From c70019f5126555754e02358758b5a24f2100db85 Mon Sep 17 00:00:00 2001 From: Kenny Kerr Date: Mon, 13 Nov 2023 10:24:57 -0600 Subject: [PATCH] Perform checked integral type conversions for APIs (#2699) --- .../impl/Foundation/Collections/MapView.rs | 2 +- .../impl/Foundation/Collections/VectorView.rs | 2 +- crates/libs/bindgen/src/rust/winrt_methods.rs | 8 +- crates/libs/bindgen/src/rust/writer.rs | 4 +- crates/libs/core/src/error.rs | 6 + crates/libs/core/src/imp/bindings.rs | 2 + crates/libs/core/src/imp/com_bindings.rs | 38 +- crates/libs/core/src/strings/bstr.rs | 2 +- crates/libs/core/src/strings/hstring.rs | 12 +- .../src/Windows/AI/MachineLearning/mod.rs | 76 +- .../ApplicationModel/Resources/Core/mod.rs | 10 +- .../libs/windows/src/Windows/Data/Json/mod.rs | 4 +- .../windows/src/Windows/Data/Xml/Dom/mod.rs | 4 +- .../Windows/Devices/Enumeration/Pnp/mod.rs | 2 +- .../src/Windows/Devices/Enumeration/mod.rs | 2 +- .../src/Windows/Devices/I2c/Provider/mod.rs | 12 +- .../windows/src/Windows/Devices/I2c/mod.rs | 12 +- .../src/Windows/Devices/Lights/Effects/mod.rs | 16 +- .../windows/src/Windows/Devices/Lights/mod.rs | 6 +- .../src/Windows/Devices/PointOfService/mod.rs | 4 +- .../windows/src/Windows/Devices/Sms/mod.rs | 6 +- .../src/Windows/Devices/Spi/Provider/mod.rs | 8 +- .../windows/src/Windows/Devices/Spi/mod.rs | 8 +- .../Windows/Foundation/Collections/impl.rs | 4 +- .../src/Windows/Foundation/Collections/mod.rs | 12 +- .../src/Windows/Foundation/Diagnostics/mod.rs | 108 +- .../windows/src/Windows/Foundation/mod.rs | 40 +- .../src/Windows/Gaming/Input/Custom/mod.rs | 16 +- .../windows/src/Windows/Gaming/Input/mod.rs | 2 +- .../Windows/Globalization/Collation/mod.rs | 2 +- .../src/Windows/Graphics/Imaging/mod.rs | 2 +- .../src/Windows/Media/Capture/Frames/mod.rs | 4 +- .../windows/src/Windows/Media/Core/mod.rs | 8 +- .../src/Windows/Media/Devices/Core/mod.rs | 12 +- .../windows/src/Windows/Media/Devices/mod.rs | 4 +- .../src/Windows/Media/MediaProperties/mod.rs | 10 +- .../windows/src/Windows/Media/Playback/mod.rs | 6 +- .../Windows/Media/Protection/PlayReady/mod.rs | 80 +- .../Networking/NetworkOperators/mod.rs | 2 +- .../Networking/ServiceDiscovery/Dnssd/mod.rs | 2 +- .../windows/src/Windows/Networking/Vpn/mod.rs | 4 +- .../src/Windows/Networking/XboxLive/mod.rs | 12 +- .../src/Windows/Perception/People/mod.rs | 8 +- .../Security/Cryptography/Certificates/mod.rs | 6 +- .../Windows/Security/Cryptography/Core/mod.rs | 2 +- .../src/Windows/Security/Cryptography/mod.rs | 2 +- .../src/Windows/Storage/AccessCache/mod.rs | 2 +- .../src/Windows/Storage/Pickers/mod.rs | 6 +- .../windows/src/Windows/Storage/Search/mod.rs | 4 +- .../src/Windows/Storage/Streams/mod.rs | 8 +- .../libs/windows/src/Windows/Storage/mod.rs | 4 +- .../Windows/System/RemoteDesktop/Input/mod.rs | 4 +- .../src/Windows/UI/Composition/Scenes/mod.rs | 8 +- .../windows/src/Windows/UI/Composition/mod.rs | 18 +- .../libs/windows/src/Windows/UI/Core/mod.rs | 2 +- .../src/Windows/UI/UIAutomation/Core/mod.rs | 4 +- .../src/Windows/Wdk/Graphics/Direct3D/mod.rs | 2 +- .../Wdk/Storage/FileSystem/Minifilters/mod.rs | 8 +- .../src/Windows/Wdk/Storage/FileSystem/mod.rs | 71 +- .../Windows/Wdk/System/OfflineRegistry/mod.rs | 4 +- .../src/Windows/Wdk/System/Registry/mod.rs | 4 +- .../Windows/Wdk/System/SystemServices/mod.rs | 62 +- .../src/Windows/Web/Http/Headers/mod.rs | 52 +- .../libs/windows/src/Windows/Web/Http/mod.rs | 2 +- .../Win32/AI/MachineLearning/DirectML/mod.rs | 18 +- .../Win32/AI/MachineLearning/WinML/mod.rs | 20 +- .../Win32/Data/RightsManagement/mod.rs | 6 +- .../src/Windows/Win32/Data/Xml/MsXml/mod.rs | 6 +- .../src/Windows/Win32/Data/Xml/XmlLite/mod.rs | 20 +- .../Win32/Devices/BiometricFramework/mod.rs | 10 +- .../Windows/Win32/Devices/Bluetooth/mod.rs | 22 +- .../Win32/Devices/Communication/mod.rs | 2 +- .../Windows/Win32/Devices/DeviceAccess/mod.rs | 6 +- .../DeviceAndDriverInstallation/mod.rs | 242 ++-- .../Windows/Win32/Devices/DeviceQuery/mod.rs | 66 +- .../src/Windows/Win32/Devices/Display/mod.rs | 18 +- .../Win32/Devices/Enumeration/Pnp/mod.rs | 10 +- .../src/Windows/Win32/Devices/Fax/mod.rs | 4 +- .../Windows/Win32/Devices/Geolocation/mod.rs | 2 +- .../Win32/Devices/HumanInterfaceDevice/mod.rs | 32 +- .../Win32/Devices/ImageAcquisition/mod.rs | 10 +- .../Win32/Devices/PortableDevices/mod.rs | 14 +- .../src/Windows/Win32/Devices/Sensors/mod.rs | 10 +- .../Win32/Devices/SerialCommunication/mod.rs | 2 +- .../src/Windows/Win32/Devices/Tapi/mod.rs | 38 +- .../src/Windows/Win32/Devices/Usb/mod.rs | 14 +- .../Win32/Devices/WebServicesOnDevices/mod.rs | 56 +- .../src/Windows/Win32/Foundation/mod.rs | 4 +- .../windows/src/Windows/Win32/Gaming/mod.rs | 8 +- .../src/Windows/Win32/Globalization/mod.rs | 158 +-- .../src/Windows/Win32/Graphics/DXCore/mod.rs | 4 +- .../Win32/Graphics/Direct2D/Common/mod.rs | 4 +- .../Windows/Win32/Graphics/Direct2D/mod.rs | 362 ++--- .../Win32/Graphics/Direct3D/Dxc/mod.rs | 26 +- .../Win32/Graphics/Direct3D/Fxc/mod.rs | 4 +- .../Windows/Win32/Graphics/Direct3D10/mod.rs | 138 +- .../Windows/Win32/Graphics/Direct3D11/mod.rs | 734 +++++----- .../Win32/Graphics/Direct3D11on12/mod.rs | 16 +- .../Windows/Win32/Graphics/Direct3D12/mod.rs | 416 +++--- .../Win32/Graphics/DirectComposition/mod.rs | 32 +- .../Win32/Graphics/DirectManipulation/mod.rs | 18 +- .../Windows/Win32/Graphics/DirectWrite/mod.rs | 344 ++--- .../src/Windows/Win32/Graphics/Dxgi/mod.rs | 24 +- .../src/Windows/Win32/Graphics/Gdi/mod.rs | 120 +- .../src/Windows/Win32/Graphics/GdiPlus/mod.rs | 8 +- .../Windows/Win32/Graphics/Imaging/D2D/mod.rs | 2 +- .../src/Windows/Win32/Graphics/Imaging/mod.rs | 216 +-- .../Windows/Win32/Graphics/Printing/mod.rs | 137 +- .../MobileDeviceManagementRegistration/mod.rs | 6 +- .../src/Windows/Win32/Media/Audio/Apo/mod.rs | 6 +- .../Win32/Media/Audio/DirectSound/mod.rs | 6 +- .../Win32/Media/Audio/Endpoints/mod.rs | 2 +- .../Windows/Win32/Media/Audio/XAudio2/mod.rs | 20 +- .../src/Windows/Win32/Media/Audio/mod.rs | 44 +- .../Windows/Win32/Media/DeviceManager/mod.rs | 152 +- .../Windows/Win32/Media/DirectShow/Tv/mod.rs | 18 +- .../src/Windows/Win32/Media/DirectShow/mod.rs | 94 +- .../Windows/Win32/Media/DxMediaObjects/mod.rs | 4 +- .../Win32/Media/MediaFoundation/mod.rs | 353 ++--- .../Windows/Win32/Media/MediaPlayer/mod.rs | 6 +- .../src/Windows/Win32/Media/Multimedia/mod.rs | 28 +- .../src/Windows/Win32/Media/Speech/mod.rs | 12 +- .../Win32/Media/WindowsMediaFormat/mod.rs | 70 +- .../Win32/NetworkManagement/Dhcp/mod.rs | 4 +- .../Win32/NetworkManagement/Dns/mod.rs | 6 +- .../Win32/NetworkManagement/IpHelper/mod.rs | 40 +- .../NetworkManagement/NetManagement/mod.rs | 36 +- .../Win32/NetworkManagement/NetShell/mod.rs | 2 +- .../NetworkDiagnosticsFramework/mod.rs | 8 +- .../Win32/NetworkManagement/P2P/mod.rs | 36 +- .../Win32/NetworkManagement/QoS/mod.rs | 4 +- .../Win32/NetworkManagement/Rras/mod.rs | 16 +- .../Win32/NetworkManagement/Snmp/mod.rs | 4 +- .../Win32/NetworkManagement/WNet/mod.rs | 40 +- .../Win32/NetworkManagement/WebDav/mod.rs | 2 +- .../Win32/NetworkManagement/WiFi/mod.rs | 18 +- .../WindowsConnectNow/mod.rs | 18 +- .../WindowsConnectionManager/mod.rs | 4 +- .../WindowsFilteringPlatform/mod.rs | 8 +- .../NetworkManagement/WindowsFirewall/mod.rs | 14 +- .../Win32/Networking/ActiveDirectory/mod.rs | 64 +- .../mod.rs | 38 +- .../Win32/Networking/Clustering/mod.rs | 34 +- .../Win32/Networking/HttpServer/mod.rs | 2 +- .../src/Windows/Win32/Networking/Ldap/mod.rs | 10 +- .../Networking/NetworkListManager/mod.rs | 6 +- .../RemoteDifferentialCompression/mod.rs | 4 +- .../Windows/Win32/Networking/WebSocket/mod.rs | 14 +- .../Windows/Win32/Networking/WinHttp/mod.rs | 14 +- .../Windows/Win32/Networking/WinInet/mod.rs | 54 +- .../Windows/Win32/Networking/WinSock/mod.rs | 78 +- .../Networking/WindowsWebServices/mod.rs | 68 +- .../Windows/Win32/Security/AppLocker/mod.rs | 2 +- .../Authentication/Identity/Provider/mod.rs | 14 +- .../Security/Authentication/Identity/mod.rs | 36 +- .../Win32/Security/Authorization/mod.rs | 24 +- .../Windows/Win32/Security/Credentials/mod.rs | 34 +- .../Security/Cryptography/Catalog/mod.rs | 2 +- .../Security/Cryptography/Certificates/mod.rs | 6 +- .../Win32/Security/Cryptography/Sip/mod.rs | 2 +- .../Win32/Security/Cryptography/mod.rs | 256 ++-- .../Win32/Security/DiagnosticDataQuery/mod.rs | 6 +- .../ExtensibleAuthenticationProtocol/mod.rs | 34 +- .../Windows/Win32/Security/Isolation/mod.rs | 4 +- .../src/Windows/Win32/Security/Tpm/mod.rs | 87 +- .../windows/src/Windows/Win32/Security/mod.rs | 16 +- .../Windows/Win32/Storage/CloudFilters/mod.rs | 4 +- .../Win32/Storage/DataDeduplication/mod.rs | 24 +- .../Win32/Storage/EnhancedStorage/mod.rs | 2 +- .../Windows/Win32/Storage/FileSystem/mod.rs | 118 +- .../src/Windows/Win32/Storage/Imapi/mod.rs | 30 +- .../Windows/Win32/Storage/IndexServer/mod.rs | 2 +- .../Storage/InstallableFileSystems/mod.rs | 2 +- .../Windows/Win32/Storage/IscsiDisc/mod.rs | 8 +- .../src/Windows/Win32/Storage/Jet/mod.rs | 56 +- .../Windows/Win32/Storage/OfflineFiles/mod.rs | 30 +- .../Win32/Storage/Packaging/Appx/mod.rs | 4 +- .../Win32/Storage/Packaging/Opc/mod.rs | 4 +- .../Win32/Storage/VirtualDiskService/mod.rs | 36 +- .../src/Windows/Win32/Storage/Vss/mod.rs | 8 +- .../Windows/Win32/Storage/Xps/Printing/mod.rs | 2 +- .../src/Windows/Win32/Storage/Xps/mod.rs | 6 +- .../Windows/Win32/System/AddressBook/mod.rs | 8 +- .../Windows/Win32/System/Antimalware/mod.rs | 4 +- .../mod.rs | 69 +- .../Windows/Win32/System/ClrHosting/mod.rs | 46 +- .../Windows/Win32/System/Com/CallObj/mod.rs | 10 +- .../Windows/Win32/System/Com/Events/mod.rs | 2 +- .../Win32/System/Com/StructuredStorage/mod.rs | 66 +- .../Windows/Win32/System/Com/Urlmon/mod.rs | 64 +- .../src/Windows/Win32/System/Com/mod.rs | 78 +- .../Win32/System/ComponentServices/mod.rs | 10 +- .../src/Windows/Win32/System/Console/mod.rs | 52 +- .../src/Windows/Win32/System/Contacts/mod.rs | 20 +- .../Windows/Win32/System/DataExchange/mod.rs | 28 +- .../Win32/System/DeploymentServices/mod.rs | 6 +- .../System/Diagnostics/ClrProfiling/mod.rs | 544 ++++---- .../Diagnostics/Debug/ActiveScript/mod.rs | 34 +- .../Diagnostics/Debug/Extensions/mod.rs | 1228 ++++++++--------- .../Win32/System/Diagnostics/Debug/mod.rs | 70 +- .../Win32/System/Diagnostics/Etw/mod.rs | 32 +- .../Diagnostics/ProcessSnapshotting/mod.rs | 2 +- .../DistributedTransactionCoordinator/mod.rs | 34 +- .../Windows/Win32/System/Environment/mod.rs | 16 +- .../Win32/System/EventCollector/mod.rs | 2 +- .../src/Windows/Win32/System/EventLog/mod.rs | 16 +- .../Windows/Win32/System/GroupPolicy/mod.rs | 39 +- .../Windows/Win32/System/Hypervisor/mod.rs | 12 +- .../src/Windows/Win32/System/IO/mod.rs | 2 +- .../src/Windows/Win32/System/Iis/mod.rs | 14 +- .../Windows/Win32/System/JobObjects/mod.rs | 2 +- .../src/Windows/Win32/System/Js/mod.rs | 6 +- .../Windows/Win32/System/LibraryLoader/mod.rs | 8 +- .../Win32/System/Memory/NonVolatile/mod.rs | 2 +- .../src/Windows/Win32/System/Memory/mod.rs | 28 +- .../src/Windows/Win32/System/Mmc/mod.rs | 6 +- .../src/Windows/Win32/System/Ole/mod.rs | 20 +- .../Win32/System/ParentalControls/mod.rs | 2 +- .../Windows/Win32/System/Performance/mod.rs | 4 +- .../src/Windows/Win32/System/Pipes/mod.rs | 6 +- .../src/Windows/Win32/System/Power/mod.rs | 14 +- .../Windows/Win32/System/ProcessStatus/mod.rs | 48 +- .../System/RealTimeCommunications/mod.rs | 18 +- .../src/Windows/Win32/System/Registry/mod.rs | 16 +- .../Windows/Win32/System/RemoteDesktop/mod.rs | 52 +- .../Win32/System/RemoteManagement/mod.rs | 4 +- .../Win32/System/RestartManager/mod.rs | 8 +- .../src/Windows/Win32/System/Rpc/mod.rs | 10 +- .../src/Windows/Win32/System/Search/mod.rs | 562 ++++---- .../src/Windows/Win32/System/Services/mod.rs | 18 +- .../SettingsManagementInfrastructure/mod.rs | 2 +- .../src/Windows/Win32/System/SideShow/mod.rs | 2 +- .../Win32/System/SystemInformation/mod.rs | 24 +- .../src/Windows/Win32/System/Threading/mod.rs | 26 +- .../Win32/System/TpmBaseServices/mod.rs | 8 +- .../src/Windows/Win32/System/Variant/mod.rs | 42 +- .../Win32/System/WinRT/Metadata/mod.rs | 74 +- .../src/Windows/Win32/System/WinRT/mod.rs | 2 +- .../Win32/System/WindowsProgramming/mod.rs | 36 +- .../Windows/Win32/System/WindowsSync/mod.rs | 4 +- .../src/Windows/Win32/System/Wmi/mod.rs | 34 +- .../src/Windows/Win32/UI/Accessibility/mod.rs | 94 +- .../src/Windows/Win32/UI/Animation/mod.rs | 40 +- .../src/Windows/Win32/UI/ColorSystem/mod.rs | 20 +- .../Windows/Win32/UI/Controls/Dialogs/mod.rs | 4 +- .../src/Windows/Win32/UI/Controls/mod.rs | 28 +- .../src/Windows/Win32/UI/Input/Ime/mod.rs | 16 +- .../Win32/UI/Input/KeyboardAndMouse/mod.rs | 14 +- .../src/Windows/Win32/UI/Input/Pointer/mod.rs | 8 +- .../src/Windows/Win32/UI/Input/Touch/mod.rs | 6 +- .../windows/src/Windows/Win32/UI/Input/mod.rs | 4 +- .../Win32/UI/InteractionContext/mod.rs | 8 +- .../LegacyWindowsEnvironmentFeatures/mod.rs | 2 +- .../src/Windows/Win32/UI/Notifications/mod.rs | 2 +- .../Win32/UI/Shell/PropertiesSystem/mod.rs | 22 +- .../windows/src/Windows/Win32/UI/Shell/mod.rs | 342 ++--- .../src/Windows/Win32/UI/TabletPC/mod.rs | 56 +- .../src/Windows/Win32/UI/TextServices/mod.rs | 158 +-- .../Win32/UI/WindowsAndMessaging/mod.rs | 82 +- .../Windows/Win32/Web/InternetExplorer/mod.rs | 20 +- crates/tests/component/src/bindings.rs | 8 +- crates/tests/component_client/src/bindings.rs | 8 +- crates/tests/standalone/src/b_calendar.rs | 4 +- crates/tests/standalone/src/b_uri.rs | 6 +- crates/tools/core/bindings.txt | 1 + 265 files changed, 5685 insertions(+), 5452 deletions(-) diff --git a/crates/libs/bindgen/src/rust/extensions/impl/Foundation/Collections/MapView.rs b/crates/libs/bindgen/src/rust/extensions/impl/Foundation/Collections/MapView.rs index 72b39f56ec..9176b5d903 100644 --- a/crates/libs/bindgen/src/rust/extensions/impl/Foundation/Collections/MapView.rs +++ b/crates/libs/bindgen/src/rust/extensions/impl/Foundation/Collections/MapView.rs @@ -44,7 +44,7 @@ where V::from_default(value) } fn Size(&self) -> ::windows_core::Result { - Ok(self.map.len() as u32) + Ok(self.map.len().try_into()?) } fn HasKey(&self, key: &K::Default) -> ::windows_core::Result { Ok(self.map.contains_key(key)) diff --git a/crates/libs/bindgen/src/rust/extensions/impl/Foundation/Collections/VectorView.rs b/crates/libs/bindgen/src/rust/extensions/impl/Foundation/Collections/VectorView.rs index cc482b70fd..561681b167 100644 --- a/crates/libs/bindgen/src/rust/extensions/impl/Foundation/Collections/VectorView.rs +++ b/crates/libs/bindgen/src/rust/extensions/impl/Foundation/Collections/VectorView.rs @@ -38,7 +38,7 @@ where T::from_default(item) } fn Size(&self) -> ::windows_core::Result { - Ok(self.values.len() as u32) + Ok(self.values.len().try_into()?) } fn IndexOf(&self, value: &T::Default, result: &mut u32) -> ::windows_core::Result { match self.values.iter().position(|element| element == value) { diff --git a/crates/libs/bindgen/src/rust/winrt_methods.rs b/crates/libs/bindgen/src/rust/winrt_methods.rs index c9ecbbc268..a43594fb7e 100644 --- a/crates/libs/bindgen/src/rust/winrt_methods.rs +++ b/crates/libs/bindgen/src/rust/winrt_methods.rs @@ -138,9 +138,9 @@ fn gen_winrt_abi_args(writer: &Writer, params: &[SignatureParam]) -> TokenStream let param = if param.def.flags().contains(ParamAttributes::In) { if param.ty.is_winrt_array() { if type_is_blittable(¶m.ty) { - quote! { #name.len() as u32, #name.as_ptr(), } + quote! { #name.len().try_into().unwrap(), #name.as_ptr(), } } else { - quote! { #name.len() as u32, ::core::mem::transmute(#name.as_ptr()), } + quote! { #name.len().try_into().unwrap(), ::core::mem::transmute(#name.as_ptr()), } } } else if type_is_non_exclusive_winrt_interface(¶m.ty) { quote! { #name.try_into_param()?.abi(), } @@ -157,9 +157,9 @@ fn gen_winrt_abi_args(writer: &Writer, params: &[SignatureParam]) -> TokenStream } } else if param.ty.is_winrt_array() { if type_is_blittable(¶m.ty) { - quote! { #name.len() as u32, #name.as_mut_ptr(), } + quote! { #name.len().try_into().unwrap(), #name.as_mut_ptr(), } } else { - quote! { #name.len() as u32, ::core::mem::transmute_copy(&#name), } + quote! { #name.len().try_into().unwrap(), ::core::mem::transmute_copy(&#name), } } } else if param.ty.is_winrt_array_ref() { quote! { #name.set_abi_len(), #name as *mut _ as _, } diff --git a/crates/libs/bindgen/src/rust/writer.rs b/crates/libs/bindgen/src/rust/writer.rs index 3d18b48823..175519cd84 100644 --- a/crates/libs/bindgen/src/rust/writer.rs +++ b/crates/libs/bindgen/src/rust/writer.rs @@ -920,9 +920,9 @@ impl Writer { let name = self.param_name(params[relative].def); let flags = params[relative].def.flags(); if flags.contains(ParamAttributes::Optional) { - quote! { #name.as_deref().map_or(0, |slice|slice.len() as _), } + quote! { #name.as_deref().map_or(0, |slice|slice.len().try_into().unwrap()), } } else { - quote! { #name.len() as _, } + quote! { #name.len().try_into().unwrap(), } } } SignatureParamKind::TryInto => { diff --git a/crates/libs/core/src/error.rs b/crates/libs/core/src/error.rs index 6a4e458dd5..b851a21311 100644 --- a/crates/libs/core/src/error.rs +++ b/crates/libs/core/src/error.rs @@ -90,6 +90,12 @@ impl std::convert::From for Error { } } +impl std::convert::From for Error { + fn from(_: std::num::TryFromIntError) -> Self { + Self { code: HRESULT(crate::imp::E_INVALIDARG), info: None } + } +} + // Unfortunately this is needed to make types line up. The Rust type system does // not know the `Infallible` can never be constructed. This code needs to be here // to satesify the type checker but it will never be run. Once `!` is stabilizied diff --git a/crates/libs/core/src/imp/bindings.rs b/crates/libs/core/src/imp/bindings.rs index 1f5b31329e..840d673648 100644 --- a/crates/libs/core/src/imp/bindings.rs +++ b/crates/libs/core/src/imp/bindings.rs @@ -22,6 +22,7 @@ pub type BOOL = i32; pub type BSTR = *const u16; pub const ERROR_NO_UNICODE_TRANSLATION: WIN32_ERROR = 1113u32; +pub const E_INVALIDARG: HRESULT = -2147024809i32; pub type FARPROC = ::core::option::Option isize>; pub const FORMAT_MESSAGE_ALLOCATE_BUFFER: FORMAT_MESSAGE_OPTIONS = 256u32; pub const FORMAT_MESSAGE_FROM_SYSTEM: FORMAT_MESSAGE_OPTIONS = 4096u32; @@ -30,6 +31,7 @@ pub type FORMAT_MESSAGE_OPTIONS = u32; pub type HANDLE = isize; pub type HEAP_FLAGS = u32; pub type HMODULE = isize; +pub type HRESULT = i32; pub type LOAD_LIBRARY_FLAGS = u32; pub const LOAD_LIBRARY_SEARCH_DEFAULT_DIRS: LOAD_LIBRARY_FLAGS = 4096u32; pub type PCSTR = *const u8; diff --git a/crates/libs/core/src/imp/com_bindings.rs b/crates/libs/core/src/imp/com_bindings.rs index 4707b1d4ee..5a4c2bd15d 100644 --- a/crates/libs/core/src/imp/com_bindings.rs +++ b/crates/libs/core/src/imp/com_bindings.rs @@ -1147,115 +1147,115 @@ impl PropertyValue { pub fn CreateUInt8Array(value: &[u8]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateUInt8Array)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateUInt8Array)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } pub fn CreateInt16Array(value: &[i16]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateInt16Array)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateInt16Array)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } pub fn CreateUInt16Array(value: &[u16]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateUInt16Array)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateUInt16Array)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } pub fn CreateInt32Array(value: &[i32]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateInt32Array)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateInt32Array)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } pub fn CreateUInt32Array(value: &[u32]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateUInt32Array)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateUInt32Array)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } pub fn CreateInt64Array(value: &[i64]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateInt64Array)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateInt64Array)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } pub fn CreateUInt64Array(value: &[u64]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateUInt64Array)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateUInt64Array)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } pub fn CreateSingleArray(value: &[f32]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateSingleArray)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateSingleArray)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } pub fn CreateDoubleArray(value: &[f64]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateDoubleArray)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateDoubleArray)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } pub fn CreateChar16Array(value: &[u16]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateChar16Array)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateChar16Array)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } pub fn CreateBooleanArray(value: &[bool]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateBooleanArray)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateBooleanArray)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } pub fn CreateStringArray(value: &[::windows_core::HSTRING]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateStringArray)(::windows_core::Interface::as_raw(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateStringArray)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi(result__) }) } pub fn CreateInspectableArray(value: &[::core::option::Option<::windows_core::IInspectable>]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateInspectableArray)(::windows_core::Interface::as_raw(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateInspectableArray)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi(result__) }) } pub fn CreateGuidArray(value: &[::windows_core::GUID]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateGuidArray)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateGuidArray)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } pub fn CreateDateTimeArray(value: &[DateTime]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateDateTimeArray)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateDateTimeArray)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } pub fn CreateTimeSpanArray(value: &[TimeSpan]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateTimeSpanArray)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateTimeSpanArray)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } pub fn CreatePointArray(value: &[Point]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreatePointArray)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreatePointArray)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } pub fn CreateSizeArray(value: &[Size]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateSizeArray)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateSizeArray)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } pub fn CreateRectArray(value: &[Rect]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateRectArray)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateRectArray)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } #[doc(hidden)] diff --git a/crates/libs/core/src/strings/bstr.rs b/crates/libs/core/src/strings/bstr.rs index 63f751c3c3..5003117f92 100644 --- a/crates/libs/core/src/strings/bstr.rs +++ b/crates/libs/core/src/strings/bstr.rs @@ -42,7 +42,7 @@ impl BSTR { return Ok(Self::new()); } - let result = unsafe { Self(crate::imp::SysAllocStringLen(value.as_ptr(), value.len() as u32)) }; + let result = unsafe { Self(crate::imp::SysAllocStringLen(value.as_ptr(), value.len().try_into()?)) }; if result.is_empty() { Err(crate::imp::E_OUTOFMEMORY.into()) diff --git a/crates/libs/core/src/strings/hstring.rs b/crates/libs/core/src/strings/hstring.rs index 014da49d92..a0a7f59fab 100644 --- a/crates/libs/core/src/strings/hstring.rs +++ b/crates/libs/core/src/strings/hstring.rs @@ -45,7 +45,7 @@ impl HSTRING { /// Create a `HSTRING` from a slice of 16 bit characters (wchars). pub fn from_wide(value: &[u16]) -> Result { - unsafe { Self::from_wide_iter(value.iter().copied(), value.len() as u32) } + unsafe { Self::from_wide_iter(value.iter().copied(), value.len()) } } /// Get the contents of this `HSTRING` as a String lossily. @@ -61,17 +61,17 @@ impl HSTRING { /// # Safety /// len must not be less than the number of items in the iterator. - unsafe fn from_wide_iter>(iter: I, len: u32) -> Result { + unsafe fn from_wide_iter>(iter: I, len: usize) -> Result { if len == 0 { return Ok(Self::new()); } - let ptr = Header::alloc(len)?; + let ptr = Header::alloc(len.try_into()?)?; // Place each utf-16 character into the buffer and // increase len as we go along. for (index, wide) in iter.enumerate() { - debug_assert!((index as u32) < len); + debug_assert!(index < len); std::ptr::write((*ptr).data.add(index), wide); (*ptr).len = index as u32 + 1; @@ -151,7 +151,7 @@ impl std::fmt::Debug for HSTRING { impl std::convert::From<&str> for HSTRING { fn from(value: &str) -> Self { - unsafe { Self::from_wide_iter(value.encode_utf16(), value.len() as u32).unwrap() } + unsafe { Self::from_wide_iter(value.encode_utf16(), value.len()).unwrap() } } } @@ -177,7 +177,7 @@ impl std::convert::From<&std::path::Path> for HSTRING { #[cfg(windows)] impl std::convert::From<&std::ffi::OsStr> for HSTRING { fn from(value: &std::ffi::OsStr) -> Self { - unsafe { Self::from_wide_iter(std::os::windows::ffi::OsStrExt::encode_wide(value), value.len() as u32).unwrap() } + unsafe { Self::from_wide_iter(std::os::windows::ffi::OsStrExt::encode_wide(value), value.len()).unwrap() } } } diff --git a/crates/libs/windows/src/Windows/AI/MachineLearning/mod.rs b/crates/libs/windows/src/Windows/AI/MachineLearning/mod.rs index 235bb0a4b9..7f9a302ff0 100644 --- a/crates/libs/windows/src/Windows/AI/MachineLearning/mod.rs +++ b/crates/libs/windows/src/Windows/AI/MachineLearning/mod.rs @@ -2389,7 +2389,7 @@ impl TensorBoolean { { Self::ITensorBooleanStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromArray)(::windows_core::Interface::as_raw(this), shape.try_into_param()?.abi(), data.len() as u32, data.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromArray)(::windows_core::Interface::as_raw(this), shape.try_into_param()?.abi(), data.len().try_into().unwrap(), data.as_ptr(), &mut result__).from_abi(result__) }) } #[doc = "Required features: `\"Foundation_Collections\"`"] @@ -2407,7 +2407,7 @@ impl TensorBoolean { pub fn CreateFromShapeArrayAndDataArray(shape: &[i64], data: &[bool]) -> ::windows_core::Result { Self::ITensorBooleanStatics2(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::windows_core::Interface::as_raw(this), shape.len() as u32, shape.as_ptr(), data.len() as u32, data.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::windows_core::Interface::as_raw(this), shape.len().try_into().unwrap(), shape.as_ptr(), data.len().try_into().unwrap(), data.as_ptr(), &mut result__).from_abi(result__) }) } #[doc = "Required features: `\"Storage_Streams\"`"] @@ -2418,7 +2418,7 @@ impl TensorBoolean { { Self::ITensorBooleanStatics2(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromBuffer)(::windows_core::Interface::as_raw(this), shape.len() as u32, shape.as_ptr(), buffer.try_into_param()?.abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromBuffer)(::windows_core::Interface::as_raw(this), shape.len().try_into().unwrap(), shape.as_ptr(), buffer.try_into_param()?.abi(), &mut result__).from_abi(result__) }) } #[doc(hidden)] @@ -2529,7 +2529,7 @@ impl TensorDouble { { Self::ITensorDoubleStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromArray)(::windows_core::Interface::as_raw(this), shape.try_into_param()?.abi(), data.len() as u32, data.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromArray)(::windows_core::Interface::as_raw(this), shape.try_into_param()?.abi(), data.len().try_into().unwrap(), data.as_ptr(), &mut result__).from_abi(result__) }) } #[doc = "Required features: `\"Foundation_Collections\"`"] @@ -2547,7 +2547,7 @@ impl TensorDouble { pub fn CreateFromShapeArrayAndDataArray(shape: &[i64], data: &[f64]) -> ::windows_core::Result { Self::ITensorDoubleStatics2(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::windows_core::Interface::as_raw(this), shape.len() as u32, shape.as_ptr(), data.len() as u32, data.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::windows_core::Interface::as_raw(this), shape.len().try_into().unwrap(), shape.as_ptr(), data.len().try_into().unwrap(), data.as_ptr(), &mut result__).from_abi(result__) }) } #[doc = "Required features: `\"Storage_Streams\"`"] @@ -2558,7 +2558,7 @@ impl TensorDouble { { Self::ITensorDoubleStatics2(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromBuffer)(::windows_core::Interface::as_raw(this), shape.len() as u32, shape.as_ptr(), buffer.try_into_param()?.abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromBuffer)(::windows_core::Interface::as_raw(this), shape.len().try_into().unwrap(), shape.as_ptr(), buffer.try_into_param()?.abi(), &mut result__).from_abi(result__) }) } #[doc(hidden)] @@ -2734,7 +2734,7 @@ impl TensorFloat { { Self::ITensorFloatStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromArray)(::windows_core::Interface::as_raw(this), shape.try_into_param()?.abi(), data.len() as u32, data.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromArray)(::windows_core::Interface::as_raw(this), shape.try_into_param()?.abi(), data.len().try_into().unwrap(), data.as_ptr(), &mut result__).from_abi(result__) }) } #[doc = "Required features: `\"Foundation_Collections\"`"] @@ -2752,7 +2752,7 @@ impl TensorFloat { pub fn CreateFromShapeArrayAndDataArray(shape: &[i64], data: &[f32]) -> ::windows_core::Result { Self::ITensorFloatStatics2(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::windows_core::Interface::as_raw(this), shape.len() as u32, shape.as_ptr(), data.len() as u32, data.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::windows_core::Interface::as_raw(this), shape.len().try_into().unwrap(), shape.as_ptr(), data.len().try_into().unwrap(), data.as_ptr(), &mut result__).from_abi(result__) }) } #[doc = "Required features: `\"Storage_Streams\"`"] @@ -2763,7 +2763,7 @@ impl TensorFloat { { Self::ITensorFloatStatics2(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromBuffer)(::windows_core::Interface::as_raw(this), shape.len() as u32, shape.as_ptr(), buffer.try_into_param()?.abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromBuffer)(::windows_core::Interface::as_raw(this), shape.len().try_into().unwrap(), shape.as_ptr(), buffer.try_into_param()?.abi(), &mut result__).from_abi(result__) }) } #[doc(hidden)] @@ -2874,7 +2874,7 @@ impl TensorFloat16Bit { { Self::ITensorFloat16BitStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromArray)(::windows_core::Interface::as_raw(this), shape.try_into_param()?.abi(), data.len() as u32, data.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromArray)(::windows_core::Interface::as_raw(this), shape.try_into_param()?.abi(), data.len().try_into().unwrap(), data.as_ptr(), &mut result__).from_abi(result__) }) } #[doc = "Required features: `\"Foundation_Collections\"`"] @@ -2892,7 +2892,7 @@ impl TensorFloat16Bit { pub fn CreateFromShapeArrayAndDataArray(shape: &[i64], data: &[f32]) -> ::windows_core::Result { Self::ITensorFloat16BitStatics2(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::windows_core::Interface::as_raw(this), shape.len() as u32, shape.as_ptr(), data.len() as u32, data.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::windows_core::Interface::as_raw(this), shape.len().try_into().unwrap(), shape.as_ptr(), data.len().try_into().unwrap(), data.as_ptr(), &mut result__).from_abi(result__) }) } #[doc = "Required features: `\"Storage_Streams\"`"] @@ -2903,7 +2903,7 @@ impl TensorFloat16Bit { { Self::ITensorFloat16BitStatics2(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromBuffer)(::windows_core::Interface::as_raw(this), shape.len() as u32, shape.as_ptr(), buffer.try_into_param()?.abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromBuffer)(::windows_core::Interface::as_raw(this), shape.len().try_into().unwrap(), shape.as_ptr(), buffer.try_into_param()?.abi(), &mut result__).from_abi(result__) }) } #[doc(hidden)] @@ -3014,7 +3014,7 @@ impl TensorInt16Bit { { Self::ITensorInt16BitStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromArray)(::windows_core::Interface::as_raw(this), shape.try_into_param()?.abi(), data.len() as u32, data.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromArray)(::windows_core::Interface::as_raw(this), shape.try_into_param()?.abi(), data.len().try_into().unwrap(), data.as_ptr(), &mut result__).from_abi(result__) }) } #[doc = "Required features: `\"Foundation_Collections\"`"] @@ -3032,7 +3032,7 @@ impl TensorInt16Bit { pub fn CreateFromShapeArrayAndDataArray(shape: &[i64], data: &[i16]) -> ::windows_core::Result { Self::ITensorInt16BitStatics2(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::windows_core::Interface::as_raw(this), shape.len() as u32, shape.as_ptr(), data.len() as u32, data.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::windows_core::Interface::as_raw(this), shape.len().try_into().unwrap(), shape.as_ptr(), data.len().try_into().unwrap(), data.as_ptr(), &mut result__).from_abi(result__) }) } #[doc = "Required features: `\"Storage_Streams\"`"] @@ -3043,7 +3043,7 @@ impl TensorInt16Bit { { Self::ITensorInt16BitStatics2(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromBuffer)(::windows_core::Interface::as_raw(this), shape.len() as u32, shape.as_ptr(), buffer.try_into_param()?.abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromBuffer)(::windows_core::Interface::as_raw(this), shape.len().try_into().unwrap(), shape.as_ptr(), buffer.try_into_param()?.abi(), &mut result__).from_abi(result__) }) } #[doc(hidden)] @@ -3154,7 +3154,7 @@ impl TensorInt32Bit { { Self::ITensorInt32BitStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromArray)(::windows_core::Interface::as_raw(this), shape.try_into_param()?.abi(), data.len() as u32, data.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromArray)(::windows_core::Interface::as_raw(this), shape.try_into_param()?.abi(), data.len().try_into().unwrap(), data.as_ptr(), &mut result__).from_abi(result__) }) } #[doc = "Required features: `\"Foundation_Collections\"`"] @@ -3172,7 +3172,7 @@ impl TensorInt32Bit { pub fn CreateFromShapeArrayAndDataArray(shape: &[i64], data: &[i32]) -> ::windows_core::Result { Self::ITensorInt32BitStatics2(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::windows_core::Interface::as_raw(this), shape.len() as u32, shape.as_ptr(), data.len() as u32, data.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::windows_core::Interface::as_raw(this), shape.len().try_into().unwrap(), shape.as_ptr(), data.len().try_into().unwrap(), data.as_ptr(), &mut result__).from_abi(result__) }) } #[doc = "Required features: `\"Storage_Streams\"`"] @@ -3183,7 +3183,7 @@ impl TensorInt32Bit { { Self::ITensorInt32BitStatics2(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromBuffer)(::windows_core::Interface::as_raw(this), shape.len() as u32, shape.as_ptr(), buffer.try_into_param()?.abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromBuffer)(::windows_core::Interface::as_raw(this), shape.len().try_into().unwrap(), shape.as_ptr(), buffer.try_into_param()?.abi(), &mut result__).from_abi(result__) }) } #[doc(hidden)] @@ -3294,7 +3294,7 @@ impl TensorInt64Bit { { Self::ITensorInt64BitStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromArray)(::windows_core::Interface::as_raw(this), shape.try_into_param()?.abi(), data.len() as u32, data.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromArray)(::windows_core::Interface::as_raw(this), shape.try_into_param()?.abi(), data.len().try_into().unwrap(), data.as_ptr(), &mut result__).from_abi(result__) }) } #[doc = "Required features: `\"Foundation_Collections\"`"] @@ -3312,7 +3312,7 @@ impl TensorInt64Bit { pub fn CreateFromShapeArrayAndDataArray(shape: &[i64], data: &[i64]) -> ::windows_core::Result { Self::ITensorInt64BitStatics2(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::windows_core::Interface::as_raw(this), shape.len() as u32, shape.as_ptr(), data.len() as u32, data.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::windows_core::Interface::as_raw(this), shape.len().try_into().unwrap(), shape.as_ptr(), data.len().try_into().unwrap(), data.as_ptr(), &mut result__).from_abi(result__) }) } #[doc = "Required features: `\"Storage_Streams\"`"] @@ -3323,7 +3323,7 @@ impl TensorInt64Bit { { Self::ITensorInt64BitStatics2(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromBuffer)(::windows_core::Interface::as_raw(this), shape.len() as u32, shape.as_ptr(), buffer.try_into_param()?.abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromBuffer)(::windows_core::Interface::as_raw(this), shape.len().try_into().unwrap(), shape.as_ptr(), buffer.try_into_param()?.abi(), &mut result__).from_abi(result__) }) } #[doc(hidden)] @@ -3434,7 +3434,7 @@ impl TensorInt8Bit { { Self::ITensorInt8BitStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromArray)(::windows_core::Interface::as_raw(this), shape.try_into_param()?.abi(), data.len() as u32, data.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromArray)(::windows_core::Interface::as_raw(this), shape.try_into_param()?.abi(), data.len().try_into().unwrap(), data.as_ptr(), &mut result__).from_abi(result__) }) } #[doc = "Required features: `\"Foundation_Collections\"`"] @@ -3452,7 +3452,7 @@ impl TensorInt8Bit { pub fn CreateFromShapeArrayAndDataArray(shape: &[i64], data: &[u8]) -> ::windows_core::Result { Self::ITensorInt8BitStatics2(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::windows_core::Interface::as_raw(this), shape.len() as u32, shape.as_ptr(), data.len() as u32, data.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::windows_core::Interface::as_raw(this), shape.len().try_into().unwrap(), shape.as_ptr(), data.len().try_into().unwrap(), data.as_ptr(), &mut result__).from_abi(result__) }) } #[doc = "Required features: `\"Storage_Streams\"`"] @@ -3463,7 +3463,7 @@ impl TensorInt8Bit { { Self::ITensorInt8BitStatics2(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromBuffer)(::windows_core::Interface::as_raw(this), shape.len() as u32, shape.as_ptr(), buffer.try_into_param()?.abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromBuffer)(::windows_core::Interface::as_raw(this), shape.len().try_into().unwrap(), shape.as_ptr(), buffer.try_into_param()?.abi(), &mut result__).from_abi(result__) }) } #[doc(hidden)] @@ -3574,7 +3574,7 @@ impl TensorString { { Self::ITensorStringStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromArray)(::windows_core::Interface::as_raw(this), shape.try_into_param()?.abi(), data.len() as u32, ::core::mem::transmute(data.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromArray)(::windows_core::Interface::as_raw(this), shape.try_into_param()?.abi(), data.len().try_into().unwrap(), ::core::mem::transmute(data.as_ptr()), &mut result__).from_abi(result__) }) } #[doc = "Required features: `\"Foundation_Collections\"`"] @@ -3592,7 +3592,7 @@ impl TensorString { pub fn CreateFromShapeArrayAndDataArray(shape: &[i64], data: &[::windows_core::HSTRING]) -> ::windows_core::Result { Self::ITensorStringStatics2(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::windows_core::Interface::as_raw(this), shape.len() as u32, shape.as_ptr(), data.len() as u32, ::core::mem::transmute(data.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::windows_core::Interface::as_raw(this), shape.len().try_into().unwrap(), shape.as_ptr(), data.len().try_into().unwrap(), ::core::mem::transmute(data.as_ptr()), &mut result__).from_abi(result__) }) } #[doc(hidden)] @@ -3703,7 +3703,7 @@ impl TensorUInt16Bit { { Self::ITensorUInt16BitStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromArray)(::windows_core::Interface::as_raw(this), shape.try_into_param()?.abi(), data.len() as u32, data.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromArray)(::windows_core::Interface::as_raw(this), shape.try_into_param()?.abi(), data.len().try_into().unwrap(), data.as_ptr(), &mut result__).from_abi(result__) }) } #[doc = "Required features: `\"Foundation_Collections\"`"] @@ -3721,7 +3721,7 @@ impl TensorUInt16Bit { pub fn CreateFromShapeArrayAndDataArray(shape: &[i64], data: &[u16]) -> ::windows_core::Result { Self::ITensorUInt16BitStatics2(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::windows_core::Interface::as_raw(this), shape.len() as u32, shape.as_ptr(), data.len() as u32, data.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::windows_core::Interface::as_raw(this), shape.len().try_into().unwrap(), shape.as_ptr(), data.len().try_into().unwrap(), data.as_ptr(), &mut result__).from_abi(result__) }) } #[doc = "Required features: `\"Storage_Streams\"`"] @@ -3732,7 +3732,7 @@ impl TensorUInt16Bit { { Self::ITensorUInt16BitStatics2(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromBuffer)(::windows_core::Interface::as_raw(this), shape.len() as u32, shape.as_ptr(), buffer.try_into_param()?.abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromBuffer)(::windows_core::Interface::as_raw(this), shape.len().try_into().unwrap(), shape.as_ptr(), buffer.try_into_param()?.abi(), &mut result__).from_abi(result__) }) } #[doc(hidden)] @@ -3843,7 +3843,7 @@ impl TensorUInt32Bit { { Self::ITensorUInt32BitStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromArray)(::windows_core::Interface::as_raw(this), shape.try_into_param()?.abi(), data.len() as u32, data.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromArray)(::windows_core::Interface::as_raw(this), shape.try_into_param()?.abi(), data.len().try_into().unwrap(), data.as_ptr(), &mut result__).from_abi(result__) }) } #[doc = "Required features: `\"Foundation_Collections\"`"] @@ -3861,7 +3861,7 @@ impl TensorUInt32Bit { pub fn CreateFromShapeArrayAndDataArray(shape: &[i64], data: &[u32]) -> ::windows_core::Result { Self::ITensorUInt32BitStatics2(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::windows_core::Interface::as_raw(this), shape.len() as u32, shape.as_ptr(), data.len() as u32, data.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::windows_core::Interface::as_raw(this), shape.len().try_into().unwrap(), shape.as_ptr(), data.len().try_into().unwrap(), data.as_ptr(), &mut result__).from_abi(result__) }) } #[doc = "Required features: `\"Storage_Streams\"`"] @@ -3872,7 +3872,7 @@ impl TensorUInt32Bit { { Self::ITensorUInt32BitStatics2(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromBuffer)(::windows_core::Interface::as_raw(this), shape.len() as u32, shape.as_ptr(), buffer.try_into_param()?.abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromBuffer)(::windows_core::Interface::as_raw(this), shape.len().try_into().unwrap(), shape.as_ptr(), buffer.try_into_param()?.abi(), &mut result__).from_abi(result__) }) } #[doc(hidden)] @@ -3983,7 +3983,7 @@ impl TensorUInt64Bit { { Self::ITensorUInt64BitStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromArray)(::windows_core::Interface::as_raw(this), shape.try_into_param()?.abi(), data.len() as u32, data.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromArray)(::windows_core::Interface::as_raw(this), shape.try_into_param()?.abi(), data.len().try_into().unwrap(), data.as_ptr(), &mut result__).from_abi(result__) }) } #[doc = "Required features: `\"Foundation_Collections\"`"] @@ -4001,7 +4001,7 @@ impl TensorUInt64Bit { pub fn CreateFromShapeArrayAndDataArray(shape: &[i64], data: &[u64]) -> ::windows_core::Result { Self::ITensorUInt64BitStatics2(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::windows_core::Interface::as_raw(this), shape.len() as u32, shape.as_ptr(), data.len() as u32, data.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::windows_core::Interface::as_raw(this), shape.len().try_into().unwrap(), shape.as_ptr(), data.len().try_into().unwrap(), data.as_ptr(), &mut result__).from_abi(result__) }) } #[doc = "Required features: `\"Storage_Streams\"`"] @@ -4012,7 +4012,7 @@ impl TensorUInt64Bit { { Self::ITensorUInt64BitStatics2(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromBuffer)(::windows_core::Interface::as_raw(this), shape.len() as u32, shape.as_ptr(), buffer.try_into_param()?.abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromBuffer)(::windows_core::Interface::as_raw(this), shape.len().try_into().unwrap(), shape.as_ptr(), buffer.try_into_param()?.abi(), &mut result__).from_abi(result__) }) } #[doc(hidden)] @@ -4123,7 +4123,7 @@ impl TensorUInt8Bit { { Self::ITensorUInt8BitStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromArray)(::windows_core::Interface::as_raw(this), shape.try_into_param()?.abi(), data.len() as u32, data.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromArray)(::windows_core::Interface::as_raw(this), shape.try_into_param()?.abi(), data.len().try_into().unwrap(), data.as_ptr(), &mut result__).from_abi(result__) }) } #[doc = "Required features: `\"Foundation_Collections\"`"] @@ -4141,7 +4141,7 @@ impl TensorUInt8Bit { pub fn CreateFromShapeArrayAndDataArray(shape: &[i64], data: &[u8]) -> ::windows_core::Result { Self::ITensorUInt8BitStatics2(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::windows_core::Interface::as_raw(this), shape.len() as u32, shape.as_ptr(), data.len() as u32, data.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::windows_core::Interface::as_raw(this), shape.len().try_into().unwrap(), shape.as_ptr(), data.len().try_into().unwrap(), data.as_ptr(), &mut result__).from_abi(result__) }) } #[doc = "Required features: `\"Storage_Streams\"`"] @@ -4152,7 +4152,7 @@ impl TensorUInt8Bit { { Self::ITensorUInt8BitStatics2(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromBuffer)(::windows_core::Interface::as_raw(this), shape.len() as u32, shape.as_ptr(), buffer.try_into_param()?.abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromBuffer)(::windows_core::Interface::as_raw(this), shape.len().try_into().unwrap(), shape.as_ptr(), buffer.try_into_param()?.abi(), &mut result__).from_abi(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Resources/Core/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Resources/Core/mod.rs index 044d18769b..df0c602a7f 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Resources/Core/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Resources/Core/mod.rs @@ -536,7 +536,7 @@ impl ResourceCandidateVectorView { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } } @@ -785,7 +785,7 @@ impl ResourceContextLanguagesVectorView { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } } @@ -1082,7 +1082,7 @@ impl ResourceMapIterator { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } } @@ -1242,7 +1242,7 @@ impl ResourceMapMapViewIterator { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } } @@ -1605,7 +1605,7 @@ impl ResourceQualifierVectorView { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } } diff --git a/crates/libs/windows/src/Windows/Data/Json/mod.rs b/crates/libs/windows/src/Windows/Data/Json/mod.rs index e3a398ccac..6f55e91762 100644 --- a/crates/libs/windows/src/Windows/Data/Json/mod.rs +++ b/crates/libs/windows/src/Windows/Data/Json/mod.rs @@ -438,14 +438,14 @@ impl JsonArray { let this = &::windows_core::ComInterface::cast::>(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"Foundation_Collections\"`"] #[cfg(feature = "Foundation_Collections")] pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows_core::Result<()> { let this = &::windows_core::ComInterface::cast::>(self)?; - unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } + unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len().try_into().unwrap(), ::core::mem::transmute(items.as_ptr())).ok() } } #[doc(hidden)] pub fn IJsonArrayStatics ::windows_core::Result>(callback: F) -> ::windows_core::Result { diff --git a/crates/libs/windows/src/Windows/Data/Xml/Dom/mod.rs b/crates/libs/windows/src/Windows/Data/Xml/Dom/mod.rs index a8b8f8056d..930e9f0560 100644 --- a/crates/libs/windows/src/Windows/Data/Xml/Dom/mod.rs +++ b/crates/libs/windows/src/Windows/Data/Xml/Dom/mod.rs @@ -4457,7 +4457,7 @@ impl XmlNamedNodeMap { let this = &::windows_core::ComInterface::cast::>(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } pub fn Length(&self) -> ::windows_core::Result { @@ -4613,7 +4613,7 @@ impl XmlNodeList { let this = &::windows_core::ComInterface::cast::>(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } pub fn Length(&self) -> ::windows_core::Result { diff --git a/crates/libs/windows/src/Windows/Devices/Enumeration/Pnp/mod.rs b/crates/libs/windows/src/Windows/Devices/Enumeration/Pnp/mod.rs index cb71b68cf7..d4fabc69cc 100644 --- a/crates/libs/windows/src/Windows/Devices/Enumeration/Pnp/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Enumeration/Pnp/mod.rs @@ -296,7 +296,7 @@ impl PnpObjectCollection { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } } diff --git a/crates/libs/windows/src/Windows/Devices/Enumeration/mod.rs b/crates/libs/windows/src/Windows/Devices/Enumeration/mod.rs index 4f164035f8..bfbf19184f 100644 --- a/crates/libs/windows/src/Windows/Devices/Enumeration/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Enumeration/mod.rs @@ -1237,7 +1237,7 @@ impl DeviceInformationCollection { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } } diff --git a/crates/libs/windows/src/Windows/Devices/I2c/Provider/mod.rs b/crates/libs/windows/src/Windows/Devices/I2c/Provider/mod.rs index 9081528d02..ae9d0e6e0d 100644 --- a/crates/libs/windows/src/Windows/Devices/I2c/Provider/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/I2c/Provider/mod.rs @@ -42,35 +42,35 @@ impl II2cDeviceProvider { } pub fn Write(&self, buffer: &[u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).Write)(::windows_core::Interface::as_raw(this), buffer.len() as u32, buffer.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).Write)(::windows_core::Interface::as_raw(this), buffer.len().try_into().unwrap(), buffer.as_ptr()).ok() } } pub fn WritePartial(&self, buffer: &[u8]) -> ::windows_core::Result { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).WritePartial)(::windows_core::Interface::as_raw(this), buffer.len() as u32, buffer.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).WritePartial)(::windows_core::Interface::as_raw(this), buffer.len().try_into().unwrap(), buffer.as_ptr(), &mut result__).from_abi(result__) } } pub fn Read(&self, buffer: &mut [u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).Read)(::windows_core::Interface::as_raw(this), buffer.len() as u32, buffer.as_mut_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).Read)(::windows_core::Interface::as_raw(this), buffer.len().try_into().unwrap(), buffer.as_mut_ptr()).ok() } } pub fn ReadPartial(&self, buffer: &mut [u8]) -> ::windows_core::Result { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).ReadPartial)(::windows_core::Interface::as_raw(this), buffer.len() as u32, buffer.as_mut_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).ReadPartial)(::windows_core::Interface::as_raw(this), buffer.len().try_into().unwrap(), buffer.as_mut_ptr(), &mut result__).from_abi(result__) } } pub fn WriteRead(&self, writebuffer: &[u8], readbuffer: &mut [u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).WriteRead)(::windows_core::Interface::as_raw(this), writebuffer.len() as u32, writebuffer.as_ptr(), readbuffer.len() as u32, readbuffer.as_mut_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).WriteRead)(::windows_core::Interface::as_raw(this), writebuffer.len().try_into().unwrap(), writebuffer.as_ptr(), readbuffer.len().try_into().unwrap(), readbuffer.as_mut_ptr()).ok() } } pub fn WriteReadPartial(&self, writebuffer: &[u8], readbuffer: &mut [u8]) -> ::windows_core::Result { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).WriteReadPartial)(::windows_core::Interface::as_raw(this), writebuffer.len() as u32, writebuffer.as_ptr(), readbuffer.len() as u32, readbuffer.as_mut_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).WriteReadPartial)(::windows_core::Interface::as_raw(this), writebuffer.len().try_into().unwrap(), writebuffer.as_ptr(), readbuffer.len().try_into().unwrap(), readbuffer.as_mut_ptr(), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"Foundation\"`"] diff --git a/crates/libs/windows/src/Windows/Devices/I2c/mod.rs b/crates/libs/windows/src/Windows/Devices/I2c/mod.rs index 7f1fd2355a..827338fb45 100644 --- a/crates/libs/windows/src/Windows/Devices/I2c/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/I2c/mod.rs @@ -296,35 +296,35 @@ impl I2cDevice { } pub fn Write(&self, buffer: &[u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).Write)(::windows_core::Interface::as_raw(this), buffer.len() as u32, buffer.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).Write)(::windows_core::Interface::as_raw(this), buffer.len().try_into().unwrap(), buffer.as_ptr()).ok() } } pub fn WritePartial(&self, buffer: &[u8]) -> ::windows_core::Result { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).WritePartial)(::windows_core::Interface::as_raw(this), buffer.len() as u32, buffer.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).WritePartial)(::windows_core::Interface::as_raw(this), buffer.len().try_into().unwrap(), buffer.as_ptr(), &mut result__).from_abi(result__) } } pub fn Read(&self, buffer: &mut [u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).Read)(::windows_core::Interface::as_raw(this), buffer.len() as u32, buffer.as_mut_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).Read)(::windows_core::Interface::as_raw(this), buffer.len().try_into().unwrap(), buffer.as_mut_ptr()).ok() } } pub fn ReadPartial(&self, buffer: &mut [u8]) -> ::windows_core::Result { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).ReadPartial)(::windows_core::Interface::as_raw(this), buffer.len() as u32, buffer.as_mut_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).ReadPartial)(::windows_core::Interface::as_raw(this), buffer.len().try_into().unwrap(), buffer.as_mut_ptr(), &mut result__).from_abi(result__) } } pub fn WriteRead(&self, writebuffer: &[u8], readbuffer: &mut [u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).WriteRead)(::windows_core::Interface::as_raw(this), writebuffer.len() as u32, writebuffer.as_ptr(), readbuffer.len() as u32, readbuffer.as_mut_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).WriteRead)(::windows_core::Interface::as_raw(this), writebuffer.len().try_into().unwrap(), writebuffer.as_ptr(), readbuffer.len().try_into().unwrap(), readbuffer.as_mut_ptr()).ok() } } pub fn WriteReadPartial(&self, writebuffer: &[u8], readbuffer: &mut [u8]) -> ::windows_core::Result { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).WriteReadPartial)(::windows_core::Interface::as_raw(this), writebuffer.len() as u32, writebuffer.as_ptr(), readbuffer.len() as u32, readbuffer.as_mut_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).WriteReadPartial)(::windows_core::Interface::as_raw(this), writebuffer.len().try_into().unwrap(), writebuffer.as_ptr(), readbuffer.len().try_into().unwrap(), readbuffer.as_mut_ptr(), &mut result__).from_abi(result__) } } pub fn GetDeviceSelector() -> ::windows_core::Result<::windows_core::HSTRING> { diff --git a/crates/libs/windows/src/Windows/Devices/Lights/Effects/mod.rs b/crates/libs/windows/src/Windows/Devices/Lights/Effects/mod.rs index 5629f15e42..1a13ed018b 100644 --- a/crates/libs/windows/src/Windows/Devices/Lights/Effects/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Lights/Effects/mod.rs @@ -543,7 +543,7 @@ impl LampArrayBitmapEffect { { Self::ILampArrayBitmapEffectFactory(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateInstance)(::windows_core::Interface::as_raw(this), lamparray.into_param().abi(), lampindexes.len() as u32, lampindexes.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateInstance)(::windows_core::Interface::as_raw(this), lamparray.into_param().abi(), lampindexes.len().try_into().unwrap(), lampindexes.as_ptr(), &mut result__).from_abi(result__) }) } pub fn ZIndex(&self) -> ::windows_core::Result { @@ -739,7 +739,7 @@ impl LampArrayBlinkEffect { { Self::ILampArrayBlinkEffectFactory(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateInstance)(::windows_core::Interface::as_raw(this), lamparray.into_param().abi(), lampindexes.len() as u32, lampindexes.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateInstance)(::windows_core::Interface::as_raw(this), lamparray.into_param().abi(), lampindexes.len().try_into().unwrap(), lampindexes.as_ptr(), &mut result__).from_abi(result__) }) } pub fn ZIndex(&self) -> ::windows_core::Result { @@ -841,7 +841,7 @@ impl LampArrayColorRampEffect { { Self::ILampArrayColorRampEffectFactory(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateInstance)(::windows_core::Interface::as_raw(this), lamparray.into_param().abi(), lampindexes.len() as u32, lampindexes.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateInstance)(::windows_core::Interface::as_raw(this), lamparray.into_param().abi(), lampindexes.len().try_into().unwrap(), lampindexes.as_ptr(), &mut result__).from_abi(result__) }) } pub fn ZIndex(&self) -> ::windows_core::Result { @@ -935,7 +935,7 @@ impl LampArrayCustomEffect { { Self::ILampArrayCustomEffectFactory(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateInstance)(::windows_core::Interface::as_raw(this), lamparray.into_param().abi(), lampindexes.len() as u32, lampindexes.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateInstance)(::windows_core::Interface::as_raw(this), lamparray.into_param().abi(), lampindexes.len().try_into().unwrap(), lampindexes.as_ptr(), &mut result__).from_abi(result__) }) } pub fn ZIndex(&self) -> ::windows_core::Result { @@ -1107,7 +1107,7 @@ impl LampArrayEffectPlaylist { let this = &::windows_core::ComInterface::cast::>(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } #[doc(hidden)] @@ -1228,7 +1228,7 @@ impl LampArraySolidEffect { { Self::ILampArraySolidEffectFactory(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateInstance)(::windows_core::Interface::as_raw(this), lamparray.into_param().abi(), lampindexes.len() as u32, lampindexes.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateInstance)(::windows_core::Interface::as_raw(this), lamparray.into_param().abi(), lampindexes.len().try_into().unwrap(), lampindexes.as_ptr(), &mut result__).from_abi(result__) }) } #[doc(hidden)] @@ -1282,13 +1282,13 @@ impl LampArrayUpdateRequestedEventArgs { #[cfg(feature = "UI")] pub fn SetSingleColorForIndices(&self, desiredcolor: super::super::super::UI::Color, lampindexes: &[i32]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).SetSingleColorForIndices)(::windows_core::Interface::as_raw(this), desiredcolor, lampindexes.len() as u32, lampindexes.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).SetSingleColorForIndices)(::windows_core::Interface::as_raw(this), desiredcolor, lampindexes.len().try_into().unwrap(), lampindexes.as_ptr()).ok() } } #[doc = "Required features: `\"UI\"`"] #[cfg(feature = "UI")] pub fn SetColorsForIndices(&self, desiredcolors: &[super::super::super::UI::Color], lampindexes: &[i32]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).SetColorsForIndices)(::windows_core::Interface::as_raw(this), desiredcolors.len() as u32, desiredcolors.as_ptr(), lampindexes.len() as u32, lampindexes.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).SetColorsForIndices)(::windows_core::Interface::as_raw(this), desiredcolors.len().try_into().unwrap(), desiredcolors.as_ptr(), lampindexes.len().try_into().unwrap(), lampindexes.as_ptr()).ok() } } } impl ::windows_core::RuntimeType for LampArrayUpdateRequestedEventArgs { diff --git a/crates/libs/windows/src/Windows/Devices/Lights/mod.rs b/crates/libs/windows/src/Windows/Devices/Lights/mod.rs index 3a651adbde..6328b85975 100644 --- a/crates/libs/windows/src/Windows/Devices/Lights/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Lights/mod.rs @@ -475,13 +475,13 @@ impl LampArray { #[cfg(feature = "UI")] pub fn SetSingleColorForIndices(&self, desiredcolor: super::super::UI::Color, lampindexes: &[i32]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).SetSingleColorForIndices)(::windows_core::Interface::as_raw(this), desiredcolor, lampindexes.len() as u32, lampindexes.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).SetSingleColorForIndices)(::windows_core::Interface::as_raw(this), desiredcolor, lampindexes.len().try_into().unwrap(), lampindexes.as_ptr()).ok() } } #[doc = "Required features: `\"UI\"`"] #[cfg(feature = "UI")] pub fn SetColorsForIndices(&self, desiredcolors: &[super::super::UI::Color], lampindexes: &[i32]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).SetColorsForIndices)(::windows_core::Interface::as_raw(this), desiredcolors.len() as u32, desiredcolors.as_ptr(), lampindexes.len() as u32, lampindexes.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).SetColorsForIndices)(::windows_core::Interface::as_raw(this), desiredcolors.len().try_into().unwrap(), desiredcolors.as_ptr(), lampindexes.len().try_into().unwrap(), lampindexes.as_ptr()).ok() } } #[doc = "Required features: `\"System\"`, `\"UI\"`"] #[cfg(all(feature = "System", feature = "UI"))] @@ -493,7 +493,7 @@ impl LampArray { #[cfg(all(feature = "System", feature = "UI"))] pub fn SetColorsForKeys(&self, desiredcolors: &[super::super::UI::Color], keys: &[super::super::System::VirtualKey]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).SetColorsForKeys)(::windows_core::Interface::as_raw(this), desiredcolors.len() as u32, desiredcolors.as_ptr(), keys.len() as u32, keys.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).SetColorsForKeys)(::windows_core::Interface::as_raw(this), desiredcolors.len().try_into().unwrap(), desiredcolors.as_ptr(), keys.len().try_into().unwrap(), keys.as_ptr()).ok() } } #[doc = "Required features: `\"UI\"`"] #[cfg(feature = "UI")] diff --git a/crates/libs/windows/src/Windows/Devices/PointOfService/mod.rs b/crates/libs/windows/src/Windows/Devices/PointOfService/mod.rs index 153deb5b06..d82b2c0e61 100644 --- a/crates/libs/windows/src/Windows/Devices/PointOfService/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/PointOfService/mod.rs @@ -6090,7 +6090,7 @@ impl ClaimedMagneticStripeReader { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).AuthenticateDeviceAsync)(::windows_core::Interface::as_raw(this), responsetoken.len() as u32, responsetoken.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).AuthenticateDeviceAsync)(::windows_core::Interface::as_raw(this), responsetoken.len().try_into().unwrap(), responsetoken.as_ptr(), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"Foundation\"`"] @@ -6099,7 +6099,7 @@ impl ClaimedMagneticStripeReader { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).DeAuthenticateDeviceAsync)(::windows_core::Interface::as_raw(this), responsetoken.len() as u32, responsetoken.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).DeAuthenticateDeviceAsync)(::windows_core::Interface::as_raw(this), responsetoken.len().try_into().unwrap(), responsetoken.as_ptr(), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"Foundation\"`"] diff --git a/crates/libs/windows/src/Windows/Devices/Sms/mod.rs b/crates/libs/windows/src/Windows/Devices/Sms/mod.rs index f4bcc47a0d..048f85d171 100644 --- a/crates/libs/windows/src/Windows/Devices/Sms/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Sms/mod.rs @@ -79,7 +79,7 @@ impl ISmsBinaryMessage { #[cfg(feature = "deprecated")] pub fn SetData(&self, value: &[u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).SetData)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).SetData)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr()).ok() } } pub fn Id(&self) -> ::windows_core::Result { let this = &::windows_core::ComInterface::cast::(self)?; @@ -2213,7 +2213,7 @@ impl SmsBinaryMessage { #[cfg(feature = "deprecated")] pub fn SetData(&self, value: &[u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).SetData)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).SetData)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr()).ok() } } pub fn Id(&self) -> ::windows_core::Result { let this = &::windows_core::ComInterface::cast::(self)?; @@ -3536,7 +3536,7 @@ impl SmsTextMessage { pub fn FromBinaryData(format: SmsDataFormat, value: &[u8]) -> ::windows_core::Result { Self::ISmsTextMessageStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).FromBinaryData)(::windows_core::Interface::as_raw(this), format, value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).FromBinaryData)(::windows_core::Interface::as_raw(this), format, value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Devices/Spi/Provider/mod.rs b/crates/libs/windows/src/Windows/Devices/Spi/Provider/mod.rs index 31cde385b7..37a6f1ce51 100644 --- a/crates/libs/windows/src/Windows/Devices/Spi/Provider/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Spi/Provider/mod.rs @@ -90,19 +90,19 @@ impl ISpiDeviceProvider { } pub fn Write(&self, buffer: &[u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).Write)(::windows_core::Interface::as_raw(this), buffer.len() as u32, buffer.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).Write)(::windows_core::Interface::as_raw(this), buffer.len().try_into().unwrap(), buffer.as_ptr()).ok() } } pub fn Read(&self, buffer: &mut [u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).Read)(::windows_core::Interface::as_raw(this), buffer.len() as u32, buffer.as_mut_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).Read)(::windows_core::Interface::as_raw(this), buffer.len().try_into().unwrap(), buffer.as_mut_ptr()).ok() } } pub fn TransferSequential(&self, writebuffer: &[u8], readbuffer: &mut [u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).TransferSequential)(::windows_core::Interface::as_raw(this), writebuffer.len() as u32, writebuffer.as_ptr(), readbuffer.len() as u32, readbuffer.as_mut_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).TransferSequential)(::windows_core::Interface::as_raw(this), writebuffer.len().try_into().unwrap(), writebuffer.as_ptr(), readbuffer.len().try_into().unwrap(), readbuffer.as_mut_ptr()).ok() } } pub fn TransferFullDuplex(&self, writebuffer: &[u8], readbuffer: &mut [u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).TransferFullDuplex)(::windows_core::Interface::as_raw(this), writebuffer.len() as u32, writebuffer.as_ptr(), readbuffer.len() as u32, readbuffer.as_mut_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).TransferFullDuplex)(::windows_core::Interface::as_raw(this), writebuffer.len().try_into().unwrap(), writebuffer.as_ptr(), readbuffer.len().try_into().unwrap(), readbuffer.as_mut_ptr()).ok() } } #[doc = "Required features: `\"Foundation\"`"] #[cfg(feature = "Foundation")] diff --git a/crates/libs/windows/src/Windows/Devices/Spi/mod.rs b/crates/libs/windows/src/Windows/Devices/Spi/mod.rs index 7e4c054cd2..ddaa420f9d 100644 --- a/crates/libs/windows/src/Windows/Devices/Spi/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Spi/mod.rs @@ -400,19 +400,19 @@ impl SpiDevice { } pub fn Write(&self, buffer: &[u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).Write)(::windows_core::Interface::as_raw(this), buffer.len() as u32, buffer.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).Write)(::windows_core::Interface::as_raw(this), buffer.len().try_into().unwrap(), buffer.as_ptr()).ok() } } pub fn Read(&self, buffer: &mut [u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).Read)(::windows_core::Interface::as_raw(this), buffer.len() as u32, buffer.as_mut_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).Read)(::windows_core::Interface::as_raw(this), buffer.len().try_into().unwrap(), buffer.as_mut_ptr()).ok() } } pub fn TransferSequential(&self, writebuffer: &[u8], readbuffer: &mut [u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).TransferSequential)(::windows_core::Interface::as_raw(this), writebuffer.len() as u32, writebuffer.as_ptr(), readbuffer.len() as u32, readbuffer.as_mut_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).TransferSequential)(::windows_core::Interface::as_raw(this), writebuffer.len().try_into().unwrap(), writebuffer.as_ptr(), readbuffer.len().try_into().unwrap(), readbuffer.as_mut_ptr()).ok() } } pub fn TransferFullDuplex(&self, writebuffer: &[u8], readbuffer: &mut [u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).TransferFullDuplex)(::windows_core::Interface::as_raw(this), writebuffer.len() as u32, writebuffer.as_ptr(), readbuffer.len() as u32, readbuffer.as_mut_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).TransferFullDuplex)(::windows_core::Interface::as_raw(this), writebuffer.len().try_into().unwrap(), writebuffer.as_ptr(), readbuffer.len().try_into().unwrap(), readbuffer.as_mut_ptr()).ok() } } pub fn GetDeviceSelector() -> ::windows_core::Result<::windows_core::HSTRING> { Self::ISpiDeviceStatics(|this| unsafe { diff --git a/crates/libs/windows/src/Windows/Foundation/Collections/impl.rs b/crates/libs/windows/src/Windows/Foundation/Collections/impl.rs index eab17e991e..a991bd562e 100644 --- a/crates/libs/windows/src/Windows/Foundation/Collections/impl.rs +++ b/crates/libs/windows/src/Windows/Foundation/Collections/impl.rs @@ -837,7 +837,7 @@ where V::from_default(value) } fn Size(&self) -> ::windows_core::Result { - Ok(self.map.len() as u32) + Ok(self.map.len().try_into()?) } fn HasKey(&self, key: &K::Default) -> ::windows_core::Result { Ok(self.map.contains_key(key)) @@ -981,7 +981,7 @@ where T::from_default(item) } fn Size(&self) -> ::windows_core::Result { - Ok(self.values.len() as u32) + Ok(self.values.len().try_into()?) } fn IndexOf(&self, value: &T::Default, result: &mut u32) -> ::windows_core::Result { match self.values.iter().position(|element| element == value) { diff --git a/crates/libs/windows/src/Windows/Foundation/Collections/mod.rs b/crates/libs/windows/src/Windows/Foundation/Collections/mod.rs index 2f4562e113..c253e0c70a 100644 --- a/crates/libs/windows/src/Windows/Foundation/Collections/mod.rs +++ b/crates/libs/windows/src/Windows/Foundation/Collections/mod.rs @@ -78,7 +78,7 @@ impl IIterator { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } } @@ -627,12 +627,12 @@ impl IObservableVector { let this = &::windows_core::ComInterface::cast::>(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } pub fn ReplaceAll(&self, items: &[>::Default]) -> ::windows_core::Result<()> { let this = &::windows_core::ComInterface::cast::>(self)?; - unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } + unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len().try_into().unwrap(), ::core::mem::transmute(items.as_ptr())).ok() } } } impl ::windows_core::CanInto<::windows_core::IUnknown> for IObservableVector {} @@ -851,12 +851,12 @@ impl IVector { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } pub fn ReplaceAll(&self, items: &[>::Default]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } + unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len().try_into().unwrap(), ::core::mem::transmute(items.as_ptr())).ok() } } pub fn First(&self) -> ::windows_core::Result> { let this = &::windows_core::ComInterface::cast::>(self)?; @@ -1001,7 +1001,7 @@ impl IVectorView { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } pub fn First(&self) -> ::windows_core::Result> { diff --git a/crates/libs/windows/src/Windows/Foundation/Diagnostics/mod.rs b/crates/libs/windows/src/Windows/Foundation/Diagnostics/mod.rs index 9ab7d71e62..6fa792bd9f 100644 --- a/crates/libs/windows/src/Windows/Foundation/Diagnostics/mod.rs +++ b/crates/libs/windows/src/Windows/Foundation/Diagnostics/mod.rs @@ -1515,15 +1515,15 @@ impl LoggingFields { } pub fn AddUInt8Array(&self, name: &::windows_core::HSTRING, value: &[u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddUInt8Array)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddUInt8Array)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr()).ok() } } pub fn AddUInt8ArrayWithFormat(&self, name: &::windows_core::HSTRING, value: &[u8], format: LoggingFieldFormat) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddUInt8ArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr(), format).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddUInt8ArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr(), format).ok() } } pub fn AddUInt8ArrayWithFormatAndTags(&self, name: &::windows_core::HSTRING, value: &[u8], format: LoggingFieldFormat, tags: i32) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddUInt8ArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr(), format, tags).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddUInt8ArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr(), format, tags).ok() } } pub fn AddInt16(&self, name: &::windows_core::HSTRING, value: i16) -> ::windows_core::Result<()> { let this = self; @@ -1539,15 +1539,15 @@ impl LoggingFields { } pub fn AddInt16Array(&self, name: &::windows_core::HSTRING, value: &[i16]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddInt16Array)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddInt16Array)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr()).ok() } } pub fn AddInt16ArrayWithFormat(&self, name: &::windows_core::HSTRING, value: &[i16], format: LoggingFieldFormat) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddInt16ArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr(), format).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddInt16ArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr(), format).ok() } } pub fn AddInt16ArrayWithFormatAndTags(&self, name: &::windows_core::HSTRING, value: &[i16], format: LoggingFieldFormat, tags: i32) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddInt16ArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr(), format, tags).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddInt16ArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr(), format, tags).ok() } } pub fn AddUInt16(&self, name: &::windows_core::HSTRING, value: u16) -> ::windows_core::Result<()> { let this = self; @@ -1563,15 +1563,15 @@ impl LoggingFields { } pub fn AddUInt16Array(&self, name: &::windows_core::HSTRING, value: &[u16]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddUInt16Array)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddUInt16Array)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr()).ok() } } pub fn AddUInt16ArrayWithFormat(&self, name: &::windows_core::HSTRING, value: &[u16], format: LoggingFieldFormat) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddUInt16ArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr(), format).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddUInt16ArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr(), format).ok() } } pub fn AddUInt16ArrayWithFormatAndTags(&self, name: &::windows_core::HSTRING, value: &[u16], format: LoggingFieldFormat, tags: i32) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddUInt16ArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr(), format, tags).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddUInt16ArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr(), format, tags).ok() } } pub fn AddInt32(&self, name: &::windows_core::HSTRING, value: i32) -> ::windows_core::Result<()> { let this = self; @@ -1587,15 +1587,15 @@ impl LoggingFields { } pub fn AddInt32Array(&self, name: &::windows_core::HSTRING, value: &[i32]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddInt32Array)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddInt32Array)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr()).ok() } } pub fn AddInt32ArrayWithFormat(&self, name: &::windows_core::HSTRING, value: &[i32], format: LoggingFieldFormat) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddInt32ArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr(), format).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddInt32ArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr(), format).ok() } } pub fn AddInt32ArrayWithFormatAndTags(&self, name: &::windows_core::HSTRING, value: &[i32], format: LoggingFieldFormat, tags: i32) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddInt32ArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr(), format, tags).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddInt32ArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr(), format, tags).ok() } } pub fn AddUInt32(&self, name: &::windows_core::HSTRING, value: u32) -> ::windows_core::Result<()> { let this = self; @@ -1611,15 +1611,15 @@ impl LoggingFields { } pub fn AddUInt32Array(&self, name: &::windows_core::HSTRING, value: &[u32]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddUInt32Array)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddUInt32Array)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr()).ok() } } pub fn AddUInt32ArrayWithFormat(&self, name: &::windows_core::HSTRING, value: &[u32], format: LoggingFieldFormat) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddUInt32ArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr(), format).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddUInt32ArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr(), format).ok() } } pub fn AddUInt32ArrayWithFormatAndTags(&self, name: &::windows_core::HSTRING, value: &[u32], format: LoggingFieldFormat, tags: i32) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddUInt32ArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr(), format, tags).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddUInt32ArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr(), format, tags).ok() } } pub fn AddInt64(&self, name: &::windows_core::HSTRING, value: i64) -> ::windows_core::Result<()> { let this = self; @@ -1635,15 +1635,15 @@ impl LoggingFields { } pub fn AddInt64Array(&self, name: &::windows_core::HSTRING, value: &[i64]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddInt64Array)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddInt64Array)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr()).ok() } } pub fn AddInt64ArrayWithFormat(&self, name: &::windows_core::HSTRING, value: &[i64], format: LoggingFieldFormat) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddInt64ArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr(), format).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddInt64ArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr(), format).ok() } } pub fn AddInt64ArrayWithFormatAndTags(&self, name: &::windows_core::HSTRING, value: &[i64], format: LoggingFieldFormat, tags: i32) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddInt64ArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr(), format, tags).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddInt64ArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr(), format, tags).ok() } } pub fn AddUInt64(&self, name: &::windows_core::HSTRING, value: u64) -> ::windows_core::Result<()> { let this = self; @@ -1659,15 +1659,15 @@ impl LoggingFields { } pub fn AddUInt64Array(&self, name: &::windows_core::HSTRING, value: &[u64]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddUInt64Array)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddUInt64Array)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr()).ok() } } pub fn AddUInt64ArrayWithFormat(&self, name: &::windows_core::HSTRING, value: &[u64], format: LoggingFieldFormat) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddUInt64ArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr(), format).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddUInt64ArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr(), format).ok() } } pub fn AddUInt64ArrayWithFormatAndTags(&self, name: &::windows_core::HSTRING, value: &[u64], format: LoggingFieldFormat, tags: i32) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddUInt64ArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr(), format, tags).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddUInt64ArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr(), format, tags).ok() } } pub fn AddSingle(&self, name: &::windows_core::HSTRING, value: f32) -> ::windows_core::Result<()> { let this = self; @@ -1683,15 +1683,15 @@ impl LoggingFields { } pub fn AddSingleArray(&self, name: &::windows_core::HSTRING, value: &[f32]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddSingleArray)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddSingleArray)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr()).ok() } } pub fn AddSingleArrayWithFormat(&self, name: &::windows_core::HSTRING, value: &[f32], format: LoggingFieldFormat) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddSingleArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr(), format).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddSingleArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr(), format).ok() } } pub fn AddSingleArrayWithFormatAndTags(&self, name: &::windows_core::HSTRING, value: &[f32], format: LoggingFieldFormat, tags: i32) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddSingleArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr(), format, tags).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddSingleArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr(), format, tags).ok() } } pub fn AddDouble(&self, name: &::windows_core::HSTRING, value: f64) -> ::windows_core::Result<()> { let this = self; @@ -1707,15 +1707,15 @@ impl LoggingFields { } pub fn AddDoubleArray(&self, name: &::windows_core::HSTRING, value: &[f64]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddDoubleArray)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddDoubleArray)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr()).ok() } } pub fn AddDoubleArrayWithFormat(&self, name: &::windows_core::HSTRING, value: &[f64], format: LoggingFieldFormat) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddDoubleArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr(), format).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddDoubleArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr(), format).ok() } } pub fn AddDoubleArrayWithFormatAndTags(&self, name: &::windows_core::HSTRING, value: &[f64], format: LoggingFieldFormat, tags: i32) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddDoubleArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr(), format, tags).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddDoubleArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr(), format, tags).ok() } } pub fn AddChar16(&self, name: &::windows_core::HSTRING, value: u16) -> ::windows_core::Result<()> { let this = self; @@ -1731,15 +1731,15 @@ impl LoggingFields { } pub fn AddChar16Array(&self, name: &::windows_core::HSTRING, value: &[u16]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddChar16Array)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddChar16Array)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr()).ok() } } pub fn AddChar16ArrayWithFormat(&self, name: &::windows_core::HSTRING, value: &[u16], format: LoggingFieldFormat) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddChar16ArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr(), format).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddChar16ArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr(), format).ok() } } pub fn AddChar16ArrayWithFormatAndTags(&self, name: &::windows_core::HSTRING, value: &[u16], format: LoggingFieldFormat, tags: i32) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddChar16ArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr(), format, tags).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddChar16ArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr(), format, tags).ok() } } pub fn AddBoolean(&self, name: &::windows_core::HSTRING, value: bool) -> ::windows_core::Result<()> { let this = self; @@ -1755,15 +1755,15 @@ impl LoggingFields { } pub fn AddBooleanArray(&self, name: &::windows_core::HSTRING, value: &[bool]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddBooleanArray)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddBooleanArray)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr()).ok() } } pub fn AddBooleanArrayWithFormat(&self, name: &::windows_core::HSTRING, value: &[bool], format: LoggingFieldFormat) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddBooleanArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr(), format).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddBooleanArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr(), format).ok() } } pub fn AddBooleanArrayWithFormatAndTags(&self, name: &::windows_core::HSTRING, value: &[bool], format: LoggingFieldFormat, tags: i32) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddBooleanArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr(), format, tags).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddBooleanArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr(), format, tags).ok() } } pub fn AddString(&self, name: &::windows_core::HSTRING, value: &::windows_core::HSTRING) -> ::windows_core::Result<()> { let this = self; @@ -1779,15 +1779,15 @@ impl LoggingFields { } pub fn AddStringArray(&self, name: &::windows_core::HSTRING, value: &[::windows_core::HSTRING]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddStringArray)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, ::core::mem::transmute(value.as_ptr())).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddStringArray)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), ::core::mem::transmute(value.as_ptr())).ok() } } pub fn AddStringArrayWithFormat(&self, name: &::windows_core::HSTRING, value: &[::windows_core::HSTRING], format: LoggingFieldFormat) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddStringArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddStringArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), ::core::mem::transmute(value.as_ptr()), format).ok() } } pub fn AddStringArrayWithFormatAndTags(&self, name: &::windows_core::HSTRING, value: &[::windows_core::HSTRING], format: LoggingFieldFormat, tags: i32) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddStringArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format, tags).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddStringArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), ::core::mem::transmute(value.as_ptr()), format, tags).ok() } } pub fn AddGuid(&self, name: &::windows_core::HSTRING, value: ::windows_core::GUID) -> ::windows_core::Result<()> { let this = self; @@ -1803,15 +1803,15 @@ impl LoggingFields { } pub fn AddGuidArray(&self, name: &::windows_core::HSTRING, value: &[::windows_core::GUID]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddGuidArray)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddGuidArray)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr()).ok() } } pub fn AddGuidArrayWithFormat(&self, name: &::windows_core::HSTRING, value: &[::windows_core::GUID], format: LoggingFieldFormat) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddGuidArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr(), format).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddGuidArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr(), format).ok() } } pub fn AddGuidArrayWithFormatAndTags(&self, name: &::windows_core::HSTRING, value: &[::windows_core::GUID], format: LoggingFieldFormat, tags: i32) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddGuidArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr(), format, tags).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddGuidArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr(), format, tags).ok() } } pub fn AddDateTime(&self, name: &::windows_core::HSTRING, value: super::DateTime) -> ::windows_core::Result<()> { let this = self; @@ -1827,15 +1827,15 @@ impl LoggingFields { } pub fn AddDateTimeArray(&self, name: &::windows_core::HSTRING, value: &[super::DateTime]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddDateTimeArray)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddDateTimeArray)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr()).ok() } } pub fn AddDateTimeArrayWithFormat(&self, name: &::windows_core::HSTRING, value: &[super::DateTime], format: LoggingFieldFormat) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddDateTimeArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr(), format).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddDateTimeArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr(), format).ok() } } pub fn AddDateTimeArrayWithFormatAndTags(&self, name: &::windows_core::HSTRING, value: &[super::DateTime], format: LoggingFieldFormat, tags: i32) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddDateTimeArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr(), format, tags).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddDateTimeArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr(), format, tags).ok() } } pub fn AddTimeSpan(&self, name: &::windows_core::HSTRING, value: super::TimeSpan) -> ::windows_core::Result<()> { let this = self; @@ -1851,15 +1851,15 @@ impl LoggingFields { } pub fn AddTimeSpanArray(&self, name: &::windows_core::HSTRING, value: &[super::TimeSpan]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddTimeSpanArray)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddTimeSpanArray)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr()).ok() } } pub fn AddTimeSpanArrayWithFormat(&self, name: &::windows_core::HSTRING, value: &[super::TimeSpan], format: LoggingFieldFormat) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddTimeSpanArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr(), format).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddTimeSpanArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr(), format).ok() } } pub fn AddTimeSpanArrayWithFormatAndTags(&self, name: &::windows_core::HSTRING, value: &[super::TimeSpan], format: LoggingFieldFormat, tags: i32) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddTimeSpanArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr(), format, tags).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddTimeSpanArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr(), format, tags).ok() } } pub fn AddPoint(&self, name: &::windows_core::HSTRING, value: super::Point) -> ::windows_core::Result<()> { let this = self; @@ -1875,15 +1875,15 @@ impl LoggingFields { } pub fn AddPointArray(&self, name: &::windows_core::HSTRING, value: &[super::Point]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddPointArray)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddPointArray)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr()).ok() } } pub fn AddPointArrayWithFormat(&self, name: &::windows_core::HSTRING, value: &[super::Point], format: LoggingFieldFormat) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddPointArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr(), format).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddPointArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr(), format).ok() } } pub fn AddPointArrayWithFormatAndTags(&self, name: &::windows_core::HSTRING, value: &[super::Point], format: LoggingFieldFormat, tags: i32) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddPointArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr(), format, tags).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddPointArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr(), format, tags).ok() } } pub fn AddSize(&self, name: &::windows_core::HSTRING, value: super::Size) -> ::windows_core::Result<()> { let this = self; @@ -1899,15 +1899,15 @@ impl LoggingFields { } pub fn AddSizeArray(&self, name: &::windows_core::HSTRING, value: &[super::Size]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddSizeArray)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddSizeArray)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr()).ok() } } pub fn AddSizeArrayWithFormat(&self, name: &::windows_core::HSTRING, value: &[super::Size], format: LoggingFieldFormat) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddSizeArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr(), format).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddSizeArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr(), format).ok() } } pub fn AddSizeArrayWithFormatAndTags(&self, name: &::windows_core::HSTRING, value: &[super::Size], format: LoggingFieldFormat, tags: i32) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddSizeArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr(), format, tags).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddSizeArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr(), format, tags).ok() } } pub fn AddRect(&self, name: &::windows_core::HSTRING, value: super::Rect) -> ::windows_core::Result<()> { let this = self; @@ -1923,15 +1923,15 @@ impl LoggingFields { } pub fn AddRectArray(&self, name: &::windows_core::HSTRING, value: &[super::Rect]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddRectArray)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddRectArray)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr()).ok() } } pub fn AddRectArrayWithFormat(&self, name: &::windows_core::HSTRING, value: &[super::Rect], format: LoggingFieldFormat) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddRectArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr(), format).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddRectArrayWithFormat)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr(), format).ok() } } pub fn AddRectArrayWithFormatAndTags(&self, name: &::windows_core::HSTRING, value: &[super::Rect], format: LoggingFieldFormat, tags: i32) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddRectArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len() as u32, value.as_ptr(), format, tags).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddRectArrayWithFormatAndTags)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(name), value.len().try_into().unwrap(), value.as_ptr(), format, tags).ok() } } } impl ::windows_core::RuntimeType for LoggingFields { diff --git a/crates/libs/windows/src/Windows/Foundation/mod.rs b/crates/libs/windows/src/Windows/Foundation/mod.rs index d5e24e9f08..49e1b13d3d 100644 --- a/crates/libs/windows/src/Windows/Foundation/mod.rs +++ b/crates/libs/windows/src/Windows/Foundation/mod.rs @@ -1991,115 +1991,115 @@ impl PropertyValue { pub fn CreateUInt8Array(value: &[u8]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateUInt8Array)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateUInt8Array)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } pub fn CreateInt16Array(value: &[i16]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateInt16Array)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateInt16Array)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } pub fn CreateUInt16Array(value: &[u16]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateUInt16Array)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateUInt16Array)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } pub fn CreateInt32Array(value: &[i32]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateInt32Array)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateInt32Array)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } pub fn CreateUInt32Array(value: &[u32]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateUInt32Array)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateUInt32Array)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } pub fn CreateInt64Array(value: &[i64]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateInt64Array)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateInt64Array)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } pub fn CreateUInt64Array(value: &[u64]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateUInt64Array)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateUInt64Array)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } pub fn CreateSingleArray(value: &[f32]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateSingleArray)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateSingleArray)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } pub fn CreateDoubleArray(value: &[f64]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateDoubleArray)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateDoubleArray)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } pub fn CreateChar16Array(value: &[u16]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateChar16Array)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateChar16Array)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } pub fn CreateBooleanArray(value: &[bool]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateBooleanArray)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateBooleanArray)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } pub fn CreateStringArray(value: &[::windows_core::HSTRING]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateStringArray)(::windows_core::Interface::as_raw(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateStringArray)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi(result__) }) } pub fn CreateInspectableArray(value: &[::core::option::Option<::windows_core::IInspectable>]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateInspectableArray)(::windows_core::Interface::as_raw(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateInspectableArray)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi(result__) }) } pub fn CreateGuidArray(value: &[::windows_core::GUID]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateGuidArray)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateGuidArray)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } pub fn CreateDateTimeArray(value: &[DateTime]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateDateTimeArray)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateDateTimeArray)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } pub fn CreateTimeSpanArray(value: &[TimeSpan]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateTimeSpanArray)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateTimeSpanArray)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } pub fn CreatePointArray(value: &[Point]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreatePointArray)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreatePointArray)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } pub fn CreateSizeArray(value: &[Size]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateSizeArray)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateSizeArray)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } pub fn CreateRectArray(value: &[Rect]) -> ::windows_core::Result<::windows_core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateRectArray)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateRectArray)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } #[doc(hidden)] @@ -2358,7 +2358,7 @@ impl WwwFormUrlDecoder { let this = &::windows_core::ComInterface::cast::>(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } pub fn GetFirstValueByName(&self, name: &::windows_core::HSTRING) -> ::windows_core::Result<::windows_core::HSTRING> { diff --git a/crates/libs/windows/src/Windows/Gaming/Input/Custom/mod.rs b/crates/libs/windows/src/Windows/Gaming/Input/Custom/mod.rs index b7f0412655..1dac341d65 100644 --- a/crates/libs/windows/src/Windows/Gaming/Input/Custom/mod.rs +++ b/crates/libs/windows/src/Windows/Gaming/Input/Custom/mod.rs @@ -197,7 +197,7 @@ impl IGipGameControllerInputSink { } pub fn OnMessageReceived(&self, timestamp: u64, messageclass: GipMessageClass, messageid: u8, sequenceid: u8, messagebuffer: &[u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).OnMessageReceived)(::windows_core::Interface::as_raw(this), timestamp, messageclass, messageid, sequenceid, messagebuffer.len() as u32, messagebuffer.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).OnMessageReceived)(::windows_core::Interface::as_raw(this), timestamp, messageclass, messageid, sequenceid, messagebuffer.len().try_into().unwrap(), messagebuffer.as_ptr()).ok() } } pub fn OnInputResumed(&self, timestamp: u64) -> ::windows_core::Result<()> { let this = &::windows_core::ComInterface::cast::(self)?; @@ -253,7 +253,7 @@ pub struct IHidGameControllerInputSink(::windows_core::IUnknown); impl IHidGameControllerInputSink { pub fn OnInputReportReceived(&self, timestamp: u64, reportid: u8, reportbuffer: &[u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).OnInputReportReceived)(::windows_core::Interface::as_raw(this), timestamp, reportid, reportbuffer.len() as u32, reportbuffer.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).OnInputReportReceived)(::windows_core::Interface::as_raw(this), timestamp, reportid, reportbuffer.len().try_into().unwrap(), reportbuffer.as_ptr()).ok() } } pub fn OnInputResumed(&self, timestamp: u64) -> ::windows_core::Result<()> { let this = &::windows_core::ComInterface::cast::(self)?; @@ -307,7 +307,7 @@ pub struct IXusbGameControllerInputSink(::windows_core::IUnknown); impl IXusbGameControllerInputSink { pub fn OnInputReceived(&self, timestamp: u64, reportid: u8, inputbuffer: &[u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).OnInputReceived)(::windows_core::Interface::as_raw(this), timestamp, reportid, inputbuffer.len() as u32, inputbuffer.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).OnInputReceived)(::windows_core::Interface::as_raw(this), timestamp, reportid, inputbuffer.len().try_into().unwrap(), inputbuffer.as_ptr()).ok() } } pub fn OnInputResumed(&self, timestamp: u64) -> ::windows_core::Result<()> { let this = &::windows_core::ComInterface::cast::(self)?; @@ -477,11 +477,11 @@ impl GipGameControllerProvider { } pub fn SendMessage(&self, messageclass: GipMessageClass, messageid: u8, messagebuffer: &[u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).SendMessage)(::windows_core::Interface::as_raw(this), messageclass, messageid, messagebuffer.len() as u32, messagebuffer.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).SendMessage)(::windows_core::Interface::as_raw(this), messageclass, messageid, messagebuffer.len().try_into().unwrap(), messagebuffer.as_ptr()).ok() } } pub fn SendReceiveMessage(&self, messageclass: GipMessageClass, messageid: u8, requestmessagebuffer: &[u8], responsemessagebuffer: &mut [u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).SendReceiveMessage)(::windows_core::Interface::as_raw(this), messageclass, messageid, requestmessagebuffer.len() as u32, requestmessagebuffer.as_ptr(), responsemessagebuffer.len() as u32, responsemessagebuffer.as_mut_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).SendReceiveMessage)(::windows_core::Interface::as_raw(this), messageclass, messageid, requestmessagebuffer.len().try_into().unwrap(), requestmessagebuffer.as_ptr(), responsemessagebuffer.len().try_into().unwrap(), responsemessagebuffer.as_mut_ptr()).ok() } } #[doc = "Required features: `\"Foundation\"`, `\"Storage_Streams\"`"] #[cfg(all(feature = "Foundation", feature = "Storage_Streams"))] @@ -567,15 +567,15 @@ impl HidGameControllerProvider { } pub fn GetFeatureReport(&self, reportid: u8, reportbuffer: &mut [u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).GetFeatureReport)(::windows_core::Interface::as_raw(this), reportid, reportbuffer.len() as u32, reportbuffer.as_mut_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).GetFeatureReport)(::windows_core::Interface::as_raw(this), reportid, reportbuffer.len().try_into().unwrap(), reportbuffer.as_mut_ptr()).ok() } } pub fn SendFeatureReport(&self, reportid: u8, reportbuffer: &[u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).SendFeatureReport)(::windows_core::Interface::as_raw(this), reportid, reportbuffer.len() as u32, reportbuffer.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).SendFeatureReport)(::windows_core::Interface::as_raw(this), reportid, reportbuffer.len().try_into().unwrap(), reportbuffer.as_ptr()).ok() } } pub fn SendOutputReport(&self, reportid: u8, reportbuffer: &[u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).SendOutputReport)(::windows_core::Interface::as_raw(this), reportid, reportbuffer.len() as u32, reportbuffer.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).SendOutputReport)(::windows_core::Interface::as_raw(this), reportid, reportbuffer.len().try_into().unwrap(), reportbuffer.as_ptr()).ok() } } } impl ::windows_core::RuntimeType for HidGameControllerProvider { diff --git a/crates/libs/windows/src/Windows/Gaming/Input/mod.rs b/crates/libs/windows/src/Windows/Gaming/Input/mod.rs index 5a1e2257f1..781fd5c9a9 100644 --- a/crates/libs/windows/src/Windows/Gaming/Input/mod.rs +++ b/crates/libs/windows/src/Windows/Gaming/Input/mod.rs @@ -1591,7 +1591,7 @@ impl RawGameController { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetCurrentReading)(::windows_core::Interface::as_raw(this), buttonarray.len() as u32, buttonarray.as_mut_ptr(), switcharray.len() as u32, switcharray.as_mut_ptr(), axisarray.len() as u32, axisarray.as_mut_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetCurrentReading)(::windows_core::Interface::as_raw(this), buttonarray.len().try_into().unwrap(), buttonarray.as_mut_ptr(), switcharray.len().try_into().unwrap(), switcharray.as_mut_ptr(), axisarray.len().try_into().unwrap(), axisarray.as_mut_ptr(), &mut result__).from_abi(result__) } } pub fn GetSwitchKind(&self, switchindex: i32) -> ::windows_core::Result { diff --git a/crates/libs/windows/src/Windows/Globalization/Collation/mod.rs b/crates/libs/windows/src/Windows/Globalization/Collation/mod.rs index 48d6d297cb..246e5b1158 100644 --- a/crates/libs/windows/src/Windows/Globalization/Collation/mod.rs +++ b/crates/libs/windows/src/Windows/Globalization/Collation/mod.rs @@ -150,7 +150,7 @@ impl CharacterGroupings { let this = &::windows_core::ComInterface::cast::>(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Graphics/Imaging/mod.rs b/crates/libs/windows/src/Windows/Graphics/Imaging/mod.rs index 1f916bd804..e9a3ab0f3b 100644 --- a/crates/libs/windows/src/Windows/Graphics/Imaging/mod.rs +++ b/crates/libs/windows/src/Windows/Graphics/Imaging/mod.rs @@ -1191,7 +1191,7 @@ impl BitmapEncoder { } pub fn SetPixelData(&self, pixelformat: BitmapPixelFormat, alphamode: BitmapAlphaMode, width: u32, height: u32, dpix: f64, dpiy: f64, pixels: &[u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).SetPixelData)(::windows_core::Interface::as_raw(this), pixelformat, alphamode, width, height, dpix, dpiy, pixels.len() as u32, pixels.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).SetPixelData)(::windows_core::Interface::as_raw(this), pixelformat, alphamode, width, height, dpix, dpiy, pixels.len().try_into().unwrap(), pixels.as_ptr()).ok() } } #[doc = "Required features: `\"Foundation\"`"] #[cfg(feature = "Foundation")] diff --git a/crates/libs/windows/src/Windows/Media/Capture/Frames/mod.rs b/crates/libs/windows/src/Windows/Media/Capture/Frames/mod.rs index 9dee028884..4e23e35020 100644 --- a/crates/libs/windows/src/Windows/Media/Capture/Frames/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Capture/Frames/mod.rs @@ -1284,7 +1284,7 @@ impl MediaFrameSourceController { let this = &::windows_core::ComInterface::cast::(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetPropertyByExtendedIdAsync)(::windows_core::Interface::as_raw(this), extendedpropertyid.len() as u32, extendedpropertyid.as_ptr(), maxpropertyvaluesize.try_into_param()?.abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetPropertyByExtendedIdAsync)(::windows_core::Interface::as_raw(this), extendedpropertyid.len().try_into().unwrap(), extendedpropertyid.as_ptr(), maxpropertyvaluesize.try_into_param()?.abi(), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"Foundation\"`"] @@ -1293,7 +1293,7 @@ impl MediaFrameSourceController { let this = &::windows_core::ComInterface::cast::(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).SetPropertyByExtendedIdAsync)(::windows_core::Interface::as_raw(this), extendedpropertyid.len() as u32, extendedpropertyid.as_ptr(), propertyvalue.len() as u32, propertyvalue.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).SetPropertyByExtendedIdAsync)(::windows_core::Interface::as_raw(this), extendedpropertyid.len().try_into().unwrap(), extendedpropertyid.as_ptr(), propertyvalue.len().try_into().unwrap(), propertyvalue.as_ptr(), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"Media_Devices\"`"] diff --git a/crates/libs/windows/src/Windows/Media/Core/mod.rs b/crates/libs/windows/src/Windows/Media/Core/mod.rs index 91559cd8ca..18697b660b 100644 --- a/crates/libs/windows/src/Windows/Media/Core/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Core/mod.rs @@ -5332,7 +5332,7 @@ pub struct MediaStreamSampleProtectionProperties(::windows_core::IUnknown); impl MediaStreamSampleProtectionProperties { pub fn SetKeyIdentifier(&self, value: &[u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).SetKeyIdentifier)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).SetKeyIdentifier)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr()).ok() } } pub fn GetKeyIdentifier(&self, value: &mut ::windows_core::Array) -> ::windows_core::Result<()> { let this = self; @@ -5340,7 +5340,7 @@ impl MediaStreamSampleProtectionProperties { } pub fn SetInitializationVector(&self, value: &[u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).SetInitializationVector)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).SetInitializationVector)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr()).ok() } } pub fn GetInitializationVector(&self, value: &mut ::windows_core::Array) -> ::windows_core::Result<()> { let this = self; @@ -5348,7 +5348,7 @@ impl MediaStreamSampleProtectionProperties { } pub fn SetSubSampleMapping(&self, value: &[u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).SetSubSampleMapping)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).SetSubSampleMapping)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr()).ok() } } pub fn GetSubSampleMapping(&self, value: &mut ::windows_core::Array) -> ::windows_core::Result<()> { let this = self; @@ -5581,7 +5581,7 @@ impl MediaStreamSource { P0: ::windows_core::TryIntoParam, { let this = self; - unsafe { (::windows_core::Interface::vtable(this).AddProtectionKey)(::windows_core::Interface::as_raw(this), streamdescriptor.try_into_param()?.abi(), keyidentifier.len() as u32, keyidentifier.as_ptr(), licensedata.len() as u32, licensedata.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).AddProtectionKey)(::windows_core::Interface::as_raw(this), streamdescriptor.try_into_param()?.abi(), keyidentifier.len().try_into().unwrap(), keyidentifier.as_ptr(), licensedata.len().try_into().unwrap(), licensedata.as_ptr()).ok() } } #[doc = "Required features: `\"Foundation\"`"] #[cfg(feature = "Foundation")] diff --git a/crates/libs/windows/src/Windows/Media/Devices/Core/mod.rs b/crates/libs/windows/src/Windows/Media/Devices/Core/mod.rs index 8d5a4c6fb3..04186a6787 100644 --- a/crates/libs/windows/src/Windows/Media/Devices/Core/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Devices/Core/mod.rs @@ -541,13 +541,13 @@ impl CameraIntrinsics { #[cfg(feature = "Foundation_Numerics")] pub fn ProjectManyOntoFrame(&self, coordinates: &[super::super::super::Foundation::Numerics::Vector3], results: &mut [super::super::super::Foundation::Point]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).ProjectManyOntoFrame)(::windows_core::Interface::as_raw(this), coordinates.len() as u32, coordinates.as_ptr(), results.len() as u32, results.as_mut_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).ProjectManyOntoFrame)(::windows_core::Interface::as_raw(this), coordinates.len().try_into().unwrap(), coordinates.as_ptr(), results.len().try_into().unwrap(), results.as_mut_ptr()).ok() } } #[doc = "Required features: `\"Foundation_Numerics\"`"] #[cfg(feature = "Foundation_Numerics")] pub fn UnprojectPixelsAtUnitDepth(&self, pixelcoordinates: &[super::super::super::Foundation::Point], results: &mut [super::super::super::Foundation::Numerics::Vector2]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).UnprojectPixelsAtUnitDepth)(::windows_core::Interface::as_raw(this), pixelcoordinates.len() as u32, pixelcoordinates.as_ptr(), results.len() as u32, results.as_mut_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).UnprojectPixelsAtUnitDepth)(::windows_core::Interface::as_raw(this), pixelcoordinates.len().try_into().unwrap(), pixelcoordinates.as_ptr(), results.len().try_into().unwrap(), results.as_mut_ptr()).ok() } } #[doc = "Required features: `\"Foundation_Numerics\"`"] #[cfg(feature = "Foundation_Numerics")] @@ -571,7 +571,7 @@ impl CameraIntrinsics { #[cfg(feature = "Foundation")] pub fn DistortPoints(&self, inputs: &[super::super::super::Foundation::Point], results: &mut [super::super::super::Foundation::Point]) -> ::windows_core::Result<()> { let this = &::windows_core::ComInterface::cast::(self)?; - unsafe { (::windows_core::Interface::vtable(this).DistortPoints)(::windows_core::Interface::as_raw(this), inputs.len() as u32, inputs.as_ptr(), results.len() as u32, results.as_mut_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).DistortPoints)(::windows_core::Interface::as_raw(this), inputs.len().try_into().unwrap(), inputs.as_ptr(), results.len().try_into().unwrap(), results.as_mut_ptr()).ok() } } #[doc = "Required features: `\"Foundation\"`"] #[cfg(feature = "Foundation")] @@ -586,7 +586,7 @@ impl CameraIntrinsics { #[cfg(feature = "Foundation")] pub fn UndistortPoints(&self, inputs: &[super::super::super::Foundation::Point], results: &mut [super::super::super::Foundation::Point]) -> ::windows_core::Result<()> { let this = &::windows_core::ComInterface::cast::(self)?; - unsafe { (::windows_core::Interface::vtable(this).UndistortPoints)(::windows_core::Interface::as_raw(this), inputs.len() as u32, inputs.as_ptr(), results.len() as u32, results.as_mut_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).UndistortPoints)(::windows_core::Interface::as_raw(this), inputs.len().try_into().unwrap(), inputs.as_ptr(), results.len().try_into().unwrap(), results.as_mut_ptr()).ok() } } #[doc = "Required features: `\"Foundation_Numerics\"`"] #[cfg(feature = "Foundation_Numerics")] @@ -646,7 +646,7 @@ impl DepthCorrelatedCoordinateMapper { P0: ::windows_core::IntoParam, { let this = self; - unsafe { (::windows_core::Interface::vtable(this).UnprojectPoints)(::windows_core::Interface::as_raw(this), sourcepoints.len() as u32, sourcepoints.as_ptr(), targetcoordinatesystem.into_param().abi(), results.len() as u32, results.as_mut_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).UnprojectPoints)(::windows_core::Interface::as_raw(this), sourcepoints.len().try_into().unwrap(), sourcepoints.as_ptr(), targetcoordinatesystem.into_param().abi(), results.len().try_into().unwrap(), results.as_mut_ptr()).ok() } } #[doc = "Required features: `\"Foundation\"`, `\"Perception_Spatial\"`"] #[cfg(all(feature = "Foundation", feature = "Perception_Spatial"))] @@ -669,7 +669,7 @@ impl DepthCorrelatedCoordinateMapper { P1: ::windows_core::IntoParam, { let this = self; - unsafe { (::windows_core::Interface::vtable(this).MapPoints)(::windows_core::Interface::as_raw(this), sourcepoints.len() as u32, sourcepoints.as_ptr(), targetcoordinatesystem.into_param().abi(), targetcameraintrinsics.into_param().abi(), results.len() as u32, results.as_mut_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).MapPoints)(::windows_core::Interface::as_raw(this), sourcepoints.len().try_into().unwrap(), sourcepoints.as_ptr(), targetcoordinatesystem.into_param().abi(), targetcameraintrinsics.into_param().abi(), results.len().try_into().unwrap(), results.as_mut_ptr()).ok() } } } impl ::windows_core::RuntimeType for DepthCorrelatedCoordinateMapper { diff --git a/crates/libs/windows/src/Windows/Media/Devices/mod.rs b/crates/libs/windows/src/Windows/Media/Devices/mod.rs index edd9180706..e2052fb8cd 100644 --- a/crates/libs/windows/src/Windows/Media/Devices/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Devices/mod.rs @@ -4462,14 +4462,14 @@ impl VideoDeviceController { let this = &::windows_core::ComInterface::cast::(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetDevicePropertyByExtendedId)(::windows_core::Interface::as_raw(this), extendedpropertyid.len() as u32, extendedpropertyid.as_ptr(), maxpropertyvaluesize.try_into_param()?.abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetDevicePropertyByExtendedId)(::windows_core::Interface::as_raw(this), extendedpropertyid.len().try_into().unwrap(), extendedpropertyid.as_ptr(), maxpropertyvaluesize.try_into_param()?.abi(), &mut result__).from_abi(result__) } } pub fn SetDevicePropertyByExtendedId(&self, extendedpropertyid: &[u8], propertyvalue: &[u8]) -> ::windows_core::Result { let this = &::windows_core::ComInterface::cast::(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).SetDevicePropertyByExtendedId)(::windows_core::Interface::as_raw(this), extendedpropertyid.len() as u32, extendedpropertyid.as_ptr(), propertyvalue.len() as u32, propertyvalue.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).SetDevicePropertyByExtendedId)(::windows_core::Interface::as_raw(this), extendedpropertyid.len().try_into().unwrap(), extendedpropertyid.as_ptr(), propertyvalue.len().try_into().unwrap(), propertyvalue.as_ptr(), &mut result__).from_abi(result__) } } pub fn VideoTemporalDenoisingControl(&self) -> ::windows_core::Result { diff --git a/crates/libs/windows/src/Windows/Media/MediaProperties/mod.rs b/crates/libs/windows/src/Windows/Media/MediaProperties/mod.rs index 8fe2d98bc0..2d2a29de52 100644 --- a/crates/libs/windows/src/Windows/Media/MediaProperties/mod.rs +++ b/crates/libs/windows/src/Windows/Media/MediaProperties/mod.rs @@ -896,7 +896,7 @@ impl AudioEncodingProperties { } pub fn SetFormatUserData(&self, value: &[u8]) -> ::windows_core::Result<()> { let this = &::windows_core::ComInterface::cast::(self)?; - unsafe { (::windows_core::Interface::vtable(this).SetFormatUserData)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).SetFormatUserData)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr()).ok() } } pub fn GetFormatUserData(&self, value: &mut ::windows_core::Array) -> ::windows_core::Result<()> { let this = &::windows_core::ComInterface::cast::(self)?; @@ -2041,7 +2041,7 @@ impl TimedMetadataEncodingProperties { } pub fn SetFormatUserData(&self, value: &[u8]) -> ::windows_core::Result<()> { let this = &::windows_core::ComInterface::cast::(self)?; - unsafe { (::windows_core::Interface::vtable(this).SetFormatUserData)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).SetFormatUserData)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr()).ok() } } pub fn GetFormatUserData(&self, value: &mut ::windows_core::Array) -> ::windows_core::Result<()> { let this = &::windows_core::ComInterface::cast::(self)?; @@ -2069,13 +2069,13 @@ impl TimedMetadataEncodingProperties { pub fn CreateSsa(formatuserdata: &[u8]) -> ::windows_core::Result { Self::ITimedMetadataEncodingPropertiesStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateSsa)(::windows_core::Interface::as_raw(this), formatuserdata.len() as u32, formatuserdata.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateSsa)(::windows_core::Interface::as_raw(this), formatuserdata.len().try_into().unwrap(), formatuserdata.as_ptr(), &mut result__).from_abi(result__) }) } pub fn CreateVobSub(formatuserdata: &[u8]) -> ::windows_core::Result { Self::ITimedMetadataEncodingPropertiesStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateVobSub)(::windows_core::Interface::as_raw(this), formatuserdata.len() as u32, formatuserdata.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateVobSub)(::windows_core::Interface::as_raw(this), formatuserdata.len().try_into().unwrap(), formatuserdata.as_ptr(), &mut result__).from_abi(result__) }) } #[doc(hidden)] @@ -2187,7 +2187,7 @@ impl VideoEncodingProperties { } pub fn SetFormatUserData(&self, value: &[u8]) -> ::windows_core::Result<()> { let this = &::windows_core::ComInterface::cast::(self)?; - unsafe { (::windows_core::Interface::vtable(this).SetFormatUserData)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).SetFormatUserData)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr()).ok() } } pub fn GetFormatUserData(&self, value: &mut ::windows_core::Array) -> ::windows_core::Result<()> { let this = &::windows_core::ComInterface::cast::(self)?; diff --git a/crates/libs/windows/src/Windows/Media/Playback/mod.rs b/crates/libs/windows/src/Windows/Media/Playback/mod.rs index 267d6f4385..deebc90972 100644 --- a/crates/libs/windows/src/Windows/Media/Playback/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Playback/mod.rs @@ -2698,7 +2698,7 @@ impl MediaPlaybackAudioTrackList { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } } @@ -4779,7 +4779,7 @@ impl MediaPlaybackTimedMetadataTrackList { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } } @@ -4910,7 +4910,7 @@ impl MediaPlaybackVideoTrackList { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } } diff --git a/crates/libs/windows/src/Windows/Media/Protection/PlayReady/mod.rs b/crates/libs/windows/src/Windows/Media/Protection/PlayReady/mod.rs index 4f6b7809ad..3c64056923 100644 --- a/crates/libs/windows/src/Windows/Media/Protection/PlayReady/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Protection/PlayReady/mod.rs @@ -254,7 +254,7 @@ impl INDDownloadEngine { P0: ::windows_core::IntoParam, { let this = self; - unsafe { (::windows_core::Interface::vtable(this).Open)(::windows_core::Interface::as_raw(this), uri.into_param().abi(), sessionidbytes.len() as u32, sessionidbytes.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).Open)(::windows_core::Interface::as_raw(this), uri.into_param().abi(), sessionidbytes.len().try_into().unwrap(), sessionidbytes.as_ptr()).ok() } } #[doc = "Required features: `\"deprecated\"`"] #[cfg(feature = "deprecated")] @@ -390,7 +390,7 @@ impl INDDownloadEngineNotifier { #[cfg(feature = "deprecated")] pub fn OnPlayReadyObjectReceived(&self, databytes: &[u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).OnPlayReadyObjectReceived)(::windows_core::Interface::as_raw(this), databytes.len() as u32, databytes.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).OnPlayReadyObjectReceived)(::windows_core::Interface::as_raw(this), databytes.len().try_into().unwrap(), databytes.as_ptr()).ok() } } #[doc = "Required features: `\"deprecated\"`"] #[cfg(feature = "deprecated")] @@ -405,7 +405,7 @@ impl INDDownloadEngineNotifier { #[cfg(feature = "deprecated")] pub fn OnDataReceived(&self, databytes: &[u8], bytesreceived: u32) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).OnDataReceived)(::windows_core::Interface::as_raw(this), databytes.len() as u32, databytes.as_ptr(), bytesreceived).ok() } + unsafe { (::windows_core::Interface::vtable(this).OnDataReceived)(::windows_core::Interface::as_raw(this), databytes.len().try_into().unwrap(), databytes.as_ptr(), bytesreceived).ok() } } #[doc = "Required features: `\"deprecated\"`"] #[cfg(feature = "deprecated")] @@ -662,7 +662,7 @@ impl INDMessenger { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).SendRegistrationRequestAsync)(::windows_core::Interface::as_raw(this), sessionidbytes.len() as u32, sessionidbytes.as_ptr(), challengedatabytes.len() as u32, challengedatabytes.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).SendRegistrationRequestAsync)(::windows_core::Interface::as_raw(this), sessionidbytes.len().try_into().unwrap(), sessionidbytes.as_ptr(), challengedatabytes.len().try_into().unwrap(), challengedatabytes.as_ptr(), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"Foundation\"`, `\"deprecated\"`"] @@ -671,7 +671,7 @@ impl INDMessenger { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).SendProximityDetectionStartAsync)(::windows_core::Interface::as_raw(this), pdtype, transmitterchannelbytes.len() as u32, transmitterchannelbytes.as_ptr(), sessionidbytes.len() as u32, sessionidbytes.as_ptr(), challengedatabytes.len() as u32, challengedatabytes.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).SendProximityDetectionStartAsync)(::windows_core::Interface::as_raw(this), pdtype, transmitterchannelbytes.len().try_into().unwrap(), transmitterchannelbytes.as_ptr(), sessionidbytes.len().try_into().unwrap(), sessionidbytes.as_ptr(), challengedatabytes.len().try_into().unwrap(), challengedatabytes.as_ptr(), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"Foundation\"`, `\"deprecated\"`"] @@ -680,7 +680,7 @@ impl INDMessenger { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).SendProximityDetectionResponseAsync)(::windows_core::Interface::as_raw(this), pdtype, transmitterchannelbytes.len() as u32, transmitterchannelbytes.as_ptr(), sessionidbytes.len() as u32, sessionidbytes.as_ptr(), responsedatabytes.len() as u32, responsedatabytes.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).SendProximityDetectionResponseAsync)(::windows_core::Interface::as_raw(this), pdtype, transmitterchannelbytes.len().try_into().unwrap(), transmitterchannelbytes.as_ptr(), sessionidbytes.len().try_into().unwrap(), sessionidbytes.as_ptr(), responsedatabytes.len().try_into().unwrap(), responsedatabytes.as_ptr(), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"Foundation\"`, `\"deprecated\"`"] @@ -689,7 +689,7 @@ impl INDMessenger { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).SendLicenseFetchRequestAsync)(::windows_core::Interface::as_raw(this), sessionidbytes.len() as u32, sessionidbytes.as_ptr(), challengedatabytes.len() as u32, challengedatabytes.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).SendLicenseFetchRequestAsync)(::windows_core::Interface::as_raw(this), sessionidbytes.len().try_into().unwrap(), sessionidbytes.as_ptr(), challengedatabytes.len().try_into().unwrap(), challengedatabytes.as_ptr(), &mut result__).from_abi(result__) } } } @@ -984,7 +984,7 @@ impl INDStreamParser { #[cfg(feature = "deprecated")] pub fn ParseData(&self, databytes: &[u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).ParseData)(::windows_core::Interface::as_raw(this), databytes.len() as u32, databytes.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).ParseData)(::windows_core::Interface::as_raw(this), databytes.len().try_into().unwrap(), databytes.as_ptr()).ok() } } #[doc = "Required features: `\"Media_Core\"`, `\"deprecated\"`"] #[cfg(all(feature = "Media_Core", feature = "deprecated"))] @@ -1093,7 +1093,7 @@ impl INDStreamParserNotifier { P0: ::windows_core::IntoParam, { let this = self; - unsafe { (::windows_core::Interface::vtable(this).OnSampleParsed)(::windows_core::Interface::as_raw(this), streamid, streamtype, streamsample.into_param().abi(), pts, ccformat, ccdatabytes.len() as u32, ccdatabytes.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).OnSampleParsed)(::windows_core::Interface::as_raw(this), streamid, streamtype, streamsample.into_param().abi(), pts, ccformat, ccdatabytes.len().try_into().unwrap(), ccdatabytes.as_ptr()).ok() } } #[doc = "Required features: `\"Media_Core\"`, `\"deprecated\"`"] #[cfg(all(feature = "Media_Core", feature = "deprecated"))] @@ -1102,7 +1102,7 @@ impl INDStreamParserNotifier { P0: ::windows_core::TryIntoParam, { let this = self; - unsafe { (::windows_core::Interface::vtable(this).OnBeginSetupDecryptor)(::windows_core::Interface::as_raw(this), descriptor.try_into_param()?.abi(), keyid, probytes.len() as u32, probytes.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).OnBeginSetupDecryptor)(::windows_core::Interface::as_raw(this), descriptor.try_into_param()?.abi(), keyid, probytes.len().try_into().unwrap(), probytes.as_ptr()).ok() } } } #[cfg(feature = "deprecated")] @@ -1806,7 +1806,7 @@ impl IPlayReadyLicenseAcquisitionServiceRequest { let this = &::windows_core::ComInterface::cast::(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).ProcessManualEnablingResponse)(::windows_core::Interface::as_raw(this), responsebytes.len() as u32, responsebytes.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).ProcessManualEnablingResponse)(::windows_core::Interface::as_raw(this), responsebytes.len().try_into().unwrap(), responsebytes.as_ptr(), &mut result__).from_abi(result__) } } } @@ -2181,7 +2181,7 @@ impl IPlayReadySecureStopServiceRequest { let this = &::windows_core::ComInterface::cast::(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).ProcessManualEnablingResponse)(::windows_core::Interface::as_raw(this), responsebytes.len() as u32, responsebytes.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).ProcessManualEnablingResponse)(::windows_core::Interface::as_raw(this), responsebytes.len().try_into().unwrap(), responsebytes.as_ptr(), &mut result__).from_abi(result__) } } } @@ -2297,7 +2297,7 @@ impl IPlayReadyServiceRequest { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).ProcessManualEnablingResponse)(::windows_core::Interface::as_raw(this), responsebytes.len() as u32, responsebytes.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).ProcessManualEnablingResponse)(::windows_core::Interface::as_raw(this), responsebytes.len().try_into().unwrap(), responsebytes.as_ptr(), &mut result__).from_abi(result__) } } pub fn ProtectionSystem(&self) -> ::windows_core::Result<::windows_core::GUID> { @@ -2679,7 +2679,7 @@ impl NDCustomData { pub fn CreateInstance(customdatatypeidbytes: &[u8], customdatabytes: &[u8]) -> ::windows_core::Result { Self::INDCustomDataFactory(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateInstance)(::windows_core::Interface::as_raw(this), customdatatypeidbytes.len() as u32, customdatatypeidbytes.as_ptr(), customdatabytes.len() as u32, customdatabytes.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateInstance)(::windows_core::Interface::as_raw(this), customdatatypeidbytes.len().try_into().unwrap(), customdatatypeidbytes.as_ptr(), customdatabytes.len().try_into().unwrap(), customdatabytes.as_ptr(), &mut result__).from_abi(result__) }) } #[doc(hidden)] @@ -2733,7 +2733,7 @@ impl NDDownloadEngineNotifier { #[cfg(feature = "deprecated")] pub fn OnPlayReadyObjectReceived(&self, databytes: &[u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).OnPlayReadyObjectReceived)(::windows_core::Interface::as_raw(this), databytes.len() as u32, databytes.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).OnPlayReadyObjectReceived)(::windows_core::Interface::as_raw(this), databytes.len().try_into().unwrap(), databytes.as_ptr()).ok() } } #[doc = "Required features: `\"deprecated\"`"] #[cfg(feature = "deprecated")] @@ -2748,7 +2748,7 @@ impl NDDownloadEngineNotifier { #[cfg(feature = "deprecated")] pub fn OnDataReceived(&self, databytes: &[u8], bytesreceived: u32) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).OnDataReceived)(::windows_core::Interface::as_raw(this), databytes.len() as u32, databytes.as_ptr(), bytesreceived).ok() } + unsafe { (::windows_core::Interface::vtable(this).OnDataReceived)(::windows_core::Interface::as_raw(this), databytes.len().try_into().unwrap(), databytes.as_ptr(), bytesreceived).ok() } } #[doc = "Required features: `\"deprecated\"`"] #[cfg(feature = "deprecated")] @@ -2834,7 +2834,7 @@ impl NDLicenseFetchDescriptor { { Self::INDLicenseFetchDescriptorFactory(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateInstance)(::windows_core::Interface::as_raw(this), contentidtype, contentidbytes.len() as u32, contentidbytes.as_ptr(), licensefetchchallengecustomdata.try_into_param()?.abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateInstance)(::windows_core::Interface::as_raw(this), contentidtype, contentidbytes.len().try_into().unwrap(), contentidbytes.as_ptr(), licensefetchchallengecustomdata.try_into_param()?.abi(), &mut result__).from_abi(result__) }) } #[doc(hidden)] @@ -2951,7 +2951,7 @@ impl NDStreamParserNotifier { P0: ::windows_core::IntoParam, { let this = self; - unsafe { (::windows_core::Interface::vtable(this).OnSampleParsed)(::windows_core::Interface::as_raw(this), streamid, streamtype, streamsample.into_param().abi(), pts, ccformat, ccdatabytes.len() as u32, ccdatabytes.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).OnSampleParsed)(::windows_core::Interface::as_raw(this), streamid, streamtype, streamsample.into_param().abi(), pts, ccformat, ccdatabytes.len().try_into().unwrap(), ccdatabytes.as_ptr()).ok() } } #[doc = "Required features: `\"Media_Core\"`, `\"deprecated\"`"] #[cfg(all(feature = "Media_Core", feature = "deprecated"))] @@ -2960,7 +2960,7 @@ impl NDStreamParserNotifier { P0: ::windows_core::TryIntoParam, { let this = self; - unsafe { (::windows_core::Interface::vtable(this).OnBeginSetupDecryptor)(::windows_core::Interface::as_raw(this), descriptor.try_into_param()?.abi(), keyid, probytes.len() as u32, probytes.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).OnBeginSetupDecryptor)(::windows_core::Interface::as_raw(this), descriptor.try_into_param()?.abi(), keyid, probytes.len().try_into().unwrap(), probytes.as_ptr()).ok() } } } #[cfg(feature = "deprecated")] @@ -2996,7 +2996,7 @@ impl NDTCPMessenger { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).SendRegistrationRequestAsync)(::windows_core::Interface::as_raw(this), sessionidbytes.len() as u32, sessionidbytes.as_ptr(), challengedatabytes.len() as u32, challengedatabytes.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).SendRegistrationRequestAsync)(::windows_core::Interface::as_raw(this), sessionidbytes.len().try_into().unwrap(), sessionidbytes.as_ptr(), challengedatabytes.len().try_into().unwrap(), challengedatabytes.as_ptr(), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"Foundation\"`, `\"deprecated\"`"] @@ -3005,7 +3005,7 @@ impl NDTCPMessenger { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).SendProximityDetectionStartAsync)(::windows_core::Interface::as_raw(this), pdtype, transmitterchannelbytes.len() as u32, transmitterchannelbytes.as_ptr(), sessionidbytes.len() as u32, sessionidbytes.as_ptr(), challengedatabytes.len() as u32, challengedatabytes.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).SendProximityDetectionStartAsync)(::windows_core::Interface::as_raw(this), pdtype, transmitterchannelbytes.len().try_into().unwrap(), transmitterchannelbytes.as_ptr(), sessionidbytes.len().try_into().unwrap(), sessionidbytes.as_ptr(), challengedatabytes.len().try_into().unwrap(), challengedatabytes.as_ptr(), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"Foundation\"`, `\"deprecated\"`"] @@ -3014,7 +3014,7 @@ impl NDTCPMessenger { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).SendProximityDetectionResponseAsync)(::windows_core::Interface::as_raw(this), pdtype, transmitterchannelbytes.len() as u32, transmitterchannelbytes.as_ptr(), sessionidbytes.len() as u32, sessionidbytes.as_ptr(), responsedatabytes.len() as u32, responsedatabytes.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).SendProximityDetectionResponseAsync)(::windows_core::Interface::as_raw(this), pdtype, transmitterchannelbytes.len().try_into().unwrap(), transmitterchannelbytes.as_ptr(), sessionidbytes.len().try_into().unwrap(), sessionidbytes.as_ptr(), responsedatabytes.len().try_into().unwrap(), responsedatabytes.as_ptr(), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"Foundation\"`, `\"deprecated\"`"] @@ -3023,7 +3023,7 @@ impl NDTCPMessenger { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).SendLicenseFetchRequestAsync)(::windows_core::Interface::as_raw(this), sessionidbytes.len() as u32, sessionidbytes.as_ptr(), challengedatabytes.len() as u32, challengedatabytes.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).SendLicenseFetchRequestAsync)(::windows_core::Interface::as_raw(this), sessionidbytes.len().try_into().unwrap(), sessionidbytes.as_ptr(), challengedatabytes.len().try_into().unwrap(), challengedatabytes.as_ptr(), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"deprecated\"`"] @@ -3162,7 +3162,7 @@ impl PlayReadyContentHeader { { Self::IPlayReadyContentHeaderFactory(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateInstanceFromWindowsMediaDrmHeader)(::windows_core::Interface::as_raw(this), headerbytes.len() as u32, headerbytes.as_ptr(), licenseacquisitionurl.into_param().abi(), licenseacquisitionuserinterfaceurl.into_param().abi(), ::core::mem::transmute_copy(customattributes), domainserviceid, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateInstanceFromWindowsMediaDrmHeader)(::windows_core::Interface::as_raw(this), headerbytes.len().try_into().unwrap(), headerbytes.as_ptr(), licenseacquisitionurl.into_param().abi(), licenseacquisitionuserinterfaceurl.into_param().abi(), ::core::mem::transmute_copy(customattributes), domainserviceid, &mut result__).from_abi(result__) }) } #[doc = "Required features: `\"Foundation\"`"] @@ -3180,7 +3180,7 @@ impl PlayReadyContentHeader { pub fn CreateInstanceFromPlayReadyHeader(headerbytes: &[u8]) -> ::windows_core::Result { Self::IPlayReadyContentHeaderFactory(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateInstanceFromPlayReadyHeader)(::windows_core::Interface::as_raw(this), headerbytes.len() as u32, headerbytes.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateInstanceFromPlayReadyHeader)(::windows_core::Interface::as_raw(this), headerbytes.len().try_into().unwrap(), headerbytes.as_ptr(), &mut result__).from_abi(result__) }) } #[doc = "Required features: `\"Foundation\"`"] @@ -3192,7 +3192,7 @@ impl PlayReadyContentHeader { { Self::IPlayReadyContentHeaderFactory2(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateInstanceFromComponents2)(::windows_core::Interface::as_raw(this), dwflags, contentkeyids.len() as u32, contentkeyids.as_ptr(), contentkeyidstrings.len() as u32, ::core::mem::transmute(contentkeyidstrings.as_ptr()), contentencryptionalgorithm, licenseacquisitionurl.into_param().abi(), licenseacquisitionuserinterfaceurl.into_param().abi(), ::core::mem::transmute_copy(customattributes), domainserviceid, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateInstanceFromComponents2)(::windows_core::Interface::as_raw(this), dwflags, contentkeyids.len().try_into().unwrap(), contentkeyids.as_ptr(), contentkeyidstrings.len().try_into().unwrap(), ::core::mem::transmute(contentkeyidstrings.as_ptr()), contentencryptionalgorithm, licenseacquisitionurl.into_param().abi(), licenseacquisitionuserinterfaceurl.into_param().abi(), ::core::mem::transmute_copy(customattributes), domainserviceid, &mut result__).from_abi(result__) }) } #[doc(hidden)] @@ -3401,7 +3401,7 @@ impl PlayReadyDomainIterator { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } } @@ -3546,7 +3546,7 @@ impl PlayReadyDomainJoinServiceRequest { let this = &::windows_core::ComInterface::cast::(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).ProcessManualEnablingResponse)(::windows_core::Interface::as_raw(this), responsebytes.len() as u32, responsebytes.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).ProcessManualEnablingResponse)(::windows_core::Interface::as_raw(this), responsebytes.len().try_into().unwrap(), responsebytes.as_ptr(), &mut result__).from_abi(result__) } } } @@ -3675,7 +3675,7 @@ impl PlayReadyDomainLeaveServiceRequest { let this = &::windows_core::ComInterface::cast::(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).ProcessManualEnablingResponse)(::windows_core::Interface::as_raw(this), responsebytes.len() as u32, responsebytes.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).ProcessManualEnablingResponse)(::windows_core::Interface::as_raw(this), responsebytes.len().try_into().unwrap(), responsebytes.as_ptr(), &mut result__).from_abi(result__) } } } @@ -3819,7 +3819,7 @@ impl PlayReadyIndividualizationServiceRequest { let this = &::windows_core::ComInterface::cast::(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).ProcessManualEnablingResponse)(::windows_core::Interface::as_raw(this), responsebytes.len() as u32, responsebytes.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).ProcessManualEnablingResponse)(::windows_core::Interface::as_raw(this), responsebytes.len().try_into().unwrap(), responsebytes.as_ptr(), &mut result__).from_abi(result__) } } } @@ -4068,7 +4068,7 @@ impl PlayReadyLicenseAcquisitionServiceRequest { let this = &::windows_core::ComInterface::cast::(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).ProcessManualEnablingResponse)(::windows_core::Interface::as_raw(this), responsebytes.len() as u32, responsebytes.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).ProcessManualEnablingResponse)(::windows_core::Interface::as_raw(this), responsebytes.len().try_into().unwrap(), responsebytes.as_ptr(), &mut result__).from_abi(result__) } } } @@ -4204,7 +4204,7 @@ impl PlayReadyLicenseIterator { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } } @@ -4346,7 +4346,7 @@ impl PlayReadyMeteringReportServiceRequest { } pub fn SetMeteringCertificate(&self, meteringcertbytes: &[u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).SetMeteringCertificate)(::windows_core::Interface::as_raw(this), meteringcertbytes.len() as u32, meteringcertbytes.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).SetMeteringCertificate)(::windows_core::Interface::as_raw(this), meteringcertbytes.len().try_into().unwrap(), meteringcertbytes.as_ptr()).ok() } } #[doc = "Required features: `\"Foundation\"`"] #[cfg(feature = "Foundation")] @@ -4411,7 +4411,7 @@ impl PlayReadyMeteringReportServiceRequest { let this = &::windows_core::ComInterface::cast::(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).ProcessManualEnablingResponse)(::windows_core::Interface::as_raw(this), responsebytes.len() as u32, responsebytes.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).ProcessManualEnablingResponse)(::windows_core::Interface::as_raw(this), responsebytes.len().try_into().unwrap(), responsebytes.as_ptr(), &mut result__).from_abi(result__) } } } @@ -4518,7 +4518,7 @@ impl PlayReadyRevocationServiceRequest { let this = &::windows_core::ComInterface::cast::(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).ProcessManualEnablingResponse)(::windows_core::Interface::as_raw(this), responsebytes.len() as u32, responsebytes.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).ProcessManualEnablingResponse)(::windows_core::Interface::as_raw(this), responsebytes.len().try_into().unwrap(), responsebytes.as_ptr(), &mut result__).from_abi(result__) } } } @@ -4558,7 +4558,7 @@ impl PlayReadySecureStopIterable { pub fn CreateInstance(publishercertbytes: &[u8]) -> ::windows_core::Result { Self::IPlayReadySecureStopIterableFactory(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateInstance)(::windows_core::Interface::as_raw(this), publishercertbytes.len() as u32, publishercertbytes.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateInstance)(::windows_core::Interface::as_raw(this), publishercertbytes.len().try_into().unwrap(), publishercertbytes.as_ptr(), &mut result__).from_abi(result__) }) } #[doc(hidden)] @@ -4643,7 +4643,7 @@ impl PlayReadySecureStopIterator { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } } @@ -4727,13 +4727,13 @@ impl PlayReadySecureStopServiceRequest { pub fn CreateInstance(publishercertbytes: &[u8]) -> ::windows_core::Result { Self::IPlayReadySecureStopServiceRequestFactory(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateInstance)(::windows_core::Interface::as_raw(this), publishercertbytes.len() as u32, publishercertbytes.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateInstance)(::windows_core::Interface::as_raw(this), publishercertbytes.len().try_into().unwrap(), publishercertbytes.as_ptr(), &mut result__).from_abi(result__) }) } pub fn CreateInstanceFromSessionID(sessionid: ::windows_core::GUID, publishercertbytes: &[u8]) -> ::windows_core::Result { Self::IPlayReadySecureStopServiceRequestFactory(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateInstanceFromSessionID)(::windows_core::Interface::as_raw(this), sessionid, publishercertbytes.len() as u32, publishercertbytes.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateInstanceFromSessionID)(::windows_core::Interface::as_raw(this), sessionid, publishercertbytes.len().try_into().unwrap(), publishercertbytes.as_ptr(), &mut result__).from_abi(result__) }) } #[doc = "Required features: `\"Foundation\"`"] @@ -4799,7 +4799,7 @@ impl PlayReadySecureStopServiceRequest { let this = &::windows_core::ComInterface::cast::(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).ProcessManualEnablingResponse)(::windows_core::Interface::as_raw(this), responsebytes.len() as u32, responsebytes.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).ProcessManualEnablingResponse)(::windows_core::Interface::as_raw(this), responsebytes.len().try_into().unwrap(), responsebytes.as_ptr(), &mut result__).from_abi(result__) } } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Networking/NetworkOperators/mod.rs b/crates/libs/windows/src/Windows/Networking/NetworkOperators/mod.rs index f71c856c34..bd8d93caab 100644 --- a/crates/libs/windows/src/Windows/Networking/NetworkOperators/mod.rs +++ b/crates/libs/windows/src/Windows/Networking/NetworkOperators/mod.rs @@ -7490,7 +7490,7 @@ impl UssdMessage { } pub fn SetPayload(&self, value: &[u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).SetPayload)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).SetPayload)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr()).ok() } } pub fn PayloadAsText(&self) -> ::windows_core::Result<::windows_core::HSTRING> { let this = self; diff --git a/crates/libs/windows/src/Windows/Networking/ServiceDiscovery/Dnssd/mod.rs b/crates/libs/windows/src/Windows/Networking/ServiceDiscovery/Dnssd/mod.rs index bb12807fa6..d5d2b5c97e 100644 --- a/crates/libs/windows/src/Windows/Networking/ServiceDiscovery/Dnssd/mod.rs +++ b/crates/libs/windows/src/Windows/Networking/ServiceDiscovery/Dnssd/mod.rs @@ -392,7 +392,7 @@ impl DnssdServiceInstanceCollection { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } } diff --git a/crates/libs/windows/src/Windows/Networking/Vpn/mod.rs b/crates/libs/windows/src/Windows/Networking/Vpn/mod.rs index eeb6b6bc49..4e2bcd086b 100644 --- a/crates/libs/windows/src/Windows/Networking/Vpn/mod.rs +++ b/crates/libs/windows/src/Windows/Networking/Vpn/mod.rs @@ -827,7 +827,7 @@ impl IVpnInterfaceIdFactory { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateVpnInterfaceId)(::windows_core::Interface::as_raw(this), address.len() as u32, address.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateVpnInterfaceId)(::windows_core::Interface::as_raw(this), address.len().try_into().unwrap(), address.as_ptr(), &mut result__).from_abi(result__) } } } @@ -3165,7 +3165,7 @@ impl VpnInterfaceId { pub fn CreateVpnInterfaceId(address: &[u8]) -> ::windows_core::Result { Self::IVpnInterfaceIdFactory(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateVpnInterfaceId)(::windows_core::Interface::as_raw(this), address.len() as u32, address.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateVpnInterfaceId)(::windows_core::Interface::as_raw(this), address.len().try_into().unwrap(), address.as_ptr(), &mut result__).from_abi(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/Networking/XboxLive/mod.rs b/crates/libs/windows/src/Windows/Networking/XboxLive/mod.rs index 172c43c1e7..e16784d463 100644 --- a/crates/libs/windows/src/Windows/Networking/XboxLive/mod.rs +++ b/crates/libs/windows/src/Windows/Networking/XboxLive/mod.rs @@ -392,7 +392,7 @@ impl XboxLiveDeviceAddress { } pub fn GetSnapshotAsBytes(&self, buffer: &mut [u8], byteswritten: &mut u32) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).GetSnapshotAsBytes)(::windows_core::Interface::as_raw(this), buffer.len() as u32, buffer.as_mut_ptr(), byteswritten).ok() } + unsafe { (::windows_core::Interface::vtable(this).GetSnapshotAsBytes)(::windows_core::Interface::as_raw(this), buffer.len().try_into().unwrap(), buffer.as_mut_ptr(), byteswritten).ok() } } pub fn Compare(&self, otherdeviceaddress: P0) -> ::windows_core::Result where @@ -445,7 +445,7 @@ impl XboxLiveDeviceAddress { pub fn CreateFromSnapshotBytes(buffer: &[u8]) -> ::windows_core::Result { Self::IXboxLiveDeviceAddressStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromSnapshotBytes)(::windows_core::Interface::as_raw(this), buffer.len() as u32, buffer.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromSnapshotBytes)(::windows_core::Interface::as_raw(this), buffer.len().try_into().unwrap(), buffer.as_ptr(), &mut result__).from_abi(result__) }) } pub fn GetLocal() -> ::windows_core::Result { @@ -514,11 +514,11 @@ impl XboxLiveEndpointPair { } pub fn GetRemoteSocketAddressBytes(&self, socketaddress: &mut [u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).GetRemoteSocketAddressBytes)(::windows_core::Interface::as_raw(this), socketaddress.len() as u32, socketaddress.as_mut_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).GetRemoteSocketAddressBytes)(::windows_core::Interface::as_raw(this), socketaddress.len().try_into().unwrap(), socketaddress.as_mut_ptr()).ok() } } pub fn GetLocalSocketAddressBytes(&self, socketaddress: &mut [u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).GetLocalSocketAddressBytes)(::windows_core::Interface::as_raw(this), socketaddress.len() as u32, socketaddress.as_mut_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).GetLocalSocketAddressBytes)(::windows_core::Interface::as_raw(this), socketaddress.len().try_into().unwrap(), socketaddress.as_mut_ptr()).ok() } } pub fn State(&self) -> ::windows_core::Result { let this = self; @@ -572,7 +572,7 @@ impl XboxLiveEndpointPair { pub fn FindEndpointPairBySocketAddressBytes(localsocketaddress: &[u8], remotesocketaddress: &[u8]) -> ::windows_core::Result { Self::IXboxLiveEndpointPairStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).FindEndpointPairBySocketAddressBytes)(::windows_core::Interface::as_raw(this), localsocketaddress.len() as u32, localsocketaddress.as_ptr(), remotesocketaddress.len() as u32, remotesocketaddress.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).FindEndpointPairBySocketAddressBytes)(::windows_core::Interface::as_raw(this), localsocketaddress.len().try_into().unwrap(), localsocketaddress.as_ptr(), remotesocketaddress.len().try_into().unwrap(), remotesocketaddress.as_ptr(), &mut result__).from_abi(result__) }) } pub fn FindEndpointPairByHostNamesAndPorts(localhostname: P0, localport: &::windows_core::HSTRING, remotehostname: P1, remoteport: &::windows_core::HSTRING) -> ::windows_core::Result @@ -1009,7 +1009,7 @@ impl XboxLiveQualityOfServiceMeasurement { } } pub fn PublishPrivatePayloadBytes(payload: &[u8]) -> ::windows_core::Result<()> { - Self::IXboxLiveQualityOfServiceMeasurementStatics(|this| unsafe { (::windows_core::Interface::vtable(this).PublishPrivatePayloadBytes)(::windows_core::Interface::as_raw(this), payload.len() as u32, payload.as_ptr()).ok() }) + Self::IXboxLiveQualityOfServiceMeasurementStatics(|this| unsafe { (::windows_core::Interface::vtable(this).PublishPrivatePayloadBytes)(::windows_core::Interface::as_raw(this), payload.len().try_into().unwrap(), payload.as_ptr()).ok() }) } pub fn ClearPrivatePayload() -> ::windows_core::Result<()> { Self::IXboxLiveQualityOfServiceMeasurementStatics(|this| unsafe { (::windows_core::Interface::vtable(this).ClearPrivatePayload)(::windows_core::Interface::as_raw(this)).ok() }) diff --git a/crates/libs/windows/src/Windows/Perception/People/mod.rs b/crates/libs/windows/src/Windows/Perception/People/mod.rs index 6fdbec9f98..2799049113 100644 --- a/crates/libs/windows/src/Windows/Perception/People/mod.rs +++ b/crates/libs/windows/src/Windows/Perception/People/mod.rs @@ -238,7 +238,7 @@ impl HandMeshObserver { } pub fn GetTriangleIndices(&self, indices: &mut [u16]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).GetTriangleIndices)(::windows_core::Interface::as_raw(this), indices.len() as u32, indices.as_mut_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).GetTriangleIndices)(::windows_core::Interface::as_raw(this), indices.len().try_into().unwrap(), indices.as_mut_ptr()).ok() } } pub fn GetVertexStateForPose(&self, handpose: P0) -> ::windows_core::Result where @@ -304,7 +304,7 @@ impl HandMeshVertexState { #[cfg(feature = "Foundation_Numerics")] pub fn GetVertices(&self, vertices: &mut [HandMeshVertex]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).GetVertices)(::windows_core::Interface::as_raw(this), vertices.len() as u32, vertices.as_mut_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).GetVertices)(::windows_core::Interface::as_raw(this), vertices.len().try_into().unwrap(), vertices.as_mut_ptr()).ok() } } pub fn UpdateTimestamp(&self) -> ::windows_core::Result { let this = self; @@ -354,7 +354,7 @@ impl HandPose { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).TryGetJoints)(::windows_core::Interface::as_raw(this), coordinatesystem.into_param().abi(), joints.len() as u32, joints.as_ptr(), jointposes.len() as u32, jointposes.as_mut_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).TryGetJoints)(::windows_core::Interface::as_raw(this), coordinatesystem.into_param().abi(), joints.len().try_into().unwrap(), joints.as_ptr(), jointposes.len().try_into().unwrap(), jointposes.as_mut_ptr(), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"Foundation_Numerics\"`"] @@ -370,7 +370,7 @@ impl HandPose { #[cfg(feature = "Foundation_Numerics")] pub fn GetRelativeJoints(&self, joints: &[HandJointKind], referencejoints: &[HandJointKind], jointposes: &mut [JointPose]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).GetRelativeJoints)(::windows_core::Interface::as_raw(this), joints.len() as u32, joints.as_ptr(), referencejoints.len() as u32, referencejoints.as_ptr(), jointposes.len() as u32, jointposes.as_mut_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).GetRelativeJoints)(::windows_core::Interface::as_raw(this), joints.len().try_into().unwrap(), joints.as_ptr(), referencejoints.len().try_into().unwrap(), referencejoints.as_ptr(), jointposes.len().try_into().unwrap(), jointposes.as_mut_ptr()).ok() } } } impl ::windows_core::RuntimeType for HandPose { diff --git a/crates/libs/windows/src/Windows/Security/Cryptography/Certificates/mod.rs b/crates/libs/windows/src/Windows/Security/Cryptography/Certificates/mod.rs index ce4a34c9b7..b3dcfe00aa 100644 --- a/crates/libs/windows/src/Windows/Security/Cryptography/Certificates/mod.rs +++ b/crates/libs/windows/src/Windows/Security/Cryptography/Certificates/mod.rs @@ -1404,7 +1404,7 @@ impl CertificateExtension { } pub fn SetValue(&self, value: &[u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).SetValue)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).SetValue)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr()).ok() } } } impl ::windows_core::RuntimeType for CertificateExtension { @@ -1588,7 +1588,7 @@ impl CertificateQuery { } pub fn SetThumbprint(&self, value: &[u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).SetThumbprint)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).SetThumbprint)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr()).ok() } } pub fn HardwareOnly(&self) -> ::windows_core::Result { let this = self; @@ -1819,7 +1819,7 @@ impl CertificateRequestProperties { } pub fn SetCurveParameters(&self, value: &[u8]) -> ::windows_core::Result<()> { let this = &::windows_core::ComInterface::cast::(self)?; - unsafe { (::windows_core::Interface::vtable(this).SetCurveParameters)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).SetCurveParameters)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr()).ok() } } pub fn ContainerNamePrefix(&self) -> ::windows_core::Result<::windows_core::HSTRING> { let this = &::windows_core::ComInterface::cast::(self)?; diff --git a/crates/libs/windows/src/Windows/Security/Cryptography/Core/mod.rs b/crates/libs/windows/src/Windows/Security/Cryptography/Core/mod.rs index 0d84c5fdd4..0187fd7253 100644 --- a/crates/libs/windows/src/Windows/Security/Cryptography/Core/mod.rs +++ b/crates/libs/windows/src/Windows/Security/Cryptography/Core/mod.rs @@ -953,7 +953,7 @@ impl AsymmetricKeyAlgorithmProvider { let this = &::windows_core::ComInterface::cast::(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateKeyPairWithCurveParameters)(::windows_core::Interface::as_raw(this), parameters.len() as u32, parameters.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateKeyPairWithCurveParameters)(::windows_core::Interface::as_raw(this), parameters.len().try_into().unwrap(), parameters.as_ptr(), &mut result__).from_abi(result__) } } pub fn OpenAlgorithm(algorithm: &::windows_core::HSTRING) -> ::windows_core::Result { diff --git a/crates/libs/windows/src/Windows/Security/Cryptography/mod.rs b/crates/libs/windows/src/Windows/Security/Cryptography/mod.rs index 1706e3d0c5..50a6e8f0d2 100644 --- a/crates/libs/windows/src/Windows/Security/Cryptography/mod.rs +++ b/crates/libs/windows/src/Windows/Security/Cryptography/mod.rs @@ -96,7 +96,7 @@ impl CryptographicBuffer { pub fn CreateFromByteArray(value: &[u8]) -> ::windows_core::Result { Self::ICryptographicBufferStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).CreateFromByteArray)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).CreateFromByteArray)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr(), &mut result__).from_abi(result__) }) } #[doc = "Required features: `\"Storage_Streams\"`"] diff --git a/crates/libs/windows/src/Windows/Storage/AccessCache/mod.rs b/crates/libs/windows/src/Windows/Storage/AccessCache/mod.rs index 896200304c..b25e90cff6 100644 --- a/crates/libs/windows/src/Windows/Storage/AccessCache/mod.rs +++ b/crates/libs/windows/src/Windows/Storage/AccessCache/mod.rs @@ -332,7 +332,7 @@ impl AccessListEntryView { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } } diff --git a/crates/libs/windows/src/Windows/Storage/Pickers/mod.rs b/crates/libs/windows/src/Windows/Storage/Pickers/mod.rs index c3725b5161..75cfabfefa 100644 --- a/crates/libs/windows/src/Windows/Storage/Pickers/mod.rs +++ b/crates/libs/windows/src/Windows/Storage/Pickers/mod.rs @@ -438,14 +438,14 @@ impl FileExtensionVector { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"Foundation_Collections\"`"] #[cfg(feature = "Foundation_Collections")] pub fn ReplaceAll(&self, items: &[::windows_core::HSTRING]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } + unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len().try_into().unwrap(), ::core::mem::transmute(items.as_ptr())).ok() } } } #[cfg(feature = "Foundation_Collections")] @@ -827,7 +827,7 @@ impl FilePickerSelectedFilesArray { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } } diff --git a/crates/libs/windows/src/Windows/Storage/Search/mod.rs b/crates/libs/windows/src/Windows/Storage/Search/mod.rs index 4cc8c90c34..40bc988579 100644 --- a/crates/libs/windows/src/Windows/Storage/Search/mod.rs +++ b/crates/libs/windows/src/Windows/Storage/Search/mod.rs @@ -1328,14 +1328,14 @@ impl SortEntryVector { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"Foundation_Collections\"`"] #[cfg(feature = "Foundation_Collections")] pub fn ReplaceAll(&self, items: &[SortEntry]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } + unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len().try_into().unwrap(), ::core::mem::transmute(items.as_ptr())).ok() } } } #[cfg(feature = "Foundation_Collections")] diff --git a/crates/libs/windows/src/Windows/Storage/Streams/mod.rs b/crates/libs/windows/src/Windows/Storage/Streams/mod.rs index f2f86afa38..30a9d7385d 100644 --- a/crates/libs/windows/src/Windows/Storage/Streams/mod.rs +++ b/crates/libs/windows/src/Windows/Storage/Streams/mod.rs @@ -159,7 +159,7 @@ impl IDataReader { } pub fn ReadBytes(&self, value: &mut [u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).ReadBytes)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_mut_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).ReadBytes)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_mut_ptr()).ok() } } pub fn ReadBuffer(&self, length: u32) -> ::windows_core::Result { let this = self; @@ -408,7 +408,7 @@ impl IDataWriter { } pub fn WriteBytes(&self, value: &[u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).WriteBytes)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).WriteBytes)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr()).ok() } } pub fn WriteBuffer(&self, buffer: P0) -> ::windows_core::Result<()> where @@ -1299,7 +1299,7 @@ impl DataReader { } pub fn ReadBytes(&self, value: &mut [u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).ReadBytes)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_mut_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).ReadBytes)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_mut_ptr()).ok() } } pub fn ReadBuffer(&self, length: u32) -> ::windows_core::Result { let this = self; @@ -1656,7 +1656,7 @@ impl DataWriter { } pub fn WriteBytes(&self, value: &[u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).WriteBytes)(::windows_core::Interface::as_raw(this), value.len() as u32, value.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).WriteBytes)(::windows_core::Interface::as_raw(this), value.len().try_into().unwrap(), value.as_ptr()).ok() } } pub fn WriteBuffer(&self, buffer: P0) -> ::windows_core::Result<()> where diff --git a/crates/libs/windows/src/Windows/Storage/mod.rs b/crates/libs/windows/src/Windows/Storage/mod.rs index de4fc881fa..edfc2a236c 100644 --- a/crates/libs/windows/src/Windows/Storage/mod.rs +++ b/crates/libs/windows/src/Windows/Storage/mod.rs @@ -3452,7 +3452,7 @@ impl FileIO { { Self::IFileIOStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).WriteBytesAsync)(::windows_core::Interface::as_raw(this), file.try_into_param()?.abi(), buffer.len() as u32, buffer.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).WriteBytesAsync)(::windows_core::Interface::as_raw(this), file.try_into_param()?.abi(), buffer.len().try_into().unwrap(), buffer.as_ptr(), &mut result__).from_abi(result__) }) } #[doc(hidden)] @@ -3755,7 +3755,7 @@ impl PathIO { pub fn WriteBytesAsync(absolutepath: &::windows_core::HSTRING, buffer: &[u8]) -> ::windows_core::Result { Self::IPathIOStatics(|this| unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).WriteBytesAsync)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(absolutepath), buffer.len() as u32, buffer.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).WriteBytesAsync)(::windows_core::Interface::as_raw(this), ::core::mem::transmute_copy(absolutepath), buffer.len().try_into().unwrap(), buffer.as_ptr(), &mut result__).from_abi(result__) }) } #[doc(hidden)] diff --git a/crates/libs/windows/src/Windows/System/RemoteDesktop/Input/mod.rs b/crates/libs/windows/src/Windows/System/RemoteDesktop/Input/mod.rs index 96a48a4d17..939b3561a7 100644 --- a/crates/libs/windows/src/Windows/System/RemoteDesktop/Input/mod.rs +++ b/crates/libs/windows/src/Windows/System/RemoteDesktop/Input/mod.rs @@ -65,7 +65,7 @@ impl RemoteTextConnection { } pub fn ReportDataReceived(&self, pdudata: &[u8]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).ReportDataReceived)(::windows_core::Interface::as_raw(this), pdudata.len() as u32, pdudata.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).ReportDataReceived)(::windows_core::Interface::as_raw(this), pdudata.len().try_into().unwrap(), pdudata.as_ptr()).ok() } } pub fn CreateInstance(connectionid: ::windows_core::GUID, pduforwarder: P0) -> ::windows_core::Result where @@ -111,7 +111,7 @@ impl RemoteTextConnectionDataHandler { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).Invoke)(::windows_core::Interface::as_raw(this), pdudata.len() as u32, pdudata.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).Invoke)(::windows_core::Interface::as_raw(this), pdudata.len().try_into().unwrap(), pdudata.as_ptr(), &mut result__).from_abi(result__) } } } diff --git a/crates/libs/windows/src/Windows/UI/Composition/Scenes/mod.rs b/crates/libs/windows/src/Windows/UI/Composition/Scenes/mod.rs index 742b786db7..d1639aa6b8 100644 --- a/crates/libs/windows/src/Windows/UI/Composition/Scenes/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Composition/Scenes/mod.rs @@ -1113,14 +1113,14 @@ impl SceneComponentCollection { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"Foundation_Collections\"`"] #[cfg(feature = "Foundation_Collections")] pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } + unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len().try_into().unwrap(), ::core::mem::transmute(items.as_ptr())).ok() } } } #[cfg(feature = "Foundation_Collections")] @@ -2986,14 +2986,14 @@ impl SceneNodeCollection { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"Foundation_Collections\"`"] #[cfg(feature = "Foundation_Collections")] pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } + unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len().try_into().unwrap(), ::core::mem::transmute(items.as_ptr())).ok() } } } #[cfg(feature = "Foundation_Collections")] diff --git a/crates/libs/windows/src/Windows/UI/Composition/mod.rs b/crates/libs/windows/src/Windows/UI/Composition/mod.rs index fa10a9bdd7..f0efc0e29d 100644 --- a/crates/libs/windows/src/Windows/UI/Composition/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Composition/mod.rs @@ -8351,14 +8351,14 @@ impl CompositionColorGradientStopCollection { let this = &::windows_core::ComInterface::cast::>(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"Foundation_Collections\"`"] #[cfg(feature = "Foundation_Collections")] pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows_core::Result<()> { let this = &::windows_core::ComInterface::cast::>(self)?; - unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } + unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len().try_into().unwrap(), ::core::mem::transmute(items.as_ptr())).ok() } } } impl ::windows_core::RuntimeType for CompositionColorGradientStopCollection { @@ -14950,14 +14950,14 @@ impl CompositionShapeCollection { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"Foundation_Collections\"`"] #[cfg(feature = "Foundation_Collections")] pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } + unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len().try_into().unwrap(), ::core::mem::transmute(items.as_ptr())).ok() } } } #[cfg(feature = "Foundation_Collections")] @@ -15568,14 +15568,14 @@ impl CompositionStrokeDashArray { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, items.as_mut_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), items.as_mut_ptr(), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"Foundation_Collections\"`"] #[cfg(feature = "Foundation_Collections")] pub fn ReplaceAll(&self, items: &[f32]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len() as u32, items.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len().try_into().unwrap(), items.as_ptr()).ok() } } } #[cfg(feature = "Foundation_Collections")] @@ -16590,7 +16590,7 @@ impl CompositionVirtualDrawingSurface { #[cfg(feature = "Graphics")] pub fn Trim(&self, rects: &[super::super::Graphics::RectInt32]) -> ::windows_core::Result<()> { let this = self; - unsafe { (::windows_core::Interface::vtable(this).Trim)(::windows_core::Interface::as_raw(this), rects.len() as u32, rects.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).Trim)(::windows_core::Interface::as_raw(this), rects.len().try_into().unwrap(), rects.as_ptr()).ok() } } } impl ::windows_core::RuntimeType for CompositionVirtualDrawingSurface { @@ -18139,7 +18139,7 @@ impl DelegatedInkTrailVisual { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).AddTrailPoints)(::windows_core::Interface::as_raw(this), inkpoints.len() as u32, inkpoints.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).AddTrailPoints)(::windows_core::Interface::as_raw(this), inkpoints.len().try_into().unwrap(), inkpoints.as_ptr(), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"Foundation\"`"] @@ -18148,7 +18148,7 @@ impl DelegatedInkTrailVisual { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).AddTrailPointsWithPrediction)(::windows_core::Interface::as_raw(this), inkpoints.len() as u32, inkpoints.as_ptr(), predictedinkpoints.len() as u32, predictedinkpoints.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).AddTrailPointsWithPrediction)(::windows_core::Interface::as_raw(this), inkpoints.len().try_into().unwrap(), inkpoints.as_ptr(), predictedinkpoints.len().try_into().unwrap(), predictedinkpoints.as_ptr(), &mut result__).from_abi(result__) } } pub fn RemoveTrailPoints(&self, generationid: u32) -> ::windows_core::Result<()> { diff --git a/crates/libs/windows/src/Windows/UI/Core/mod.rs b/crates/libs/windows/src/Windows/UI/Core/mod.rs index 55b902df39..de4a55d8ca 100644 --- a/crates/libs/windows/src/Windows/UI/Core/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Core/mod.rs @@ -4813,7 +4813,7 @@ impl TouchHitTestingEventArgs { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).EvaluateProximityToPolygon)(::windows_core::Interface::as_raw(this), controlvertices.len() as u32, controlvertices.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).EvaluateProximityToPolygon)(::windows_core::Interface::as_raw(this), controlvertices.len().try_into().unwrap(), controlvertices.as_ptr(), &mut result__).from_abi(result__) } } } diff --git a/crates/libs/windows/src/Windows/UI/UIAutomation/Core/mod.rs b/crates/libs/windows/src/Windows/UI/UIAutomation/Core/mod.rs index ab28af8013..d6ec2022d0 100644 --- a/crates/libs/windows/src/Windows/UI/UIAutomation/Core/mod.rs +++ b/crates/libs/windows/src/Windows/UI/UIAutomation/Core/mod.rs @@ -126,7 +126,7 @@ impl ICoreAutomationRemoteOperationExtensionProvider { P0: ::windows_core::IntoParam, { let this = self; - unsafe { (::windows_core::Interface::vtable(this).CallExtension)(::windows_core::Interface::as_raw(this), extensionid, context.into_param().abi(), operandids.len() as u32, operandids.as_ptr()).ok() } + unsafe { (::windows_core::Interface::vtable(this).CallExtension)(::windows_core::Interface::as_raw(this), extensionid, context.into_param().abi(), operandids.len().try_into().unwrap(), operandids.as_ptr()).ok() } } pub fn IsExtensionSupported(&self, extensionid: ::windows_core::GUID) -> ::windows_core::Result { let this = self; @@ -392,7 +392,7 @@ impl CoreAutomationRemoteOperation { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).Execute)(::windows_core::Interface::as_raw(this), bytecodebuffer.len() as u32, bytecodebuffer.as_ptr(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).Execute)(::windows_core::Interface::as_raw(this), bytecodebuffer.len().try_into().unwrap(), bytecodebuffer.as_ptr(), &mut result__).from_abi(result__) } } pub fn ImportConnectionBoundObject(&self, operandid: AutomationRemoteOperationOperandId, connectionboundobject: P0) -> ::windows_core::Result<()> 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 c88f385566..afe28b7371 100644 --- a/crates/libs/windows/src/Windows/Wdk/Graphics/Direct3D/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/Graphics/Direct3D/mod.rs @@ -1041,7 +1041,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); - D3DKMTShareObjects(hobjects.len() as _, ::core::mem::transmute(hobjects.as_ptr()), pobjectattributes, dwdesiredaccess, phsharednthandle) + D3DKMTShareObjects(hobjects.len().try_into().unwrap(), ::core::mem::transmute(hobjects.as_ptr()), pobjectattributes, dwdesiredaccess, phsharednthandle) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 39f0f2bfce..0f61aacd64 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 @@ -209,7 +209,7 @@ pub unsafe fn FltCancelIo(callbackdata: *const FLT_CALLBACK_DATA) -> super::supe #[inline] pub unsafe fn FltCancellableWaitForMultipleObjects(objectarray: &[*const ::core::ffi::c_void], waittype: super::super::super::super::Win32::System::Kernel::WAIT_TYPE, timeout: ::core::option::Option<*const i64>, waitblockarray: ::core::option::Option<*const super::super::super::Foundation::KWAIT_BLOCK>, callbackdata: *const FLT_CALLBACK_DATA) -> super::super::super::super::Win32::Foundation::NTSTATUS { ::windows_targets::link!("fltmgr.sys" "system" fn FltCancellableWaitForMultipleObjects(count : u32, objectarray : *const *const ::core::ffi::c_void, waittype : super::super::super::super::Win32::System::Kernel:: WAIT_TYPE, timeout : *const i64, waitblockarray : *const super::super::super::Foundation:: KWAIT_BLOCK, callbackdata : *const FLT_CALLBACK_DATA) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltCancellableWaitForMultipleObjects(objectarray.len() as _, ::core::mem::transmute(objectarray.as_ptr()), waittype, ::core::mem::transmute(timeout.unwrap_or(::std::ptr::null())), ::core::mem::transmute(waitblockarray.unwrap_or(::std::ptr::null())), callbackdata) + FltCancellableWaitForMultipleObjects(objectarray.len().try_into().unwrap(), ::core::mem::transmute(objectarray.as_ptr()), waittype, ::core::mem::transmute(timeout.unwrap_or(::std::ptr::null())), ::core::mem::transmute(waitblockarray.unwrap_or(::std::ptr::null())), callbackdata) } #[doc = "Required features: `\"Wdk_Foundation\"`, `\"Wdk_System_SystemServices\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`, `\"Win32_System_IO\"`, `\"Win32_System_Kernel\"`, `\"Win32_System_Power\"`, `\"Win32_System_WindowsProgramming\"`"] #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Foundation", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power", feature = "Win32_System_WindowsProgramming"))] @@ -686,7 +686,7 @@ pub unsafe fn FltEnumerateFilterInformation(index: u32, informationclass: super: #[inline] pub unsafe fn FltEnumerateFilters(filterlist: ::core::option::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); - 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() as _), numberfiltersreturned) + 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) } #[doc = "Required features: `\"Wdk_Foundation\"`, `\"Wdk_System_SystemServices\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`, `\"Win32_Storage_InstallableFileSystems\"`, `\"Win32_System_IO\"`, `\"Win32_System_Kernel\"`, `\"Win32_System_Power\"`, `\"Win32_System_WindowsProgramming\"`"] #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Foundation", feature = "Win32_Security", feature = "Win32_Storage_InstallableFileSystems", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power", feature = "Win32_System_WindowsProgramming"))] @@ -731,7 +731,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("fltmgr.sys" "system" fn FltEnumerateInstances(volume : PFLT_VOLUME, filter : PFLT_FILTER, instancelist : *mut PFLT_INSTANCE, instancelistsize : u32, numberinstancesreturned : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltEnumerateInstances(volume.into_param().abi(), filter.into_param().abi(), ::core::mem::transmute(instancelist.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), instancelist.as_deref().map_or(0, |slice| slice.len() as _), numberinstancesreturned) + FltEnumerateInstances(volume.into_param().abi(), filter.into_param().abi(), ::core::mem::transmute(instancelist.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), instancelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), numberinstancesreturned) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Storage_InstallableFileSystems\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Storage_InstallableFileSystems"))] @@ -751,7 +751,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("fltmgr.sys" "system" fn FltEnumerateVolumes(filter : PFLT_FILTER, volumelist : *mut PFLT_VOLUME, volumelistsize : u32, numbervolumesreturned : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltEnumerateVolumes(filter.into_param().abi(), ::core::mem::transmute(volumelist.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), volumelist.as_deref().map_or(0, |slice| slice.len() as _), numbervolumesreturned) + FltEnumerateVolumes(filter.into_param().abi(), ::core::mem::transmute(volumelist.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), volumelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), numbervolumesreturned) } #[doc = "Required features: `\"Wdk_Foundation\"`, `\"Wdk_System_SystemServices\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`, `\"Win32_System_IO\"`, `\"Win32_System_Kernel\"`, `\"Win32_System_Power\"`, `\"Win32_System_WindowsProgramming\"`"] #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Foundation", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power", feature = "Win32_System_WindowsProgramming"))] 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 f059af66d9..0dd8edd7f7 100644 --- a/crates/libs/windows/src/Windows/Wdk/Storage/FileSystem/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/Storage/FileSystem/mod.rs @@ -588,7 +588,7 @@ 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: ::core::option::Option<*const i64>, waitblockarray: ::core::option::Option<*const super::super::Foundation::KWAIT_BLOCK>, irp: ::core::option::Option<*const super::super::Foundation::IRP>) -> super::super::super::Win32::Foundation::NTSTATUS { ::windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlCancellableWaitForMultipleObjects(count : u32, objectarray : *const *const ::core::ffi::c_void, waittype : super::super::super::Win32::System::Kernel:: WAIT_TYPE, timeout : *const i64, waitblockarray : *const super::super::Foundation:: KWAIT_BLOCK, irp : *const super::super::Foundation:: IRP) -> super::super::super::Win32::Foundation:: NTSTATUS); - FsRtlCancellableWaitForMultipleObjects(objectarray.len() as _, ::core::mem::transmute(objectarray.as_ptr()), waittype, ::core::mem::transmute(timeout.unwrap_or(::std::ptr::null())), ::core::mem::transmute(waitblockarray.unwrap_or(::std::ptr::null())), ::core::mem::transmute(irp.unwrap_or(::std::ptr::null()))) + FsRtlCancellableWaitForMultipleObjects(objectarray.len().try_into().unwrap(), ::core::mem::transmute(objectarray.as_ptr()), waittype, ::core::mem::transmute(timeout.unwrap_or(::std::ptr::null())), ::core::mem::transmute(waitblockarray.unwrap_or(::std::ptr::null())), ::core::mem::transmute(irp.unwrap_or(::std::ptr::null()))) } #[doc = "Required features: `\"Wdk_Foundation\"`, `\"Wdk_System_SystemServices\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`, `\"Win32_System_IO\"`, `\"Win32_System_Kernel\"`, `\"Win32_System_Power\"`, `\"Win32_System_WindowsProgramming\"`"] #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Foundation", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power", feature = "Win32_System_WindowsProgramming"))] @@ -2345,7 +2345,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ntoskrnl.exe" "system" fn KeRemoveQueueEx(queue : *mut super::super::Foundation:: KQUEUE, waitmode : i8, alertable : super::super::super::Win32::Foundation:: BOOLEAN, timeout : *const i64, entryarray : *mut *mut super::super::super::Win32::System::Kernel:: LIST_ENTRY, count : u32) -> u32); - KeRemoveQueueEx(queue, waitmode, alertable.into_param().abi(), ::core::mem::transmute(timeout.unwrap_or(::std::ptr::null())), ::core::mem::transmute(entryarray.as_ptr()), entryarray.len() as _) + KeRemoveQueueEx(queue, waitmode, alertable.into_param().abi(), ::core::mem::transmute(timeout.unwrap_or(::std::ptr::null())), ::core::mem::transmute(entryarray.as_ptr()), entryarray.len().try_into().unwrap()) } #[doc = "Required features: `\"Wdk_Foundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Kernel\"`"] #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Foundation", feature = "Win32_System_Kernel"))] @@ -2486,7 +2486,7 @@ pub unsafe fn MmMdlPagesAreZero(mdl: *const super::super::Foundation::MDL) -> u3 #[inline] pub unsafe fn MmPrefetchPages(readlists: &[*const READ_LIST]) -> super::super::super::Win32::Foundation::NTSTATUS { ::windows_targets::link!("ntoskrnl.exe" "system" fn MmPrefetchPages(numberoflists : u32, readlists : *const *const READ_LIST) -> super::super::super::Win32::Foundation:: NTSTATUS); - MmPrefetchPages(readlists.len() as _, ::core::mem::transmute(readlists.as_ptr())) + MmPrefetchPages(readlists.len().try_into().unwrap(), ::core::mem::transmute(readlists.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2532,7 +2532,24 @@ where P2: ::windows_core::IntoParam, { ::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::Foundation:: PSID, desiredaccess : u32, audittype : super::super::super::Win32::Security:: AUDIT_EVENT_TYPE, flags : u32, objecttypelist : *const super::super::super::Win32::Security:: OBJECT_TYPE_LIST, objecttypelistlength : u32, genericmapping : *const super::super::super::Win32::Security:: GENERIC_MAPPING, objectcreation : super::super::super::Win32::Foundation:: BOOLEAN, grantedaccess : *mut u32, accessstatus : *mut i32, generateonclose : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtAccessCheckByTypeAndAuditAlarm(subsystemname, ::core::mem::transmute(handleid.unwrap_or(::std::ptr::null())), objecttypename, objectname, securitydescriptor.into_param().abi(), principalselfsid.into_param().abi(), desiredaccess, audittype, flags, ::core::mem::transmute(objecttypelist.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), objecttypelist.as_deref().map_or(0, |slice| slice.len() as _), genericmapping, objectcreation.into_param().abi(), grantedaccess, accessstatus, generateonclose) + NtAccessCheckByTypeAndAuditAlarm( + subsystemname, + ::core::mem::transmute(handleid.unwrap_or(::std::ptr::null())), + objecttypename, + objectname, + securitydescriptor.into_param().abi(), + principalselfsid.into_param().abi(), + desiredaccess, + audittype, + flags, + ::core::mem::transmute(objecttypelist.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), + objecttypelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), + genericmapping, + objectcreation.into_param().abi(), + grantedaccess, + accessstatus, + generateonclose, + ) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Security\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] @@ -2671,7 +2688,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ntdll.dll" "system" fn NtCreateSectionEx(sectionhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, maximumsize : *const i64, sectionpageprotection : u32, allocationattributes : u32, filehandle : super::super::super::Win32::Foundation:: HANDLE, extendedparameters : *mut super::super::super::Win32::System::Memory:: MEM_EXTENDED_PARAMETER, extendedparametercount : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtCreateSectionEx(sectionhandle, desiredaccess, ::core::mem::transmute(objectattributes.unwrap_or(::std::ptr::null())), ::core::mem::transmute(maximumsize.unwrap_or(::std::ptr::null())), sectionpageprotection, allocationattributes, filehandle.into_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() as _)) + NtCreateSectionEx(sectionhandle, desiredaccess, ::core::mem::transmute(objectattributes.unwrap_or(::std::ptr::null())), ::core::mem::transmute(maximumsize.unwrap_or(::std::ptr::null())), sectionpageprotection, allocationattributes, filehandle.into_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())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2985,7 +3002,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ntdll.dll" "system" fn NtSetInformationVirtualMemory(processhandle : super::super::super::Win32::Foundation:: HANDLE, vminformationclass : VIRTUAL_MEMORY_INFORMATION_CLASS, numberofentries : usize, virtualaddresses : *const MEMORY_RANGE_ENTRY, vminformation : *const ::core::ffi::c_void, vminformationlength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtSetInformationVirtualMemory(processhandle.into_param().abi(), vminformationclass, virtualaddresses.len() as _, ::core::mem::transmute(virtualaddresses.as_ptr()), vminformation, vminformationlength) + NtSetInformationVirtualMemory(processhandle.into_param().abi(), vminformationclass, virtualaddresses.len().try_into().unwrap(), ::core::mem::transmute(virtualaddresses.as_ptr()), vminformation, vminformationlength) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_IO\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] @@ -3369,7 +3386,7 @@ pub unsafe fn RtlAllocateAndInitializeSid(identifierauthority: *const super::sup #[inline] pub unsafe fn RtlAllocateAndInitializeSidEx(identifierauthority: *const super::super::super::Win32::Security::SID_IDENTIFIER_AUTHORITY, subauthorities: &[u32], sid: *mut super::super::super::Win32::Foundation::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::Foundation:: PSID) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlAllocateAndInitializeSidEx(identifierauthority, subauthorities.len() as _, ::core::mem::transmute(subauthorities.as_ptr()), sid) + RtlAllocateAndInitializeSidEx(identifierauthority, subauthorities.len().try_into().unwrap(), ::core::mem::transmute(subauthorities.as_ptr()), sid) } #[inline] pub unsafe fn RtlAllocateHeap(heaphandle: *const ::core::ffi::c_void, flags: u32, size: usize) -> *mut ::core::ffi::c_void { @@ -3400,14 +3417,14 @@ pub unsafe fn RtlCompareMemoryUlong(source: *const ::core::ffi::c_void, length: #[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); - RtlCompressBuffer(compressionformatandengine, ::core::mem::transmute(uncompressedbuffer.as_ptr()), uncompressedbuffer.len() as _, ::core::mem::transmute(compressedbuffer.as_ptr()), compressedbuffer.len() as _, uncompressedchunksize, finalcompressedsize, workspace) + 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, workspace) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[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); - RtlCompressChunks(::core::mem::transmute(uncompressedbuffer.as_ptr()), uncompressedbuffer.len() as _, ::core::mem::transmute(compressedbuffer.as_ptr()), compressedbuffer.len() as _, compresseddatainfo, compresseddatainfolength, workspace) + RtlCompressChunks(::core::mem::transmute(uncompressedbuffer.as_ptr()), uncompressedbuffer.len().try_into().unwrap(), ::core::mem::transmute(compressedbuffer.as_ptr()), compressedbuffer.len().try_into().unwrap(), compresseddatainfo, compresseddatainfolength, workspace) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3487,49 +3504,49 @@ pub unsafe fn RtlCreateVirtualAccountSid(name: *const super::super::super::Win32 #[inline] pub unsafe fn RtlCustomCPToUnicodeN(customcp: *const CPTABLEINFO, unicodestring: ::windows_core::PWSTR, maxbytesinunicodestring: u32, bytesinunicodestring: ::core::option::Option<*mut u32>, customcpstring: &[u8]) -> super::super::super::Win32::Foundation::NTSTATUS { ::windows_targets::link!("ntdll.dll" "system" fn RtlCustomCPToUnicodeN(customcp : *const CPTABLEINFO, unicodestring : ::windows_core::PWSTR, maxbytesinunicodestring : u32, bytesinunicodestring : *mut u32, customcpstring : ::windows_core::PCSTR, bytesincustomcpstring : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlCustomCPToUnicodeN(customcp, ::core::mem::transmute(unicodestring), maxbytesinunicodestring, ::core::mem::transmute(bytesinunicodestring.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(customcpstring.as_ptr()), customcpstring.len() as _) + RtlCustomCPToUnicodeN(customcp, ::core::mem::transmute(unicodestring), maxbytesinunicodestring, ::core::mem::transmute(bytesinunicodestring.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(customcpstring.as_ptr()), customcpstring.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[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); - RtlDecompressBuffer(compressionformat, ::core::mem::transmute(uncompressedbuffer.as_ptr()), uncompressedbuffer.len() as _, ::core::mem::transmute(compressedbuffer.as_ptr()), compressedbuffer.len() as _, finaluncompressedsize) + 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) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn RtlDecompressBufferEx(compressionformat: u16, uncompressedbuffer: &mut [u8], compressedbuffer: &[u8], finaluncompressedsize: *mut u32, workspace: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { ::windows_targets::link!("ntdll.dll" "system" fn RtlDecompressBufferEx(compressionformat : u16, uncompressedbuffer : *mut u8, uncompressedbuffersize : u32, compressedbuffer : *const u8, compressedbuffersize : u32, finaluncompressedsize : *mut u32, workspace : *const ::core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlDecompressBufferEx(compressionformat, ::core::mem::transmute(uncompressedbuffer.as_ptr()), uncompressedbuffer.len() as _, ::core::mem::transmute(compressedbuffer.as_ptr()), compressedbuffer.len() as _, finaluncompressedsize, ::core::mem::transmute(workspace.unwrap_or(::std::ptr::null()))) + RtlDecompressBufferEx(compressionformat, ::core::mem::transmute(uncompressedbuffer.as_ptr()), uncompressedbuffer.len().try_into().unwrap(), ::core::mem::transmute(compressedbuffer.as_ptr()), compressedbuffer.len().try_into().unwrap(), finaluncompressedsize, ::core::mem::transmute(workspace.unwrap_or(::std::ptr::null()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn RtlDecompressBufferEx2(compressionformat: u16, uncompressedbuffer: &mut [u8], compressedbuffer: &[u8], uncompressedchunksize: u32, finaluncompressedsize: *mut u32, workspace: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { ::windows_targets::link!("ntoskrnl.exe" "system" fn RtlDecompressBufferEx2(compressionformat : u16, uncompressedbuffer : *mut u8, uncompressedbuffersize : u32, compressedbuffer : *const u8, compressedbuffersize : u32, uncompressedchunksize : u32, finaluncompressedsize : *mut u32, workspace : *const ::core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlDecompressBufferEx2(compressionformat, ::core::mem::transmute(uncompressedbuffer.as_ptr()), uncompressedbuffer.len() as _, ::core::mem::transmute(compressedbuffer.as_ptr()), compressedbuffer.len() as _, uncompressedchunksize, finaluncompressedsize, ::core::mem::transmute(workspace.unwrap_or(::std::ptr::null()))) + RtlDecompressBufferEx2(compressionformat, ::core::mem::transmute(uncompressedbuffer.as_ptr()), uncompressedbuffer.len().try_into().unwrap(), ::core::mem::transmute(compressedbuffer.as_ptr()), compressedbuffer.len().try_into().unwrap(), uncompressedchunksize, finaluncompressedsize, ::core::mem::transmute(workspace.unwrap_or(::std::ptr::null()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn RtlDecompressChunks(uncompressedbuffer: &mut [u8], compressedbuffer: &[u8], compressedtail: &[u8], compresseddatainfo: *const COMPRESSED_DATA_INFO) -> super::super::super::Win32::Foundation::NTSTATUS { ::windows_targets::link!("ntoskrnl.exe" "system" fn RtlDecompressChunks(uncompressedbuffer : *mut u8, uncompressedbuffersize : u32, compressedbuffer : *const u8, compressedbuffersize : u32, compressedtail : *const u8, compressedtailsize : u32, compresseddatainfo : *const COMPRESSED_DATA_INFO) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlDecompressChunks(::core::mem::transmute(uncompressedbuffer.as_ptr()), uncompressedbuffer.len() as _, ::core::mem::transmute(compressedbuffer.as_ptr()), compressedbuffer.len() as _, ::core::mem::transmute(compressedtail.as_ptr()), compressedtail.len() as _, compresseddatainfo) + RtlDecompressChunks(::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(compressedtail.as_ptr()), compressedtail.len().try_into().unwrap(), compresseddatainfo) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[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); - RtlDecompressFragment(compressionformat, ::core::mem::transmute(uncompressedfragment.as_ptr()), uncompressedfragment.len() as _, ::core::mem::transmute(compressedbuffer.as_ptr()), compressedbuffer.len() as _, fragmentoffset, finaluncompressedsize, workspace) + 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, workspace) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[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); - RtlDecompressFragmentEx(compressionformat, ::core::mem::transmute(uncompressedfragment.as_ptr()), uncompressedfragment.len() as _, ::core::mem::transmute(compressedbuffer.as_ptr()), compressedbuffer.len() as _, fragmentoffset, uncompressedchunksize, finaluncompressedsize, workspace) + 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, workspace) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Security\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] @@ -3842,14 +3859,14 @@ where #[inline] pub unsafe fn RtlMultiByteToUnicodeN(unicodestring: ::windows_core::PWSTR, maxbytesinunicodestring: u32, bytesinunicodestring: ::core::option::Option<*mut u32>, multibytestring: &[u8]) -> super::super::super::Win32::Foundation::NTSTATUS { ::windows_targets::link!("ntdll.dll" "system" fn RtlMultiByteToUnicodeN(unicodestring : ::windows_core::PWSTR, maxbytesinunicodestring : u32, bytesinunicodestring : *mut u32, multibytestring : ::windows_core::PCSTR, bytesinmultibytestring : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlMultiByteToUnicodeN(::core::mem::transmute(unicodestring), maxbytesinunicodestring, ::core::mem::transmute(bytesinunicodestring.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(multibytestring.as_ptr()), multibytestring.len() as _) + RtlMultiByteToUnicodeN(::core::mem::transmute(unicodestring), maxbytesinunicodestring, ::core::mem::transmute(bytesinunicodestring.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(multibytestring.as_ptr()), multibytestring.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[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); - RtlMultiByteToUnicodeSize(bytesinunicodestring, ::core::mem::transmute(multibytestring.as_ptr()), multibytestring.len() as _) + RtlMultiByteToUnicodeSize(bytesinunicodestring, ::core::mem::transmute(multibytestring.as_ptr()), multibytestring.len().try_into().unwrap()) } #[doc = "Required features: `\"Wdk_Foundation\"`, `\"Win32_Foundation\"`"] #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Foundation"))] @@ -3906,7 +3923,7 @@ where #[inline] pub unsafe fn RtlOemToUnicodeN(unicodestring: ::windows_core::PWSTR, maxbytesinunicodestring: u32, bytesinunicodestring: ::core::option::Option<*mut u32>, oemstring: &[u8]) -> super::super::super::Win32::Foundation::NTSTATUS { ::windows_targets::link!("ntdll.dll" "system" fn RtlOemToUnicodeN(unicodestring : ::windows_core::PWSTR, maxbytesinunicodestring : u32, bytesinunicodestring : *mut u32, oemstring : ::windows_core::PCSTR, bytesinoemstring : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlOemToUnicodeN(::core::mem::transmute(unicodestring), maxbytesinunicodestring, ::core::mem::transmute(bytesinunicodestring.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(oemstring.as_ptr()), oemstring.len() as _) + RtlOemToUnicodeN(::core::mem::transmute(unicodestring), maxbytesinunicodestring, ::core::mem::transmute(bytesinunicodestring.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(oemstring.as_ptr()), oemstring.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Kernel\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Kernel"))] @@ -4078,21 +4095,21 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("ntdll.dll" "system" fn RtlUnicodeToCustomCPN(customcp : *const CPTABLEINFO, customcpstring : ::windows_core::PSTR, maxbytesincustomcpstring : u32, bytesincustomcpstring : *mut u32, unicodestring : ::windows_core::PCWSTR, bytesinunicodestring : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlUnicodeToCustomCPN(customcp, ::core::mem::transmute(customcpstring.as_ptr()), customcpstring.len() as _, ::core::mem::transmute(bytesincustomcpstring.unwrap_or(::std::ptr::null_mut())), unicodestring.into_param().abi(), bytesinunicodestring) + RtlUnicodeToCustomCPN(customcp, ::core::mem::transmute(customcpstring.as_ptr()), customcpstring.len().try_into().unwrap(), ::core::mem::transmute(bytesincustomcpstring.unwrap_or(::std::ptr::null_mut())), unicodestring.into_param().abi(), bytesinunicodestring) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn RtlUnicodeToMultiByteN(multibytestring: &mut [u8], bytesinmultibytestring: ::core::option::Option<*mut u32>, unicodestring: *const u16, bytesinunicodestring: u32) -> super::super::super::Win32::Foundation::NTSTATUS { ::windows_targets::link!("ntdll.dll" "system" fn RtlUnicodeToMultiByteN(multibytestring : ::windows_core::PSTR, maxbytesinmultibytestring : u32, bytesinmultibytestring : *mut u32, unicodestring : *const u16, bytesinunicodestring : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlUnicodeToMultiByteN(::core::mem::transmute(multibytestring.as_ptr()), multibytestring.len() as _, ::core::mem::transmute(bytesinmultibytestring.unwrap_or(::std::ptr::null_mut())), unicodestring, bytesinunicodestring) + RtlUnicodeToMultiByteN(::core::mem::transmute(multibytestring.as_ptr()), multibytestring.len().try_into().unwrap(), ::core::mem::transmute(bytesinmultibytestring.unwrap_or(::std::ptr::null_mut())), unicodestring, bytesinunicodestring) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn RtlUnicodeToOemN(oemstring: &mut [u8], bytesinoemstring: ::core::option::Option<*mut u32>, unicodestring: *const u16, bytesinunicodestring: u32) -> super::super::super::Win32::Foundation::NTSTATUS { ::windows_targets::link!("ntdll.dll" "system" fn RtlUnicodeToOemN(oemstring : ::windows_core::PSTR, maxbytesinoemstring : u32, bytesinoemstring : *mut u32, unicodestring : *const u16, bytesinunicodestring : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlUnicodeToOemN(::core::mem::transmute(oemstring.as_ptr()), oemstring.len() as _, ::core::mem::transmute(bytesinoemstring.unwrap_or(::std::ptr::null_mut())), unicodestring, bytesinunicodestring) + RtlUnicodeToOemN(::core::mem::transmute(oemstring.as_ptr()), oemstring.len().try_into().unwrap(), ::core::mem::transmute(bytesinoemstring.unwrap_or(::std::ptr::null_mut())), unicodestring, bytesinunicodestring) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Kernel\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Kernel"))] @@ -4122,21 +4139,21 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("ntdll.dll" "system" fn RtlUpcaseUnicodeToCustomCPN(customcp : *const CPTABLEINFO, customcpstring : ::windows_core::PSTR, maxbytesincustomcpstring : u32, bytesincustomcpstring : *mut u32, unicodestring : ::windows_core::PCWSTR, bytesinunicodestring : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlUpcaseUnicodeToCustomCPN(customcp, ::core::mem::transmute(customcpstring.as_ptr()), customcpstring.len() as _, ::core::mem::transmute(bytesincustomcpstring.unwrap_or(::std::ptr::null_mut())), unicodestring.into_param().abi(), bytesinunicodestring) + RtlUpcaseUnicodeToCustomCPN(customcp, ::core::mem::transmute(customcpstring.as_ptr()), customcpstring.len().try_into().unwrap(), ::core::mem::transmute(bytesincustomcpstring.unwrap_or(::std::ptr::null_mut())), unicodestring.into_param().abi(), bytesinunicodestring) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn RtlUpcaseUnicodeToMultiByteN(multibytestring: &mut [u8], bytesinmultibytestring: ::core::option::Option<*mut u32>, unicodestring: *const u16, bytesinunicodestring: u32) -> super::super::super::Win32::Foundation::NTSTATUS { ::windows_targets::link!("ntdll.dll" "system" fn RtlUpcaseUnicodeToMultiByteN(multibytestring : ::windows_core::PSTR, maxbytesinmultibytestring : u32, bytesinmultibytestring : *mut u32, unicodestring : *const u16, bytesinunicodestring : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlUpcaseUnicodeToMultiByteN(::core::mem::transmute(multibytestring.as_ptr()), multibytestring.len() as _, ::core::mem::transmute(bytesinmultibytestring.unwrap_or(::std::ptr::null_mut())), unicodestring, bytesinunicodestring) + RtlUpcaseUnicodeToMultiByteN(::core::mem::transmute(multibytestring.as_ptr()), multibytestring.len().try_into().unwrap(), ::core::mem::transmute(bytesinmultibytestring.unwrap_or(::std::ptr::null_mut())), unicodestring, bytesinunicodestring) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn RtlUpcaseUnicodeToOemN(oemstring: &mut [u8], bytesinoemstring: ::core::option::Option<*mut u32>, unicodestring: *const u16, bytesinunicodestring: u32) -> super::super::super::Win32::Foundation::NTSTATUS { ::windows_targets::link!("ntdll.dll" "system" fn RtlUpcaseUnicodeToOemN(oemstring : ::windows_core::PSTR, maxbytesinoemstring : u32, bytesinoemstring : *mut u32, unicodestring : *const u16, bytesinunicodestring : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlUpcaseUnicodeToOemN(::core::mem::transmute(oemstring.as_ptr()), oemstring.len() as _, ::core::mem::transmute(bytesinoemstring.unwrap_or(::std::ptr::null_mut())), unicodestring, bytesinunicodestring) + RtlUpcaseUnicodeToOemN(::core::mem::transmute(oemstring.as_ptr()), oemstring.len().try_into().unwrap(), ::core::mem::transmute(bytesinoemstring.unwrap_or(::std::ptr::null_mut())), unicodestring, bytesinunicodestring) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -4913,7 +4930,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ntdll.dll" "system" fn ZwAllocateVirtualMemoryEx(processhandle : super::super::super::Win32::Foundation:: HANDLE, baseaddress : *mut *mut ::core::ffi::c_void, regionsize : *mut usize, allocationtype : u32, pageprotection : u32, extendedparameters : *mut super::super::super::Win32::System::Memory:: MEM_EXTENDED_PARAMETER, extendedparametercount : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwAllocateVirtualMemoryEx(processhandle.into_param().abi(), baseaddress, 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() as _)) + ZwAllocateVirtualMemoryEx(processhandle.into_param().abi(), baseaddress, 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())) } #[doc = "Required features: `\"Wdk_Foundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Kernel\"`"] #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Foundation", feature = "Win32_System_Kernel"))] @@ -5204,7 +5221,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ntdll.dll" "system" fn ZwSetInformationVirtualMemory(processhandle : super::super::super::Win32::Foundation:: HANDLE, vminformationclass : VIRTUAL_MEMORY_INFORMATION_CLASS, numberofentries : usize, virtualaddresses : *const MEMORY_RANGE_ENTRY, vminformation : *const ::core::ffi::c_void, vminformationlength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwSetInformationVirtualMemory(processhandle.into_param().abi(), vminformationclass, virtualaddresses.len() as _, ::core::mem::transmute(virtualaddresses.as_ptr()), vminformation, vminformationlength) + ZwSetInformationVirtualMemory(processhandle.into_param().abi(), vminformationclass, virtualaddresses.len().try_into().unwrap(), ::core::mem::transmute(virtualaddresses.as_ptr()), vminformation, vminformationlength) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_IO\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] 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 143979dcb3..548919c874 100644 --- a/crates/libs/windows/src/Windows/Wdk/System/OfflineRegistry/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/System/OfflineRegistry/mod.rs @@ -124,7 +124,7 @@ where #[inline] pub unsafe fn ORMergeHives(hivehandles: &[ORHKEY], phkresult: *mut ORHKEY) -> ::windows_core::Result<()> { ::windows_targets::link!("offreg.dll" "system" fn ORMergeHives(hivehandles : *const ORHKEY, hivecount : u32, phkresult : *mut ORHKEY) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - ORMergeHives(::core::mem::transmute(hivehandles.as_ptr()), hivehandles.len() as _, phkresult).ok() + ORMergeHives(::core::mem::transmute(hivehandles.as_ptr()), hivehandles.len().try_into().unwrap(), phkresult).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -222,7 +222,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("offreg.dll" "system" fn ORSetValue(handle : ORHKEY, lpvaluename : ::windows_core::PCWSTR, dwtype : u32, lpdata : *const u8, cbdata : u32) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - ORSetValue(handle.into_param().abi(), lpvaluename.into_param().abi(), dwtype, ::core::mem::transmute(lpdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpdata.as_deref().map_or(0, |slice| slice.len() as _)).ok() + ORSetValue(handle.into_param().abi(), lpvaluename.into_param().abi(), dwtype, ::core::mem::transmute(lpdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] diff --git a/crates/libs/windows/src/Windows/Wdk/System/Registry/mod.rs b/crates/libs/windows/src/Windows/Wdk/System/Registry/mod.rs index 24a71f1157..2529c0bb7e 100644 --- a/crates/libs/windows/src/Windows/Wdk/System/Registry/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/System/Registry/mod.rs @@ -11,7 +11,7 @@ where ::windows_targets::link!("ntdll.dll" "system" fn NtNotifyChangeMultipleKeys(masterkeyhandle : super::super::super::Win32::Foundation:: HANDLE, count : u32, subordinateobjects : *const super::super::Foundation:: OBJECT_ATTRIBUTES, event : super::super::super::Win32::Foundation:: HANDLE, apcroutine : super::super::super::Win32::System::IO:: PIO_APC_ROUTINE, apccontext : *const ::core::ffi::c_void, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, completionfilter : u32, watchtree : super::super::super::Win32::Foundation:: BOOLEAN, buffer : *mut ::core::ffi::c_void, buffersize : u32, asynchronous : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); NtNotifyChangeMultipleKeys( masterkeyhandle.into_param().abi(), - subordinateobjects.as_deref().map_or(0, |slice| slice.len() as _), + 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.into_param().abi(), apcroutine, @@ -32,7 +32,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ntdll.dll" "system" fn NtQueryMultipleValueKey(keyhandle : super::super::super::Win32::Foundation:: HANDLE, valueentries : *mut KEY_VALUE_ENTRY, entrycount : u32, valuebuffer : *mut ::core::ffi::c_void, bufferlength : *mut u32, requiredbufferlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtQueryMultipleValueKey(keyhandle.into_param().abi(), ::core::mem::transmute(valueentries.as_ptr()), valueentries.len() as _, valuebuffer, bufferlength, ::core::mem::transmute(requiredbufferlength.unwrap_or(::std::ptr::null_mut()))) + NtQueryMultipleValueKey(keyhandle.into_param().abi(), ::core::mem::transmute(valueentries.as_ptr()), valueentries.len().try_into().unwrap(), valuebuffer, bufferlength, ::core::mem::transmute(requiredbufferlength.unwrap_or(::std::ptr::null_mut()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 66ef1d3cc3..55c7b043a6 100644 --- a/crates/libs/windows/src/Windows/Wdk/System/SystemServices/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/System/SystemServices/mod.rs @@ -10,7 +10,7 @@ pub unsafe fn ClfsAddLogContainer(plfolog: *const super::super::Foundation::FILE #[inline] pub unsafe fn ClfsAddLogContainerSet(plfolog: *const super::super::Foundation::FILE_OBJECT, pcbcontainer: ::core::option::Option<*const u64>, rguszcontainerpath: &[super::super::super::Win32::Foundation::UNICODE_STRING]) -> super::super::super::Win32::Foundation::NTSTATUS { ::windows_targets::link!("clfs.sys" "system" fn ClfsAddLogContainerSet(plfolog : *const super::super::Foundation:: FILE_OBJECT, ccontainers : u16, pcbcontainer : *const u64, rguszcontainerpath : *const super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - ClfsAddLogContainerSet(plfolog, rguszcontainerpath.len() as _, ::core::mem::transmute(pcbcontainer.unwrap_or(::std::ptr::null())), ::core::mem::transmute(rguszcontainerpath.as_ptr())) + ClfsAddLogContainerSet(plfolog, rguszcontainerpath.len().try_into().unwrap(), ::core::mem::transmute(pcbcontainer.unwrap_or(::std::ptr::null())), ::core::mem::transmute(rguszcontainerpath.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Storage_FileSystem\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Storage_FileSystem"))] @@ -24,14 +24,14 @@ pub unsafe fn ClfsAdvanceLogBase(pvmarshalcontext: *mut ::core::ffi::c_void, pls #[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); - ClfsAlignReservedLog(pvmarshalcontext, rgcbreservation.len() as _, ::core::mem::transmute(rgcbreservation.as_ptr()), pcbalignreservation) + ClfsAlignReservedLog(pvmarshalcontext, rgcbreservation.len().try_into().unwrap(), ::core::mem::transmute(rgcbreservation.as_ptr()), pcbalignreservation) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn ClfsAllocReservedLog(pvmarshalcontext: *const ::core::ffi::c_void, pcbadjustment: &[i64]) -> super::super::super::Win32::Foundation::NTSTATUS { ::windows_targets::link!("clfs.sys" "system" fn ClfsAllocReservedLog(pvmarshalcontext : *const ::core::ffi::c_void, crecords : u32, pcbadjustment : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - ClfsAllocReservedLog(pvmarshalcontext, pcbadjustment.len() as _, ::core::mem::transmute(pcbadjustment.as_ptr())) + ClfsAllocReservedLog(pvmarshalcontext, pcbadjustment.len().try_into().unwrap(), ::core::mem::transmute(pcbadjustment.as_ptr())) } #[doc = "Required features: `\"Wdk_Foundation\"`, `\"Wdk_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`, `\"Win32_System_IO\"`, `\"Win32_System_Kernel\"`, `\"Win32_System_Power\"`, `\"Win32_System_WindowsProgramming\"`"] #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Foundation", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power", feature = "Win32_System_WindowsProgramming"))] @@ -130,7 +130,7 @@ pub unsafe fn ClfsFlushToLsn(pvmarshalcontext: *const ::core::ffi::c_void, plsnf #[inline] pub unsafe fn ClfsFreeReservedLog(pvmarshalcontext: *const ::core::ffi::c_void, pcbadjustment: &[i64]) -> super::super::super::Win32::Foundation::NTSTATUS { ::windows_targets::link!("clfs.sys" "system" fn ClfsFreeReservedLog(pvmarshalcontext : *const ::core::ffi::c_void, crecords : u32, pcbadjustment : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - ClfsFreeReservedLog(pvmarshalcontext, pcbadjustment.len() as _, ::core::mem::transmute(pcbadjustment.as_ptr())) + ClfsFreeReservedLog(pvmarshalcontext, pcbadjustment.len().try_into().unwrap(), ::core::mem::transmute(pcbadjustment.as_ptr())) } #[doc = "Required features: `\"Wdk_Foundation\"`, `\"Wdk_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`, `\"Win32_System_IO\"`, `\"Win32_System_Kernel\"`, `\"Win32_System_Power\"`, `\"Win32_System_WindowsProgramming\"`"] #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Foundation", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power", feature = "Win32_System_WindowsProgramming"))] @@ -356,7 +356,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("clfs.sys" "system" fn ClfsRemoveLogContainerSet(plfolog : *const super::super::Foundation:: FILE_OBJECT, ccontainers : u16, rgwszcontainerpath : *const super::super::super::Win32::Foundation:: UNICODE_STRING, fforce : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ClfsRemoveLogContainerSet(plfolog, rgwszcontainerpath.len() as _, ::core::mem::transmute(rgwszcontainerpath.as_ptr()), fforce.into_param().abi()) + ClfsRemoveLogContainerSet(plfolog, rgwszcontainerpath.len().try_into().unwrap(), ::core::mem::transmute(rgwszcontainerpath.as_ptr()), fforce.into_param().abi()) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Storage_FileSystem\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Storage_FileSystem"))] @@ -366,10 +366,10 @@ pub unsafe fn ClfsReserveAndAppendLog(pvmarshalcontext: *const ::core::ffi::c_vo ClfsReserveAndAppendLog( 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() as _), + rgwriteentries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(plsnundonext.unwrap_or(::std::ptr::null())), ::core::mem::transmute(plsnprevious.unwrap_or(::std::ptr::null())), - rgcbreservation.as_deref().map_or(0, |slice| slice.len() 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(::std::ptr::null_mut())), @@ -383,11 +383,11 @@ pub unsafe fn ClfsReserveAndAppendLogAligned(pvmarshalcontext: *const ::core::ff ClfsReserveAndAppendLogAligned( 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() as _), + rgwriteentries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), cbentryalignment, ::core::mem::transmute(plsnundonext.unwrap_or(::std::ptr::null())), ::core::mem::transmute(plsnprevious.unwrap_or(::std::ptr::null())), - rgcbreservation.as_deref().map_or(0, |slice| slice.len() 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(::std::ptr::null_mut())), @@ -529,7 +529,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("ntdll.dll" "system" fn DbgPrompt(prompt : ::windows_core::PCSTR, response : ::windows_core::PSTR, length : u32) -> u32); - DbgPrompt(prompt.into_param().abi(), ::core::mem::transmute(response.as_ptr()), response.len() as _) + DbgPrompt(prompt.into_param().abi(), ::core::mem::transmute(response.as_ptr()), response.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -605,14 +605,14 @@ pub unsafe fn EtwUnregister(reghandle: u64) -> super::super::super::Win32::Found #[inline] pub unsafe fn EtwWrite(reghandle: u64, eventdescriptor: *const super::super::super::Win32::System::Diagnostics::Etw::EVENT_DESCRIPTOR, activityid: ::core::option::Option<*const ::windows_core::GUID>, userdata: ::core::option::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 : u64, eventdescriptor : *const super::super::super::Win32::System::Diagnostics::Etw:: EVENT_DESCRIPTOR, activityid : *const ::windows_core::GUID, userdatacount : u32, userdata : *const super::super::super::Win32::System::Diagnostics::Etw:: EVENT_DATA_DESCRIPTOR) -> super::super::super::Win32::Foundation:: NTSTATUS); - EtwWrite(reghandle, eventdescriptor, ::core::mem::transmute(activityid.unwrap_or(::std::ptr::null())), userdata.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(userdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + EtwWrite(reghandle, eventdescriptor, ::core::mem::transmute(activityid.unwrap_or(::std::ptr::null())), userdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(userdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Diagnostics_Etw\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Diagnostics_Etw"))] #[inline] pub unsafe fn EtwWriteEx(reghandle: u64, eventdescriptor: *const super::super::super::Win32::System::Diagnostics::Etw::EVENT_DESCRIPTOR, filter: u64, flags: u32, activityid: ::core::option::Option<*const ::windows_core::GUID>, relatedactivityid: ::core::option::Option<*const ::windows_core::GUID>, userdata: ::core::option::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 : u64, eventdescriptor : *const super::super::super::Win32::System::Diagnostics::Etw:: EVENT_DESCRIPTOR, filter : u64, flags : u32, activityid : *const ::windows_core::GUID, relatedactivityid : *const ::windows_core::GUID, userdatacount : u32, userdata : *const super::super::super::Win32::System::Diagnostics::Etw:: EVENT_DATA_DESCRIPTOR) -> super::super::super::Win32::Foundation:: NTSTATUS); - EtwWriteEx(reghandle, eventdescriptor, filter, flags, ::core::mem::transmute(activityid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(relatedactivityid.unwrap_or(::std::ptr::null())), userdata.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(userdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + EtwWriteEx(reghandle, eventdescriptor, filter, flags, ::core::mem::transmute(activityid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(relatedactivityid.unwrap_or(::std::ptr::null())), userdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(userdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -629,7 +629,7 @@ where #[inline] pub unsafe fn EtwWriteTransfer(reghandle: u64, eventdescriptor: *const super::super::super::Win32::System::Diagnostics::Etw::EVENT_DESCRIPTOR, activityid: ::core::option::Option<*const ::windows_core::GUID>, relatedactivityid: ::core::option::Option<*const ::windows_core::GUID>, userdata: ::core::option::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 : u64, eventdescriptor : *const super::super::super::Win32::System::Diagnostics::Etw:: EVENT_DESCRIPTOR, activityid : *const ::windows_core::GUID, relatedactivityid : *const ::windows_core::GUID, userdatacount : u32, userdata : *const super::super::super::Win32::System::Diagnostics::Etw:: EVENT_DATA_DESCRIPTOR) -> super::super::super::Win32::Foundation:: NTSTATUS); - EtwWriteTransfer(reghandle, eventdescriptor, ::core::mem::transmute(activityid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(relatedactivityid.unwrap_or(::std::ptr::null())), userdata.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(userdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + EtwWriteTransfer(reghandle, eventdescriptor, ::core::mem::transmute(activityid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(relatedactivityid.unwrap_or(::std::ptr::null())), userdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(userdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[doc = "Required features: `\"Wdk_Foundation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Kernel\"`"] #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Foundation", feature = "Win32_System_Kernel"))] @@ -773,7 +773,7 @@ pub unsafe fn ExAllocatePool2(flags: u64, numberofbytes: usize, tag: u32) -> *mu #[inline] pub unsafe fn ExAllocatePool3(flags: u64, numberofbytes: usize, tag: u32, extendedparameters: ::core::option::Option<&[POOL_EXTENDED_PARAMETER]>) -> *mut ::core::ffi::c_void { ::windows_targets::link!("ntoskrnl.exe" "system" fn ExAllocatePool3(flags : u64, numberofbytes : usize, tag : u32, extendedparameters : *const POOL_EXTENDED_PARAMETER, extendedparameterscount : u32) -> *mut ::core::ffi::c_void); - ExAllocatePool3(flags, numberofbytes, 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() as _)) + ExAllocatePool3(flags, numberofbytes, 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())) } #[doc = "Required features: `\"Wdk_Foundation\"`"] #[cfg(feature = "Wdk_Foundation")] @@ -939,7 +939,7 @@ pub unsafe fn ExFreePool(p: *mut ::core::ffi::c_void) { #[inline] pub unsafe fn ExFreePool2(p: *mut ::core::ffi::c_void, tag: u32, extendedparameters: ::core::option::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) -> ()); - ExFreePool2(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() as _)) + ExFreePool2(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())) } #[inline] pub unsafe fn ExFreePoolWithTag(p: *mut ::core::ffi::c_void, tag: u32) { @@ -1444,7 +1444,7 @@ pub unsafe fn HalAllocateCrashDumpRegisters(adapterobject: *const super::super:: #[inline] pub unsafe fn HalAllocateHardwareCounters(groupaffinty: ::core::option::Option<&[super::super::super::Win32::System::SystemInformation::GROUP_AFFINITY]>, resourcelist: ::core::option::Option<*const PHYSICAL_COUNTER_RESOURCE_LIST>, countersethandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { ::windows_targets::link!("hal.dll" "system" fn HalAllocateHardwareCounters(groupaffinty : *const super::super::super::Win32::System::SystemInformation:: GROUP_AFFINITY, groupcount : u32, resourcelist : *const PHYSICAL_COUNTER_RESOURCE_LIST, countersethandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - HalAllocateHardwareCounters(::core::mem::transmute(groupaffinty.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), groupaffinty.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(resourcelist.unwrap_or(::std::ptr::null())), countersethandle) + HalAllocateHardwareCounters(::core::mem::transmute(groupaffinty.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), groupaffinty.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(resourcelist.unwrap_or(::std::ptr::null())), countersethandle) } #[doc = "Required features: `\"Wdk_Foundation\"`, `\"Wdk_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`, `\"Win32_System_IO\"`, `\"Win32_System_Kernel\"`, `\"Win32_System_Power\"`, `\"Win32_System_WindowsProgramming\"`"] #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Foundation", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power", feature = "Win32_System_WindowsProgramming"))] @@ -3244,7 +3244,7 @@ pub unsafe fn IoWMIQueryAllData(datablockobject: *const ::core::ffi::c_void, ino #[inline] pub unsafe fn IoWMIQueryAllDataMultiple(datablockobjectlist: &[*const ::core::ffi::c_void], inoutbuffersize: *mut u32, outbuffer: ::core::option::Option<*mut ::core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { ::windows_targets::link!("ntoskrnl.exe" "system" fn IoWMIQueryAllDataMultiple(datablockobjectlist : *const *const ::core::ffi::c_void, objectcount : u32, inoutbuffersize : *mut u32, outbuffer : *mut ::core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoWMIQueryAllDataMultiple(::core::mem::transmute(datablockobjectlist.as_ptr()), datablockobjectlist.len() as _, inoutbuffersize, ::core::mem::transmute(outbuffer.unwrap_or(::std::ptr::null_mut()))) + IoWMIQueryAllDataMultiple(::core::mem::transmute(datablockobjectlist.as_ptr()), datablockobjectlist.len().try_into().unwrap(), inoutbuffersize, ::core::mem::transmute(outbuffer.unwrap_or(::std::ptr::null_mut()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3802,7 +3802,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); - KeQueryHardwareCounterConfiguration(::core::mem::transmute(counterarray.as_ptr()), counterarray.len() as _, count) + KeQueryHardwareCounterConfiguration(::core::mem::transmute(counterarray.as_ptr()), counterarray.len().try_into().unwrap(), count) } #[inline] pub unsafe fn KeQueryHighestNodeNumber() -> u16 { @@ -3848,7 +3848,7 @@ pub unsafe fn KeQueryNodeActiveAffinity(nodenumber: u16, affinity: ::core::optio #[inline] pub unsafe fn KeQueryNodeActiveAffinity2(nodenumber: u16, groupaffinities: ::core::option::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); - 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() as _), groupaffinitiesrequired) + 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) } #[inline] pub unsafe fn KeQueryNodeActiveProcessorCount(nodenumber: u16) -> u32 { @@ -4155,7 +4155,7 @@ where #[inline] pub unsafe fn KeSetHardwareCounterConfiguration(counterarray: &[HARDWARE_COUNTER]) -> super::super::super::Win32::Foundation::NTSTATUS { ::windows_targets::link!("ntoskrnl.exe" "system" fn KeSetHardwareCounterConfiguration(counterarray : *const HARDWARE_COUNTER, count : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - KeSetHardwareCounterConfiguration(::core::mem::transmute(counterarray.as_ptr()), counterarray.len() as _) + KeSetHardwareCounterConfiguration(::core::mem::transmute(counterarray.as_ptr()), counterarray.len().try_into().unwrap()) } #[doc = "Required features: `\"Wdk_Foundation\"`, `\"Win32_System_Kernel\"`"] #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] @@ -4268,7 +4268,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ntoskrnl.exe" "system" fn KeWaitForMultipleObjects(count : u32, object : *const *const ::core::ffi::c_void, waittype : super::super::super::Win32::System::Kernel:: WAIT_TYPE, waitreason : KWAIT_REASON, waitmode : i8, alertable : super::super::super::Win32::Foundation:: BOOLEAN, timeout : *const i64, waitblockarray : *mut super::super::Foundation:: KWAIT_BLOCK) -> super::super::super::Win32::Foundation:: NTSTATUS); - KeWaitForMultipleObjects(object.len() as _, ::core::mem::transmute(object.as_ptr()), waittype, waitreason, waitmode, alertable.into_param().abi(), ::core::mem::transmute(timeout.unwrap_or(::std::ptr::null())), ::core::mem::transmute(waitblockarray.unwrap_or(::std::ptr::null_mut()))) + KeWaitForMultipleObjects(object.len().try_into().unwrap(), ::core::mem::transmute(object.as_ptr()), waittype, waitreason, waitmode, alertable.into_param().abi(), ::core::mem::transmute(timeout.unwrap_or(::std::ptr::null())), ::core::mem::transmute(waitblockarray.unwrap_or(::std::ptr::null_mut()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -4355,7 +4355,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); - MmAllocateMdlForIoSpace(::core::mem::transmute(physicaladdresslist.as_ptr()), physicaladdresslist.len() as _, newmdl) + MmAllocateMdlForIoSpace(::core::mem::transmute(physicaladdresslist.as_ptr()), physicaladdresslist.len().try_into().unwrap(), newmdl) } #[doc = "Required features: `\"Wdk_Foundation\"`"] #[cfg(feature = "Wdk_Foundation")] @@ -5368,7 +5368,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ntoskrnl.exe" "system" fn PcwAddInstance(buffer : super::super::Foundation:: PPCW_BUFFER, name : *const super::super::super::Win32::Foundation:: UNICODE_STRING, id : u32, count : u32, data : *const PCW_DATA) -> super::super::super::Win32::Foundation:: NTSTATUS); - PcwAddInstance(buffer.into_param().abi(), name, id, data.len() as _, ::core::mem::transmute(data.as_ptr())) + PcwAddInstance(buffer.into_param().abi(), name, id, data.len().try_into().unwrap(), ::core::mem::transmute(data.as_ptr())) } #[doc = "Required features: `\"Wdk_Foundation\"`"] #[cfg(feature = "Wdk_Foundation")] @@ -5388,7 +5388,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ntoskrnl.exe" "system" fn PcwCreateInstance(instance : *mut super::super::Foundation:: PPCW_INSTANCE, registration : super::super::Foundation:: PPCW_REGISTRATION, name : *const super::super::super::Win32::Foundation:: UNICODE_STRING, count : u32, data : *const PCW_DATA) -> super::super::super::Win32::Foundation:: NTSTATUS); - PcwCreateInstance(instance, registration.into_param().abi(), name, data.len() as _, ::core::mem::transmute(data.as_ptr())) + PcwCreateInstance(instance, registration.into_param().abi(), name, data.len().try_into().unwrap(), ::core::mem::transmute(data.as_ptr())) } #[doc = "Required features: `\"Wdk_Foundation\"`, `\"Win32_Foundation\"`"] #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Foundation"))] @@ -6363,7 +6363,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ntoskrnl.exe" "system" fn PsSetSystemMultipleGroupAffinityThread(groupaffinities : *const super::super::super::Win32::System::SystemInformation:: GROUP_AFFINITY, groupcount : u16, affinitytoken : super::super::Foundation:: PAFFINITY_TOKEN) -> super::super::super::Win32::Foundation:: NTSTATUS); - PsSetSystemMultipleGroupAffinityThread(::core::mem::transmute(groupaffinities.as_ptr()), groupaffinities.len() as _, affinitytoken.into_param().abi()) + PsSetSystemMultipleGroupAffinityThread(::core::mem::transmute(groupaffinities.as_ptr()), groupaffinities.len().try_into().unwrap(), affinitytoken.into_param().abi()) } #[doc = "Required features: `\"Wdk_Foundation\"`, `\"Win32_Foundation\"`"] #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Foundation"))] @@ -6553,7 +6553,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ntdll.dll" "system" fn RtlCompareUnicodeStrings(string1 : *const u16, string1length : usize, string2 : *const u16, string2length : usize, caseinsensitive : super::super::super::Win32::Foundation:: BOOLEAN) -> i32); - RtlCompareUnicodeStrings(::core::mem::transmute(string1.as_ptr()), string1.len() as _, ::core::mem::transmute(string2.as_ptr()), string2.len() as _, caseinsensitive.into_param().abi()) + RtlCompareUnicodeStrings(::core::mem::transmute(string1.as_ptr()), string1.len().try_into().unwrap(), ::core::mem::transmute(string2.as_ptr()), string2.len().try_into().unwrap(), caseinsensitive.into_param().abi()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -6788,7 +6788,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ntdll.dll" "system" fn RtlFindClearRuns(bitmapheader : *const RTL_BITMAP, runarray : *mut RTL_BITMAP_RUN, sizeofrunarray : u32, locatelongestruns : super::super::super::Win32::Foundation:: BOOLEAN) -> u32); - RtlFindClearRuns(bitmapheader, ::core::mem::transmute(runarray.as_ptr()), runarray.len() as _, locatelongestruns.into_param().abi()) + RtlFindClearRuns(bitmapheader, ::core::mem::transmute(runarray.as_ptr()), runarray.len().try_into().unwrap(), locatelongestruns.into_param().abi()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -7433,7 +7433,7 @@ where #[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); - RtlUTF8ToUnicodeN(::core::mem::transmute(unicodestringdestination), unicodestringmaxbytecount, unicodestringactualbytecount, ::core::mem::transmute(utf8stringsource.as_ptr()), utf8stringsource.len() as _) + RtlUTF8ToUnicodeN(::core::mem::transmute(unicodestringdestination), unicodestringmaxbytecount, unicodestringactualbytecount, ::core::mem::transmute(utf8stringsource.as_ptr()), utf8stringsource.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -7464,7 +7464,7 @@ where #[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); - RtlUnicodeToUTF8N(::core::mem::transmute(utf8stringdestination.as_ptr()), utf8stringdestination.len() as _, utf8stringactualbytecount, unicodestringsource, unicodestringbytecount) + RtlUnicodeToUTF8N(::core::mem::transmute(utf8stringdestination.as_ptr()), utf8stringdestination.len().try_into().unwrap(), utf8stringactualbytecount, unicodestringsource, unicodestringbytecount) } #[inline] pub unsafe fn RtlUpcaseUnicodeChar(sourcecharacter: u16) -> u16 { @@ -7993,7 +7993,7 @@ pub unsafe fn WheaHwErrorReportAbandonDeviceDriver(errorhandle: *const ::core::f #[inline] pub unsafe fn WheaHwErrorReportSetSectionNameDeviceDriver(bufferset: *const super::super::super::Win32::System::Diagnostics::Debug::WHEA_DRIVER_BUFFER_SET, name: &[u8]) -> super::super::super::Win32::Foundation::NTSTATUS { ::windows_targets::link!("ntoskrnl.exe" "system" fn WheaHwErrorReportSetSectionNameDeviceDriver(bufferset : *const super::super::super::Win32::System::Diagnostics::Debug:: WHEA_DRIVER_BUFFER_SET, namelength : u32, name : *const u8) -> super::super::super::Win32::Foundation:: NTSTATUS); - WheaHwErrorReportSetSectionNameDeviceDriver(bufferset, name.len() as _, ::core::mem::transmute(name.as_ptr())) + WheaHwErrorReportSetSectionNameDeviceDriver(bufferset, name.len().try_into().unwrap(), ::core::mem::transmute(name.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -8062,7 +8062,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("ntoskrnl.exe" "system" fn WheaReportHwErrorDeviceDriver(errorsourceid : u32, deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, errordata : *const u8, errordatalength : u32, sectiontypeguid : *const ::windows_core::GUID, errorseverity : WHEA_ERROR_SEVERITY, devicefriendlyname : ::windows_core::PCSTR) -> super::super::super::Win32::Foundation:: NTSTATUS); - WheaReportHwErrorDeviceDriver(errorsourceid, deviceobject, ::core::mem::transmute(errordata.as_ptr()), errordata.len() as _, sectiontypeguid, errorseverity, devicefriendlyname.into_param().abi()) + WheaReportHwErrorDeviceDriver(errorsourceid, deviceobject, ::core::mem::transmute(errordata.as_ptr()), errordata.len().try_into().unwrap(), sectiontypeguid, errorseverity, devicefriendlyname.into_param().abi()) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Diagnostics_Debug\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Diagnostics_Debug"))] diff --git a/crates/libs/windows/src/Windows/Web/Http/Headers/mod.rs b/crates/libs/windows/src/Windows/Web/Http/Headers/mod.rs index 1552efebd4..4d20ee043b 100644 --- a/crates/libs/windows/src/Windows/Web/Http/Headers/mod.rs +++ b/crates/libs/windows/src/Windows/Web/Http/Headers/mod.rs @@ -1564,14 +1564,14 @@ impl HttpCacheDirectiveHeaderValueCollection { let this = &::windows_core::ComInterface::cast::>(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"Foundation_Collections\"`"] #[cfg(feature = "Foundation_Collections")] pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows_core::Result<()> { let this = &::windows_core::ComInterface::cast::>(self)?; - unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } + unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len().try_into().unwrap(), ::core::mem::transmute(items.as_ptr())).ok() } } } impl ::windows_core::RuntimeType for HttpCacheDirectiveHeaderValueCollection { @@ -1822,14 +1822,14 @@ impl HttpChallengeHeaderValueCollection { let this = &::windows_core::ComInterface::cast::>(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"Foundation_Collections\"`"] #[cfg(feature = "Foundation_Collections")] pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows_core::Result<()> { let this = &::windows_core::ComInterface::cast::>(self)?; - unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } + unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len().try_into().unwrap(), ::core::mem::transmute(items.as_ptr())).ok() } } } impl ::windows_core::RuntimeType for HttpChallengeHeaderValueCollection { @@ -2058,14 +2058,14 @@ impl HttpConnectionOptionHeaderValueCollection { let this = &::windows_core::ComInterface::cast::>(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"Foundation_Collections\"`"] #[cfg(feature = "Foundation_Collections")] pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows_core::Result<()> { let this = &::windows_core::ComInterface::cast::>(self)?; - unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } + unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len().try_into().unwrap(), ::core::mem::transmute(items.as_ptr())).ok() } } } impl ::windows_core::RuntimeType for HttpConnectionOptionHeaderValueCollection { @@ -2294,14 +2294,14 @@ impl HttpContentCodingHeaderValueCollection { let this = &::windows_core::ComInterface::cast::>(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"Foundation_Collections\"`"] #[cfg(feature = "Foundation_Collections")] pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows_core::Result<()> { let this = &::windows_core::ComInterface::cast::>(self)?; - unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } + unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len().try_into().unwrap(), ::core::mem::transmute(items.as_ptr())).ok() } } } impl ::windows_core::RuntimeType for HttpContentCodingHeaderValueCollection { @@ -2545,14 +2545,14 @@ impl HttpContentCodingWithQualityHeaderValueCollection { let this = &::windows_core::ComInterface::cast::>(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"Foundation_Collections\"`"] #[cfg(feature = "Foundation_Collections")] pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows_core::Result<()> { let this = &::windows_core::ComInterface::cast::>(self)?; - unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } + unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len().try_into().unwrap(), ::core::mem::transmute(items.as_ptr())).ok() } } } impl ::windows_core::RuntimeType for HttpContentCodingWithQualityHeaderValueCollection { @@ -3318,14 +3318,14 @@ impl HttpCookiePairHeaderValueCollection { let this = &::windows_core::ComInterface::cast::>(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"Foundation_Collections\"`"] #[cfg(feature = "Foundation_Collections")] pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows_core::Result<()> { let this = &::windows_core::ComInterface::cast::>(self)?; - unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } + unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len().try_into().unwrap(), ::core::mem::transmute(items.as_ptr())).ok() } } } impl ::windows_core::RuntimeType for HttpCookiePairHeaderValueCollection { @@ -3734,14 +3734,14 @@ impl HttpExpectationHeaderValueCollection { let this = &::windows_core::ComInterface::cast::>(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"Foundation_Collections\"`"] #[cfg(feature = "Foundation_Collections")] pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows_core::Result<()> { let this = &::windows_core::ComInterface::cast::>(self)?; - unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } + unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len().try_into().unwrap(), ::core::mem::transmute(items.as_ptr())).ok() } } } impl ::windows_core::RuntimeType for HttpExpectationHeaderValueCollection { @@ -3904,14 +3904,14 @@ impl HttpLanguageHeaderValueCollection { let this = &::windows_core::ComInterface::cast::>(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"Foundation_Collections\"`, `\"Globalization\"`"] #[cfg(all(feature = "Foundation_Collections", feature = "Globalization"))] pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows_core::Result<()> { let this = &::windows_core::ComInterface::cast::>(self)?; - unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } + unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len().try_into().unwrap(), ::core::mem::transmute(items.as_ptr())).ok() } } } impl ::windows_core::RuntimeType for HttpLanguageHeaderValueCollection { @@ -4155,14 +4155,14 @@ impl HttpLanguageRangeWithQualityHeaderValueCollection { let this = &::windows_core::ComInterface::cast::>(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"Foundation_Collections\"`"] #[cfg(feature = "Foundation_Collections")] pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows_core::Result<()> { let this = &::windows_core::ComInterface::cast::>(self)?; - unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } + unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len().try_into().unwrap(), ::core::mem::transmute(items.as_ptr())).ok() } } } impl ::windows_core::RuntimeType for HttpLanguageRangeWithQualityHeaderValueCollection { @@ -4529,14 +4529,14 @@ impl HttpMediaTypeWithQualityHeaderValueCollection { let this = &::windows_core::ComInterface::cast::>(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"Foundation_Collections\"`"] #[cfg(feature = "Foundation_Collections")] pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows_core::Result<()> { let this = &::windows_core::ComInterface::cast::>(self)?; - unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } + unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len().try_into().unwrap(), ::core::mem::transmute(items.as_ptr())).ok() } } } impl ::windows_core::RuntimeType for HttpMediaTypeWithQualityHeaderValueCollection { @@ -4699,14 +4699,14 @@ impl HttpMethodHeaderValueCollection { let this = &::windows_core::ComInterface::cast::>(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"Foundation_Collections\"`"] #[cfg(feature = "Foundation_Collections")] pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows_core::Result<()> { let this = &::windows_core::ComInterface::cast::>(self)?; - unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } + unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len().try_into().unwrap(), ::core::mem::transmute(items.as_ptr())).ok() } } } impl ::windows_core::RuntimeType for HttpMethodHeaderValueCollection { @@ -5110,14 +5110,14 @@ impl HttpProductInfoHeaderValueCollection { let this = &::windows_core::ComInterface::cast::>(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"Foundation_Collections\"`"] #[cfg(feature = "Foundation_Collections")] pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows_core::Result<()> { let this = &::windows_core::ComInterface::cast::>(self)?; - unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } + unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len().try_into().unwrap(), ::core::mem::transmute(items.as_ptr())).ok() } } } impl ::windows_core::RuntimeType for HttpProductInfoHeaderValueCollection { @@ -5931,14 +5931,14 @@ impl HttpTransferCodingHeaderValueCollection { let this = &::windows_core::ComInterface::cast::>(self)?; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } #[doc = "Required features: `\"Foundation_Collections\"`"] #[cfg(feature = "Foundation_Collections")] pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows_core::Result<()> { let this = &::windows_core::ComInterface::cast::>(self)?; - unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } + unsafe { (::windows_core::Interface::vtable(this).ReplaceAll)(::windows_core::Interface::as_raw(this), items.len().try_into().unwrap(), ::core::mem::transmute(items.as_ptr())).ok() } } } impl ::windows_core::RuntimeType for HttpTransferCodingHeaderValueCollection { diff --git a/crates/libs/windows/src/Windows/Web/Http/mod.rs b/crates/libs/windows/src/Windows/Web/Http/mod.rs index 20e98ba411..45b204b383 100644 --- a/crates/libs/windows/src/Windows/Web/Http/mod.rs +++ b/crates/libs/windows/src/Windows/Web/Http/mod.rs @@ -1410,7 +1410,7 @@ impl HttpCookieCollection { let this = self; unsafe { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len() as u32, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(this).GetMany)(::windows_core::Interface::as_raw(this), startindex, items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } } 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 2b0c152a39..0523f4d883 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 @@ -50,10 +50,10 @@ impl IDMLBindingTable { (::windows_core::Interface::vtable(self).base__.GetDevice)(::windows_core::Interface::as_raw(self), &::IID, &mut result__).from_abi(result__) } pub unsafe fn BindInputs(&self, bindings: ::core::option::Option<&[DML_BINDING_DESC]>) { - (::windows_core::Interface::vtable(self).BindInputs)(::windows_core::Interface::as_raw(self), bindings.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(bindings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).BindInputs)(::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 BindOutputs(&self, bindings: ::core::option::Option<&[DML_BINDING_DESC]>) { - (::windows_core::Interface::vtable(self).BindOutputs)(::windows_core::Interface::as_raw(self), bindings.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(bindings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::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: ::core::option::Option<*const DML_BINDING_DESC>) { (::windows_core::Interface::vtable(self).BindTemporaryResource)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(binding.unwrap_or(::std::ptr::null()))) @@ -262,7 +262,7 @@ impl IDMLDevice { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).CreateOperatorInitializer)(::windows_core::Interface::as_raw(self), operators.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(operators.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateOperatorInitializer)(::windows_core::Interface::as_raw(self), operators.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(operators.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), &::IID, &mut result__).from_abi(result__) } pub unsafe fn CreateCommandRecorder(&self) -> ::windows_core::Result where @@ -281,10 +281,10 @@ impl IDMLDevice { (::windows_core::Interface::vtable(self).CreateBindingTable)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(desc.unwrap_or(::std::ptr::null())), &::IID, &mut result__).from_abi(result__) } pub unsafe fn Evict(&self, ppobjects: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Evict)(::windows_core::Interface::as_raw(self), ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr())).ok() + (::windows_core::Interface::vtable(self).Evict)(::windows_core::Interface::as_raw(self), ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr())).ok() } pub unsafe fn MakeResident(&self, ppobjects: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).MakeResident)(::windows_core::Interface::as_raw(self), ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr())).ok() + (::windows_core::Interface::vtable(self).MakeResident)(::windows_core::Interface::as_raw(self), ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr())).ok() } pub unsafe fn GetDeviceRemovedReason(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetDeviceRemovedReason)(::windows_core::Interface::as_raw(self)).ok() @@ -365,7 +365,7 @@ impl IDMLDevice1 { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).base__.CreateOperatorInitializer)(::windows_core::Interface::as_raw(self), operators.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(operators.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateOperatorInitializer)(::windows_core::Interface::as_raw(self), operators.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(operators.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), &::IID, &mut result__).from_abi(result__) } pub unsafe fn CreateCommandRecorder(&self) -> ::windows_core::Result where @@ -384,10 +384,10 @@ impl IDMLDevice1 { (::windows_core::Interface::vtable(self).base__.CreateBindingTable)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(desc.unwrap_or(::std::ptr::null())), &::IID, &mut result__).from_abi(result__) } pub unsafe fn Evict(&self, ppobjects: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.Evict)(::windows_core::Interface::as_raw(self), ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.Evict)(::windows_core::Interface::as_raw(self), ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr())).ok() } pub unsafe fn MakeResident(&self, ppobjects: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.MakeResident)(::windows_core::Interface::as_raw(self), ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.MakeResident)(::windows_core::Interface::as_raw(self), ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr())).ok() } pub unsafe fn GetDeviceRemovedReason(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetDeviceRemovedReason)(::windows_core::Interface::as_raw(self)).ok() @@ -626,7 +626,7 @@ impl IDMLOperatorInitializer { result__ } pub unsafe fn Reset(&self, operators: ::core::option::Option<&[::core::option::Option]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self), operators.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(operators.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self), operators.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(operators.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() } } ::windows_core::imp::interface_hierarchy!(IDMLOperatorInitializer, ::windows_core::IUnknown, IDMLObject, IDMLDeviceChild, IDMLPageable, IDMLDispatchable); 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 20729db85d..2f29c0e853 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 @@ -38,7 +38,7 @@ impl IMLOperatorAttributes { where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { - (::windows_core::Interface::vtable(self).GetStringAttributeElement)(::windows_core::Interface::as_raw(self), name.into_param().abi(), elementindex, attributeelement.len() as _, ::core::mem::transmute(attributeelement.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetStringAttributeElement)(::windows_core::Interface::as_raw(self), name.into_param().abi(), elementindex, attributeelement.len().try_into().unwrap(), ::core::mem::transmute(attributeelement.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IMLOperatorAttributes, ::windows_core::IUnknown); @@ -91,7 +91,7 @@ impl IMLOperatorKernelContext { } pub unsafe fn GetOutputTensor(&self, outputindex: u32, dimensionsizes: &[u32]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).GetOutputTensor)(::windows_core::Interface::as_raw(self), outputindex, dimensionsizes.len() as _, ::core::mem::transmute(dimensionsizes.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).GetOutputTensor)(::windows_core::Interface::as_raw(self), outputindex, dimensionsizes.len().try_into().unwrap(), ::core::mem::transmute(dimensionsizes.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn GetOutputTensor2(&self, outputindex: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -152,7 +152,7 @@ impl IMLOperatorKernelCreationContext { where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { - (::windows_core::Interface::vtable(self).base__.GetStringAttributeElement)(::windows_core::Interface::as_raw(self), name.into_param().abi(), elementindex, attributeelement.len() as _, ::core::mem::transmute(attributeelement.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.GetStringAttributeElement)(::windows_core::Interface::as_raw(self), name.into_param().abi(), elementindex, attributeelement.len().try_into().unwrap(), ::core::mem::transmute(attributeelement.as_ptr())).ok() } pub unsafe fn GetInputCount(&self) -> u32 { (::windows_core::Interface::vtable(self).GetInputCount)(::windows_core::Interface::as_raw(self)) @@ -242,7 +242,7 @@ impl IMLOperatorRegistry { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).RegisterOperatorSetSchema)(::windows_core::Interface::as_raw(self), operatorsetid, baselineversion, ::core::mem::transmute(schema.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), schema.as_deref().map_or(0, |slice| slice.len() as _), typeinferrer.into_param().abi(), shapeinferrer.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).RegisterOperatorSetSchema)(::windows_core::Interface::as_raw(self), operatorsetid, baselineversion, ::core::mem::transmute(schema.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), schema.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), typeinferrer.into_param().abi(), shapeinferrer.into_param().abi()).ok() } pub unsafe fn RegisterOperatorKernel(&self, operatorkernel: *const MLOperatorKernelDescription, operatorkernelfactory: P0, shapeinferrer: P1) -> ::windows_core::Result<()> where @@ -294,7 +294,7 @@ impl IMLOperatorShapeInferenceContext { where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { - (::windows_core::Interface::vtable(self).base__.GetStringAttributeElement)(::windows_core::Interface::as_raw(self), name.into_param().abi(), elementindex, attributeelement.len() as _, ::core::mem::transmute(attributeelement.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.GetStringAttributeElement)(::windows_core::Interface::as_raw(self), name.into_param().abi(), elementindex, attributeelement.len().try_into().unwrap(), ::core::mem::transmute(attributeelement.as_ptr())).ok() } pub unsafe fn GetInputCount(&self) -> u32 { (::windows_core::Interface::vtable(self).GetInputCount)(::windows_core::Interface::as_raw(self)) @@ -317,7 +317,7 @@ impl IMLOperatorShapeInferenceContext { (::windows_core::Interface::vtable(self).GetInputTensorDimensionCount)(::windows_core::Interface::as_raw(self), inputindex, &mut result__).from_abi(result__) } pub unsafe fn GetInputTensorShape(&self, inputindex: u32, dimensions: &mut [u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetInputTensorShape)(::windows_core::Interface::as_raw(self), inputindex, dimensions.len() as _, ::core::mem::transmute(dimensions.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetInputTensorShape)(::windows_core::Interface::as_raw(self), inputindex, dimensions.len().try_into().unwrap(), ::core::mem::transmute(dimensions.as_ptr())).ok() } pub unsafe fn SetOutputTensorShape(&self, outputindex: u32, dimensioncount: u32, dimensions: *const u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).SetOutputTensorShape)(::windows_core::Interface::as_raw(self), outputindex, dimensioncount, dimensions).ok() @@ -375,7 +375,7 @@ impl IMLOperatorTensor { (::windows_core::Interface::vtable(self).GetDimensionCount)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetShape(&self, dimensions: &mut [u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetShape)(::windows_core::Interface::as_raw(self), dimensions.len() as _, ::core::mem::transmute(dimensions.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetShape)(::windows_core::Interface::as_raw(self), dimensions.len().try_into().unwrap(), ::core::mem::transmute(dimensions.as_ptr())).ok() } pub unsafe fn GetTensorDataType(&self) -> MLOperatorTensorDataType { (::windows_core::Interface::vtable(self).GetTensorDataType)(::windows_core::Interface::as_raw(self)) @@ -423,7 +423,7 @@ impl IMLOperatorTensorShapeDescription { (::windows_core::Interface::vtable(self).GetInputTensorDimensionCount)(::windows_core::Interface::as_raw(self), inputindex, &mut result__).from_abi(result__) } pub unsafe fn GetInputTensorShape(&self, inputindex: u32, dimensions: &mut [u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetInputTensorShape)(::windows_core::Interface::as_raw(self), inputindex, dimensions.len() as _, ::core::mem::transmute(dimensions.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetInputTensorShape)(::windows_core::Interface::as_raw(self), inputindex, dimensions.len().try_into().unwrap(), ::core::mem::transmute(dimensions.as_ptr())).ok() } pub unsafe fn HasOutputShapeDescription(&self) -> bool { (::windows_core::Interface::vtable(self).HasOutputShapeDescription)(::windows_core::Interface::as_raw(self)) @@ -433,7 +433,7 @@ impl IMLOperatorTensorShapeDescription { (::windows_core::Interface::vtable(self).GetOutputTensorDimensionCount)(::windows_core::Interface::as_raw(self), outputindex, &mut result__).from_abi(result__) } pub unsafe fn GetOutputTensorShape(&self, outputindex: u32, dimensions: &mut [u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetOutputTensorShape)(::windows_core::Interface::as_raw(self), outputindex, dimensions.len() as _, ::core::mem::transmute(dimensions.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetOutputTensorShape)(::windows_core::Interface::as_raw(self), outputindex, dimensions.len().try_into().unwrap(), ::core::mem::transmute(dimensions.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IMLOperatorTensorShapeDescription, ::windows_core::IUnknown); @@ -481,7 +481,7 @@ impl IMLOperatorTypeInferenceContext { where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { - (::windows_core::Interface::vtable(self).base__.GetStringAttributeElement)(::windows_core::Interface::as_raw(self), name.into_param().abi(), elementindex, attributeelement.len() as _, ::core::mem::transmute(attributeelement.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.GetStringAttributeElement)(::windows_core::Interface::as_raw(self), name.into_param().abi(), elementindex, attributeelement.len().try_into().unwrap(), ::core::mem::transmute(attributeelement.as_ptr())).ok() } pub unsafe fn GetInputCount(&self) -> u32 { (::windows_core::Interface::vtable(self).GetInputCount)(::windows_core::Interface::as_raw(self)) 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 81900a10de..377e50c1ae 100644 --- a/crates/libs/windows/src/Windows/Win32/Data/RightsManagement/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Data/RightsManagement/mod.rs @@ -13,7 +13,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::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); - DRMAcquireIssuanceLicenseTemplate(hclient, uflags, pvreserved, pwsztemplateids.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pwsztemplateids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), wszurl.into_param().abi(), pvcontext).ok() + DRMAcquireIssuanceLicenseTemplate(hclient, uflags, 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.into_param().abi(), pvcontext).ok() } #[inline] pub unsafe fn DRMAcquireLicense(hsession: u32, uflags: u32, wszgroupidentitycredential: P0, wszrequestedrights: P1, wszcustomdata: P2, wszurl: P3, pvcontext: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> @@ -95,7 +95,7 @@ pub unsafe fn DRMCloseSession(hsession: u32) -> ::windows_core::Result<()> { #[inline] pub unsafe fn DRMConstructCertificateChain(rgwszcertificates: &[::windows_core::PCWSTR], pcchain: *mut u32, wszchain: ::windows_core::PWSTR) -> ::windows_core::Result<()> { ::windows_targets::link!("msdrm.dll" "system" fn DRMConstructCertificateChain(ccertificates : u32, rgwszcertificates : *const ::windows_core::PCWSTR, pcchain : *mut u32, wszchain : ::windows_core::PWSTR) -> ::windows_core::HRESULT); - DRMConstructCertificateChain(rgwszcertificates.len() as _, ::core::mem::transmute(rgwszcertificates.as_ptr()), pcchain, ::core::mem::transmute(wszchain)).ok() + DRMConstructCertificateChain(rgwszcertificates.len().try_into().unwrap(), ::core::mem::transmute(rgwszcertificates.as_ptr()), pcchain, ::core::mem::transmute(wszchain)).ok() } #[inline] pub unsafe fn DRMCreateBoundLicense(henv: u32, pparams: *mut DRMBOUNDLICENSEPARAMS, wszlicensechain: P0, phboundlicense: *mut u32, pherrorlog: *mut u32) -> ::windows_core::Result<()> @@ -407,7 +407,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("msdrm.dll" "system" fn DRMGetSignedIssuanceLicenseEx(henv : u32, hissuancelicense : u32, uflags : u32, pbsymkey : *const u8, cbsymkey : u32, wszsymkeytype : ::windows_core::PCWSTR, pvreserved : *const ::core::ffi::c_void, henablingprincipal : u32, hboundlicenseclc : u32, pfncallback : DRMCALLBACK, pvcontext : *const ::core::ffi::c_void) -> ::windows_core::HRESULT); - DRMGetSignedIssuanceLicenseEx(henv, hissuancelicense, uflags, ::core::mem::transmute(pbsymkey.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbsymkey.as_deref().map_or(0, |slice| slice.len() as _), wszsymkeytype.into_param().abi(), ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null())), henablingprincipal, hboundlicenseclc, pfncallback, pvcontext).ok() + DRMGetSignedIssuanceLicenseEx(henv, hissuancelicense, uflags, ::core::mem::transmute(pbsymkey.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbsymkey.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), wszsymkeytype.into_param().abi(), ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null())), henablingprincipal, hboundlicenseclc, pfncallback, pvcontext).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 84eec0876c..2c63c3e262 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 @@ -11197,7 +11197,7 @@ impl IXMLHTTPRequest3 { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).SetClientCertificate)(::windows_core::Interface::as_raw(self), pbclientcertificatehash.len() as _, ::core::mem::transmute(pbclientcertificatehash.as_ptr()), pwszpin.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).SetClientCertificate)(::windows_core::Interface::as_raw(self), pbclientcertificatehash.len().try_into().unwrap(), ::core::mem::transmute(pbclientcertificatehash.as_ptr()), pwszpin.into_param().abi()).ok() } } ::windows_core::imp::interface_hierarchy!(IXMLHTTPRequest3, ::windows_core::IUnknown, IXMLHTTPRequest2); @@ -11259,13 +11259,13 @@ impl IXMLHTTPRequest3Callback { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).OnServerCertificateReceived)(::windows_core::Interface::as_raw(self), pxhr.into_param().abi(), dwcertificateerrors, rgservercertificatechain.len() as _, ::core::mem::transmute(rgservercertificatechain.as_ptr())).ok() + (::windows_core::Interface::vtable(self).OnServerCertificateReceived)(::windows_core::Interface::as_raw(self), pxhr.into_param().abi(), dwcertificateerrors, rgservercertificatechain.len().try_into().unwrap(), ::core::mem::transmute(rgservercertificatechain.as_ptr())).ok() } pub unsafe fn OnClientCertificateRequested(&self, pxhr: P0, rgpwszissuerlist: &[*const u16]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).OnClientCertificateRequested)(::windows_core::Interface::as_raw(self), pxhr.into_param().abi(), rgpwszissuerlist.len() as _, ::core::mem::transmute(rgpwszissuerlist.as_ptr())).ok() + (::windows_core::Interface::vtable(self).OnClientCertificateRequested)(::windows_core::Interface::as_raw(self), pxhr.into_param().abi(), rgpwszissuerlist.len().try_into().unwrap(), ::core::mem::transmute(rgpwszissuerlist.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IXMLHTTPRequest3Callback, ::windows_core::IUnknown, IXMLHTTPRequest2Callback); 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 b3aab14af2..e165a8165a 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 @@ -128,7 +128,7 @@ impl IXmlReader { (::windows_core::Interface::vtable(self).GetValue)(::windows_core::Interface::as_raw(self), ppwszvalue, ::core::mem::transmute(pcwchvalue.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn ReadValueChunk(&self, pwchbuffer: &mut [u16], pcwchread: *mut u32) -> ::windows_core::HRESULT { - (::windows_core::Interface::vtable(self).ReadValueChunk)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwchbuffer.as_ptr()), pwchbuffer.len() as _, pcwchread) + (::windows_core::Interface::vtable(self).ReadValueChunk)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwchbuffer.as_ptr()), pwchbuffer.len().try_into().unwrap(), pcwchread) } pub unsafe fn GetBaseUri(&self, ppwszbaseuri: *mut ::windows_core::PCWSTR, pcwchbaseuri: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetBaseUri)(::windows_core::Interface::as_raw(self), ppwszbaseuri, ::core::mem::transmute(pcwchbaseuri.unwrap_or(::std::ptr::null_mut()))).ok() @@ -281,7 +281,7 @@ impl IXmlWriter { (::windows_core::Interface::vtable(self).WriteCharEntity)(::windows_core::Interface::as_raw(self), wch).ok() } pub unsafe fn WriteChars(&self, pwch: ::core::option::Option<&[u16]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).WriteChars)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwch.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pwch.as_deref().map_or(0, |slice| slice.len() as _)).ok() + (::windows_core::Interface::vtable(self).WriteChars)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwch.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pwch.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } pub unsafe fn WriteComment(&self, pwszcomment: P0) -> ::windows_core::Result<()> where @@ -373,7 +373,7 @@ impl IXmlWriter { (::windows_core::Interface::vtable(self).WriteRaw)(::windows_core::Interface::as_raw(self), pwszdata.into_param().abi()).ok() } pub unsafe fn WriteRawChars(&self, pwch: ::core::option::Option<&[u16]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).WriteRawChars)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwch.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pwch.as_deref().map_or(0, |slice| slice.len() as _)).ok() + (::windows_core::Interface::vtable(self).WriteRawChars)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwch.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pwch.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } pub unsafe fn WriteStartDocument(&self, standalone: XmlStandalone) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).WriteStartDocument)(::windows_core::Interface::as_raw(self), standalone).ok() @@ -482,7 +482,7 @@ impl IXmlWriterLite { (::windows_core::Interface::vtable(self).WriteAttributes)(::windows_core::Interface::as_raw(self), preader.into_param().abi(), fwritedefaultattributes.into_param().abi()).ok() } pub unsafe fn WriteAttributeString(&self, pwszqname: &[u16], pwszvalue: ::core::option::Option<&[u16]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).WriteAttributeString)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszqname.as_ptr()), pwszqname.len() as _, ::core::mem::transmute(pwszvalue.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pwszvalue.as_deref().map_or(0, |slice| slice.len() as _)).ok() + (::windows_core::Interface::vtable(self).WriteAttributeString)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszqname.as_ptr()), pwszqname.len().try_into().unwrap(), ::core::mem::transmute(pwszvalue.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pwszvalue.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } pub unsafe fn WriteCData(&self, pwsztext: P0) -> ::windows_core::Result<()> where @@ -494,7 +494,7 @@ impl IXmlWriterLite { (::windows_core::Interface::vtable(self).WriteCharEntity)(::windows_core::Interface::as_raw(self), wch).ok() } pub unsafe fn WriteChars(&self, pwch: ::core::option::Option<&[u16]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).WriteChars)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwch.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pwch.as_deref().map_or(0, |slice| slice.len() as _)).ok() + (::windows_core::Interface::vtable(self).WriteChars)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwch.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pwch.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } pub unsafe fn WriteComment(&self, pwszcomment: P0) -> ::windows_core::Result<()> where @@ -515,13 +515,13 @@ impl IXmlWriterLite { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).WriteElementString)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszqname.as_ptr()), pwszqname.len() as _, pwszvalue.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).WriteElementString)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszqname.as_ptr()), pwszqname.len().try_into().unwrap(), pwszvalue.into_param().abi()).ok() } pub unsafe fn WriteEndDocument(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).WriteEndDocument)(::windows_core::Interface::as_raw(self)).ok() } pub unsafe fn WriteEndElement(&self, pwszqname: &[u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).WriteEndElement)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszqname.as_ptr()), pwszqname.len() as _).ok() + (::windows_core::Interface::vtable(self).WriteEndElement)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszqname.as_ptr()), pwszqname.len().try_into().unwrap()).ok() } pub unsafe fn WriteEntityRef(&self, pwszname: P0) -> ::windows_core::Result<()> where @@ -530,7 +530,7 @@ impl IXmlWriterLite { (::windows_core::Interface::vtable(self).WriteEntityRef)(::windows_core::Interface::as_raw(self), pwszname.into_param().abi()).ok() } pub unsafe fn WriteFullEndElement(&self, pwszqname: &[u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).WriteFullEndElement)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszqname.as_ptr()), pwszqname.len() as _).ok() + (::windows_core::Interface::vtable(self).WriteFullEndElement)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszqname.as_ptr()), pwszqname.len().try_into().unwrap()).ok() } pub unsafe fn WriteName(&self, pwszname: P0) -> ::windows_core::Result<()> where @@ -576,13 +576,13 @@ impl IXmlWriterLite { (::windows_core::Interface::vtable(self).WriteRaw)(::windows_core::Interface::as_raw(self), pwszdata.into_param().abi()).ok() } pub unsafe fn WriteRawChars(&self, pwch: ::core::option::Option<&[u16]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).WriteRawChars)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwch.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pwch.as_deref().map_or(0, |slice| slice.len() as _)).ok() + (::windows_core::Interface::vtable(self).WriteRawChars)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwch.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pwch.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } pub unsafe fn WriteStartDocument(&self, standalone: XmlStandalone) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).WriteStartDocument)(::windows_core::Interface::as_raw(self), standalone).ok() } pub unsafe fn WriteStartElement(&self, pwszqname: &[u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).WriteStartElement)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszqname.as_ptr()), pwszqname.len() as _).ok() + (::windows_core::Interface::vtable(self).WriteStartElement)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszqname.as_ptr()), pwszqname.len().try_into().unwrap()).ok() } pub unsafe fn WriteString(&self, pwsztext: P0) -> ::windows_core::Result<()> where 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 e4a92e9732..3b159927cc 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/BiometricFramework/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/BiometricFramework/mod.rs @@ -48,7 +48,7 @@ where 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() as _), + unitarray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(databaseid.unwrap_or(::std::ptr::null())), notificationmethod, targetwindow.into_param().abi(), @@ -88,12 +88,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: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("winbio.dll" "system" fn WinBioControlUnit(sessionhandle : u32, unitid : u32, component : WINBIO_COMPONENT, controlcode : u32, sendbuffer : *const u8, sendbuffersize : usize, receivebuffer : *mut u8, receivebuffersize : usize, receivedatasize : *mut usize, operationstatus : *mut u32) -> ::windows_core::HRESULT); - WinBioControlUnit(sessionhandle, unitid, component, controlcode, ::core::mem::transmute(sendbuffer.as_ptr()), sendbuffer.len() as _, ::core::mem::transmute(receivebuffer.as_ptr()), receivebuffer.len() as _, receivedatasize, ::core::mem::transmute(operationstatus.unwrap_or(::std::ptr::null_mut()))).ok() + WinBioControlUnit(sessionhandle, unitid, component, controlcode, ::core::mem::transmute(sendbuffer.as_ptr()), sendbuffer.len().try_into().unwrap(), ::core::mem::transmute(receivebuffer.as_ptr()), receivebuffer.len().try_into().unwrap(), receivedatasize, ::core::mem::transmute(operationstatus.unwrap_or(::std::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WinBioControlUnitPrivileged(sessionhandle: u32, unitid: u32, component: WINBIO_COMPONENT, controlcode: u32, sendbuffer: &[u8], receivebuffer: &mut [u8], receivedatasize: *mut usize, operationstatus: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("winbio.dll" "system" fn WinBioControlUnitPrivileged(sessionhandle : u32, unitid : u32, component : WINBIO_COMPONENT, controlcode : u32, sendbuffer : *const u8, sendbuffersize : usize, receivebuffer : *mut u8, receivebuffersize : usize, receivedatasize : *mut usize, operationstatus : *mut u32) -> ::windows_core::HRESULT); - WinBioControlUnitPrivileged(sessionhandle, unitid, component, controlcode, ::core::mem::transmute(sendbuffer.as_ptr()), sendbuffer.len() as _, ::core::mem::transmute(receivebuffer.as_ptr()), receivebuffer.len() as _, receivedatasize, ::core::mem::transmute(operationstatus.unwrap_or(::std::ptr::null_mut()))).ok() + WinBioControlUnitPrivileged(sessionhandle, unitid, component, controlcode, ::core::mem::transmute(sendbuffer.as_ptr()), sendbuffer.len().try_into().unwrap(), ::core::mem::transmute(receivebuffer.as_ptr()), receivebuffer.len().try_into().unwrap(), receivedatasize, ::core::mem::transmute(operationstatus.unwrap_or(::std::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WinBioDeleteTemplate(sessionhandle: u32, unitid: u32, identity: *const WINBIO_IDENTITY, subfactor: u8) -> ::windows_core::Result<()> { @@ -236,7 +236,7 @@ pub unsafe fn WinBioMonitorPresence(sessionhandle: u32, unitid: u32) -> ::window pub unsafe fn WinBioOpenSession(factor: u32, pooltype: WINBIO_POOL, flags: u32, unitarray: ::core::option::Option<&[u32]>, databaseid: ::core::option::Option<*const ::windows_core::GUID>) -> ::windows_core::Result { ::windows_targets::link!("winbio.dll" "system" fn WinBioOpenSession(factor : u32, pooltype : WINBIO_POOL, flags : u32, unitarray : *const u32, unitcount : usize, databaseid : *const ::windows_core::GUID, sessionhandle : *mut u32) -> ::windows_core::HRESULT); let mut result__ = ::std::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() as _), ::core::mem::transmute(databaseid.unwrap_or(::std::ptr::null())), &mut result__).from_abi(result__) + WinBioOpenSession(factor, pooltype, flags, ::core::mem::transmute(unitarray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), unitarray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(databaseid.unwrap_or(::std::ptr::null())), &mut result__).from_abi(result__) } #[inline] pub unsafe fn WinBioRegisterEventMonitor(sessionhandle: u32, eventmask: u32, eventcallback: PWINBIO_EVENT_CALLBACK, eventcallbackcontext: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> { @@ -266,7 +266,7 @@ pub unsafe fn WinBioRemoveCredential(identity: WINBIO_IDENTITY, r#type: WINBIO_C #[inline] pub unsafe fn WinBioSetCredential(r#type: WINBIO_CREDENTIAL_TYPE, credential: &[u8], format: WINBIO_CREDENTIAL_FORMAT) -> ::windows_core::Result<()> { ::windows_targets::link!("winbio.dll" "system" fn WinBioSetCredential(r#type : WINBIO_CREDENTIAL_TYPE, credential : *const u8, credentialsize : usize, format : WINBIO_CREDENTIAL_FORMAT) -> ::windows_core::HRESULT); - WinBioSetCredential(r#type, ::core::mem::transmute(credential.as_ptr()), credential.len() as _, format).ok() + WinBioSetCredential(r#type, ::core::mem::transmute(credential.as_ptr()), credential.len().try_into().unwrap(), format).ok() } #[inline] pub unsafe fn WinBioSetProperty(sessionhandle: u32, propertytype: u32, propertyid: u32, unitid: u32, identity: ::core::option::Option<*const WINBIO_IDENTITY>, subfactor: u8, propertybuffer: *const ::core::ffi::c_void, propertybuffersize: usize) -> ::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 23c85c3813..f0e3211292 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Bluetooth/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Bluetooth/mod.rs @@ -7,7 +7,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("bthprops.cpl" "system" fn BluetoothAuthenticateDevice(hwndparent : super::super::Foundation:: HWND, hradio : super::super::Foundation:: HANDLE, pbtbi : *mut BLUETOOTH_DEVICE_INFO, pszpasskey : ::windows_core::PCWSTR, ulpasskeylength : u32) -> u32); - BluetoothAuthenticateDevice(hwndparent.into_param().abi(), hradio.into_param().abi(), 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() as _)) + BluetoothAuthenticateDevice(hwndparent.into_param().abi(), hradio.into_param().abi(), 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())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -29,7 +29,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("bthprops.cpl" "system" fn BluetoothAuthenticateMultipleDevices(hwndparent : super::super::Foundation:: HWND, hradio : super::super::Foundation:: HANDLE, cdevices : u32, rgbtdi : *mut BLUETOOTH_DEVICE_INFO) -> u32); - BluetoothAuthenticateMultipleDevices(hwndparent.into_param().abi(), hradio.into_param().abi(), rgbtdi.len() as _, ::core::mem::transmute(rgbtdi.as_ptr())) + BluetoothAuthenticateMultipleDevices(hwndparent.into_param().abi(), hradio.into_param().abi(), rgbtdi.len().try_into().unwrap(), ::core::mem::transmute(rgbtdi.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -177,7 +177,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothGATTGetCharacteristics(hdevice : super::super::Foundation:: HANDLE, service : *const BTH_LE_GATT_SERVICE, characteristicsbuffercount : u16, characteristicsbuffer : *mut BTH_LE_GATT_CHARACTERISTIC, characteristicsbufferactual : *mut u16, flags : u32) -> ::windows_core::HRESULT); - BluetoothGATTGetCharacteristics(hdevice.into_param().abi(), ::core::mem::transmute(service.unwrap_or(::std::ptr::null())), characteristicsbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(characteristicsbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), characteristicsbufferactual, flags).ok() + BluetoothGATTGetCharacteristics(hdevice.into_param().abi(), ::core::mem::transmute(service.unwrap_or(::std::ptr::null())), characteristicsbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(characteristicsbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), characteristicsbufferactual, flags).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -197,7 +197,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothGATTGetDescriptors(hdevice : super::super::Foundation:: HANDLE, characteristic : *const BTH_LE_GATT_CHARACTERISTIC, descriptorsbuffercount : u16, descriptorsbuffer : *mut BTH_LE_GATT_DESCRIPTOR, descriptorsbufferactual : *mut u16, flags : u32) -> ::windows_core::HRESULT); - BluetoothGATTGetDescriptors(hdevice.into_param().abi(), characteristic, descriptorsbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(descriptorsbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), descriptorsbufferactual, flags).ok() + BluetoothGATTGetDescriptors(hdevice.into_param().abi(), 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, flags).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -207,7 +207,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothGATTGetIncludedServices(hdevice : super::super::Foundation:: HANDLE, parentservice : *const BTH_LE_GATT_SERVICE, includedservicesbuffercount : u16, includedservicesbuffer : *mut BTH_LE_GATT_SERVICE, includedservicesbufferactual : *mut u16, flags : u32) -> ::windows_core::HRESULT); - BluetoothGATTGetIncludedServices(hdevice.into_param().abi(), ::core::mem::transmute(parentservice.unwrap_or(::std::ptr::null())), includedservicesbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(includedservicesbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), includedservicesbufferactual, flags).ok() + BluetoothGATTGetIncludedServices(hdevice.into_param().abi(), ::core::mem::transmute(parentservice.unwrap_or(::std::ptr::null())), includedservicesbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(includedservicesbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), includedservicesbufferactual, flags).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -217,7 +217,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothGATTGetServices(hdevice : super::super::Foundation:: HANDLE, servicesbuffercount : u16, servicesbuffer : *mut BTH_LE_GATT_SERVICE, servicesbufferactual : *mut u16, flags : u32) -> ::windows_core::HRESULT); - BluetoothGATTGetServices(hdevice.into_param().abi(), servicesbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(servicesbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), servicesbufferactual, flags).ok() + BluetoothGATTGetServices(hdevice.into_param().abi(), servicesbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(servicesbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), servicesbufferactual, flags).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -325,27 +325,27 @@ pub unsafe fn BluetoothRemoveDevice(paddress: *const BLUETOOTH_ADDRESS) -> u32 { #[inline] pub unsafe fn BluetoothSdpEnumAttributes(psdpstream: &[u8], pfncallback: PFN_BLUETOOTH_ENUM_ATTRIBUTES_CALLBACK, pvparam: *const ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothSdpEnumAttributes(psdpstream : *const u8, cbstreamsize : u32, pfncallback : PFN_BLUETOOTH_ENUM_ATTRIBUTES_CALLBACK, pvparam : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - BluetoothSdpEnumAttributes(::core::mem::transmute(psdpstream.as_ptr()), psdpstream.len() as _, pfncallback, pvparam).ok() + BluetoothSdpEnumAttributes(::core::mem::transmute(psdpstream.as_ptr()), psdpstream.len().try_into().unwrap(), pfncallback, pvparam).ok() } #[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); - BluetoothSdpGetAttributeValue(::core::mem::transmute(precordstream.as_ptr()), precordstream.len() as _, usattributeid, pattributedata) + BluetoothSdpGetAttributeValue(::core::mem::transmute(precordstream.as_ptr()), precordstream.len().try_into().unwrap(), usattributeid, pattributedata) } #[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); - BluetoothSdpGetContainerElementData(::core::mem::transmute(pcontainerstream.as_ptr()), pcontainerstream.len() as _, pelement, pdata) + BluetoothSdpGetContainerElementData(::core::mem::transmute(pcontainerstream.as_ptr()), pcontainerstream.len().try_into().unwrap(), pelement, pdata) } #[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); - BluetoothSdpGetElementData(::core::mem::transmute(psdpstream.as_ptr()), psdpstream.len() as _, pdata) + BluetoothSdpGetElementData(::core::mem::transmute(psdpstream.as_ptr()), psdpstream.len().try_into().unwrap(), pdata) } #[inline] pub unsafe fn BluetoothSdpGetString(precordstream: &[u8], pstringdata: ::core::option::Option<*const SDP_STRING_TYPE_DATA>, usstringoffset: u16, pszstring: ::windows_core::PWSTR, pcchstringlength: *mut u32) -> u32 { ::windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothSdpGetString(precordstream : *const u8, cbrecordlength : u32, pstringdata : *const SDP_STRING_TYPE_DATA, usstringoffset : u16, pszstring : ::windows_core::PWSTR, pcchstringlength : *mut u32) -> u32); - BluetoothSdpGetString(::core::mem::transmute(precordstream.as_ptr()), precordstream.len() as _, ::core::mem::transmute(pstringdata.unwrap_or(::std::ptr::null())), usstringoffset, ::core::mem::transmute(pszstring), pcchstringlength) + BluetoothSdpGetString(::core::mem::transmute(precordstream.as_ptr()), precordstream.len().try_into().unwrap(), ::core::mem::transmute(pstringdata.unwrap_or(::std::ptr::null())), usstringoffset, ::core::mem::transmute(pszstring), pcchstringlength) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] diff --git a/crates/libs/windows/src/Windows/Win32/Devices/Communication/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/Communication/mod.rs index 6e8f65fc42..165e4a1351 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Communication/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Communication/mod.rs @@ -123,7 +123,7 @@ where #[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); - GetCommPorts(::core::mem::transmute(lpportnumbers.as_ptr()), lpportnumbers.len() as _, puportnumbersfound) + GetCommPorts(::core::mem::transmute(lpportnumbers.as_ptr()), lpportnumbers.len().try_into().unwrap(), puportnumbersfound) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 af0d0c6cf5..39abb8ff81 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/DeviceAccess/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/DeviceAccess/mod.rs @@ -49,7 +49,7 @@ pub struct ICreateDeviceAccessAsync_Vtbl { pub struct IDeviceIoControl(::windows_core::IUnknown); impl IDeviceIoControl { pub unsafe fn DeviceIoControlSync(&self, iocontrolcode: u32, inputbuffer: ::core::option::Option<&[u8]>, outputbuffer: ::core::option::Option<&mut [u8]>, bytesreturned: *mut u32) -> ::windows_core::Result<()> { - (::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() as _), ::core::mem::transmute(outputbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), outputbuffer.as_deref().map_or(0, |slice| slice.len() as _), bytesreturned).ok() + (::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).ok() } pub unsafe fn DeviceIoControlAsync(&self, iocontrolcode: u32, inputbuffer: ::core::option::Option<&[u8]>, outputbuffer: ::core::option::Option<&mut [u8]>, requestcompletioncallback: P0, cancelcontext: ::core::option::Option<*mut usize>) -> ::windows_core::Result<()> where @@ -59,9 +59,9 @@ impl IDeviceIoControl { ::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() as _), + 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() as _), + outputbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), requestcompletioncallback.into_param().abi(), ::core::mem::transmute(cancelcontext.unwrap_or(::std::ptr::null_mut())), ) 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 85337cbe02..fa907f18cc 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/DeviceAndDriverInstallation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/DeviceAndDriverInstallation/mod.rs @@ -489,22 +489,22 @@ pub unsafe fn CM_Get_DevNode_Status_Ex(pulstatus: *mut CM_DEVNODE_STATUS_FLAGS, #[inline] pub unsafe fn CM_Get_Device_IDA(dndevinst: u32, buffer: &mut [u8], ulflags: u32) -> CONFIGRET { ::windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_IDA(dndevinst : u32, buffer : ::windows_core::PSTR, bufferlen : u32, ulflags : u32) -> CONFIGRET); - CM_Get_Device_IDA(dndevinst, ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, ulflags) + CM_Get_Device_IDA(dndevinst, ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ulflags) } #[inline] pub unsafe fn CM_Get_Device_IDW(dndevinst: u32, buffer: &mut [u16], ulflags: u32) -> CONFIGRET { ::windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_IDW(dndevinst : u32, buffer : ::windows_core::PWSTR, bufferlen : u32, ulflags : u32) -> CONFIGRET); - CM_Get_Device_IDW(dndevinst, ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, ulflags) + CM_Get_Device_IDW(dndevinst, ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ulflags) } #[inline] pub unsafe fn CM_Get_Device_ID_ExA(dndevinst: u32, buffer: &mut [u8], ulflags: u32, hmachine: isize) -> CONFIGRET { ::windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_ID_ExA(dndevinst : u32, buffer : ::windows_core::PSTR, bufferlen : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Device_ID_ExA(dndevinst, ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, ulflags, hmachine) + CM_Get_Device_ID_ExA(dndevinst, ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ulflags, hmachine) } #[inline] pub unsafe fn CM_Get_Device_ID_ExW(dndevinst: u32, buffer: &mut [u16], ulflags: u32, hmachine: isize) -> CONFIGRET { ::windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_ID_ExW(dndevinst : u32, buffer : ::windows_core::PWSTR, bufferlen : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Device_ID_ExW(dndevinst, ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, ulflags, hmachine) + CM_Get_Device_ID_ExW(dndevinst, ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ulflags, hmachine) } #[inline] pub unsafe fn CM_Get_Device_ID_ListA(pszfilter: P0, buffer: &mut [u8], ulflags: u32) -> CONFIGRET @@ -512,7 +512,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_ID_ListA(pszfilter : ::windows_core::PCSTR, buffer : ::windows_core::PSTR, bufferlen : u32, ulflags : u32) -> CONFIGRET); - CM_Get_Device_ID_ListA(pszfilter.into_param().abi(), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, ulflags) + CM_Get_Device_ID_ListA(pszfilter.into_param().abi(), ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ulflags) } #[inline] pub unsafe fn CM_Get_Device_ID_ListW(pszfilter: P0, buffer: &mut [u16], ulflags: u32) -> CONFIGRET @@ -520,7 +520,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_ID_ListW(pszfilter : ::windows_core::PCWSTR, buffer : ::windows_core::PWSTR, bufferlen : u32, ulflags : u32) -> CONFIGRET); - CM_Get_Device_ID_ListW(pszfilter.into_param().abi(), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, ulflags) + CM_Get_Device_ID_ListW(pszfilter.into_param().abi(), ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ulflags) } #[inline] pub unsafe fn CM_Get_Device_ID_List_ExA(pszfilter: P0, buffer: &mut [u8], ulflags: u32, hmachine: isize) -> CONFIGRET @@ -528,7 +528,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_ID_List_ExA(pszfilter : ::windows_core::PCSTR, buffer : ::windows_core::PSTR, bufferlen : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Device_ID_List_ExA(pszfilter.into_param().abi(), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, ulflags, hmachine) + CM_Get_Device_ID_List_ExA(pszfilter.into_param().abi(), ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ulflags, hmachine) } #[inline] pub unsafe fn CM_Get_Device_ID_List_ExW(pszfilter: P0, buffer: &mut [u16], ulflags: u32, hmachine: isize) -> CONFIGRET @@ -536,7 +536,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_ID_List_ExW(pszfilter : ::windows_core::PCWSTR, buffer : ::windows_core::PWSTR, bufferlen : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Device_ID_List_ExW(pszfilter.into_param().abi(), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, ulflags, hmachine) + CM_Get_Device_ID_List_ExW(pszfilter.into_param().abi(), ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ulflags, hmachine) } #[inline] pub unsafe fn CM_Get_Device_ID_List_SizeA(pullen: *mut u32, pszfilter: P0, ulflags: u32) -> CONFIGRET @@ -618,7 +618,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_Interface_ListA(interfaceclassguid : *const ::windows_core::GUID, pdeviceid : ::windows_core::PCSTR, buffer : ::windows_core::PSTR, bufferlen : u32, ulflags : CM_GET_DEVICE_INTERFACE_LIST_FLAGS) -> CONFIGRET); - CM_Get_Device_Interface_ListA(interfaceclassguid, pdeviceid.into_param().abi(), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, ulflags) + CM_Get_Device_Interface_ListA(interfaceclassguid, pdeviceid.into_param().abi(), ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ulflags) } #[inline] pub unsafe fn CM_Get_Device_Interface_ListW(interfaceclassguid: *const ::windows_core::GUID, pdeviceid: P0, buffer: &mut [u16], ulflags: CM_GET_DEVICE_INTERFACE_LIST_FLAGS) -> CONFIGRET @@ -626,7 +626,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_Interface_ListW(interfaceclassguid : *const ::windows_core::GUID, pdeviceid : ::windows_core::PCWSTR, buffer : ::windows_core::PWSTR, bufferlen : u32, ulflags : CM_GET_DEVICE_INTERFACE_LIST_FLAGS) -> CONFIGRET); - CM_Get_Device_Interface_ListW(interfaceclassguid, pdeviceid.into_param().abi(), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, ulflags) + CM_Get_Device_Interface_ListW(interfaceclassguid, pdeviceid.into_param().abi(), ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ulflags) } #[inline] pub unsafe fn CM_Get_Device_Interface_List_ExA(interfaceclassguid: *const ::windows_core::GUID, pdeviceid: P0, buffer: &mut [u8], ulflags: u32, hmachine: isize) -> CONFIGRET @@ -634,7 +634,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::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 : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Device_Interface_List_ExA(interfaceclassguid, pdeviceid.into_param().abi(), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, ulflags, hmachine) + CM_Get_Device_Interface_List_ExA(interfaceclassguid, pdeviceid.into_param().abi(), ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ulflags, hmachine) } #[inline] pub unsafe fn CM_Get_Device_Interface_List_ExW(interfaceclassguid: *const ::windows_core::GUID, pdeviceid: P0, buffer: &mut [u16], ulflags: u32, hmachine: isize) -> CONFIGRET @@ -642,7 +642,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::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 : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Device_Interface_List_ExW(interfaceclassguid, pdeviceid.into_param().abi(), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, ulflags, hmachine) + CM_Get_Device_Interface_List_ExW(interfaceclassguid, pdeviceid.into_param().abi(), ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ulflags, hmachine) } #[inline] pub unsafe fn CM_Get_Device_Interface_List_SizeA(pullen: *mut u32, interfaceclassguid: *const ::windows_core::GUID, pdeviceid: P0, ulflags: CM_GET_DEVICE_INTERFACE_LIST_FLAGS) -> CONFIGRET @@ -1085,22 +1085,22 @@ where #[inline] pub unsafe fn CM_Query_And_Remove_SubTreeA(dnancestor: u32, pvetotype: ::core::option::Option<*mut PNP_VETO_TYPE>, pszvetoname: ::core::option::Option<&mut [u8]>, ulflags: u32) -> CONFIGRET { ::windows_targets::link!("cfgmgr32.dll" "system" fn CM_Query_And_Remove_SubTreeA(dnancestor : u32, pvetotype : *mut PNP_VETO_TYPE, pszvetoname : ::windows_core::PSTR, ulnamelength : u32, ulflags : u32) -> CONFIGRET); - CM_Query_And_Remove_SubTreeA(dnancestor, ::core::mem::transmute(pvetotype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pszvetoname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len() as _), ulflags) + CM_Query_And_Remove_SubTreeA(dnancestor, ::core::mem::transmute(pvetotype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pszvetoname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags) } #[inline] pub unsafe fn CM_Query_And_Remove_SubTreeW(dnancestor: u32, pvetotype: ::core::option::Option<*mut PNP_VETO_TYPE>, pszvetoname: ::core::option::Option<&mut [u16]>, ulflags: u32) -> CONFIGRET { ::windows_targets::link!("cfgmgr32.dll" "system" fn CM_Query_And_Remove_SubTreeW(dnancestor : u32, pvetotype : *mut PNP_VETO_TYPE, pszvetoname : ::windows_core::PWSTR, ulnamelength : u32, ulflags : u32) -> CONFIGRET); - CM_Query_And_Remove_SubTreeW(dnancestor, ::core::mem::transmute(pvetotype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pszvetoname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len() as _), ulflags) + CM_Query_And_Remove_SubTreeW(dnancestor, ::core::mem::transmute(pvetotype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pszvetoname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags) } #[inline] pub unsafe fn CM_Query_And_Remove_SubTree_ExA(dnancestor: u32, pvetotype: ::core::option::Option<*mut PNP_VETO_TYPE>, pszvetoname: ::core::option::Option<&mut [u8]>, ulflags: u32, hmachine: isize) -> CONFIGRET { ::windows_targets::link!("cfgmgr32.dll" "system" fn CM_Query_And_Remove_SubTree_ExA(dnancestor : u32, pvetotype : *mut PNP_VETO_TYPE, pszvetoname : ::windows_core::PSTR, ulnamelength : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Query_And_Remove_SubTree_ExA(dnancestor, ::core::mem::transmute(pvetotype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pszvetoname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len() as _), ulflags, hmachine) + CM_Query_And_Remove_SubTree_ExA(dnancestor, ::core::mem::transmute(pvetotype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pszvetoname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags, hmachine) } #[inline] pub unsafe fn CM_Query_And_Remove_SubTree_ExW(dnancestor: u32, pvetotype: ::core::option::Option<*mut PNP_VETO_TYPE>, pszvetoname: ::core::option::Option<&mut [u16]>, ulflags: u32, hmachine: isize) -> CONFIGRET { ::windows_targets::link!("cfgmgr32.dll" "system" fn CM_Query_And_Remove_SubTree_ExW(dnancestor : u32, pvetotype : *mut PNP_VETO_TYPE, pszvetoname : ::windows_core::PWSTR, ulnamelength : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Query_And_Remove_SubTree_ExW(dnancestor, ::core::mem::transmute(pvetotype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pszvetoname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len() as _), ulflags, hmachine) + CM_Query_And_Remove_SubTree_ExW(dnancestor, ::core::mem::transmute(pvetotype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pszvetoname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags, hmachine) } #[inline] pub unsafe fn CM_Query_Arbitrator_Free_Data(pdata: *mut ::core::ffi::c_void, datalen: u32, dndevinst: u32, resourceid: u32, ulflags: u32) -> CONFIGRET { @@ -1209,22 +1209,22 @@ pub unsafe fn CM_Remove_SubTree_Ex(dnancestor: u32, ulflags: u32, hmachine: isiz #[inline] pub unsafe fn CM_Request_Device_EjectA(dndevinst: u32, pvetotype: ::core::option::Option<*mut PNP_VETO_TYPE>, pszvetoname: ::core::option::Option<&mut [u8]>, ulflags: u32) -> CONFIGRET { ::windows_targets::link!("cfgmgr32.dll" "system" fn CM_Request_Device_EjectA(dndevinst : u32, pvetotype : *mut PNP_VETO_TYPE, pszvetoname : ::windows_core::PSTR, ulnamelength : u32, ulflags : u32) -> CONFIGRET); - CM_Request_Device_EjectA(dndevinst, ::core::mem::transmute(pvetotype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pszvetoname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len() as _), ulflags) + CM_Request_Device_EjectA(dndevinst, ::core::mem::transmute(pvetotype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pszvetoname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags) } #[inline] pub unsafe fn CM_Request_Device_EjectW(dndevinst: u32, pvetotype: ::core::option::Option<*mut PNP_VETO_TYPE>, pszvetoname: ::core::option::Option<&mut [u16]>, ulflags: u32) -> CONFIGRET { ::windows_targets::link!("cfgmgr32.dll" "system" fn CM_Request_Device_EjectW(dndevinst : u32, pvetotype : *mut PNP_VETO_TYPE, pszvetoname : ::windows_core::PWSTR, ulnamelength : u32, ulflags : u32) -> CONFIGRET); - CM_Request_Device_EjectW(dndevinst, ::core::mem::transmute(pvetotype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pszvetoname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len() as _), ulflags) + CM_Request_Device_EjectW(dndevinst, ::core::mem::transmute(pvetotype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pszvetoname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags) } #[inline] pub unsafe fn CM_Request_Device_Eject_ExA(dndevinst: u32, pvetotype: ::core::option::Option<*mut PNP_VETO_TYPE>, pszvetoname: ::core::option::Option<&mut [u8]>, ulflags: u32, hmachine: isize) -> CONFIGRET { ::windows_targets::link!("cfgmgr32.dll" "system" fn CM_Request_Device_Eject_ExA(dndevinst : u32, pvetotype : *mut PNP_VETO_TYPE, pszvetoname : ::windows_core::PSTR, ulnamelength : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Request_Device_Eject_ExA(dndevinst, ::core::mem::transmute(pvetotype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pszvetoname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len() as _), ulflags, hmachine) + CM_Request_Device_Eject_ExA(dndevinst, ::core::mem::transmute(pvetotype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pszvetoname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags, hmachine) } #[inline] pub unsafe fn CM_Request_Device_Eject_ExW(dndevinst: u32, pvetotype: ::core::option::Option<*mut PNP_VETO_TYPE>, pszvetoname: ::core::option::Option<&mut [u16]>, ulflags: u32, hmachine: isize) -> CONFIGRET { ::windows_targets::link!("cfgmgr32.dll" "system" fn CM_Request_Device_Eject_ExW(dndevinst : u32, pvetotype : *mut PNP_VETO_TYPE, pszvetoname : ::windows_core::PWSTR, ulnamelength : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Request_Device_Eject_ExW(dndevinst, ::core::mem::transmute(pvetotype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pszvetoname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len() as _), ulflags, hmachine) + CM_Request_Device_Eject_ExW(dndevinst, ::core::mem::transmute(pvetotype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pszvetoname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags, hmachine) } #[inline] pub unsafe fn CM_Request_Eject_PC() -> CONFIGRET { @@ -1251,14 +1251,14 @@ pub unsafe fn CM_Run_Detection_Ex(ulflags: u32, hmachine: isize) -> CONFIGRET { #[inline] pub unsafe fn CM_Set_Class_PropertyW(classguid: *const ::windows_core::GUID, propertykey: *const super::Properties::DEVPROPKEY, propertytype: super::Properties::DEVPROPTYPE, propertybuffer: ::core::option::Option<&[u8]>, ulflags: u32) -> CONFIGRET { ::windows_targets::link!("cfgmgr32.dll" "system" fn CM_Set_Class_PropertyW(classguid : *const ::windows_core::GUID, propertykey : *const super::Properties:: DEVPROPKEY, propertytype : super::Properties:: DEVPROPTYPE, propertybuffer : *const u8, propertybuffersize : u32, ulflags : u32) -> CONFIGRET); - CM_Set_Class_PropertyW(classguid, propertykey, propertytype, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), ulflags) + CM_Set_Class_PropertyW(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) } #[doc = "Required features: `\"Win32_Devices_Properties\"`"] #[cfg(feature = "Win32_Devices_Properties")] #[inline] pub unsafe fn CM_Set_Class_Property_ExW(classguid: *const ::windows_core::GUID, propertykey: *const super::Properties::DEVPROPKEY, propertytype: super::Properties::DEVPROPTYPE, propertybuffer: ::core::option::Option<&[u8]>, ulflags: u32, hmachine: isize) -> CONFIGRET { ::windows_targets::link!("cfgmgr32.dll" "system" fn CM_Set_Class_Property_ExW(classguid : *const ::windows_core::GUID, propertykey : *const super::Properties:: DEVPROPKEY, propertytype : super::Properties:: DEVPROPTYPE, propertybuffer : *const u8, propertybuffersize : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - 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() as _), ulflags, hmachine) + 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) } #[inline] pub unsafe fn CM_Set_Class_Registry_PropertyA(classguid: *const ::windows_core::GUID, ulproperty: u32, buffer: ::core::option::Option<*const ::core::ffi::c_void>, ullength: u32, ulflags: u32, hmachine: isize) -> CONFIGRET { @@ -1285,14 +1285,14 @@ pub unsafe fn CM_Set_DevNode_Problem_Ex(dndevinst: u32, ulproblem: u32, ulflags: #[inline] pub unsafe fn CM_Set_DevNode_PropertyW(dndevinst: u32, propertykey: *const super::Properties::DEVPROPKEY, propertytype: super::Properties::DEVPROPTYPE, propertybuffer: ::core::option::Option<&[u8]>, ulflags: u32) -> CONFIGRET { ::windows_targets::link!("cfgmgr32.dll" "system" fn CM_Set_DevNode_PropertyW(dndevinst : u32, propertykey : *const super::Properties:: DEVPROPKEY, propertytype : super::Properties:: DEVPROPTYPE, propertybuffer : *const u8, propertybuffersize : u32, ulflags : u32) -> CONFIGRET); - CM_Set_DevNode_PropertyW(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() as _), ulflags) + CM_Set_DevNode_PropertyW(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) } #[doc = "Required features: `\"Win32_Devices_Properties\"`"] #[cfg(feature = "Win32_Devices_Properties")] #[inline] pub unsafe fn CM_Set_DevNode_Property_ExW(dndevinst: u32, propertykey: *const super::Properties::DEVPROPKEY, propertytype: super::Properties::DEVPROPTYPE, propertybuffer: ::core::option::Option<&[u8]>, ulflags: u32, hmachine: isize) -> CONFIGRET { ::windows_targets::link!("cfgmgr32.dll" "system" fn CM_Set_DevNode_Property_ExW(dndevinst : u32, propertykey : *const super::Properties:: DEVPROPKEY, propertytype : super::Properties:: DEVPROPTYPE, propertybuffer : *const u8, propertybuffersize : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - 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() as _), ulflags, hmachine) + 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) } #[inline] pub unsafe fn CM_Set_DevNode_Registry_PropertyA(dndevinst: u32, ulproperty: u32, buffer: ::core::option::Option<*const ::core::ffi::c_void>, ullength: u32, ulflags: u32) -> CONFIGRET { @@ -1322,7 +1322,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("cfgmgr32.dll" "system" fn CM_Set_Device_Interface_PropertyW(pszdeviceinterface : ::windows_core::PCWSTR, propertykey : *const super::Properties:: DEVPROPKEY, propertytype : super::Properties:: DEVPROPTYPE, propertybuffer : *const u8, propertybuffersize : u32, ulflags : u32) -> CONFIGRET); - CM_Set_Device_Interface_PropertyW(pszdeviceinterface.into_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() as _), ulflags) + CM_Set_Device_Interface_PropertyW(pszdeviceinterface.into_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) } #[doc = "Required features: `\"Win32_Devices_Properties\"`"] #[cfg(feature = "Win32_Devices_Properties")] @@ -1332,7 +1332,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("cfgmgr32.dll" "system" fn CM_Set_Device_Interface_Property_ExW(pszdeviceinterface : ::windows_core::PCWSTR, propertykey : *const super::Properties:: DEVPROPKEY, propertytype : super::Properties:: DEVPROPTYPE, propertybuffer : *const u8, propertybuffersize : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Set_Device_Interface_Property_ExW(pszdeviceinterface.into_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() as _), ulflags, hmachine) + CM_Set_Device_Interface_Property_ExW(pszdeviceinterface.into_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) } #[inline] pub unsafe fn CM_Set_HW_Prof(ulhardwareprofile: u32, ulflags: u32) -> CONFIGRET { @@ -1767,7 +1767,7 @@ where P5: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupCopyErrorA(hwndparent : super::super::Foundation:: HWND, dialogtitle : ::windows_core::PCSTR, diskname : ::windows_core::PCSTR, pathtosource : ::windows_core::PCSTR, sourcefile : ::windows_core::PCSTR, targetpathfile : ::windows_core::PCSTR, win32errorcode : u32, style : u32, pathbuffer : ::windows_core::PSTR, pathbuffersize : u32, pathrequiredsize : *mut u32) -> u32); - SetupCopyErrorA(hwndparent.into_param().abi(), dialogtitle.into_param().abi(), diskname.into_param().abi(), pathtosource.into_param().abi(), sourcefile.into_param().abi(), targetpathfile.into_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() as _), ::core::mem::transmute(pathrequiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupCopyErrorA(hwndparent.into_param().abi(), dialogtitle.into_param().abi(), diskname.into_param().abi(), pathtosource.into_param().abi(), sourcefile.into_param().abi(), targetpathfile.into_param().abi(), win32errorcode, style, ::core::mem::transmute(pathbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pathbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pathrequiredsize.unwrap_or(::std::ptr::null_mut()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1782,7 +1782,7 @@ where P5: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupCopyErrorW(hwndparent : super::super::Foundation:: HWND, dialogtitle : ::windows_core::PCWSTR, diskname : ::windows_core::PCWSTR, pathtosource : ::windows_core::PCWSTR, sourcefile : ::windows_core::PCWSTR, targetpathfile : ::windows_core::PCWSTR, win32errorcode : u32, style : u32, pathbuffer : ::windows_core::PWSTR, pathbuffersize : u32, pathrequiredsize : *mut u32) -> u32); - SetupCopyErrorW(hwndparent.into_param().abi(), dialogtitle.into_param().abi(), diskname.into_param().abi(), pathtosource.into_param().abi(), sourcefile.into_param().abi(), targetpathfile.into_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() as _), ::core::mem::transmute(pathrequiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupCopyErrorW(hwndparent.into_param().abi(), dialogtitle.into_param().abi(), diskname.into_param().abi(), pathtosource.into_param().abi(), sourcefile.into_param().abi(), targetpathfile.into_param().abi(), win32errorcode, style, ::core::mem::transmute(pathbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pathbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pathrequiredsize.unwrap_or(::std::ptr::null_mut()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1793,7 +1793,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupCopyOEMInfA(sourceinffilename : ::windows_core::PCSTR, oemsourcemedialocation : ::windows_core::PCSTR, oemsourcemediatype : OEM_SOURCE_MEDIA_TYPE, copystyle : SP_COPY_STYLE, destinationinffilename : ::windows_core::PSTR, destinationinffilenamesize : u32, requiredsize : *mut u32, destinationinffilenamecomponent : *mut ::windows_core::PSTR) -> super::super::Foundation:: BOOL); - SetupCopyOEMInfA(sourceinffilename.into_param().abi(), oemsourcemedialocation.into_param().abi(), oemsourcemediatype, copystyle, ::core::mem::transmute(destinationinffilename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), destinationinffilename.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(destinationinffilenamecomponent.unwrap_or(::std::ptr::null_mut()))).ok() + SetupCopyOEMInfA(sourceinffilename.into_param().abi(), oemsourcemedialocation.into_param().abi(), oemsourcemediatype, copystyle, ::core::mem::transmute(destinationinffilename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), destinationinffilename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(destinationinffilenamecomponent.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1804,7 +1804,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupCopyOEMInfW(sourceinffilename : ::windows_core::PCWSTR, oemsourcemedialocation : ::windows_core::PCWSTR, oemsourcemediatype : OEM_SOURCE_MEDIA_TYPE, copystyle : SP_COPY_STYLE, destinationinffilename : ::windows_core::PWSTR, destinationinffilenamesize : u32, requiredsize : *mut u32, destinationinffilenamecomponent : *mut ::windows_core::PWSTR) -> super::super::Foundation:: BOOL); - SetupCopyOEMInfW(sourceinffilename.into_param().abi(), oemsourcemedialocation.into_param().abi(), oemsourcemediatype, copystyle, ::core::mem::transmute(destinationinffilename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), destinationinffilename.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(destinationinffilenamecomponent.unwrap_or(::std::ptr::null_mut()))).ok() + SetupCopyOEMInfW(sourceinffilename.into_param().abi(), oemsourcemedialocation.into_param().abi(), oemsourcemediatype, copystyle, ::core::mem::transmute(destinationinffilename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), destinationinffilename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(destinationinffilenamecomponent.unwrap_or(::std::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupCreateDiskSpaceListA(reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: u32, flags: u32) -> *mut ::core::ffi::c_void { @@ -1890,7 +1890,7 @@ where #[inline] pub unsafe fn SetupDiBuildClassInfoList(flags: u32, classguidlist: ::core::option::Option<&mut [::windows_core::GUID]>, requiredsize: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiBuildClassInfoList(flags : u32, classguidlist : *mut ::windows_core::GUID, classguidlistsize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiBuildClassInfoList(flags, ::core::mem::transmute(classguidlist.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), classguidlist.as_deref().map_or(0, |slice| slice.len() as _), requiredsize).ok() + 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).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1900,7 +1900,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiBuildClassInfoListExA(flags : u32, classguidlist : *mut ::windows_core::GUID, classguidlistsize : u32, requiredsize : *mut u32, machinename : ::windows_core::PCSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiBuildClassInfoListExA(flags, ::core::mem::transmute(classguidlist.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), classguidlist.as_deref().map_or(0, |slice| slice.len() as _), requiredsize, machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() + SetupDiBuildClassInfoListExA(flags, ::core::mem::transmute(classguidlist.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), classguidlist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), requiredsize, machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1910,7 +1910,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiBuildClassInfoListExW(flags : u32, classguidlist : *mut ::windows_core::GUID, classguidlistsize : u32, requiredsize : *mut u32, machinename : ::windows_core::PCWSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiBuildClassInfoListExW(flags, ::core::mem::transmute(classguidlist.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), classguidlist.as_deref().map_or(0, |slice| slice.len() as _), requiredsize, machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() + SetupDiBuildClassInfoListExW(flags, ::core::mem::transmute(classguidlist.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), classguidlist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), requiredsize, machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1960,7 +1960,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiClassGuidsFromNameA(classname : ::windows_core::PCSTR, classguidlist : *mut ::windows_core::GUID, classguidlistsize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiClassGuidsFromNameA(classname.into_param().abi(), ::core::mem::transmute(classguidlist.as_ptr()), classguidlist.len() as _, requiredsize).ok() + SetupDiClassGuidsFromNameA(classname.into_param().abi(), ::core::mem::transmute(classguidlist.as_ptr()), classguidlist.len().try_into().unwrap(), requiredsize).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1971,7 +1971,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiClassGuidsFromNameExA(classname : ::windows_core::PCSTR, classguidlist : *mut ::windows_core::GUID, classguidlistsize : u32, requiredsize : *mut u32, machinename : ::windows_core::PCSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiClassGuidsFromNameExA(classname.into_param().abi(), ::core::mem::transmute(classguidlist.as_ptr()), classguidlist.len() as _, requiredsize, machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() + SetupDiClassGuidsFromNameExA(classname.into_param().abi(), ::core::mem::transmute(classguidlist.as_ptr()), classguidlist.len().try_into().unwrap(), requiredsize, machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1982,7 +1982,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiClassGuidsFromNameExW(classname : ::windows_core::PCWSTR, classguidlist : *mut ::windows_core::GUID, classguidlistsize : u32, requiredsize : *mut u32, machinename : ::windows_core::PCWSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiClassGuidsFromNameExW(classname.into_param().abi(), ::core::mem::transmute(classguidlist.as_ptr()), classguidlist.len() as _, requiredsize, machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() + SetupDiClassGuidsFromNameExW(classname.into_param().abi(), ::core::mem::transmute(classguidlist.as_ptr()), classguidlist.len().try_into().unwrap(), requiredsize, machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1992,14 +1992,14 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiClassGuidsFromNameW(classname : ::windows_core::PCWSTR, classguidlist : *mut ::windows_core::GUID, classguidlistsize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiClassGuidsFromNameW(classname.into_param().abi(), ::core::mem::transmute(classguidlist.as_ptr()), classguidlist.len() as _, requiredsize).ok() + SetupDiClassGuidsFromNameW(classname.into_param().abi(), ::core::mem::transmute(classguidlist.as_ptr()), classguidlist.len().try_into().unwrap(), requiredsize).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn SetupDiClassNameFromGuidA(classguid: *const ::windows_core::GUID, classname: &mut [u8], requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiClassNameFromGuidA(classguid : *const ::windows_core::GUID, classname : ::windows_core::PSTR, classnamesize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiClassNameFromGuidA(classguid, ::core::mem::transmute(classname.as_ptr()), classname.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupDiClassNameFromGuidA(classguid, ::core::mem::transmute(classname.as_ptr()), classname.len().try_into().unwrap(), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2009,7 +2009,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiClassNameFromGuidExA(classguid : *const ::windows_core::GUID, classname : ::windows_core::PSTR, classnamesize : u32, requiredsize : *mut u32, machinename : ::windows_core::PCSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiClassNameFromGuidExA(classguid, ::core::mem::transmute(classname.as_ptr()), classname.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() + SetupDiClassNameFromGuidExA(classguid, ::core::mem::transmute(classname.as_ptr()), classname.len().try_into().unwrap(), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2019,14 +2019,14 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiClassNameFromGuidExW(classguid : *const ::windows_core::GUID, classname : ::windows_core::PWSTR, classnamesize : u32, requiredsize : *mut u32, machinename : ::windows_core::PCWSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiClassNameFromGuidExW(classguid, ::core::mem::transmute(classname.as_ptr()), classname.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() + SetupDiClassNameFromGuidExW(classguid, ::core::mem::transmute(classname.as_ptr()), classname.len().try_into().unwrap(), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn SetupDiClassNameFromGuidW(classguid: *const ::windows_core::GUID, classname: &mut [u16], requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiClassNameFromGuidW(classguid : *const ::windows_core::GUID, classname : ::windows_core::PWSTR, classnamesize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiClassNameFromGuidW(classguid, ::core::mem::transmute(classname.as_ptr()), classname.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupDiClassNameFromGuidW(classguid, ::core::mem::transmute(classname.as_ptr()), classname.len().try_into().unwrap(), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_System_Registry\"`"] #[cfg(feature = "Win32_System_Registry")] @@ -2281,14 +2281,14 @@ where #[inline] pub unsafe fn SetupDiGetActualModelsSectionA(context: *const INFCONTEXT, alternateplatforminfo: ::core::option::Option<*const SP_ALTPLATFORM_INFO_V2>, infsectionwithext: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetActualModelsSectionA(context : *const INFCONTEXT, alternateplatforminfo : *const SP_ALTPLATFORM_INFO_V2, infsectionwithext : ::windows_core::PSTR, infsectionwithextsize : u32, requiredsize : *mut u32, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiGetActualModelsSectionA(context, ::core::mem::transmute(alternateplatforminfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(infsectionwithext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), infsectionwithext.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() + SetupDiGetActualModelsSectionA(context, ::core::mem::transmute(alternateplatforminfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(infsectionwithext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), infsectionwithext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Diagnostics_Debug\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Diagnostics_Debug"))] #[inline] pub unsafe fn SetupDiGetActualModelsSectionW(context: *const INFCONTEXT, alternateplatforminfo: ::core::option::Option<*const SP_ALTPLATFORM_INFO_V2>, infsectionwithext: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetActualModelsSectionW(context : *const INFCONTEXT, alternateplatforminfo : *const SP_ALTPLATFORM_INFO_V2, infsectionwithext : ::windows_core::PWSTR, infsectionwithextsize : u32, requiredsize : *mut u32, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiGetActualModelsSectionW(context, ::core::mem::transmute(alternateplatforminfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(infsectionwithext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), infsectionwithext.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() + SetupDiGetActualModelsSectionW(context, ::core::mem::transmute(alternateplatforminfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(infsectionwithext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), infsectionwithext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2298,7 +2298,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetActualSectionToInstallA(infhandle : *const ::core::ffi::c_void, infsectionname : ::windows_core::PCSTR, infsectionwithext : ::windows_core::PSTR, infsectionwithextsize : u32, requiredsize : *mut u32, extension : *mut ::windows_core::PSTR) -> super::super::Foundation:: BOOL); - SetupDiGetActualSectionToInstallA(infhandle, infsectionname.into_param().abi(), ::core::mem::transmute(infsectionwithext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), infsectionwithext.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(extension.unwrap_or(::std::ptr::null_mut()))).ok() + SetupDiGetActualSectionToInstallA(infhandle, infsectionname.into_param().abi(), ::core::mem::transmute(infsectionwithext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), infsectionwithext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(extension.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Diagnostics_Debug\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Diagnostics_Debug"))] @@ -2313,7 +2313,7 @@ where infsectionname.into_param().abi(), ::core::mem::transmute(alternateplatforminfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(infsectionwithext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - infsectionwithext.as_deref().map_or(0, |slice| slice.len() as _), + infsectionwithext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(extension.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null())), @@ -2333,7 +2333,7 @@ where infsectionname.into_param().abi(), ::core::mem::transmute(alternateplatforminfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(infsectionwithext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - infsectionwithext.as_deref().map_or(0, |slice| slice.len() as _), + infsectionwithext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(extension.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null())), @@ -2348,7 +2348,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetActualSectionToInstallW(infhandle : *const ::core::ffi::c_void, infsectionname : ::windows_core::PCWSTR, infsectionwithext : ::windows_core::PWSTR, infsectionwithextsize : u32, requiredsize : *mut u32, extension : *mut ::windows_core::PWSTR) -> super::super::Foundation:: BOOL); - SetupDiGetActualSectionToInstallW(infhandle, infsectionname.into_param().abi(), ::core::mem::transmute(infsectionwithext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), infsectionwithext.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(extension.unwrap_or(::std::ptr::null_mut()))).ok() + SetupDiGetActualSectionToInstallW(infhandle, infsectionname.into_param().abi(), ::core::mem::transmute(infsectionwithext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), infsectionwithext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(extension.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2362,7 +2362,7 @@ pub unsafe fn SetupDiGetClassBitmapIndex(classguid: ::core::option::Option<*cons #[inline] pub unsafe fn SetupDiGetClassDescriptionA(classguid: *const ::windows_core::GUID, classdescription: &mut [u8], requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassDescriptionA(classguid : *const ::windows_core::GUID, classdescription : ::windows_core::PSTR, classdescriptionsize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiGetClassDescriptionA(classguid, ::core::mem::transmute(classdescription.as_ptr()), classdescription.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupDiGetClassDescriptionA(classguid, ::core::mem::transmute(classdescription.as_ptr()), classdescription.len().try_into().unwrap(), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2372,7 +2372,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassDescriptionExA(classguid : *const ::windows_core::GUID, classdescription : ::windows_core::PSTR, classdescriptionsize : u32, requiredsize : *mut u32, machinename : ::windows_core::PCSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiGetClassDescriptionExA(classguid, ::core::mem::transmute(classdescription.as_ptr()), classdescription.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() + SetupDiGetClassDescriptionExA(classguid, ::core::mem::transmute(classdescription.as_ptr()), classdescription.len().try_into().unwrap(), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2382,14 +2382,14 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassDescriptionExW(classguid : *const ::windows_core::GUID, classdescription : ::windows_core::PWSTR, classdescriptionsize : u32, requiredsize : *mut u32, machinename : ::windows_core::PCWSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiGetClassDescriptionExW(classguid, ::core::mem::transmute(classdescription.as_ptr()), classdescription.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() + SetupDiGetClassDescriptionExW(classguid, ::core::mem::transmute(classdescription.as_ptr()), classdescription.len().try_into().unwrap(), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn SetupDiGetClassDescriptionW(classguid: *const ::windows_core::GUID, classdescription: &mut [u16], requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassDescriptionW(classguid : *const ::windows_core::GUID, classdescription : ::windows_core::PWSTR, classdescriptionsize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiGetClassDescriptionW(classguid, ::core::mem::transmute(classdescription.as_ptr()), classdescription.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupDiGetClassDescriptionW(classguid, ::core::mem::transmute(classdescription.as_ptr()), classdescription.len().try_into().unwrap(), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`, `\"Win32_UI_Controls\"`, `\"Win32_UI_WindowsAndMessaging\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))] @@ -2525,14 +2525,14 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassPropertyExW(classguid : *const ::windows_core::GUID, propertykey : *const super::Properties:: DEVPROPKEY, propertytype : *mut super::Properties:: DEVPROPTYPE, propertybuffer : *mut u8, propertybuffersize : u32, requiredsize : *mut u32, flags : u32, machinename : ::windows_core::PCWSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiGetClassPropertyExW(classguid, propertykey, propertytype, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), flags, machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() + SetupDiGetClassPropertyExW(classguid, propertykey, propertytype, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), flags, machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Devices_Properties\"`, `\"Win32_Foundation\"`"] #[cfg(all(feature = "Win32_Devices_Properties", feature = "Win32_Foundation"))] #[inline] pub unsafe fn SetupDiGetClassPropertyKeys(classguid: *const ::windows_core::GUID, propertykeyarray: ::core::option::Option<&mut [super::Properties::DEVPROPKEY]>, requiredpropertykeycount: ::core::option::Option<*mut u32>, flags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassPropertyKeys(classguid : *const ::windows_core::GUID, propertykeyarray : *mut super::Properties:: DEVPROPKEY, propertykeycount : u32, requiredpropertykeycount : *mut u32, flags : u32) -> super::super::Foundation:: BOOL); - SetupDiGetClassPropertyKeys(classguid, ::core::mem::transmute(propertykeyarray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertykeyarray.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredpropertykeycount.unwrap_or(::std::ptr::null_mut())), flags).ok() + SetupDiGetClassPropertyKeys(classguid, ::core::mem::transmute(propertykeyarray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertykeyarray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredpropertykeycount.unwrap_or(::std::ptr::null_mut())), flags).ok() } #[doc = "Required features: `\"Win32_Devices_Properties\"`, `\"Win32_Foundation\"`"] #[cfg(all(feature = "Win32_Devices_Properties", feature = "Win32_Foundation"))] @@ -2542,14 +2542,14 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassPropertyKeysExW(classguid : *const ::windows_core::GUID, propertykeyarray : *mut super::Properties:: DEVPROPKEY, propertykeycount : u32, requiredpropertykeycount : *mut u32, flags : u32, machinename : ::windows_core::PCWSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiGetClassPropertyKeysExW(classguid, ::core::mem::transmute(propertykeyarray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertykeyarray.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredpropertykeycount.unwrap_or(::std::ptr::null_mut())), flags, machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() + SetupDiGetClassPropertyKeysExW(classguid, ::core::mem::transmute(propertykeyarray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertykeyarray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredpropertykeycount.unwrap_or(::std::ptr::null_mut())), flags, machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Devices_Properties\"`, `\"Win32_Foundation\"`"] #[cfg(all(feature = "Win32_Devices_Properties", feature = "Win32_Foundation"))] #[inline] pub unsafe fn SetupDiGetClassPropertyW(classguid: *const ::windows_core::GUID, propertykey: *const super::Properties::DEVPROPKEY, propertytype: *mut super::Properties::DEVPROPTYPE, propertybuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>, flags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassPropertyW(classguid : *const ::windows_core::GUID, propertykey : *const super::Properties:: DEVPROPKEY, propertytype : *mut super::Properties:: DEVPROPTYPE, propertybuffer : *mut u8, propertybuffersize : u32, requiredsize : *mut u32, flags : u32) -> super::super::Foundation:: BOOL); - SetupDiGetClassPropertyW(classguid, propertykey, propertytype, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), flags).ok() + SetupDiGetClassPropertyW(classguid, propertykey, propertytype, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), flags).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2559,7 +2559,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassRegistryPropertyA(classguid : *const ::windows_core::GUID, property : u32, propertyregdatatype : *mut u32, propertybuffer : *mut u8, propertybuffersize : u32, requiredsize : *mut u32, machinename : ::windows_core::PCSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiGetClassRegistryPropertyA(classguid, property, ::core::mem::transmute(propertyregdatatype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(propertybuffer.as_ptr()), propertybuffer.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() + SetupDiGetClassRegistryPropertyA(classguid, property, ::core::mem::transmute(propertyregdatatype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(propertybuffer.as_ptr()), propertybuffer.len().try_into().unwrap(), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2569,7 +2569,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassRegistryPropertyW(classguid : *const ::windows_core::GUID, property : u32, propertyregdatatype : *mut u32, propertybuffer : *mut u8, propertybuffersize : u32, requiredsize : *mut u32, machinename : ::windows_core::PCWSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiGetClassRegistryPropertyW(classguid, property, ::core::mem::transmute(propertyregdatatype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(propertybuffer.as_ptr()), propertybuffer.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() + SetupDiGetClassRegistryPropertyW(classguid, property, ::core::mem::transmute(propertyregdatatype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(propertybuffer.as_ptr()), propertybuffer.len().try_into().unwrap(), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2580,7 +2580,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetCustomDevicePropertyA(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, custompropertyname : ::windows_core::PCSTR, flags : u32, propertyregdatatype : *mut u32, propertybuffer : *mut u8, propertybuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiGetCustomDevicePropertyA(deviceinfoset.into_param().abi(), deviceinfodata, custompropertyname.into_param().abi(), flags, ::core::mem::transmute(propertyregdatatype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(propertybuffer.as_ptr()), propertybuffer.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupDiGetCustomDevicePropertyA(deviceinfoset.into_param().abi(), deviceinfodata, custompropertyname.into_param().abi(), flags, ::core::mem::transmute(propertyregdatatype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(propertybuffer.as_ptr()), propertybuffer.len().try_into().unwrap(), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2591,7 +2591,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetCustomDevicePropertyW(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, custompropertyname : ::windows_core::PCWSTR, flags : u32, propertyregdatatype : *mut u32, propertybuffer : *mut u8, propertybuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiGetCustomDevicePropertyW(deviceinfoset.into_param().abi(), deviceinfodata, custompropertyname.into_param().abi(), flags, ::core::mem::transmute(propertyregdatatype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(propertybuffer.as_ptr()), propertybuffer.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupDiGetCustomDevicePropertyW(deviceinfoset.into_param().abi(), deviceinfodata, custompropertyname.into_param().abi(), flags, ::core::mem::transmute(propertyregdatatype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(propertybuffer.as_ptr()), propertybuffer.len().try_into().unwrap(), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2651,7 +2651,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDeviceInstanceIdA(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, deviceinstanceid : ::windows_core::PSTR, deviceinstanceidsize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiGetDeviceInstanceIdA(deviceinfoset.into_param().abi(), deviceinfodata, ::core::mem::transmute(deviceinstanceid.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), deviceinstanceid.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupDiGetDeviceInstanceIdA(deviceinfoset.into_param().abi(), deviceinfodata, ::core::mem::transmute(deviceinstanceid.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), deviceinstanceid.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2661,7 +2661,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDeviceInstanceIdW(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, deviceinstanceid : ::windows_core::PWSTR, deviceinstanceidsize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiGetDeviceInstanceIdW(deviceinfoset.into_param().abi(), deviceinfodata, ::core::mem::transmute(deviceinstanceid.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), deviceinstanceid.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupDiGetDeviceInstanceIdW(deviceinfoset.into_param().abi(), deviceinfodata, ::core::mem::transmute(deviceinstanceid.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), deviceinstanceid.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2701,7 +2701,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDeviceInterfacePropertyKeys(deviceinfoset : HDEVINFO, deviceinterfacedata : *const SP_DEVICE_INTERFACE_DATA, propertykeyarray : *mut super::Properties:: DEVPROPKEY, propertykeycount : u32, requiredpropertykeycount : *mut u32, flags : u32) -> super::super::Foundation:: BOOL); - SetupDiGetDeviceInterfacePropertyKeys(deviceinfoset.into_param().abi(), deviceinterfacedata, ::core::mem::transmute(propertykeyarray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertykeyarray.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredpropertykeycount.unwrap_or(::std::ptr::null_mut())), flags).ok() + SetupDiGetDeviceInterfacePropertyKeys(deviceinfoset.into_param().abi(), deviceinterfacedata, ::core::mem::transmute(propertykeyarray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertykeyarray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredpropertykeycount.unwrap_or(::std::ptr::null_mut())), flags).ok() } #[doc = "Required features: `\"Win32_Devices_Properties\"`, `\"Win32_Foundation\"`"] #[cfg(all(feature = "Win32_Devices_Properties", feature = "Win32_Foundation"))] @@ -2711,7 +2711,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDeviceInterfacePropertyW(deviceinfoset : HDEVINFO, deviceinterfacedata : *const SP_DEVICE_INTERFACE_DATA, propertykey : *const super::Properties:: DEVPROPKEY, propertytype : *mut super::Properties:: DEVPROPTYPE, propertybuffer : *mut u8, propertybuffersize : u32, requiredsize : *mut u32, flags : u32) -> super::super::Foundation:: BOOL); - SetupDiGetDeviceInterfacePropertyW(deviceinfoset.into_param().abi(), deviceinterfacedata, propertykey, propertytype, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), flags).ok() + SetupDiGetDeviceInterfacePropertyW(deviceinfoset.into_param().abi(), deviceinterfacedata, propertykey, propertytype, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), flags).ok() } #[doc = "Required features: `\"Win32_Devices_Properties\"`, `\"Win32_Foundation\"`"] #[cfg(all(feature = "Win32_Devices_Properties", feature = "Win32_Foundation"))] @@ -2721,7 +2721,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDevicePropertyKeys(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, propertykeyarray : *mut super::Properties:: DEVPROPKEY, propertykeycount : u32, requiredpropertykeycount : *mut u32, flags : u32) -> super::super::Foundation:: BOOL); - SetupDiGetDevicePropertyKeys(deviceinfoset.into_param().abi(), deviceinfodata, ::core::mem::transmute(propertykeyarray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertykeyarray.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredpropertykeycount.unwrap_or(::std::ptr::null_mut())), flags).ok() + SetupDiGetDevicePropertyKeys(deviceinfoset.into_param().abi(), deviceinfodata, ::core::mem::transmute(propertykeyarray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertykeyarray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredpropertykeycount.unwrap_or(::std::ptr::null_mut())), flags).ok() } #[doc = "Required features: `\"Win32_Devices_Properties\"`, `\"Win32_Foundation\"`"] #[cfg(all(feature = "Win32_Devices_Properties", feature = "Win32_Foundation"))] @@ -2731,7 +2731,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDevicePropertyW(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, propertykey : *const super::Properties:: DEVPROPKEY, propertytype : *mut super::Properties:: DEVPROPTYPE, propertybuffer : *mut u8, propertybuffersize : u32, requiredsize : *mut u32, flags : u32) -> super::super::Foundation:: BOOL); - SetupDiGetDevicePropertyW(deviceinfoset.into_param().abi(), deviceinfodata, propertykey, propertytype, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), flags).ok() + SetupDiGetDevicePropertyW(deviceinfoset.into_param().abi(), deviceinfodata, propertykey, propertytype, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), flags).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2741,7 +2741,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDeviceRegistryPropertyA(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, property : u32, propertyregdatatype : *mut u32, propertybuffer : *mut u8, propertybuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiGetDeviceRegistryPropertyA(deviceinfoset.into_param().abi(), deviceinfodata, property, ::core::mem::transmute(propertyregdatatype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupDiGetDeviceRegistryPropertyA(deviceinfoset.into_param().abi(), deviceinfodata, property, ::core::mem::transmute(propertyregdatatype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2751,7 +2751,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDeviceRegistryPropertyW(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, property : u32, propertyregdatatype : *mut u32, propertybuffer : *mut u8, propertybuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiGetDeviceRegistryPropertyW(deviceinfoset.into_param().abi(), deviceinfodata, property, ::core::mem::transmute(propertyregdatatype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupDiGetDeviceRegistryPropertyW(deviceinfoset.into_param().abi(), deviceinfodata, property, ::core::mem::transmute(propertyregdatatype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2798,7 +2798,7 @@ where #[inline] pub unsafe fn SetupDiGetHwProfileFriendlyNameA(hwprofile: u32, friendlyname: &mut [u8], requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetHwProfileFriendlyNameA(hwprofile : u32, friendlyname : ::windows_core::PSTR, friendlynamesize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiGetHwProfileFriendlyNameA(hwprofile, ::core::mem::transmute(friendlyname.as_ptr()), friendlyname.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupDiGetHwProfileFriendlyNameA(hwprofile, ::core::mem::transmute(friendlyname.as_ptr()), friendlyname.len().try_into().unwrap(), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2808,7 +2808,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetHwProfileFriendlyNameExA(hwprofile : u32, friendlyname : ::windows_core::PSTR, friendlynamesize : u32, requiredsize : *mut u32, machinename : ::windows_core::PCSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiGetHwProfileFriendlyNameExA(hwprofile, ::core::mem::transmute(friendlyname.as_ptr()), friendlyname.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() + SetupDiGetHwProfileFriendlyNameExA(hwprofile, ::core::mem::transmute(friendlyname.as_ptr()), friendlyname.len().try_into().unwrap(), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2818,21 +2818,21 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetHwProfileFriendlyNameExW(hwprofile : u32, friendlyname : ::windows_core::PWSTR, friendlynamesize : u32, requiredsize : *mut u32, machinename : ::windows_core::PCWSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiGetHwProfileFriendlyNameExW(hwprofile, ::core::mem::transmute(friendlyname.as_ptr()), friendlyname.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() + SetupDiGetHwProfileFriendlyNameExW(hwprofile, ::core::mem::transmute(friendlyname.as_ptr()), friendlyname.len().try_into().unwrap(), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn SetupDiGetHwProfileFriendlyNameW(hwprofile: u32, friendlyname: &mut [u16], requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetHwProfileFriendlyNameW(hwprofile : u32, friendlyname : ::windows_core::PWSTR, friendlynamesize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiGetHwProfileFriendlyNameW(hwprofile, ::core::mem::transmute(friendlyname.as_ptr()), friendlyname.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupDiGetHwProfileFriendlyNameW(hwprofile, ::core::mem::transmute(friendlyname.as_ptr()), friendlyname.len().try_into().unwrap(), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn SetupDiGetHwProfileList(hwprofilelist: &mut [u32], requiredsize: *mut u32, currentlyactiveindex: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetHwProfileList(hwprofilelist : *mut u32, hwprofilelistsize : u32, requiredsize : *mut u32, currentlyactiveindex : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiGetHwProfileList(::core::mem::transmute(hwprofilelist.as_ptr()), hwprofilelist.len() as _, requiredsize, ::core::mem::transmute(currentlyactiveindex.unwrap_or(::std::ptr::null_mut()))).ok() + SetupDiGetHwProfileList(::core::mem::transmute(hwprofilelist.as_ptr()), hwprofilelist.len().try_into().unwrap(), requiredsize, ::core::mem::transmute(currentlyactiveindex.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2842,7 +2842,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetHwProfileListExA(hwprofilelist : *mut u32, hwprofilelistsize : u32, requiredsize : *mut u32, currentlyactiveindex : *mut u32, machinename : ::windows_core::PCSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiGetHwProfileListExA(::core::mem::transmute(hwprofilelist.as_ptr()), hwprofilelist.len() as _, requiredsize, ::core::mem::transmute(currentlyactiveindex.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() + SetupDiGetHwProfileListExA(::core::mem::transmute(hwprofilelist.as_ptr()), hwprofilelist.len().try_into().unwrap(), requiredsize, ::core::mem::transmute(currentlyactiveindex.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2852,7 +2852,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetHwProfileListExW(hwprofilelist : *mut u32, hwprofilelistsize : u32, requiredsize : *mut u32, currentlyactiveindex : *mut u32, machinename : ::windows_core::PCWSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiGetHwProfileListExW(::core::mem::transmute(hwprofilelist.as_ptr()), hwprofilelist.len() as _, requiredsize, ::core::mem::transmute(currentlyactiveindex.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() + SetupDiGetHwProfileListExW(::core::mem::transmute(hwprofilelist.as_ptr()), hwprofilelist.len().try_into().unwrap(), requiredsize, ::core::mem::transmute(currentlyactiveindex.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2862,7 +2862,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetINFClassA(infname : ::windows_core::PCSTR, classguid : *mut ::windows_core::GUID, classname : ::windows_core::PSTR, classnamesize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiGetINFClassA(infname.into_param().abi(), classguid, ::core::mem::transmute(classname.as_ptr()), classname.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupDiGetINFClassA(infname.into_param().abi(), classguid, ::core::mem::transmute(classname.as_ptr()), classname.len().try_into().unwrap(), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2872,7 +2872,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetINFClassW(infname : ::windows_core::PCWSTR, classguid : *mut ::windows_core::GUID, classname : ::windows_core::PWSTR, classnamesize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiGetINFClassW(infname.into_param().abi(), classguid, ::core::mem::transmute(classname.as_ptr()), classname.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupDiGetINFClassW(infname.into_param().abi(), classguid, ::core::mem::transmute(classname.as_ptr()), classname.len().try_into().unwrap(), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3212,14 +3212,14 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiSetClassPropertyExW(classguid : *const ::windows_core::GUID, propertykey : *const super::Properties:: DEVPROPKEY, propertytype : super::Properties:: DEVPROPTYPE, propertybuffer : *const u8, propertybuffersize : u32, flags : u32, machinename : ::windows_core::PCWSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiSetClassPropertyExW(classguid, propertykey, propertytype, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), flags, machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() + SetupDiSetClassPropertyExW(classguid, propertykey, propertytype, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), flags, machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Devices_Properties\"`, `\"Win32_Foundation\"`"] #[cfg(all(feature = "Win32_Devices_Properties", feature = "Win32_Foundation"))] #[inline] pub unsafe fn SetupDiSetClassPropertyW(classguid: *const ::windows_core::GUID, propertykey: *const super::Properties::DEVPROPKEY, propertytype: super::Properties::DEVPROPTYPE, propertybuffer: ::core::option::Option<&[u8]>, flags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiSetClassPropertyW(classguid : *const ::windows_core::GUID, propertykey : *const super::Properties:: DEVPROPKEY, propertytype : super::Properties:: DEVPROPTYPE, propertybuffer : *const u8, propertybuffersize : u32, flags : u32) -> super::super::Foundation:: BOOL); - SetupDiSetClassPropertyW(classguid, propertykey, propertytype, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), flags).ok() + SetupDiSetClassPropertyW(classguid, propertykey, propertytype, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), flags).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3229,7 +3229,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiSetClassRegistryPropertyA(classguid : *const ::windows_core::GUID, property : u32, propertybuffer : *const u8, propertybuffersize : u32, machinename : ::windows_core::PCSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiSetClassRegistryPropertyA(classguid, property, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() + SetupDiSetClassRegistryPropertyA(classguid, property, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3239,7 +3239,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiSetClassRegistryPropertyW(classguid : *const ::windows_core::GUID, property : u32, propertybuffer : *const u8, propertybuffersize : u32, machinename : ::windows_core::PCWSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiSetClassRegistryPropertyW(classguid, property, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() + SetupDiSetClassRegistryPropertyW(classguid, property, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3279,7 +3279,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiSetDeviceInterfacePropertyW(deviceinfoset : HDEVINFO, deviceinterfacedata : *const SP_DEVICE_INTERFACE_DATA, propertykey : *const super::Properties:: DEVPROPKEY, propertytype : super::Properties:: DEVPROPTYPE, propertybuffer : *const u8, propertybuffersize : u32, flags : u32) -> super::super::Foundation:: BOOL); - SetupDiSetDeviceInterfacePropertyW(deviceinfoset.into_param().abi(), deviceinterfacedata, propertykey, propertytype, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), flags).ok() + SetupDiSetDeviceInterfacePropertyW(deviceinfoset.into_param().abi(), deviceinterfacedata, propertykey, propertytype, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), flags).ok() } #[doc = "Required features: `\"Win32_Devices_Properties\"`, `\"Win32_Foundation\"`"] #[cfg(all(feature = "Win32_Devices_Properties", feature = "Win32_Foundation"))] @@ -3289,7 +3289,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiSetDevicePropertyW(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, propertykey : *const super::Properties:: DEVPROPKEY, propertytype : super::Properties:: DEVPROPTYPE, propertybuffer : *const u8, propertybuffersize : u32, flags : u32) -> super::super::Foundation:: BOOL); - SetupDiSetDevicePropertyW(deviceinfoset.into_param().abi(), deviceinfodata, propertykey, propertytype, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), flags).ok() + SetupDiSetDevicePropertyW(deviceinfoset.into_param().abi(), deviceinfodata, propertykey, propertytype, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), flags).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3299,7 +3299,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiSetDeviceRegistryPropertyA(deviceinfoset : HDEVINFO, deviceinfodata : *mut SP_DEVINFO_DATA, property : u32, propertybuffer : *const u8, propertybuffersize : u32) -> super::super::Foundation:: BOOL); - SetupDiSetDeviceRegistryPropertyA(deviceinfoset.into_param().abi(), deviceinfodata, property, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _)).ok() + SetupDiSetDeviceRegistryPropertyA(deviceinfoset.into_param().abi(), deviceinfodata, property, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3309,7 +3309,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiSetDeviceRegistryPropertyW(deviceinfoset : HDEVINFO, deviceinfodata : *mut SP_DEVINFO_DATA, property : u32, propertybuffer : *const u8, propertybuffersize : u32) -> super::super::Foundation:: BOOL); - SetupDiSetDeviceRegistryPropertyW(deviceinfoset.into_param().abi(), deviceinfodata, property, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _)).ok() + SetupDiSetDeviceRegistryPropertyW(deviceinfoset.into_param().abi(), deviceinfodata, property, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3386,14 +3386,14 @@ pub unsafe fn SetupDuplicateDiskSpaceListW(diskspace: *const ::core::ffi::c_void #[inline] pub unsafe fn SetupEnumInfSectionsA(infhandle: *const ::core::ffi::c_void, index: u32, buffer: ::core::option::Option<&mut [u8]>, sizeneeded: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupEnumInfSectionsA(infhandle : *const ::core::ffi::c_void, index : u32, buffer : ::windows_core::PSTR, size : u32, sizeneeded : *mut u32) -> super::super::Foundation:: BOOL); - SetupEnumInfSectionsA(infhandle, index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(sizeneeded.unwrap_or(::std::ptr::null_mut()))).ok() + SetupEnumInfSectionsA(infhandle, index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(sizeneeded.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn SetupEnumInfSectionsW(infhandle: *const ::core::ffi::c_void, index: u32, buffer: ::core::option::Option<&mut [u16]>, sizeneeded: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupEnumInfSectionsW(infhandle : *const ::core::ffi::c_void, index : u32, buffer : ::windows_core::PWSTR, size : u32, sizeneeded : *mut u32) -> super::super::Foundation:: BOOL); - SetupEnumInfSectionsW(infhandle, index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(sizeneeded.unwrap_or(::std::ptr::null_mut()))).ok() + SetupEnumInfSectionsW(infhandle, index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(sizeneeded.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3449,14 +3449,14 @@ where #[inline] pub unsafe fn SetupFreeSourceListA(list: &mut [*mut ::windows_core::PCSTR]) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupFreeSourceListA(list : *mut *mut ::windows_core::PCSTR, count : u32) -> super::super::Foundation:: BOOL); - SetupFreeSourceListA(::core::mem::transmute(list.as_ptr()), list.len() as _).ok() + SetupFreeSourceListA(::core::mem::transmute(list.as_ptr()), list.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn SetupFreeSourceListW(list: &mut [*mut ::windows_core::PCWSTR]) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupFreeSourceListW(list : *mut *mut ::windows_core::PCWSTR, count : u32) -> super::super::Foundation:: BOOL); - SetupFreeSourceListW(::core::mem::transmute(list.as_ptr()), list.len() as _).ok() + SetupFreeSourceListW(::core::mem::transmute(list.as_ptr()), list.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3477,7 +3477,7 @@ pub unsafe fn SetupGetBackupInformationW(queuehandle: *const ::core::ffi::c_void #[inline] pub unsafe fn SetupGetBinaryField(context: *const INFCONTEXT, fieldindex: u32, returnbuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetBinaryField(context : *const INFCONTEXT, fieldindex : u32, returnbuffer : *mut u8, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetBinaryField(context, fieldindex, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupGetBinaryField(context, fieldindex, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupGetFieldCount(context: *const INFCONTEXT) -> u32 { @@ -3500,7 +3500,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetFileCompressionInfoExA(sourcefilename : ::windows_core::PCSTR, actualsourcefilenamebuffer : ::windows_core::PCSTR, actualsourcefilenamebufferlen : u32, requiredbufferlen : *mut u32, sourcefilesize : *mut u32, targetfilesize : *mut u32, compressiontype : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetFileCompressionInfoExA(sourcefilename.into_param().abi(), ::core::mem::transmute(actualsourcefilenamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), actualsourcefilenamebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredbufferlen.unwrap_or(::std::ptr::null_mut())), sourcefilesize, targetfilesize, compressiontype).ok() + SetupGetFileCompressionInfoExA(sourcefilename.into_param().abi(), ::core::mem::transmute(actualsourcefilenamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), actualsourcefilenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredbufferlen.unwrap_or(::std::ptr::null_mut())), sourcefilesize, targetfilesize, compressiontype).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3510,7 +3510,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetFileCompressionInfoExW(sourcefilename : ::windows_core::PCWSTR, actualsourcefilenamebuffer : ::windows_core::PCWSTR, actualsourcefilenamebufferlen : u32, requiredbufferlen : *mut u32, sourcefilesize : *mut u32, targetfilesize : *mut u32, compressiontype : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetFileCompressionInfoExW(sourcefilename.into_param().abi(), ::core::mem::transmute(actualsourcefilenamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), actualsourcefilenamebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredbufferlen.unwrap_or(::std::ptr::null_mut())), sourcefilesize, targetfilesize, compressiontype).ok() + SetupGetFileCompressionInfoExW(sourcefilename.into_param().abi(), ::core::mem::transmute(actualsourcefilenamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), actualsourcefilenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredbufferlen.unwrap_or(::std::ptr::null_mut())), sourcefilesize, targetfilesize, compressiontype).ok() } #[inline] pub unsafe fn SetupGetFileCompressionInfoW(sourcefilename: P0, actualsourcefilename: *mut ::windows_core::PWSTR, sourcefilesize: *mut u32, targetfilesize: *mut u32, compressiontype: *mut u32) -> u32 @@ -3543,7 +3543,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetInfDriverStoreLocationA(filename : ::windows_core::PCSTR, alternateplatforminfo : *const SP_ALTPLATFORM_INFO_V2, localename : ::windows_core::PCSTR, returnbuffer : ::windows_core::PSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetInfDriverStoreLocationA(filename.into_param().abi(), ::core::mem::transmute(alternateplatforminfo.unwrap_or(::std::ptr::null())), localename.into_param().abi(), ::core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupGetInfDriverStoreLocationA(filename.into_param().abi(), ::core::mem::transmute(alternateplatforminfo.unwrap_or(::std::ptr::null())), localename.into_param().abi(), ::core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len().try_into().unwrap(), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Diagnostics_Debug\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Diagnostics_Debug"))] @@ -3554,7 +3554,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetInfDriverStoreLocationW(filename : ::windows_core::PCWSTR, alternateplatforminfo : *const SP_ALTPLATFORM_INFO_V2, localename : ::windows_core::PCWSTR, returnbuffer : ::windows_core::PWSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetInfDriverStoreLocationW(filename.into_param().abi(), ::core::mem::transmute(alternateplatforminfo.unwrap_or(::std::ptr::null())), localename.into_param().abi(), ::core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupGetInfDriverStoreLocationW(filename.into_param().abi(), ::core::mem::transmute(alternateplatforminfo.unwrap_or(::std::ptr::null())), localename.into_param().abi(), ::core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len().try_into().unwrap(), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3564,7 +3564,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetInfFileListA(directorypath : ::windows_core::PCSTR, infstyle : INF_STYLE, returnbuffer : ::windows_core::PSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetInfFileListA(directorypath.into_param().abi(), infstyle, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupGetInfFileListA(directorypath.into_param().abi(), infstyle, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3574,7 +3574,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetInfFileListW(directorypath : ::windows_core::PCWSTR, infstyle : INF_STYLE, returnbuffer : ::windows_core::PWSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetInfFileListW(directorypath.into_param().abi(), infstyle, ::core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupGetInfFileListW(directorypath.into_param().abi(), infstyle, ::core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len().try_into().unwrap(), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3598,7 +3598,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetInfPublishedNameA(driverstorelocation : ::windows_core::PCSTR, returnbuffer : ::windows_core::PSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetInfPublishedNameA(driverstorelocation.into_param().abi(), ::core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupGetInfPublishedNameA(driverstorelocation.into_param().abi(), ::core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len().try_into().unwrap(), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3608,7 +3608,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetInfPublishedNameW(driverstorelocation : ::windows_core::PCWSTR, returnbuffer : ::windows_core::PWSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetInfPublishedNameW(driverstorelocation.into_param().abi(), ::core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupGetInfPublishedNameW(driverstorelocation.into_param().abi(), ::core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len().try_into().unwrap(), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3662,7 +3662,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetLineTextA(context : *const INFCONTEXT, infhandle : *const ::core::ffi::c_void, section : ::windows_core::PCSTR, key : ::windows_core::PCSTR, returnbuffer : ::windows_core::PSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetLineTextA(::core::mem::transmute(context.unwrap_or(::std::ptr::null())), ::core::mem::transmute(infhandle.unwrap_or(::std::ptr::null())), section.into_param().abi(), key.into_param().abi(), ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupGetLineTextA(::core::mem::transmute(context.unwrap_or(::std::ptr::null())), ::core::mem::transmute(infhandle.unwrap_or(::std::ptr::null())), section.into_param().abi(), key.into_param().abi(), ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3673,21 +3673,21 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetLineTextW(context : *const INFCONTEXT, infhandle : *const ::core::ffi::c_void, section : ::windows_core::PCWSTR, key : ::windows_core::PCWSTR, returnbuffer : ::windows_core::PWSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetLineTextW(::core::mem::transmute(context.unwrap_or(::std::ptr::null())), ::core::mem::transmute(infhandle.unwrap_or(::std::ptr::null())), section.into_param().abi(), key.into_param().abi(), ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupGetLineTextW(::core::mem::transmute(context.unwrap_or(::std::ptr::null())), ::core::mem::transmute(infhandle.unwrap_or(::std::ptr::null())), section.into_param().abi(), key.into_param().abi(), ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn SetupGetMultiSzFieldA(context: *const INFCONTEXT, fieldindex: u32, returnbuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetMultiSzFieldA(context : *const INFCONTEXT, fieldindex : u32, returnbuffer : ::windows_core::PSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetMultiSzFieldA(context, fieldindex, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupGetMultiSzFieldA(context, fieldindex, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn SetupGetMultiSzFieldW(context: *const INFCONTEXT, fieldindex: u32, returnbuffer: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetMultiSzFieldW(context : *const INFCONTEXT, fieldindex : u32, returnbuffer : ::windows_core::PWSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetMultiSzFieldW(context, fieldindex, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupGetMultiSzFieldW(context, fieldindex, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3704,7 +3704,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetSourceFileLocationA(infhandle : *const ::core::ffi::c_void, infcontext : *const INFCONTEXT, filename : ::windows_core::PCSTR, sourceid : *mut u32, returnbuffer : ::windows_core::PSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetSourceFileLocationA(infhandle, ::core::mem::transmute(infcontext.unwrap_or(::std::ptr::null())), filename.into_param().abi(), sourceid, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupGetSourceFileLocationA(infhandle, ::core::mem::transmute(infcontext.unwrap_or(::std::ptr::null())), filename.into_param().abi(), sourceid, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3714,7 +3714,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetSourceFileLocationW(infhandle : *const ::core::ffi::c_void, infcontext : *const INFCONTEXT, filename : ::windows_core::PCWSTR, sourceid : *mut u32, returnbuffer : ::windows_core::PWSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetSourceFileLocationW(infhandle, ::core::mem::transmute(infcontext.unwrap_or(::std::ptr::null())), filename.into_param().abi(), sourceid, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupGetSourceFileLocationW(infhandle, ::core::mem::transmute(infcontext.unwrap_or(::std::ptr::null())), filename.into_param().abi(), sourceid, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3743,28 +3743,28 @@ where #[inline] pub unsafe fn SetupGetSourceInfoA(infhandle: *const ::core::ffi::c_void, sourceid: u32, infodesired: u32, returnbuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetSourceInfoA(infhandle : *const ::core::ffi::c_void, sourceid : u32, infodesired : u32, returnbuffer : ::windows_core::PSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetSourceInfoA(infhandle, sourceid, infodesired, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupGetSourceInfoA(infhandle, sourceid, infodesired, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn SetupGetSourceInfoW(infhandle: *const ::core::ffi::c_void, sourceid: u32, infodesired: u32, returnbuffer: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetSourceInfoW(infhandle : *const ::core::ffi::c_void, sourceid : u32, infodesired : u32, returnbuffer : ::windows_core::PWSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetSourceInfoW(infhandle, sourceid, infodesired, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupGetSourceInfoW(infhandle, sourceid, infodesired, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn SetupGetStringFieldA(context: *const INFCONTEXT, fieldindex: u32, returnbuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetStringFieldA(context : *const INFCONTEXT, fieldindex : u32, returnbuffer : ::windows_core::PSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetStringFieldA(context, fieldindex, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupGetStringFieldA(context, fieldindex, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn SetupGetStringFieldW(context: *const INFCONTEXT, fieldindex: u32, returnbuffer: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetStringFieldW(context : *const INFCONTEXT, fieldindex : u32, returnbuffer : ::windows_core::PWSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetStringFieldW(context, fieldindex, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupGetStringFieldW(context, fieldindex, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3774,7 +3774,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetTargetPathA(infhandle : *const ::core::ffi::c_void, infcontext : *const INFCONTEXT, section : ::windows_core::PCSTR, returnbuffer : ::windows_core::PSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetTargetPathA(infhandle, ::core::mem::transmute(infcontext.unwrap_or(::std::ptr::null())), section.into_param().abi(), ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupGetTargetPathA(infhandle, ::core::mem::transmute(infcontext.unwrap_or(::std::ptr::null())), section.into_param().abi(), ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3784,7 +3784,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetTargetPathW(infhandle : *const ::core::ffi::c_void, infcontext : *const INFCONTEXT, section : ::windows_core::PCWSTR, returnbuffer : ::windows_core::PWSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetTargetPathW(infhandle, ::core::mem::transmute(infcontext.unwrap_or(::std::ptr::null())), section.into_param().abi(), ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupGetTargetPathW(infhandle, ::core::mem::transmute(infcontext.unwrap_or(::std::ptr::null())), section.into_param().abi(), ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupGetThreadLogToken() -> u64 { @@ -4129,7 +4129,7 @@ where P5: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupPromptForDiskA(hwndparent : super::super::Foundation:: HWND, dialogtitle : ::windows_core::PCSTR, diskname : ::windows_core::PCSTR, pathtosource : ::windows_core::PCSTR, filesought : ::windows_core::PCSTR, tagfile : ::windows_core::PCSTR, diskpromptstyle : u32, pathbuffer : ::windows_core::PSTR, pathbuffersize : u32, pathrequiredsize : *mut u32) -> u32); - SetupPromptForDiskA(hwndparent.into_param().abi(), dialogtitle.into_param().abi(), diskname.into_param().abi(), pathtosource.into_param().abi(), filesought.into_param().abi(), tagfile.into_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() as _), ::core::mem::transmute(pathrequiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupPromptForDiskA(hwndparent.into_param().abi(), dialogtitle.into_param().abi(), diskname.into_param().abi(), pathtosource.into_param().abi(), filesought.into_param().abi(), tagfile.into_param().abi(), diskpromptstyle, ::core::mem::transmute(pathbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pathbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pathrequiredsize.unwrap_or(::std::ptr::null_mut()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -4144,7 +4144,7 @@ where P5: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupPromptForDiskW(hwndparent : super::super::Foundation:: HWND, dialogtitle : ::windows_core::PCWSTR, diskname : ::windows_core::PCWSTR, pathtosource : ::windows_core::PCWSTR, filesought : ::windows_core::PCWSTR, tagfile : ::windows_core::PCWSTR, diskpromptstyle : u32, pathbuffer : ::windows_core::PWSTR, pathbuffersize : u32, pathrequiredsize : *mut u32) -> u32); - SetupPromptForDiskW(hwndparent.into_param().abi(), dialogtitle.into_param().abi(), diskname.into_param().abi(), pathtosource.into_param().abi(), filesought.into_param().abi(), tagfile.into_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() as _), ::core::mem::transmute(pathrequiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupPromptForDiskW(hwndparent.into_param().abi(), dialogtitle.into_param().abi(), diskname.into_param().abi(), pathtosource.into_param().abi(), filesought.into_param().abi(), tagfile.into_param().abi(), diskpromptstyle, ::core::mem::transmute(pathbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pathbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pathrequiredsize.unwrap_or(::std::ptr::null_mut()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -4162,14 +4162,14 @@ where #[inline] pub unsafe fn SetupQueryDrivesInDiskSpaceListA(diskspace: *const ::core::ffi::c_void, returnbuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupQueryDrivesInDiskSpaceListA(diskspace : *const ::core::ffi::c_void, returnbuffer : ::windows_core::PSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupQueryDrivesInDiskSpaceListA(diskspace, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupQueryDrivesInDiskSpaceListA(diskspace, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn SetupQueryDrivesInDiskSpaceListW(diskspace: *const ::core::ffi::c_void, returnbuffer: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupQueryDrivesInDiskSpaceListW(diskspace : *const ::core::ffi::c_void, returnbuffer : ::windows_core::PWSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupQueryDrivesInDiskSpaceListW(diskspace, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupQueryDrivesInDiskSpaceListW(diskspace, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -4180,7 +4180,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupQueryFileLogA(fileloghandle : *const ::core::ffi::c_void, logsectionname : ::windows_core::PCSTR, targetfilename : ::windows_core::PCSTR, desiredinfo : SetupFileLogInfo, dataout : ::windows_core::PSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupQueryFileLogA(fileloghandle, logsectionname.into_param().abi(), targetfilename.into_param().abi(), desiredinfo, ::core::mem::transmute(dataout.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dataout.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupQueryFileLogA(fileloghandle, logsectionname.into_param().abi(), targetfilename.into_param().abi(), desiredinfo, ::core::mem::transmute(dataout.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dataout.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -4191,21 +4191,21 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupQueryFileLogW(fileloghandle : *const ::core::ffi::c_void, logsectionname : ::windows_core::PCWSTR, targetfilename : ::windows_core::PCWSTR, desiredinfo : SetupFileLogInfo, dataout : ::windows_core::PWSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupQueryFileLogW(fileloghandle, logsectionname.into_param().abi(), targetfilename.into_param().abi(), desiredinfo, ::core::mem::transmute(dataout.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dataout.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupQueryFileLogW(fileloghandle, logsectionname.into_param().abi(), targetfilename.into_param().abi(), desiredinfo, ::core::mem::transmute(dataout.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dataout.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn SetupQueryInfFileInformationA(infinformation: *const SP_INF_INFORMATION, infindex: u32, returnbuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupQueryInfFileInformationA(infinformation : *const SP_INF_INFORMATION, infindex : u32, returnbuffer : ::windows_core::PSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupQueryInfFileInformationA(infinformation, infindex, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupQueryInfFileInformationA(infinformation, infindex, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn SetupQueryInfFileInformationW(infinformation: *const SP_INF_INFORMATION, infindex: u32, returnbuffer: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupQueryInfFileInformationW(infinformation : *const SP_INF_INFORMATION, infindex : u32, returnbuffer : ::windows_core::PWSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupQueryInfFileInformationW(infinformation, infindex, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupQueryInfFileInformationW(infinformation, infindex, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Diagnostics_Debug\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Diagnostics_Debug"))] @@ -4229,7 +4229,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupQueryInfVersionInformationA(infinformation : *const SP_INF_INFORMATION, infindex : u32, key : ::windows_core::PCSTR, returnbuffer : ::windows_core::PSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupQueryInfVersionInformationA(infinformation, infindex, key.into_param().abi(), ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupQueryInfVersionInformationA(infinformation, infindex, key.into_param().abi(), ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -4239,7 +4239,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupQueryInfVersionInformationW(infinformation : *const SP_INF_INFORMATION, infindex : u32, key : ::windows_core::PCWSTR, returnbuffer : ::windows_core::PWSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupQueryInfVersionInformationW(infinformation, infindex, key.into_param().abi(), ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() + SetupQueryInfVersionInformationW(infinformation, infindex, key.into_param().abi(), ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -4705,14 +4705,14 @@ where #[inline] pub unsafe fn SetupSetSourceListA(flags: u32, sourcelist: &[::windows_core::PCSTR]) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupSetSourceListA(flags : u32, sourcelist : *const ::windows_core::PCSTR, sourcecount : u32) -> super::super::Foundation:: BOOL); - SetupSetSourceListA(flags, ::core::mem::transmute(sourcelist.as_ptr()), sourcelist.len() as _).ok() + SetupSetSourceListA(flags, ::core::mem::transmute(sourcelist.as_ptr()), sourcelist.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn SetupSetSourceListW(flags: u32, sourcelist: &[::windows_core::PCWSTR]) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupSetSourceListW(flags : u32, sourcelist : *const ::windows_core::PCWSTR, sourcecount : u32) -> super::super::Foundation:: BOOL); - SetupSetSourceListW(flags, ::core::mem::transmute(sourcelist.as_ptr()), sourcelist.len() as _).ok() + SetupSetSourceListW(flags, ::core::mem::transmute(sourcelist.as_ptr()), sourcelist.len().try_into().unwrap()).ok() } #[inline] pub unsafe fn SetupSetThreadLogToken(logtoken: u64) { 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 6543d6b067..2f69091c1c 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/DeviceQuery/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/DeviceQuery/mod.rs @@ -12,7 +12,7 @@ where pub unsafe fn DevCreateObjectQuery(objecttype: DEV_OBJECT_TYPE, queryflags: u32, prequestedproperties: ::core::option::Option<&[super::Properties::DEVPROPCOMPKEY]>, pfilter: ::core::option::Option<&[DEVPROP_FILTER_EXPRESSION]>, pcallback: PDEV_QUERY_RESULT_CALLBACK, pcontext: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result { ::windows_targets::link!("api-ms-win-devices-query-l1-1-0.dll" "system" fn DevCreateObjectQuery(objecttype : DEV_OBJECT_TYPE, queryflags : u32, crequestedproperties : u32, prequestedproperties : *const super::Properties:: DEVPROPCOMPKEY, cfilterexpressioncount : u32, pfilter : *const DEVPROP_FILTER_EXPRESSION, pcallback : PDEV_QUERY_RESULT_CALLBACK, pcontext : *const ::core::ffi::c_void, phdevquery : *mut HDEVQUERY) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - DevCreateObjectQuery(objecttype, queryflags, prequestedproperties.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prequestedproperties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pfilter.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pfilter.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pcallback, ::core::mem::transmute(pcontext.unwrap_or(::std::ptr::null())), &mut result__).from_abi(result__) + DevCreateObjectQuery(objecttype, queryflags, prequestedproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(prequestedproperties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pfilter.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pfilter.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pcallback, ::core::mem::transmute(pcontext.unwrap_or(::std::ptr::null())), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Devices_Properties\"`"] #[cfg(feature = "Win32_Devices_Properties")] @@ -23,11 +23,11 @@ pub unsafe fn DevCreateObjectQueryEx(objecttype: DEV_OBJECT_TYPE, queryflags: u3 DevCreateObjectQueryEx( objecttype, queryflags, - prequestedproperties.as_deref().map_or(0, |slice| slice.len() as _), + 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() as _), + 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())), - pextendedparameters.as_deref().map_or(0, |slice| slice.len() as _), + pextendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pextendedparameters.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pcallback, ::core::mem::transmute(pcontext.unwrap_or(::std::ptr::null())), @@ -44,7 +44,19 @@ 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); let mut result__ = ::std::mem::zeroed(); - DevCreateObjectQueryFromId(objecttype, pszobjectid.into_param().abi(), queryflags, prequestedproperties.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prequestedproperties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pfilter.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pfilter.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pcallback, ::core::mem::transmute(pcontext.unwrap_or(::std::ptr::null())), &mut result__).from_abi(result__) + DevCreateObjectQueryFromId( + objecttype, + pszobjectid.into_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(::std::ptr::null())), + &mut result__, + ) + .from_abi(result__) } #[doc = "Required features: `\"Win32_Devices_Properties\"`"] #[cfg(feature = "Win32_Devices_Properties")] @@ -59,11 +71,11 @@ where objecttype, pszobjectid.into_param().abi(), queryflags, - prequestedproperties.as_deref().map_or(0, |slice| slice.len() as _), + 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() as _), + 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())), - pextendedparameters.as_deref().map_or(0, |slice| slice.len() as _), + pextendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pextendedparameters.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pcallback, ::core::mem::transmute(pcontext.unwrap_or(::std::ptr::null())), @@ -80,7 +92,19 @@ 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); let mut result__ = ::std::mem::zeroed(); - DevCreateObjectQueryFromIds(objecttype, pszzobjectids.into_param().abi(), queryflags, prequestedproperties.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prequestedproperties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pfilter.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pfilter.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pcallback, ::core::mem::transmute(pcontext.unwrap_or(::std::ptr::null())), &mut result__).from_abi(result__) + DevCreateObjectQueryFromIds( + objecttype, + pszzobjectids.into_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(::std::ptr::null())), + &mut result__, + ) + .from_abi(result__) } #[doc = "Required features: `\"Win32_Devices_Properties\"`"] #[cfg(feature = "Win32_Devices_Properties")] @@ -95,11 +119,11 @@ where objecttype, pszzobjectids.into_param().abi(), queryflags, - prequestedproperties.as_deref().map_or(0, |slice| slice.len() as _), + 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() as _), + 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())), - pextendedparameters.as_deref().map_or(0, |slice| slice.len() as _), + pextendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pextendedparameters.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pcallback, ::core::mem::transmute(pcontext.unwrap_or(::std::ptr::null())), @@ -115,21 +139,21 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("api-ms-win-devices-query-l1-1-0.dll" "system" fn DevFindProperty(pkey : *const super::Properties:: DEVPROPKEY, store : super::Properties:: DEVPROPSTORE, pszlocalename : ::windows_core::PCWSTR, cproperties : u32, pproperties : *const super::Properties:: DEVPROPERTY) -> *mut super::Properties:: DEVPROPERTY); - DevFindProperty(pkey, store, pszlocalename.into_param().abi(), pproperties.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pproperties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + DevFindProperty(pkey, store, pszlocalename.into_param().abi(), pproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pproperties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[doc = "Required features: `\"Win32_Devices_Properties\"`"] #[cfg(feature = "Win32_Devices_Properties")] #[inline] pub unsafe fn DevFreeObjectProperties(pproperties: &[super::Properties::DEVPROPERTY]) { ::windows_targets::link!("api-ms-win-devices-query-l1-1-0.dll" "system" fn DevFreeObjectProperties(cpropertycount : u32, pproperties : *const super::Properties:: DEVPROPERTY) -> ()); - DevFreeObjectProperties(pproperties.len() as _, ::core::mem::transmute(pproperties.as_ptr())) + DevFreeObjectProperties(pproperties.len().try_into().unwrap(), ::core::mem::transmute(pproperties.as_ptr())) } #[doc = "Required features: `\"Win32_Devices_Properties\"`"] #[cfg(feature = "Win32_Devices_Properties")] #[inline] pub unsafe fn DevFreeObjects(pobjects: &[DEV_OBJECT]) { ::windows_targets::link!("api-ms-win-devices-query-l1-1-0.dll" "system" fn DevFreeObjects(cobjectcount : u32, pobjects : *const DEV_OBJECT) -> ()); - DevFreeObjects(pobjects.len() as _, ::core::mem::transmute(pobjects.as_ptr())) + DevFreeObjects(pobjects.len().try_into().unwrap(), ::core::mem::transmute(pobjects.as_ptr())) } #[doc = "Required features: `\"Win32_Devices_Properties\"`"] #[cfg(feature = "Win32_Devices_Properties")] @@ -139,7 +163,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::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); - DevGetObjectProperties(objecttype, pszobjectid.into_param().abi(), queryflags, prequestedproperties.len() as _, ::core::mem::transmute(prequestedproperties.as_ptr()), pcpropertycount, ppproperties).ok() + DevGetObjectProperties(objecttype, pszobjectid.into_param().abi(), queryflags, prequestedproperties.len().try_into().unwrap(), ::core::mem::transmute(prequestedproperties.as_ptr()), pcpropertycount, ppproperties).ok() } #[doc = "Required features: `\"Win32_Devices_Properties\"`"] #[cfg(feature = "Win32_Devices_Properties")] @@ -149,14 +173,14 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::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); - DevGetObjectPropertiesEx(objecttype, pszobjectid.into_param().abi(), queryflags, prequestedproperties.len() as _, ::core::mem::transmute(prequestedproperties.as_ptr()), pextendedparameters.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pextendedparameters.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pcpropertycount, ppproperties).ok() + DevGetObjectPropertiesEx(objecttype, pszobjectid.into_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, ppproperties).ok() } #[doc = "Required features: `\"Win32_Devices_Properties\"`"] #[cfg(feature = "Win32_Devices_Properties")] #[inline] pub unsafe fn DevGetObjects(objecttype: DEV_OBJECT_TYPE, queryflags: u32, prequestedproperties: ::core::option::Option<&[super::Properties::DEVPROPCOMPKEY]>, pfilter: ::core::option::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); - DevGetObjects(objecttype, queryflags, prequestedproperties.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prequestedproperties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pfilter.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pfilter.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pcobjectcount, ppobjects).ok() + 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, ppobjects).ok() } #[doc = "Required features: `\"Win32_Devices_Properties\"`"] #[cfg(feature = "Win32_Devices_Properties")] @@ -166,11 +190,11 @@ pub unsafe fn DevGetObjectsEx(objecttype: DEV_OBJECT_TYPE, queryflags: u32, preq DevGetObjectsEx( objecttype, queryflags, - prequestedproperties.as_deref().map_or(0, |slice| slice.len() as _), + 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() as _), + 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())), - pextendedparameters.as_deref().map_or(0, |slice| slice.len() as _), + 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())), pcobjectcount, ppobjects, 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 92b76aee02..dea2cdcbc7 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Display/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Display/mod.rs @@ -52,7 +52,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dxva2.dll" "system" fn CapabilitiesRequestAndCapabilitiesReply(hmonitor : super::super::Foundation:: HANDLE, pszasciicapabilitiesstring : ::windows_core::PSTR, dwcapabilitiesstringlengthincharacters : u32) -> i32); - CapabilitiesRequestAndCapabilitiesReply(hmonitor.into_param().abi(), ::core::mem::transmute(pszasciicapabilitiesstring.as_ptr()), pszasciicapabilitiesstring.len() as _) + CapabilitiesRequestAndCapabilitiesReply(hmonitor.into_param().abi(), ::core::mem::transmute(pszasciicapabilitiesstring.as_ptr()), pszasciicapabilitiesstring.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -79,7 +79,7 @@ where #[inline] pub unsafe fn DestroyPhysicalMonitors(pphysicalmonitorarray: &[PHYSICAL_MONITOR]) -> ::windows_core::Result<()> { ::windows_targets::link!("dxva2.dll" "system" fn DestroyPhysicalMonitors(dwphysicalmonitorarraysize : u32, pphysicalmonitorarray : *const PHYSICAL_MONITOR) -> super::super::Foundation:: BOOL); - DestroyPhysicalMonitors(pphysicalmonitorarray.len() as _, ::core::mem::transmute(pphysicalmonitorarray.as_ptr())).ok() + DestroyPhysicalMonitors(pphysicalmonitorarray.len().try_into().unwrap(), ::core::mem::transmute(pphysicalmonitorarray.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -335,12 +335,12 @@ where #[inline] pub unsafe fn EngMultiByteToUnicodeN(unicodestring: ::windows_core::PWSTR, maxbytesinunicodestring: u32, bytesinunicodestring: ::core::option::Option<*mut u32>, multibytestring: &[u8]) { ::windows_targets::link!("gdi32.dll" "system" fn EngMultiByteToUnicodeN(unicodestring : ::windows_core::PWSTR, maxbytesinunicodestring : u32, bytesinunicodestring : *mut u32, multibytestring : ::windows_core::PCSTR, bytesinmultibytestring : u32) -> ()); - EngMultiByteToUnicodeN(::core::mem::transmute(unicodestring), maxbytesinunicodestring, ::core::mem::transmute(bytesinunicodestring.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(multibytestring.as_ptr()), multibytestring.len() as _) + EngMultiByteToUnicodeN(::core::mem::transmute(unicodestring), maxbytesinunicodestring, ::core::mem::transmute(bytesinunicodestring.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(multibytestring.as_ptr()), multibytestring.len().try_into().unwrap()) } #[inline] pub unsafe fn EngMultiByteToWideChar(codepage: u32, widecharstring: ::windows_core::PWSTR, bytesinwidecharstring: i32, multibytestring: ::core::option::Option<&[u8]>) -> i32 { ::windows_targets::link!("gdi32.dll" "system" fn EngMultiByteToWideChar(codepage : u32, widecharstring : ::windows_core::PWSTR, bytesinwidecharstring : i32, multibytestring : ::windows_core::PCSTR, bytesinmultibytestring : i32) -> i32); - EngMultiByteToWideChar(codepage, ::core::mem::transmute(widecharstring), 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() as _)) + EngMultiByteToWideChar(codepage, ::core::mem::transmute(widecharstring), 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())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -429,7 +429,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("gdi32.dll" "system" fn EngUnicodeToMultiByteN(multibytestring : ::windows_core::PSTR, maxbytesinmultibytestring : u32, bytesinmultibytestring : *mut u32, unicodestring : ::windows_core::PCWSTR, bytesinunicodestring : u32) -> ()); - EngUnicodeToMultiByteN(::core::mem::transmute(multibytestring.as_ptr()), multibytestring.len() as _, ::core::mem::transmute(bytesinmultibytestring.unwrap_or(::std::ptr::null_mut())), unicodestring.into_param().abi(), bytesinunicodestring) + EngUnicodeToMultiByteN(::core::mem::transmute(multibytestring.as_ptr()), multibytestring.len().try_into().unwrap(), ::core::mem::transmute(bytesinmultibytestring.unwrap_or(::std::ptr::null_mut())), unicodestring.into_param().abi(), bytesinunicodestring) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -444,7 +444,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("gdi32.dll" "system" fn EngWideCharToMultiByte(codepage : u32, widecharstring : ::windows_core::PCWSTR, bytesinwidecharstring : i32, multibytestring : ::windows_core::PSTR, bytesinmultibytestring : i32) -> i32); - EngWideCharToMultiByte(codepage, widecharstring.into_param().abi(), 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() as _)) + EngWideCharToMultiByte(codepage, widecharstring.into_param().abi(), 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())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -652,7 +652,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dxva2.dll" "system" fn GetPhysicalMonitorsFromHMONITOR(hmonitor : super::super::Graphics::Gdi:: HMONITOR, dwphysicalmonitorarraysize : u32, pphysicalmonitorarray : *mut PHYSICAL_MONITOR) -> super::super::Foundation:: BOOL); - GetPhysicalMonitorsFromHMONITOR(hmonitor.into_param().abi(), pphysicalmonitorarray.len() as _, ::core::mem::transmute(pphysicalmonitorarray.as_ptr())).ok() + GetPhysicalMonitorsFromHMONITOR(hmonitor.into_param().abi(), pphysicalmonitorarray.len().try_into().unwrap(), ::core::mem::transmute(pphysicalmonitorarray.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D9\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))] @@ -662,7 +662,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dxva2.dll" "system" fn GetPhysicalMonitorsFromIDirect3DDevice9(pdirect3ddevice9 : * mut::core::ffi::c_void, dwphysicalmonitorarraysize : u32, pphysicalmonitorarray : *mut PHYSICAL_MONITOR) -> ::windows_core::HRESULT); - GetPhysicalMonitorsFromIDirect3DDevice9(pdirect3ddevice9.into_param().abi(), pphysicalmonitorarray.len() as _, ::core::mem::transmute(pphysicalmonitorarray.as_ptr())).ok() + GetPhysicalMonitorsFromIDirect3DDevice9(pdirect3ddevice9.into_param().abi(), pphysicalmonitorarray.len().try_into().unwrap(), ::core::mem::transmute(pphysicalmonitorarray.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -826,7 +826,7 @@ pub unsafe fn SetDisplayAutoRotationPreferences(orientation: ORIENTATION_PREFERE #[inline] pub unsafe fn SetDisplayConfig(patharray: ::core::option::Option<&[DISPLAYCONFIG_PATH_INFO]>, modeinfoarray: ::core::option::Option<&[DISPLAYCONFIG_MODE_INFO]>, flags: SET_DISPLAY_CONFIG_FLAGS) -> i32 { ::windows_targets::link!("user32.dll" "system" fn SetDisplayConfig(numpatharrayelements : u32, patharray : *const DISPLAYCONFIG_PATH_INFO, nummodeinfoarrayelements : u32, modeinfoarray : *const DISPLAYCONFIG_MODE_INFO, flags : SET_DISPLAY_CONFIG_FLAGS) -> i32); - SetDisplayConfig(patharray.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(patharray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), modeinfoarray.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(modeinfoarray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), flags) + SetDisplayConfig(patharray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(patharray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), modeinfoarray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(modeinfoarray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), flags) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 2ef4b89ae6..ecbbd27ffc 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 @@ -16,7 +16,7 @@ where { ::windows_targets::link!("cfgmgr32.dll" "system" fn SwDeviceCreate(pszenumeratorname : ::windows_core::PCWSTR, pszparentdeviceinstance : ::windows_core::PCWSTR, pcreateinfo : *const SW_DEVICE_CREATE_INFO, cpropertycount : u32, pproperties : *const super::super::Properties:: DEVPROPERTY, pcallback : SW_DEVICE_CREATE_CALLBACK, pcontext : *const ::core::ffi::c_void, phswdevice : *mut HSWDEVICE) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - SwDeviceCreate(pszenumeratorname.into_param().abi(), pszparentdeviceinstance.into_param().abi(), pcreateinfo, pproperties.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pproperties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pcallback, ::core::mem::transmute(pcontext.unwrap_or(::std::ptr::null())), &mut result__).from_abi(result__) + SwDeviceCreate(pszenumeratorname.into_param().abi(), pszparentdeviceinstance.into_param().abi(), pcreateinfo, pproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pproperties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pcallback, ::core::mem::transmute(pcontext.unwrap_or(::std::ptr::null())), &mut result__).from_abi(result__) } #[inline] pub unsafe fn SwDeviceGetLifetime(hswdevice: P0) -> ::windows_core::Result @@ -36,7 +36,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("cfgmgr32.dll" "system" fn SwDeviceInterfacePropertySet(hswdevice : HSWDEVICE, pszdeviceinterfaceid : ::windows_core::PCWSTR, cpropertycount : u32, pproperties : *const super::super::Properties:: DEVPROPERTY) -> ::windows_core::HRESULT); - SwDeviceInterfacePropertySet(hswdevice.into_param().abi(), pszdeviceinterfaceid.into_param().abi(), pproperties.len() as _, ::core::mem::transmute(pproperties.as_ptr())).ok() + SwDeviceInterfacePropertySet(hswdevice.into_param().abi(), pszdeviceinterfaceid.into_param().abi(), pproperties.len().try_into().unwrap(), ::core::mem::transmute(pproperties.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Devices_Properties\"`, `\"Win32_Foundation\"`"] #[cfg(all(feature = "Win32_Devices_Properties", feature = "Win32_Foundation"))] @@ -49,7 +49,7 @@ where { ::windows_targets::link!("cfgmgr32.dll" "system" fn SwDeviceInterfaceRegister(hswdevice : HSWDEVICE, pinterfaceclassguid : *const ::windows_core::GUID, pszreferencestring : ::windows_core::PCWSTR, cpropertycount : u32, pproperties : *const super::super::Properties:: DEVPROPERTY, fenabled : super::super::super::Foundation:: BOOL, ppszdeviceinterfaceid : *mut ::windows_core::PWSTR) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - SwDeviceInterfaceRegister(hswdevice.into_param().abi(), pinterfaceclassguid, pszreferencestring.into_param().abi(), pproperties.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pproperties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), fenabled.into_param().abi(), &mut result__).from_abi(result__) + SwDeviceInterfaceRegister(hswdevice.into_param().abi(), pinterfaceclassguid, pszreferencestring.into_param().abi(), pproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pproperties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), fenabled.into_param().abi(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -71,7 +71,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("cfgmgr32.dll" "system" fn SwDevicePropertySet(hswdevice : HSWDEVICE, cpropertycount : u32, pproperties : *const super::super::Properties:: DEVPROPERTY) -> ::windows_core::HRESULT); - SwDevicePropertySet(hswdevice.into_param().abi(), pproperties.len() as _, ::core::mem::transmute(pproperties.as_ptr())).ok() + SwDevicePropertySet(hswdevice.into_param().abi(), pproperties.len().try_into().unwrap(), ::core::mem::transmute(pproperties.as_ptr())).ok() } #[inline] pub unsafe fn SwDeviceSetLifetime(hswdevice: P0, lifetime: SW_DEVICE_LIFETIME) -> ::windows_core::Result<()> @@ -704,7 +704,7 @@ pub struct IUPnPDevices_Vtbl { pub struct IUPnPEventSink(::windows_core::IUnknown); impl IUPnPEventSink { pub unsafe fn OnStateChanged(&self, rgdispidchanges: &[i32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).OnStateChanged)(::windows_core::Interface::as_raw(self), rgdispidchanges.len() as _, ::core::mem::transmute(rgdispidchanges.as_ptr())).ok() + (::windows_core::Interface::vtable(self).OnStateChanged)(::windows_core::Interface::as_raw(self), rgdispidchanges.len().try_into().unwrap(), ::core::mem::transmute(rgdispidchanges.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] 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 7350dcc227..8924e874e3 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Fax/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Fax/mod.rs @@ -6954,7 +6954,7 @@ impl IStiDeviceControl { (::windows_core::Interface::vtable(self).GetLastError)(::windows_core::Interface::as_raw(self), lpdwlasterror).ok() } pub unsafe fn GetMyDevicePortName(&self, lpszdevicepath: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetMyDevicePortName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(lpszdevicepath.as_ptr()), lpszdevicepath.len() as _).ok() + (::windows_core::Interface::vtable(self).GetMyDevicePortName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(lpszdevicepath.as_ptr()), lpszdevicepath.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -7169,7 +7169,7 @@ impl IStillImageW { P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).SetDeviceValue)(::windows_core::Interface::as_raw(self), pwszdevicename.into_param().abi(), pvaluename.into_param().abi(), r#type, ::core::mem::transmute(pdata.as_ptr()), pdata.len() as _).ok() + (::windows_core::Interface::vtable(self).SetDeviceValue)(::windows_core::Interface::as_raw(self), pwszdevicename.into_param().abi(), pvaluename.into_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: ::core::option::Option<*mut u32>, pwszeventname: &mut [u16; 128]) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetSTILaunchInformation)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszdevicename.as_ptr()), ::core::mem::transmute(pdweventcode.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pwszeventname.as_ptr())).ok() 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 330658de87..9035107f7b 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Geolocation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Geolocation/mod.rs @@ -439,7 +439,7 @@ impl ILocation { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).RequestPermissions)(::windows_core::Interface::as_raw(self), hparent.into_param().abi(), ::core::mem::transmute(preporttypes.as_ptr()), preporttypes.len() as _, fmodal.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).RequestPermissions)(::windows_core::Interface::as_raw(self), hparent.into_param().abi(), ::core::mem::transmute(preporttypes.as_ptr()), preporttypes.len().try_into().unwrap(), fmodal.into_param().abi()).ok() } } ::windows_core::imp::interface_hierarchy!(ILocation, ::windows_core::IUnknown); 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 d740114012..716ac0d3ee 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/HumanInterfaceDevice/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/HumanInterfaceDevice/mod.rs @@ -204,7 +204,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("hid.dll" "system" fn HidP_GetButtonArray(reporttype : HIDP_REPORT_TYPE, usagepage : u16, linkcollection : u16, usage : u16, buttondata : *mut HIDP_BUTTON_ARRAY_DATA, buttondatalength : *mut u16, preparseddata : PHIDP_PREPARSED_DATA, report : ::windows_core::PCSTR, reportlength : u32) -> super::super::Foundation:: NTSTATUS); - HidP_GetButtonArray(reporttype, usagepage, linkcollection, usage, buttondata, buttondatalength, preparseddata.into_param().abi(), ::core::mem::transmute(report.as_ptr()), report.len() as _) + HidP_GetButtonArray(reporttype, usagepage, linkcollection, usage, buttondata, buttondatalength, preparseddata.into_param().abi(), ::core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -234,7 +234,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("hid.dll" "system" fn HidP_GetData(reporttype : HIDP_REPORT_TYPE, datalist : *mut HIDP_DATA, datalength : *mut u32, preparseddata : PHIDP_PREPARSED_DATA, report : ::windows_core::PSTR, reportlength : u32) -> super::super::Foundation:: NTSTATUS); - HidP_GetData(reporttype, datalist, datalength, preparseddata.into_param().abi(), ::core::mem::transmute(report.as_ptr()), report.len() as _) + HidP_GetData(reporttype, datalist, datalength, preparseddata.into_param().abi(), ::core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -264,7 +264,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("hid.dll" "system" fn HidP_GetScaledUsageValue(reporttype : HIDP_REPORT_TYPE, usagepage : u16, linkcollection : u16, usage : u16, usagevalue : *mut i32, preparseddata : PHIDP_PREPARSED_DATA, report : ::windows_core::PCSTR, reportlength : u32) -> super::super::Foundation:: NTSTATUS); - HidP_GetScaledUsageValue(reporttype, usagepage, linkcollection, usage, usagevalue, preparseddata.into_param().abi(), ::core::mem::transmute(report.as_ptr()), report.len() as _) + HidP_GetScaledUsageValue(reporttype, usagepage, linkcollection, usage, usagevalue, preparseddata.into_param().abi(), ::core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -294,7 +294,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("hid.dll" "system" fn HidP_GetUsageValue(reporttype : HIDP_REPORT_TYPE, usagepage : u16, linkcollection : u16, usage : u16, usagevalue : *mut u32, preparseddata : PHIDP_PREPARSED_DATA, report : ::windows_core::PCSTR, reportlength : u32) -> super::super::Foundation:: NTSTATUS); - HidP_GetUsageValue(reporttype, usagepage, linkcollection, usage, usagevalue, preparseddata.into_param().abi(), ::core::mem::transmute(report.as_ptr()), report.len() as _) + HidP_GetUsageValue(reporttype, usagepage, linkcollection, usage, usagevalue, preparseddata.into_param().abi(), ::core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -304,7 +304,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("hid.dll" "system" fn HidP_GetUsageValueArray(reporttype : HIDP_REPORT_TYPE, usagepage : u16, linkcollection : u16, usage : u16, usagevalue : ::windows_core::PSTR, usagevaluebytelength : u16, preparseddata : PHIDP_PREPARSED_DATA, report : ::windows_core::PCSTR, reportlength : u32) -> super::super::Foundation:: NTSTATUS); - HidP_GetUsageValueArray(reporttype, usagepage, linkcollection, usage, ::core::mem::transmute(usagevalue.as_ptr()), usagevalue.len() as _, preparseddata.into_param().abi(), ::core::mem::transmute(report.as_ptr()), report.len() as _) + HidP_GetUsageValueArray(reporttype, usagepage, linkcollection, usage, ::core::mem::transmute(usagevalue.as_ptr()), usagevalue.len().try_into().unwrap(), preparseddata.into_param().abi(), ::core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -314,7 +314,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("hid.dll" "system" fn HidP_GetUsages(reporttype : HIDP_REPORT_TYPE, usagepage : u16, linkcollection : u16, usagelist : *mut u16, usagelength : *mut u32, preparseddata : PHIDP_PREPARSED_DATA, report : ::windows_core::PSTR, reportlength : u32) -> super::super::Foundation:: NTSTATUS); - HidP_GetUsages(reporttype, usagepage, linkcollection, usagelist, usagelength, preparseddata.into_param().abi(), ::core::mem::transmute(report.as_ptr()), report.len() as _) + HidP_GetUsages(reporttype, usagepage, linkcollection, usagelist, usagelength, preparseddata.into_param().abi(), ::core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -324,7 +324,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("hid.dll" "system" fn HidP_GetUsagesEx(reporttype : HIDP_REPORT_TYPE, linkcollection : u16, buttonlist : *mut USAGE_AND_PAGE, usagelength : *mut u32, preparseddata : PHIDP_PREPARSED_DATA, report : ::windows_core::PCSTR, reportlength : u32) -> super::super::Foundation:: NTSTATUS); - HidP_GetUsagesEx(reporttype, linkcollection, buttonlist, usagelength, preparseddata.into_param().abi(), ::core::mem::transmute(report.as_ptr()), report.len() as _) + HidP_GetUsagesEx(reporttype, linkcollection, buttonlist, usagelength, preparseddata.into_param().abi(), ::core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -344,7 +344,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("hid.dll" "system" fn HidP_InitializeReportForID(reporttype : HIDP_REPORT_TYPE, reportid : u8, preparseddata : PHIDP_PREPARSED_DATA, report : ::windows_core::PSTR, reportlength : u32) -> super::super::Foundation:: NTSTATUS); - HidP_InitializeReportForID(reporttype, reportid, preparseddata.into_param().abi(), ::core::mem::transmute(report.as_ptr()), report.len() as _) + HidP_InitializeReportForID(reporttype, reportid, preparseddata.into_param().abi(), ::core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } #[inline] pub unsafe fn HidP_MaxDataListLength(reporttype: HIDP_REPORT_TYPE, preparseddata: P0) -> u32 @@ -370,7 +370,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("hid.dll" "system" fn HidP_SetButtonArray(reporttype : HIDP_REPORT_TYPE, usagepage : u16, linkcollection : u16, usage : u16, buttondata : *const HIDP_BUTTON_ARRAY_DATA, buttondatalength : u16, preparseddata : PHIDP_PREPARSED_DATA, report : ::windows_core::PSTR, reportlength : u32) -> super::super::Foundation:: NTSTATUS); - HidP_SetButtonArray(reporttype, usagepage, linkcollection, usage, ::core::mem::transmute(buttondata.as_ptr()), buttondata.len() as _, preparseddata.into_param().abi(), ::core::mem::transmute(report.as_ptr()), report.len() as _) + HidP_SetButtonArray(reporttype, usagepage, linkcollection, usage, ::core::mem::transmute(buttondata.as_ptr()), buttondata.len().try_into().unwrap(), preparseddata.into_param().abi(), ::core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -380,7 +380,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("hid.dll" "system" fn HidP_SetData(reporttype : HIDP_REPORT_TYPE, datalist : *mut HIDP_DATA, datalength : *mut u32, preparseddata : PHIDP_PREPARSED_DATA, report : ::windows_core::PCSTR, reportlength : u32) -> super::super::Foundation:: NTSTATUS); - HidP_SetData(reporttype, datalist, datalength, preparseddata.into_param().abi(), ::core::mem::transmute(report.as_ptr()), report.len() as _) + HidP_SetData(reporttype, datalist, datalength, preparseddata.into_param().abi(), ::core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -390,7 +390,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("hid.dll" "system" fn HidP_SetScaledUsageValue(reporttype : HIDP_REPORT_TYPE, usagepage : u16, linkcollection : u16, usage : u16, usagevalue : i32, preparseddata : PHIDP_PREPARSED_DATA, report : ::windows_core::PSTR, reportlength : u32) -> super::super::Foundation:: NTSTATUS); - HidP_SetScaledUsageValue(reporttype, usagepage, linkcollection, usage, usagevalue, preparseddata.into_param().abi(), ::core::mem::transmute(report.as_ptr()), report.len() as _) + HidP_SetScaledUsageValue(reporttype, usagepage, linkcollection, usage, usagevalue, preparseddata.into_param().abi(), ::core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -400,7 +400,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("hid.dll" "system" fn HidP_SetUsageValue(reporttype : HIDP_REPORT_TYPE, usagepage : u16, linkcollection : u16, usage : u16, usagevalue : u32, preparseddata : PHIDP_PREPARSED_DATA, report : ::windows_core::PSTR, reportlength : u32) -> super::super::Foundation:: NTSTATUS); - HidP_SetUsageValue(reporttype, usagepage, linkcollection, usage, usagevalue, preparseddata.into_param().abi(), ::core::mem::transmute(report.as_ptr()), report.len() as _) + HidP_SetUsageValue(reporttype, usagepage, linkcollection, usage, usagevalue, preparseddata.into_param().abi(), ::core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -410,7 +410,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("hid.dll" "system" fn HidP_SetUsageValueArray(reporttype : HIDP_REPORT_TYPE, usagepage : u16, linkcollection : u16, usage : u16, usagevalue : ::windows_core::PCSTR, usagevaluebytelength : u16, preparseddata : PHIDP_PREPARSED_DATA, report : ::windows_core::PSTR, reportlength : u32) -> super::super::Foundation:: NTSTATUS); - HidP_SetUsageValueArray(reporttype, usagepage, linkcollection, usage, ::core::mem::transmute(usagevalue.as_ptr()), usagevalue.len() as _, preparseddata.into_param().abi(), ::core::mem::transmute(report.as_ptr()), report.len() as _) + HidP_SetUsageValueArray(reporttype, usagepage, linkcollection, usage, ::core::mem::transmute(usagevalue.as_ptr()), usagevalue.len().try_into().unwrap(), preparseddata.into_param().abi(), ::core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -420,14 +420,14 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("hid.dll" "system" fn HidP_SetUsages(reporttype : HIDP_REPORT_TYPE, usagepage : u16, linkcollection : u16, usagelist : *mut u16, usagelength : *mut u32, preparseddata : PHIDP_PREPARSED_DATA, report : ::windows_core::PCSTR, reportlength : u32) -> super::super::Foundation:: NTSTATUS); - HidP_SetUsages(reporttype, usagepage, linkcollection, usagelist, usagelength, preparseddata.into_param().abi(), ::core::mem::transmute(report.as_ptr()), report.len() as _) + HidP_SetUsages(reporttype, usagepage, linkcollection, usagelist, usagelength, preparseddata.into_param().abi(), ::core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn HidP_TranslateUsagesToI8042ScanCodes(changedusagelist: &[u16], keyaction: HIDP_KEYBOARD_DIRECTION, modifierstate: *mut HIDP_KEYBOARD_MODIFIER_STATE, insertcodesprocedure: PHIDP_INSERT_SCANCODES, insertcodescontext: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::NTSTATUS { ::windows_targets::link!("hid.dll" "system" fn HidP_TranslateUsagesToI8042ScanCodes(changedusagelist : *const u16, usagelistlength : u32, keyaction : HIDP_KEYBOARD_DIRECTION, modifierstate : *mut HIDP_KEYBOARD_MODIFIER_STATE, insertcodesprocedure : PHIDP_INSERT_SCANCODES, insertcodescontext : *const ::core::ffi::c_void) -> super::super::Foundation:: NTSTATUS); - HidP_TranslateUsagesToI8042ScanCodes(::core::mem::transmute(changedusagelist.as_ptr()), changedusagelist.len() as _, keyaction, modifierstate, insertcodesprocedure, ::core::mem::transmute(insertcodescontext.unwrap_or(::std::ptr::null()))) + HidP_TranslateUsagesToI8042ScanCodes(::core::mem::transmute(changedusagelist.as_ptr()), changedusagelist.len().try_into().unwrap(), keyaction, modifierstate, insertcodesprocedure, ::core::mem::transmute(insertcodescontext.unwrap_or(::std::ptr::null()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -437,7 +437,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("hid.dll" "system" fn HidP_UnsetUsages(reporttype : HIDP_REPORT_TYPE, usagepage : u16, linkcollection : u16, usagelist : *mut u16, usagelength : *mut u32, preparseddata : PHIDP_PREPARSED_DATA, report : ::windows_core::PCSTR, reportlength : u32) -> super::super::Foundation:: NTSTATUS); - HidP_UnsetUsages(reporttype, usagepage, linkcollection, usagelist, usagelength, preparseddata.into_param().abi(), ::core::mem::transmute(report.as_ptr()), report.len() as _) + HidP_UnsetUsages(reporttype, usagepage, linkcollection, usagelist, usagelength, preparseddata.into_param().abi(), ::core::mem::transmute(report.as_ptr()), report.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 595c38cd01..a247907da1 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/ImageAcquisition/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/ImageAcquisition/mod.rs @@ -786,7 +786,7 @@ impl IWiaItem { (::windows_core::Interface::vtable(self).DumpTreeItemData)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn Diagnostic(&self, pbuffer: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Diagnostic)(::windows_core::Interface::as_raw(self), pbuffer.len() as _, ::core::mem::transmute(pbuffer.as_ptr())).ok() + (::windows_core::Interface::vtable(self).Diagnostic)(::windows_core::Interface::as_raw(self), pbuffer.len().try_into().unwrap(), ::core::mem::transmute(pbuffer.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IWiaItem, ::windows_core::IUnknown); @@ -900,7 +900,7 @@ impl IWiaItem2 { (::windows_core::Interface::vtable(self).EnumRegisterEventInfo)(::windows_core::Interface::as_raw(self), lflags, peventguid, &mut result__).from_abi(result__) } pub unsafe fn Diagnostic(&self, pbuffer: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Diagnostic)(::windows_core::Interface::as_raw(self), pbuffer.len() as _, ::core::mem::transmute(pbuffer.as_ptr())).ok() + (::windows_core::Interface::vtable(self).Diagnostic)(::windows_core::Interface::as_raw(self), pbuffer.len().try_into().unwrap(), ::core::mem::transmute(pbuffer.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IWiaItem2, ::windows_core::IUnknown); @@ -946,7 +946,7 @@ impl IWiaItemExtras { (::windows_core::Interface::vtable(self).GetExtendedErrorInfo)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn Escape(&self, dwescapecode: u32, lpindata: &[u8], poutdata: &mut [u8], pdwactualdatasize: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Escape)(::windows_core::Interface::as_raw(self), dwescapecode, ::core::mem::transmute(lpindata.as_ptr()), lpindata.len() as _, ::core::mem::transmute(poutdata.as_ptr()), poutdata.len() as _, pdwactualdatasize).ok() + (::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).ok() } pub unsafe fn CancelPendingIO(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).CancelPendingIO)(::windows_core::Interface::as_raw(self)).ok() @@ -1304,7 +1304,7 @@ impl IWiaPropertyStorage { #[doc = "Required features: `\"Win32_System_Com_StructuredStorage\"`"] #[cfg(feature = "Win32_System_Com_StructuredStorage")] pub unsafe fn DeleteMultiple(&self, rgpspec: &[super::super::System::Com::StructuredStorage::PROPSPEC]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).DeleteMultiple)(::windows_core::Interface::as_raw(self), rgpspec.len() as _, ::core::mem::transmute(rgpspec.as_ptr())).ok() + (::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<()> { (::windows_core::Interface::vtable(self).ReadPropertyNames)(::windows_core::Interface::as_raw(self), cpropid, rgpropid, rglpwstrname).ok() @@ -1313,7 +1313,7 @@ impl IWiaPropertyStorage { (::windows_core::Interface::vtable(self).WritePropertyNames)(::windows_core::Interface::as_raw(self), cpropid, rgpropid, rglpwstrname).ok() } pub unsafe fn DeletePropertyNames(&self, rgpropid: &[u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).DeletePropertyNames)(::windows_core::Interface::as_raw(self), rgpropid.len() as _, ::core::mem::transmute(rgpropid.as_ptr())).ok() + (::windows_core::Interface::vtable(self).DeletePropertyNames)(::windows_core::Interface::as_raw(self), rgpropid.len().try_into().unwrap(), ::core::mem::transmute(rgpropid.as_ptr())).ok() } pub unsafe fn Commit(&self, grfcommitflags: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Commit)(::windows_core::Interface::as_raw(self), grfcommitflags).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Devices/PortableDevices/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/PortableDevices/mod.rs index d95d968b74..975fcbd4f2 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/PortableDevices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/PortableDevices/mod.rs @@ -5,7 +5,7 @@ where { ::windows_targets::link!("dmprocessxmlfiltered.dll" "system" fn DMProcessConfigXMLFiltered(pszxmlin : ::windows_core::PCWSTR, rgszallowedcspnodes : *const ::windows_core::PCWSTR, dwnumallowedcspnodes : u32, pbstrxmlout : *mut ::std::mem::MaybeUninit <::windows_core::BSTR >) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - DMProcessConfigXMLFiltered(pszxmlin.into_param().abi(), ::core::mem::transmute(rgszallowedcspnodes.as_ptr()), rgszallowedcspnodes.len() as _, &mut result__).from_abi(result__) + DMProcessConfigXMLFiltered(pszxmlin.into_param().abi(), ::core::mem::transmute(rgszallowedcspnodes.as_ptr()), rgszallowedcspnodes.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] @@ -33,7 +33,7 @@ pub struct IConnectionRequestCallback_Vtbl { pub struct IEnumPortableDeviceConnectors(::windows_core::IUnknown); impl IEnumPortableDeviceConnectors { pub unsafe fn Next(&self, pconnectors: &mut [::core::option::Option], pcfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), pconnectors.len() as _, ::core::mem::transmute(pconnectors.as_ptr()), pcfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), pconnectors.len().try_into().unwrap(), ::core::mem::transmute(pconnectors.as_ptr()), pcfetched).ok() } pub unsafe fn Skip(&self, cconnectors: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), cconnectors).ok() @@ -67,7 +67,7 @@ pub struct IEnumPortableDeviceConnectors_Vtbl { pub struct IEnumPortableDeviceObjectIDs(::windows_core::IUnknown); impl IEnumPortableDeviceObjectIDs { pub unsafe fn Next(&self, pobjids: &mut [::windows_core::PWSTR], pcfetched: *mut u32) -> ::windows_core::HRESULT { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), pobjids.len() as _, ::core::mem::transmute(pobjids.as_ptr()), pcfetched) + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), pobjids.len().try_into().unwrap(), ::core::mem::transmute(pobjids.as_ptr()), pcfetched) } pub unsafe fn Skip(&self, cobjects: u32) -> ::windows_core::HRESULT { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), cobjects) @@ -347,7 +347,7 @@ impl IPortableDeviceConnector { #[doc = "Required features: `\"Win32_Devices_Properties\"`"] #[cfg(feature = "Win32_Devices_Properties")] pub unsafe fn SetProperty(&self, ppropertykey: *const super::Properties::DEVPROPKEY, propertytype: super::Properties::DEVPROPTYPE, pdata: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetProperty)(::windows_core::Interface::as_raw(self), ppropertykey, propertytype, ::core::mem::transmute(pdata.as_ptr()), pdata.len() as _).ok() + (::windows_core::Interface::vtable(self).SetProperty)(::windows_core::Interface::as_raw(self), ppropertykey, propertytype, ::core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap()).ok() } pub unsafe fn GetPnPID(&self) -> ::windows_core::Result<::windows_core::PWSTR> { let mut result__ = ::std::mem::zeroed(); @@ -1617,7 +1617,7 @@ impl IPortableDeviceValues { #[doc = "Required features: `\"Win32_UI_Shell_PropertiesSystem\"`"] #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe fn SetBufferValue(&self, key: *const super::super::UI::Shell::PropertiesSystem::PROPERTYKEY, pvalue: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetBufferValue)(::windows_core::Interface::as_raw(self), key, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len() as _).ok() + (::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() } #[doc = "Required features: `\"Win32_UI_Shell_PropertiesSystem\"`"] #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] @@ -2055,13 +2055,13 @@ pub struct IWpdSerializer(::windows_core::IUnknown); impl IWpdSerializer { pub unsafe fn GetIPortableDeviceValuesFromBuffer(&self, pbuffer: &[u8]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).GetIPortableDeviceValuesFromBuffer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).GetIPortableDeviceValuesFromBuffer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn WriteIPortableDeviceValuesToBuffer(&self, presults: P0, pbuffer: &mut [u8], pdwbyteswritten: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).WriteIPortableDeviceValuesToBuffer)(::windows_core::Interface::as_raw(self), pbuffer.len() as _, presults.into_param().abi(), ::core::mem::transmute(pbuffer.as_ptr()), pdwbyteswritten).ok() + (::windows_core::Interface::vtable(self).WriteIPortableDeviceValuesToBuffer)(::windows_core::Interface::as_raw(self), pbuffer.len().try_into().unwrap(), presults.into_param().abi(), ::core::mem::transmute(pbuffer.as_ptr()), pdwbyteswritten).ok() } pub unsafe fn GetBufferFromIPortableDeviceValues(&self, psource: P0, ppbuffer: *mut *mut u8, pdwbuffersize: *mut u32) -> ::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 6c2d92ba4e..b6e2c593b6 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Sensors/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Sensors/mod.rs @@ -17,7 +17,7 @@ pub unsafe fn CollectionsListCopyAndMarshall(target: *mut SENSOR_COLLECTION_LIST #[inline] pub unsafe fn CollectionsListDeserializeFromBuffer(sourcebuffer: &[u8], targetcollection: *mut SENSOR_COLLECTION_LIST) -> super::super::Foundation::NTSTATUS { ::windows_targets::link!("sensorsutilsv2.dll" "system" fn CollectionsListDeserializeFromBuffer(sourcebuffersizeinbytes : u32, sourcebuffer : *const u8, targetcollection : *mut SENSOR_COLLECTION_LIST) -> super::super::Foundation:: NTSTATUS); - CollectionsListDeserializeFromBuffer(sourcebuffer.len() as _, ::core::mem::transmute(sourcebuffer.as_ptr()), targetcollection) + CollectionsListDeserializeFromBuffer(sourcebuffer.len().try_into().unwrap(), ::core::mem::transmute(sourcebuffer.as_ptr()), targetcollection) } #[inline] pub unsafe fn CollectionsListGetFillableCount(buffersizebytes: u32) -> u32 { @@ -57,7 +57,7 @@ pub unsafe fn CollectionsListMarshall(target: *mut SENSOR_COLLECTION_LIST) -> su #[inline] pub unsafe fn CollectionsListSerializeToBuffer(sourcecollection: *const SENSOR_COLLECTION_LIST, targetbuffer: &mut [u8]) -> super::super::Foundation::NTSTATUS { ::windows_targets::link!("sensorsutilsv2.dll" "system" fn CollectionsListSerializeToBuffer(sourcecollection : *const SENSOR_COLLECTION_LIST, targetbuffersizeinbytes : u32, targetbuffer : *mut u8) -> super::super::Foundation:: NTSTATUS); - CollectionsListSerializeToBuffer(sourcecollection, targetbuffer.len() as _, ::core::mem::transmute(targetbuffer.as_ptr())) + CollectionsListSerializeToBuffer(sourcecollection, targetbuffer.len().try_into().unwrap(), ::core::mem::transmute(targetbuffer.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"Win32_System_Variant\"`, `\"Win32_UI_Shell_PropertiesSystem\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant", feature = "Win32_UI_Shell_PropertiesSystem"))] @@ -93,7 +93,7 @@ pub unsafe fn GetPerformanceTime(timems: *mut u32) -> super::super::Foundation:: pub unsafe fn InitPropVariantFromCLSIDArray(members: &[::windows_core::GUID]) -> ::windows_core::Result { ::windows_targets::link!("sensorsutilsv2.dll" "system" fn InitPropVariantFromCLSIDArray(members : *const ::windows_core::GUID, size : u32, ppropvar : *mut super::super::System::Com::StructuredStorage:: PROPVARIANT) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - InitPropVariantFromCLSIDArray(::core::mem::transmute(members.as_ptr()), members.len() as _, &mut result__).from_abi(result__) + InitPropVariantFromCLSIDArray(::core::mem::transmute(members.as_ptr()), members.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] @@ -115,7 +115,7 @@ pub unsafe fn IsCollectionListSame(lista: *const SENSOR_COLLECTION_LIST, listb: #[inline] pub unsafe fn IsGUIDPresentInList(guidarray: &[::windows_core::GUID], guidelem: *const ::windows_core::GUID) -> super::super::Foundation::BOOLEAN { ::windows_targets::link!("sensorsutilsv2.dll" "system" fn IsGUIDPresentInList(guidarray : *const ::windows_core::GUID, arraylength : u32, guidelem : *const ::windows_core::GUID) -> super::super::Foundation:: BOOLEAN); - IsGUIDPresentInList(::core::mem::transmute(guidarray.as_ptr()), guidarray.len() as _, guidelem) + IsGUIDPresentInList(::core::mem::transmute(guidarray.as_ptr()), guidarray.len().try_into().unwrap(), guidelem) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"Win32_System_Variant\"`, `\"Win32_UI_Shell_PropertiesSystem\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant", feature = "Win32_UI_Shell_PropertiesSystem"))] @@ -385,7 +385,7 @@ impl ISensor { (::windows_core::Interface::vtable(self).GetEventInterest)(::windows_core::Interface::as_raw(self), ppvalues, pcount).ok() } pub unsafe fn SetEventInterest(&self, pvalues: ::core::option::Option<&[::windows_core::GUID]>) -> ::windows_core::Result<()> { - (::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() as _)).ok() + (::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() } pub unsafe fn SetEventSink(&self, pevents: P0) -> ::windows_core::Result<()> where 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 e22042c9ec..68bfe48f56 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/SerialCommunication/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/SerialCommunication/mod.rs @@ -31,7 +31,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("msports.dll" "system" fn ComDBGetCurrentPortUsage(hcomdb : HCOMDB, buffer : *mut u8, buffersize : u32, reporttype : u32, maxportsreported : *mut u32) -> i32); - ComDBGetCurrentPortUsage(hcomdb.into_param().abi(), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), reporttype, ::core::mem::transmute(maxportsreported.unwrap_or(::std::ptr::null_mut()))) + ComDBGetCurrentPortUsage(hcomdb.into_param().abi(), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), reporttype, ::core::mem::transmute(maxportsreported.unwrap_or(::std::ptr::null_mut()))) } #[inline] pub unsafe fn ComDBOpen(phcomdb: *mut HCOMDB) -> i32 { diff --git a/crates/libs/windows/src/Windows/Win32/Devices/Tapi/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/Tapi/mod.rs index 6089302eb9..a056cc3366 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Tapi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Tapi/mod.rs @@ -307,7 +307,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("tapi32.dll" "system" fn lineGatherDigits(hcall : u32, dwdigitmodes : u32, lpsdigits : ::windows_core::PSTR, dwnumdigits : u32, lpszterminationdigits : ::windows_core::PCSTR, dwfirstdigittimeout : u32, dwinterdigittimeout : u32) -> i32); - lineGatherDigits(hcall, dwdigitmodes, ::core::mem::transmute(lpsdigits.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpsdigits.as_deref().map_or(0, |slice| slice.len() as _), lpszterminationdigits.into_param().abi(), dwfirstdigittimeout, dwinterdigittimeout) + lineGatherDigits(hcall, dwdigitmodes, ::core::mem::transmute(lpsdigits.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpsdigits.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpszterminationdigits.into_param().abi(), dwfirstdigittimeout, dwinterdigittimeout) } #[inline] pub unsafe fn lineGatherDigitsA(hcall: u32, dwdigitmodes: u32, lpsdigits: ::core::option::Option<&mut [u8]>, lpszterminationdigits: P0, dwfirstdigittimeout: u32, dwinterdigittimeout: u32) -> i32 @@ -315,7 +315,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("tapi32.dll" "system" fn lineGatherDigitsA(hcall : u32, dwdigitmodes : u32, lpsdigits : ::windows_core::PSTR, dwnumdigits : u32, lpszterminationdigits : ::windows_core::PCSTR, dwfirstdigittimeout : u32, dwinterdigittimeout : u32) -> i32); - lineGatherDigitsA(hcall, dwdigitmodes, ::core::mem::transmute(lpsdigits.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpsdigits.as_deref().map_or(0, |slice| slice.len() as _), lpszterminationdigits.into_param().abi(), dwfirstdigittimeout, dwinterdigittimeout) + lineGatherDigitsA(hcall, dwdigitmodes, ::core::mem::transmute(lpsdigits.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpsdigits.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpszterminationdigits.into_param().abi(), dwfirstdigittimeout, dwinterdigittimeout) } #[inline] pub unsafe fn lineGatherDigitsW(hcall: u32, dwdigitmodes: u32, lpsdigits: ::core::option::Option<&mut [u16]>, lpszterminationdigits: P0, dwfirstdigittimeout: u32, dwinterdigittimeout: u32) -> i32 @@ -323,7 +323,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("tapi32.dll" "system" fn lineGatherDigitsW(hcall : u32, dwdigitmodes : u32, lpsdigits : ::windows_core::PWSTR, dwnumdigits : u32, lpszterminationdigits : ::windows_core::PCWSTR, dwfirstdigittimeout : u32, dwinterdigittimeout : u32) -> i32); - lineGatherDigitsW(hcall, dwdigitmodes, ::core::mem::transmute(lpsdigits.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpsdigits.as_deref().map_or(0, |slice| slice.len() as _), lpszterminationdigits.into_param().abi(), dwfirstdigittimeout, dwinterdigittimeout) + lineGatherDigitsW(hcall, dwdigitmodes, ::core::mem::transmute(lpsdigits.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpsdigits.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpszterminationdigits.into_param().abi(), dwfirstdigittimeout, dwinterdigittimeout) } #[inline] pub unsafe fn lineGenerateDigits(hcall: u32, dwdigitmode: u32, lpszdigits: P0, dwduration: u32) -> i32 @@ -1762,7 +1762,7 @@ impl IEnumAddress { #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, ppelements: &mut [::core::option::Option], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppelements.len() as _, ::core::mem::transmute(ppelements.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), ::core::mem::transmute(ppelements.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -1916,7 +1916,7 @@ pub struct IEnumAgentSession_Vtbl { pub struct IEnumBstr(::windows_core::IUnknown); impl IEnumBstr { pub unsafe fn Next(&self, ppstrings: &mut [::windows_core::BSTR], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppstrings.len() as _, ::core::mem::transmute(ppstrings.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppstrings.len().try_into().unwrap(), ::core::mem::transmute(ppstrings.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -1991,7 +1991,7 @@ impl IEnumCallHub { #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, ppelements: &mut [::core::option::Option], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppelements.len() as _, ::core::mem::transmute(ppelements.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), ::core::mem::transmute(ppelements.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -2067,7 +2067,7 @@ pub struct IEnumCallingCard_Vtbl { pub struct IEnumDialableAddrs(::windows_core::IUnknown); impl IEnumDialableAddrs { pub unsafe fn Next(&self, ppelements: &mut [::windows_core::BSTR], pcfetched: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppelements.len() as _, ::core::mem::transmute(ppelements.as_ptr()), ::core::mem::transmute(pcfetched.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), ::core::mem::transmute(ppelements.as_ptr()), ::core::mem::transmute(pcfetched.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -2103,7 +2103,7 @@ impl IEnumDirectory { #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, ppelements: &mut [::core::option::Option], pcfetched: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppelements.len() as _, ::core::mem::transmute(ppelements.as_ptr()), ::core::mem::transmute(pcfetched.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), ::core::mem::transmute(ppelements.as_ptr()), ::core::mem::transmute(pcfetched.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -2142,7 +2142,7 @@ impl IEnumDirectoryObject { #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, pval: &mut [::core::option::Option], pcfetched: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), pval.len() as _, ::core::mem::transmute(pval.as_ptr()), ::core::mem::transmute(pcfetched.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), pval.len().try_into().unwrap(), ::core::mem::transmute(pval.as_ptr()), ::core::mem::transmute(pcfetched.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -2259,7 +2259,7 @@ impl IEnumPhone { #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, ppelements: &mut [::core::option::Option], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppelements.len() as _, ::core::mem::transmute(ppelements.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), ::core::mem::transmute(ppelements.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -2298,7 +2298,7 @@ impl IEnumPluggableSuperclassInfo { #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, ppelements: &mut [::core::option::Option], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppelements.len() as _, ::core::mem::transmute(ppelements.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), ::core::mem::transmute(ppelements.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -2337,7 +2337,7 @@ impl IEnumPluggableTerminalClassInfo { #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, ppelements: &mut [::core::option::Option], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppelements.len() as _, ::core::mem::transmute(ppelements.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), ::core::mem::transmute(ppelements.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -2530,7 +2530,7 @@ pub struct IEnumTerminal_Vtbl { pub struct IEnumTerminalClass(::windows_core::IUnknown); impl IEnumTerminalClass { pub unsafe fn Next(&self, pelements: &mut [::windows_core::GUID], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), pelements.len() as _, ::core::mem::transmute(pelements.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), pelements.len().try_into().unwrap(), ::core::mem::transmute(pelements.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -4953,7 +4953,7 @@ impl ITCallInfo { (::windows_core::Interface::vtable(self).GetCallInfoBuffer)(::windows_core::Interface::as_raw(self), callinfobuffer, pdwsize, ppcallinfobuffer).ok() } pub unsafe fn SetCallInfoBuffer(&self, callinfobuffer: CALLINFO_BUFFER, pcallinfobuffer: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetCallInfoBuffer)(::windows_core::Interface::as_raw(self), callinfobuffer, pcallinfobuffer.len() as _, ::core::mem::transmute(pcallinfobuffer.as_ptr())).ok() + (::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() } pub unsafe fn ReleaseUserUserInfo(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).ReleaseUserUserInfo)(::windows_core::Interface::as_raw(self)).ok() @@ -5059,7 +5059,7 @@ impl ITCallInfo2 { (::windows_core::Interface::vtable(self).base__.GetCallInfoBuffer)(::windows_core::Interface::as_raw(self), callinfobuffer, pdwsize, ppcallinfobuffer).ok() } pub unsafe fn SetCallInfoBuffer(&self, callinfobuffer: CALLINFO_BUFFER, pcallinfobuffer: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetCallInfoBuffer)(::windows_core::Interface::as_raw(self), callinfobuffer, pcallinfobuffer.len() as _, ::core::mem::transmute(pcallinfobuffer.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.SetCallInfoBuffer)(::windows_core::Interface::as_raw(self), callinfobuffer, pcallinfobuffer.len().try_into().unwrap(), ::core::mem::transmute(pcallinfobuffer.as_ptr())).ok() } pub unsafe fn ReleaseUserUserInfo(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.ReleaseUserUserInfo)(::windows_core::Interface::as_raw(self)).ok() @@ -6492,7 +6492,7 @@ impl ITLegacyAddressMediaControl { where P0: ::windows_core::IntoParam<::windows_core::BSTR>, { - (::windows_core::Interface::vtable(self).SetDevConfig)(::windows_core::Interface::as_raw(self), pdeviceclass.into_param().abi(), pdeviceconfig.len() as _, ::core::mem::transmute(pdeviceconfig.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetDevConfig)(::windows_core::Interface::as_raw(self), pdeviceclass.into_param().abi(), pdeviceconfig.len().try_into().unwrap(), ::core::mem::transmute(pdeviceconfig.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(ITLegacyAddressMediaControl, ::windows_core::IUnknown); @@ -6530,7 +6530,7 @@ impl ITLegacyAddressMediaControl2 { where P0: ::windows_core::IntoParam<::windows_core::BSTR>, { - (::windows_core::Interface::vtable(self).base__.SetDevConfig)(::windows_core::Interface::as_raw(self), pdeviceclass.into_param().abi(), pdeviceconfig.len() as _, ::core::mem::transmute(pdeviceconfig.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.SetDevConfig)(::windows_core::Interface::as_raw(self), pdeviceclass.into_param().abi(), pdeviceconfig.len().try_into().unwrap(), ::core::mem::transmute(pdeviceconfig.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -6548,7 +6548,7 @@ impl ITLegacyAddressMediaControl2 { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::BSTR>, { - (::windows_core::Interface::vtable(self).ConfigDialogEdit)(::windows_core::Interface::as_raw(self), hwndowner.into_param().abi(), pdeviceclass.into_param().abi(), pdeviceconfigin.len() as _, ::core::mem::transmute(pdeviceconfigin.as_ptr()), pdwsizeout, ppdeviceconfigout).ok() + (::windows_core::Interface::vtable(self).ConfigDialogEdit)(::windows_core::Interface::as_raw(self), hwndowner.into_param().abi(), pdeviceclass.into_param().abi(), pdeviceconfigin.len().try_into().unwrap(), ::core::mem::transmute(pdeviceconfigin.as_ptr()), pdwsizeout, ppdeviceconfigout).ok() } } ::windows_core::imp::interface_hierarchy!(ITLegacyAddressMediaControl2, ::windows_core::IUnknown, ITLegacyAddressMediaControl); @@ -6884,7 +6884,7 @@ impl ITMSPAddress { where P0: ::windows_core::IntoParam<::windows_core::IUnknown>, { - (::windows_core::Interface::vtable(self).ReceiveTSPData)(::windows_core::Interface::as_raw(self), pmspcall.into_param().abi(), ::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len() as _).ok() + (::windows_core::Interface::vtable(self).ReceiveTSPData)(::windows_core::Interface::as_raw(self), pmspcall.into_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<()> { (::windows_core::Interface::vtable(self).GetEvent)(::windows_core::Interface::as_raw(self), pdwsize, peventbuffer).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Devices/Usb/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/Usb/mod.rs index 608ed30cea..fb11ef393c 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Usb/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Usb/mod.rs @@ -16,7 +16,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_ControlTransfer(interfacehandle : WINUSB_INTERFACE_HANDLE, setuppacket : WINUSB_SETUP_PACKET, buffer : *mut u8, bufferlength : u32, lengthtransferred : *mut u32, overlapped : *const super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - WinUsb_ControlTransfer(interfacehandle.into_param().abi(), ::core::mem::transmute(setuppacket), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lengthtransferred.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null()))).ok() + WinUsb_ControlTransfer(interfacehandle.into_param().abi(), ::core::mem::transmute(setuppacket), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lengthtransferred.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -93,7 +93,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_GetDescriptor(interfacehandle : WINUSB_INTERFACE_HANDLE, descriptortype : u8, index : u8, languageid : u16, buffer : *mut u8, bufferlength : u32, lengthtransferred : *mut u32) -> super::super::Foundation:: BOOL); - WinUsb_GetDescriptor(interfacehandle.into_param().abi(), descriptortype, index, languageid, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), lengthtransferred).ok() + WinUsb_GetDescriptor(interfacehandle.into_param().abi(), descriptortype, index, languageid, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lengthtransferred).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_IO\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] @@ -191,7 +191,7 @@ where #[inline] pub unsafe fn WinUsb_ReadIsochPipe(bufferhandle: *const ::core::ffi::c_void, offset: u32, length: u32, framenumber: *mut u32, isopacketdescriptors: &mut [USBD_ISO_PACKET_DESCRIPTOR], overlapped: ::core::option::Option<*const super::super::System::IO::OVERLAPPED>) -> ::windows_core::Result<()> { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_ReadIsochPipe(bufferhandle : *const ::core::ffi::c_void, offset : u32, length : u32, framenumber : *mut u32, numberofpackets : u32, isopacketdescriptors : *mut USBD_ISO_PACKET_DESCRIPTOR, overlapped : *const super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - WinUsb_ReadIsochPipe(bufferhandle, offset, length, framenumber, isopacketdescriptors.len() as _, ::core::mem::transmute(isopacketdescriptors.as_ptr()), ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null()))).ok() + WinUsb_ReadIsochPipe(bufferhandle, offset, length, framenumber, isopacketdescriptors.len().try_into().unwrap(), ::core::mem::transmute(isopacketdescriptors.as_ptr()), ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_IO\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] @@ -201,7 +201,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_ReadIsochPipeAsap(bufferhandle : *const ::core::ffi::c_void, offset : u32, length : u32, continuestream : super::super::Foundation:: BOOL, numberofpackets : u32, isopacketdescriptors : *mut USBD_ISO_PACKET_DESCRIPTOR, overlapped : *const super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - WinUsb_ReadIsochPipeAsap(bufferhandle, offset, length, continuestream.into_param().abi(), isopacketdescriptors.len() as _, ::core::mem::transmute(isopacketdescriptors.as_ptr()), ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null()))).ok() + WinUsb_ReadIsochPipeAsap(bufferhandle, offset, length, continuestream.into_param().abi(), isopacketdescriptors.len().try_into().unwrap(), ::core::mem::transmute(isopacketdescriptors.as_ptr()), ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_IO\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] @@ -211,7 +211,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_ReadPipe(interfacehandle : WINUSB_INTERFACE_HANDLE, pipeid : u8, buffer : *mut u8, bufferlength : u32, lengthtransferred : *mut u32, overlapped : *const super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - WinUsb_ReadPipe(interfacehandle.into_param().abi(), pipeid, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lengthtransferred.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null()))).ok() + WinUsb_ReadPipe(interfacehandle.into_param().abi(), pipeid, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lengthtransferred.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -221,7 +221,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_RegisterIsochBuffer(interfacehandle : WINUSB_INTERFACE_HANDLE, pipeid : u8, buffer : *mut u8, bufferlength : u32, isochbufferhandle : *mut *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - WinUsb_RegisterIsochBuffer(interfacehandle.into_param().abi(), pipeid, ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, isochbufferhandle).ok() + WinUsb_RegisterIsochBuffer(interfacehandle.into_param().abi(), pipeid, ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), isochbufferhandle).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -315,7 +315,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_WritePipe(interfacehandle : WINUSB_INTERFACE_HANDLE, pipeid : u8, buffer : *const u8, bufferlength : u32, lengthtransferred : *mut u32, overlapped : *const super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - WinUsb_WritePipe(interfacehandle.into_param().abi(), pipeid, ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, ::core::mem::transmute(lengthtransferred.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null()))).ok() + WinUsb_WritePipe(interfacehandle.into_param().abi(), pipeid, ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ::core::mem::transmute(lengthtransferred.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null()))).ok() } 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 dedc271e9a..9ecf4325cd 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/WebServicesOnDevices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/WebServicesOnDevices/mod.rs @@ -26,7 +26,7 @@ where { ::windows_targets::link!("wsdapi.dll" "system" fn WSDCreateDeviceHost2(pszlocalid : ::windows_core::PCWSTR, pcontext : * mut::core::ffi::c_void, pconfigparams : *const WSD_CONFIG_PARAM, dwconfigparamcount : u32, ppdevicehost : *mut * mut::core::ffi::c_void) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - WSDCreateDeviceHost2(pszlocalid.into_param().abi(), pcontext.into_param().abi(), ::core::mem::transmute(pconfigparams.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pconfigparams.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + WSDCreateDeviceHost2(pszlocalid.into_param().abi(), pcontext.into_param().abi(), ::core::mem::transmute(pconfigparams.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pconfigparams.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } #[inline] pub unsafe fn WSDCreateDeviceHostAdvanced(pszlocalid: P0, pcontext: P1, pphostaddresses: ::core::option::Option<&[::core::option::Option]>) -> ::windows_core::Result @@ -36,7 +36,7 @@ where { ::windows_targets::link!("wsdapi.dll" "system" fn WSDCreateDeviceHostAdvanced(pszlocalid : ::windows_core::PCWSTR, pcontext : * mut::core::ffi::c_void, pphostaddresses : *const * mut::core::ffi::c_void, dwhostaddresscount : u32, ppdevicehost : *mut * mut::core::ffi::c_void) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - WSDCreateDeviceHostAdvanced(pszlocalid.into_param().abi(), pcontext.into_param().abi(), ::core::mem::transmute(pphostaddresses.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pphostaddresses.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + WSDCreateDeviceHostAdvanced(pszlocalid.into_param().abi(), pcontext.into_param().abi(), ::core::mem::transmute(pphostaddresses.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pphostaddresses.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } #[inline] pub unsafe fn WSDCreateDeviceProxy(pszdeviceid: P0, pszlocalid: P1, pcontext: P2) -> ::windows_core::Result @@ -58,7 +58,7 @@ where { ::windows_targets::link!("wsdapi.dll" "system" fn WSDCreateDeviceProxy2(pszdeviceid : ::windows_core::PCWSTR, pszlocalid : ::windows_core::PCWSTR, pcontext : * mut::core::ffi::c_void, pconfigparams : *const WSD_CONFIG_PARAM, dwconfigparamcount : u32, ppdeviceproxy : *mut * mut::core::ffi::c_void) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - WSDCreateDeviceProxy2(pszdeviceid.into_param().abi(), pszlocalid.into_param().abi(), pcontext.into_param().abi(), ::core::mem::transmute(pconfigparams.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pconfigparams.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + WSDCreateDeviceProxy2(pszdeviceid.into_param().abi(), pszlocalid.into_param().abi(), pcontext.into_param().abi(), ::core::mem::transmute(pconfigparams.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pconfigparams.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } #[inline] pub unsafe fn WSDCreateDeviceProxyAdvanced(pszdeviceid: P0, pdeviceaddress: P1, pszlocalid: P2, pcontext: P3) -> ::windows_core::Result @@ -88,7 +88,7 @@ where { ::windows_targets::link!("wsdapi.dll" "system" fn WSDCreateDiscoveryProvider2(pcontext : * mut::core::ffi::c_void, pconfigparams : *const WSD_CONFIG_PARAM, dwconfigparamcount : u32, ppprovider : *mut * mut::core::ffi::c_void) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - WSDCreateDiscoveryProvider2(pcontext.into_param().abi(), ::core::mem::transmute(pconfigparams.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pconfigparams.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + WSDCreateDiscoveryProvider2(pcontext.into_param().abi(), ::core::mem::transmute(pconfigparams.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pconfigparams.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } #[inline] pub unsafe fn WSDCreateDiscoveryPublisher(pcontext: P0) -> ::windows_core::Result @@ -106,7 +106,7 @@ where { ::windows_targets::link!("wsdapi.dll" "system" fn WSDCreateDiscoveryPublisher2(pcontext : * mut::core::ffi::c_void, pconfigparams : *const WSD_CONFIG_PARAM, dwconfigparamcount : u32, pppublisher : *mut * mut::core::ffi::c_void) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - WSDCreateDiscoveryPublisher2(pcontext.into_param().abi(), ::core::mem::transmute(pconfigparams.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pconfigparams.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + WSDCreateDiscoveryPublisher2(pcontext.into_param().abi(), ::core::mem::transmute(pconfigparams.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pconfigparams.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } #[inline] pub unsafe fn WSDCreateHttpAddress() -> ::windows_core::Result { @@ -183,12 +183,12 @@ pub unsafe fn WSDSetConfigurationOption(dwoption: u32, pvoid: *const ::core::ffi #[inline] pub unsafe fn WSDUriDecode(source: &[u16], destout: *mut ::windows_core::PWSTR, cchdestout: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("wsdapi.dll" "system" fn WSDUriDecode(source : ::windows_core::PCWSTR, cchsource : u32, destout : *mut ::windows_core::PWSTR, cchdestout : *mut u32) -> ::windows_core::HRESULT); - WSDUriDecode(::core::mem::transmute(source.as_ptr()), source.len() as _, destout, ::core::mem::transmute(cchdestout.unwrap_or(::std::ptr::null_mut()))).ok() + WSDUriDecode(::core::mem::transmute(source.as_ptr()), source.len().try_into().unwrap(), destout, ::core::mem::transmute(cchdestout.unwrap_or(::std::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WSDUriEncode(source: &[u16], destout: *mut ::windows_core::PWSTR, cchdestout: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("wsdapi.dll" "system" fn WSDUriEncode(source : ::windows_core::PCWSTR, cchsource : u32, destout : *mut ::windows_core::PWSTR, cchdestout : *mut u32) -> ::windows_core::HRESULT); - WSDUriEncode(::core::mem::transmute(source.as_ptr()), source.len() as _, destout, ::core::mem::transmute(cchdestout.unwrap_or(::std::ptr::null_mut()))).ok() + WSDUriEncode(::core::mem::transmute(source.as_ptr()), source.len().try_into().unwrap(), destout, ::core::mem::transmute(cchdestout.unwrap_or(::std::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WSDXMLAddChild(pparent: *mut WSDXML_ELEMENT, pchild: *mut WSDXML_ELEMENT) -> ::windows_core::Result<()> { @@ -248,7 +248,7 @@ impl IWSDAddress { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).Serialize)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszbuffer.as_ptr()), pszbuffer.len() as _, fsafe.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).Serialize)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszbuffer.as_ptr()), pszbuffer.len().try_into().unwrap(), fsafe.into_param().abi()).ok() } pub unsafe fn Deserialize(&self, pszbuffer: P0) -> ::windows_core::Result<()> where @@ -383,7 +383,7 @@ impl IWSDDeviceHost { P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).Init)(::windows_core::Interface::as_raw(self), pszlocalid.into_param().abi(), pcontext.into_param().abi(), ::core::mem::transmute(pphostaddresses.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pphostaddresses.as_deref().map_or(0, |slice| slice.len() as _)).ok() + (::windows_core::Interface::vtable(self).Init)(::windows_core::Interface::as_raw(self), pszlocalid.into_param().abi(), pcontext.into_param().abi(), ::core::mem::transmute(pphostaddresses.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pphostaddresses.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } pub unsafe fn Start(&self, ullinstanceid: u64, pscopelist: *const WSD_URI_LIST, pnotificationsink: P0) -> ::windows_core::Result<()> where @@ -684,7 +684,7 @@ impl IWSDHttpAddress { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.Serialize)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszbuffer.as_ptr()), pszbuffer.len() as _, fsafe.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).base__.base__.Serialize)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszbuffer.as_ptr()), pszbuffer.len().try_into().unwrap(), fsafe.into_param().abi()).ok() } pub unsafe fn Deserialize(&self, pszbuffer: P0) -> ::windows_core::Result<()> where @@ -889,7 +889,7 @@ pub struct IWSDHttpMessageParameters_Vtbl { pub struct IWSDInboundAttachment(::windows_core::IUnknown); impl IWSDInboundAttachment { pub unsafe fn Read(&self, pbuffer: &mut [u8], pdwnumberofbytesread: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Read)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len() as _, pdwnumberofbytesread).ok() + (::windows_core::Interface::vtable(self).Read)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap(), pdwnumberofbytesread).ok() } pub unsafe fn Close(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Close)(::windows_core::Interface::as_raw(self)).ok() @@ -983,7 +983,7 @@ pub struct IWSDOutboundAttachment(::windows_core::IUnknown); impl IWSDOutboundAttachment { pub unsafe fn Write(&self, pbuffer: &[u8]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).Write)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).Write)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn Close(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Close)(::windows_core::Interface::as_raw(self)).ok() @@ -1221,7 +1221,7 @@ impl IWSDServiceProxyEventing { where P0: ::windows_core::IntoParam<::windows_core::IUnknown>, { - (::windows_core::Interface::vtable(self).SubscribeToMultipleOperations)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(poperations.as_ptr()), poperations.len() as _, punknown.into_param().abi(), ::core::mem::transmute(pexpires.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pany.unwrap_or(::std::ptr::null())), ::core::mem::transmute(ppexpires.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppany.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).SubscribeToMultipleOperations)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), punknown.into_param().abi(), ::core::mem::transmute(pexpires.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pany.unwrap_or(::std::ptr::null())), ::core::mem::transmute(ppexpires.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppany.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1232,7 +1232,7 @@ impl IWSDServiceProxyEventing { P2: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).BeginSubscribeToMultipleOperations)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(poperations.as_ptr()), poperations.len() as _, punknown.into_param().abi(), ::core::mem::transmute(pexpires.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pany.unwrap_or(::std::ptr::null())), pasyncstate.into_param().abi(), pasynccallback.into_param().abi(), &mut result__).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.into_param().abi(), ::core::mem::transmute(pexpires.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pany.unwrap_or(::std::ptr::null())), pasyncstate.into_param().abi(), pasynccallback.into_param().abi(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1240,10 +1240,10 @@ impl IWSDServiceProxyEventing { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).EndSubscribeToMultipleOperations)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(poperations.as_ptr()), poperations.len() as _, presult.into_param().abi(), ::core::mem::transmute(ppexpires.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppany.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).EndSubscribeToMultipleOperations)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), presult.into_param().abi(), ::core::mem::transmute(ppexpires.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppany.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn UnsubscribeToMultipleOperations(&self, poperations: &[WSD_OPERATION], pany: *const WSDXML_ELEMENT) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).UnsubscribeToMultipleOperations)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(poperations.as_ptr()), poperations.len() as _, pany).ok() + (::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() } pub unsafe fn BeginUnsubscribeToMultipleOperations(&self, poperations: &[WSD_OPERATION], pany: ::core::option::Option<*const WSDXML_ELEMENT>, pasyncstate: P0, pasynccallback: P1) -> ::windows_core::Result where @@ -1251,18 +1251,18 @@ impl IWSDServiceProxyEventing { P1: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).BeginUnsubscribeToMultipleOperations)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(poperations.as_ptr()), poperations.len() as _, ::core::mem::transmute(pany.unwrap_or(::std::ptr::null())), pasyncstate.into_param().abi(), pasynccallback.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).BeginUnsubscribeToMultipleOperations)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), ::core::mem::transmute(pany.unwrap_or(::std::ptr::null())), pasyncstate.into_param().abi(), pasynccallback.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn EndUnsubscribeToMultipleOperations(&self, poperations: &[WSD_OPERATION], presult: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).EndUnsubscribeToMultipleOperations)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(poperations.as_ptr()), poperations.len() as _, presult.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).EndUnsubscribeToMultipleOperations)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), presult.into_param().abi()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn RenewMultipleOperations(&self, poperations: &[WSD_OPERATION], pexpires: ::core::option::Option<*const WSD_EVENTING_EXPIRES>, pany: ::core::option::Option<*const WSDXML_ELEMENT>, ppexpires: ::core::option::Option<*mut *mut WSD_EVENTING_EXPIRES>, ppany: ::core::option::Option<*mut *mut WSDXML_ELEMENT>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).RenewMultipleOperations)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(poperations.as_ptr()), poperations.len() as _, ::core::mem::transmute(pexpires.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pany.unwrap_or(::std::ptr::null())), ::core::mem::transmute(ppexpires.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppany.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).RenewMultipleOperations)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), ::core::mem::transmute(pexpires.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pany.unwrap_or(::std::ptr::null())), ::core::mem::transmute(ppexpires.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppany.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1272,7 +1272,7 @@ impl IWSDServiceProxyEventing { P1: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).BeginRenewMultipleOperations)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(poperations.as_ptr()), poperations.len() as _, ::core::mem::transmute(pexpires.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pany.unwrap_or(::std::ptr::null())), pasyncstate.into_param().abi(), pasynccallback.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).BeginRenewMultipleOperations)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), ::core::mem::transmute(pexpires.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pany.unwrap_or(::std::ptr::null())), pasyncstate.into_param().abi(), pasynccallback.into_param().abi(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1280,12 +1280,12 @@ impl IWSDServiceProxyEventing { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).EndRenewMultipleOperations)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(poperations.as_ptr()), poperations.len() as _, presult.into_param().abi(), ::core::mem::transmute(ppexpires.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppany.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).EndRenewMultipleOperations)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), presult.into_param().abi(), ::core::mem::transmute(ppexpires.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppany.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetStatusForMultipleOperations(&self, poperations: &[WSD_OPERATION], pany: ::core::option::Option<*const WSDXML_ELEMENT>, ppexpires: ::core::option::Option<*mut *mut WSD_EVENTING_EXPIRES>, ppany: ::core::option::Option<*mut *mut WSDXML_ELEMENT>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetStatusForMultipleOperations)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(poperations.as_ptr()), poperations.len() as _, ::core::mem::transmute(pany.unwrap_or(::std::ptr::null())), ::core::mem::transmute(ppexpires.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppany.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetStatusForMultipleOperations)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), ::core::mem::transmute(pany.unwrap_or(::std::ptr::null())), ::core::mem::transmute(ppexpires.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppany.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn BeginGetStatusForMultipleOperations(&self, poperations: &[WSD_OPERATION], pany: ::core::option::Option<*const WSDXML_ELEMENT>, pasyncstate: P0, pasynccallback: P1) -> ::windows_core::Result where @@ -1293,7 +1293,7 @@ impl IWSDServiceProxyEventing { P1: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).BeginGetStatusForMultipleOperations)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(poperations.as_ptr()), poperations.len() as _, ::core::mem::transmute(pany.unwrap_or(::std::ptr::null())), pasyncstate.into_param().abi(), pasynccallback.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).BeginGetStatusForMultipleOperations)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), ::core::mem::transmute(pany.unwrap_or(::std::ptr::null())), pasyncstate.into_param().abi(), pasynccallback.into_param().abi(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1301,7 +1301,7 @@ impl IWSDServiceProxyEventing { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).EndGetStatusForMultipleOperations)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(poperations.as_ptr()), poperations.len() as _, presult.into_param().abi(), ::core::mem::transmute(ppexpires.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppany.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).EndGetStatusForMultipleOperations)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), presult.into_param().abi(), ::core::mem::transmute(ppexpires.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppany.unwrap_or(::std::ptr::null_mut()))).ok() } } ::windows_core::imp::interface_hierarchy!(IWSDServiceProxyEventing, ::windows_core::IUnknown, IWSDMetadataExchange, IWSDServiceProxy); @@ -1411,7 +1411,7 @@ impl IWSDTransportAddress { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.Serialize)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszbuffer.as_ptr()), pszbuffer.len() as _, fsafe.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).base__.Serialize)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszbuffer.as_ptr()), pszbuffer.len().try_into().unwrap(), fsafe.into_param().abi()).ok() } pub unsafe fn Deserialize(&self, pszbuffer: P0) -> ::windows_core::Result<()> where @@ -1476,7 +1476,7 @@ impl IWSDUdpAddress { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.Serialize)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszbuffer.as_ptr()), pszbuffer.len() as _, fsafe.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).base__.base__.Serialize)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszbuffer.as_ptr()), pszbuffer.len().try_into().unwrap(), fsafe.into_param().abi()).ok() } pub unsafe fn Deserialize(&self, pszbuffer: P0) -> ::windows_core::Result<()> where @@ -1652,10 +1652,10 @@ impl IWSDXMLContext { (::windows_core::Interface::vtable(self).AddNameToNamespace)(::windows_core::Interface::as_raw(self), pszuri.into_param().abi(), pszname.into_param().abi(), ::core::mem::transmute(ppname.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetNamespaces(&self, pnamespaces: &[*const WSDXML_NAMESPACE], blayernumber: u8) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetNamespaces)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pnamespaces.as_ptr()), pnamespaces.len() as _, blayernumber).ok() + (::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() } pub unsafe fn SetTypes(&self, ptypes: &[*const WSDXML_TYPE], blayernumber: u8) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetTypes)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ptypes.as_ptr()), ptypes.len() as _, blayernumber).ok() + (::windows_core::Interface::vtable(self).SetTypes)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ptypes.as_ptr()), ptypes.len().try_into().unwrap(), blayernumber).ok() } } ::windows_core::imp::interface_hierarchy!(IWSDXMLContext, ::windows_core::IUnknown); diff --git a/crates/libs/windows/src/Windows/Win32/Foundation/mod.rs b/crates/libs/windows/src/Windows/Win32/Foundation/mod.rs index 48bcba00d8..6afa61d4f6 100644 --- a/crates/libs/windows/src/Windows/Win32/Foundation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Foundation/mod.rs @@ -110,12 +110,12 @@ where #[inline] pub unsafe fn SysAllocStringByteLen(psz: ::core::option::Option<&[u8]>) -> ::windows_core::BSTR { ::windows_targets::link!("oleaut32.dll" "system" fn SysAllocStringByteLen(psz : ::windows_core::PCSTR, len : u32) -> ::windows_core::BSTR); - SysAllocStringByteLen(::core::mem::transmute(psz.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), psz.as_deref().map_or(0, |slice| slice.len() as _)) + SysAllocStringByteLen(::core::mem::transmute(psz.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), psz.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn SysAllocStringLen(strin: ::core::option::Option<&[u16]>) -> ::windows_core::BSTR { ::windows_targets::link!("oleaut32.dll" "system" fn SysAllocStringLen(strin : ::windows_core::PCWSTR, ui : u32) -> ::windows_core::BSTR); - SysAllocStringLen(::core::mem::transmute(strin.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), strin.as_deref().map_or(0, |slice| slice.len() as _)) + SysAllocStringLen(::core::mem::transmute(strin.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), strin.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn SysFreeString(bstrstring: P0) diff --git a/crates/libs/windows/src/Windows/Win32/Gaming/mod.rs b/crates/libs/windows/src/Windows/Win32/Gaming/mod.rs index 7ce2abf87d..6e3cf0e30d 100644 --- a/crates/libs/windows/src/Windows/Win32/Gaming/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Gaming/mod.rs @@ -146,7 +146,7 @@ where #[inline] pub unsafe fn ShowPlayerPickerUI(promptdisplaytext: &::windows_core::HSTRING, xuids: &[::windows_core::HSTRING], preselectedxuids: ::core::option::Option<&[::windows_core::HSTRING]>, minselectioncount: usize, maxselectioncount: usize, completionroutine: PlayerPickerUICompletionRoutine, context: ::core::option::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 : ::std::mem::MaybeUninit <::windows_core::HSTRING >, xuids : *const ::std::mem::MaybeUninit <::windows_core::HSTRING >, xuidscount : usize, preselectedxuids : *const ::std::mem::MaybeUninit <::windows_core::HSTRING >, preselectedxuidscount : usize, minselectioncount : usize, maxselectioncount : usize, completionroutine : PlayerPickerUICompletionRoutine, context : *const ::core::ffi::c_void) -> ::windows_core::HRESULT); - ShowPlayerPickerUI(::core::mem::transmute_copy(promptdisplaytext), ::core::mem::transmute(xuids.as_ptr()), xuids.len() as _, ::core::mem::transmute(preselectedxuids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), preselectedxuids.as_deref().map_or(0, |slice| slice.len() as _), minselectioncount, maxselectioncount, completionroutine, ::core::mem::transmute(context.unwrap_or(::std::ptr::null()))).ok() + ShowPlayerPickerUI(::core::mem::transmute_copy(promptdisplaytext), ::core::mem::transmute(xuids.as_ptr()), xuids.len().try_into().unwrap(), ::core::mem::transmute(preselectedxuids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), preselectedxuids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), minselectioncount, maxselectioncount, completionroutine, ::core::mem::transmute(context.unwrap_or(::std::ptr::null()))).ok() } #[inline] pub unsafe fn ShowPlayerPickerUIForUser(user: P0, promptdisplaytext: &::windows_core::HSTRING, xuids: &[::windows_core::HSTRING], preselectedxuids: ::core::option::Option<&[::windows_core::HSTRING]>, minselectioncount: usize, maxselectioncount: usize, completionroutine: PlayerPickerUICompletionRoutine, context: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> @@ -154,7 +154,7 @@ where P0: ::windows_core::IntoParam<::windows_core::IInspectable>, { ::windows_targets::link!("api-ms-win-gaming-tcui-l1-1-2.dll" "system" fn ShowPlayerPickerUIForUser(user : * mut::core::ffi::c_void, promptdisplaytext : ::std::mem::MaybeUninit <::windows_core::HSTRING >, xuids : *const ::std::mem::MaybeUninit <::windows_core::HSTRING >, xuidscount : usize, preselectedxuids : *const ::std::mem::MaybeUninit <::windows_core::HSTRING >, preselectedxuidscount : usize, minselectioncount : usize, maxselectioncount : usize, completionroutine : PlayerPickerUICompletionRoutine, context : *const ::core::ffi::c_void) -> ::windows_core::HRESULT); - ShowPlayerPickerUIForUser(user.into_param().abi(), ::core::mem::transmute_copy(promptdisplaytext), ::core::mem::transmute(xuids.as_ptr()), xuids.len() as _, ::core::mem::transmute(preselectedxuids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), preselectedxuids.as_deref().map_or(0, |slice| slice.len() as _), minselectioncount, maxselectioncount, completionroutine, ::core::mem::transmute(context.unwrap_or(::std::ptr::null()))).ok() + ShowPlayerPickerUIForUser(user.into_param().abi(), ::core::mem::transmute_copy(promptdisplaytext), ::core::mem::transmute(xuids.as_ptr()), xuids.len().try_into().unwrap(), ::core::mem::transmute(preselectedxuids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), preselectedxuids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), minselectioncount, maxselectioncount, completionroutine, ::core::mem::transmute(context.unwrap_or(::std::ptr::null()))).ok() } #[inline] pub unsafe fn ShowProfileCardUI(targetuserxuid: &::windows_core::HSTRING, completionroutine: GameUICompletionRoutine, context: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> { @@ -454,7 +454,7 @@ impl IXblIdpAuthManager { P7: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).GetTokenAndSignatureWithTokenResult)(::windows_core::Interface::as_raw(self), msaaccountid.into_param().abi(), appsid.into_param().abi(), msatarget.into_param().abi(), msapolicy.into_param().abi(), httpmethod.into_param().abi(), uri.into_param().abi(), headers.into_param().abi(), ::core::mem::transmute(body.as_ptr()), body.len() as _, forcerefresh.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).GetTokenAndSignatureWithTokenResult)(::windows_core::Interface::as_raw(self), msaaccountid.into_param().abi(), appsid.into_param().abi(), msatarget.into_param().abi(), msapolicy.into_param().abi(), httpmethod.into_param().abi(), uri.into_param().abi(), headers.into_param().abi(), ::core::mem::transmute(body.as_ptr()), body.len().try_into().unwrap(), forcerefresh.into_param().abi(), &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IXblIdpAuthManager, ::windows_core::IUnknown); @@ -495,7 +495,7 @@ impl IXblIdpAuthManager2 { P6: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).GetUserlessTokenAndSignatureWithTokenResult)(::windows_core::Interface::as_raw(self), appsid.into_param().abi(), msatarget.into_param().abi(), msapolicy.into_param().abi(), httpmethod.into_param().abi(), uri.into_param().abi(), headers.into_param().abi(), ::core::mem::transmute(body.as_ptr()), body.len() as _, forcerefresh.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).GetUserlessTokenAndSignatureWithTokenResult)(::windows_core::Interface::as_raw(self), appsid.into_param().abi(), msatarget.into_param().abi(), msapolicy.into_param().abi(), httpmethod.into_param().abi(), uri.into_param().abi(), headers.into_param().abi(), ::core::mem::transmute(body.as_ptr()), body.len().try_into().unwrap(), forcerefresh.into_param().abi(), &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IXblIdpAuthManager2, ::windows_core::IUnknown); diff --git a/crates/libs/windows/src/Windows/Win32/Globalization/mod.rs b/crates/libs/windows/src/Windows/Win32/Globalization/mod.rs index 18193134e9..bf5d5d3d20 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 CompareStringA(locale: u32, dwcmpflags: u32, lpstring1: &[i8], lpstring2: &[i8]) -> COMPARESTRING_RESULT { ::windows_targets::link!("kernel32.dll" "system" fn CompareStringA(locale : u32, dwcmpflags : u32, lpstring1 : *const i8, cchcount1 : i32, lpstring2 : *const i8, cchcount2 : i32) -> COMPARESTRING_RESULT); - CompareStringA(locale, dwcmpflags, ::core::mem::transmute(lpstring1.as_ptr()), lpstring1.len() as _, ::core::mem::transmute(lpstring2.as_ptr()), lpstring2.len() as _) + CompareStringA(locale, dwcmpflags, ::core::mem::transmute(lpstring1.as_ptr()), lpstring1.len().try_into().unwrap(), ::core::mem::transmute(lpstring2.as_ptr()), lpstring2.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -12,7 +12,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn CompareStringEx(lplocalename : ::windows_core::PCWSTR, dwcmpflags : COMPARE_STRING_FLAGS, lpstring1 : ::windows_core::PCWSTR, cchcount1 : i32, lpstring2 : ::windows_core::PCWSTR, cchcount2 : i32, lpversioninformation : *const NLSVERSIONINFO, lpreserved : *const ::core::ffi::c_void, lparam : super::Foundation:: LPARAM) -> COMPARESTRING_RESULT); - CompareStringEx(lplocalename.into_param().abi(), dwcmpflags, ::core::mem::transmute(lpstring1.as_ptr()), lpstring1.len() as _, ::core::mem::transmute(lpstring2.as_ptr()), lpstring2.len() as _, ::core::mem::transmute(lpversioninformation.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null())), lparam.into_param().abi()) + CompareStringEx(lplocalename.into_param().abi(), dwcmpflags, ::core::mem::transmute(lpstring1.as_ptr()), lpstring1.len().try_into().unwrap(), ::core::mem::transmute(lpstring2.as_ptr()), lpstring2.len().try_into().unwrap(), ::core::mem::transmute(lpversioninformation.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null())), lparam.into_param().abi()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -22,12 +22,12 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn CompareStringOrdinal(lpstring1 : ::windows_core::PCWSTR, cchcount1 : i32, lpstring2 : ::windows_core::PCWSTR, cchcount2 : i32, bignorecase : super::Foundation:: BOOL) -> COMPARESTRING_RESULT); - CompareStringOrdinal(::core::mem::transmute(lpstring1.as_ptr()), lpstring1.len() as _, ::core::mem::transmute(lpstring2.as_ptr()), lpstring2.len() as _, bignorecase.into_param().abi()) + CompareStringOrdinal(::core::mem::transmute(lpstring1.as_ptr()), lpstring1.len().try_into().unwrap(), ::core::mem::transmute(lpstring2.as_ptr()), lpstring2.len().try_into().unwrap(), bignorecase.into_param().abi()) } #[inline] pub unsafe fn CompareStringW(locale: u32, dwcmpflags: u32, lpstring1: &[u16], lpstring2: &[u16]) -> COMPARESTRING_RESULT { ::windows_targets::link!("kernel32.dll" "system" fn CompareStringW(locale : u32, dwcmpflags : u32, lpstring1 : ::windows_core::PCWSTR, cchcount1 : i32, lpstring2 : ::windows_core::PCWSTR, cchcount2 : i32) -> COMPARESTRING_RESULT); - CompareStringW(locale, dwcmpflags, ::core::mem::transmute(lpstring1.as_ptr()), lpstring1.len() as _, ::core::mem::transmute(lpstring2.as_ptr()), lpstring2.len() as _) + CompareStringW(locale, dwcmpflags, ::core::mem::transmute(lpstring1.as_ptr()), lpstring1.len().try_into().unwrap(), ::core::mem::transmute(lpstring2.as_ptr()), lpstring2.len().try_into().unwrap()) } #[inline] pub unsafe fn ConvertDefaultLocale(locale: u32) -> u32 { @@ -238,7 +238,7 @@ pub unsafe fn EnumUILanguagesW(lpuilanguageenumproc: UILANGUAGE_ENUMPROCW, dwfla #[inline] pub unsafe fn FindNLSString(locale: u32, dwfindnlsstringflags: u32, lpstringsource: &[u16], lpstringvalue: &[u16], pcchfound: ::core::option::Option<*mut i32>) -> i32 { ::windows_targets::link!("kernel32.dll" "system" fn FindNLSString(locale : u32, dwfindnlsstringflags : u32, lpstringsource : ::windows_core::PCWSTR, cchsource : i32, lpstringvalue : ::windows_core::PCWSTR, cchvalue : i32, pcchfound : *mut i32) -> i32); - FindNLSString(locale, dwfindnlsstringflags, ::core::mem::transmute(lpstringsource.as_ptr()), lpstringsource.len() as _, ::core::mem::transmute(lpstringvalue.as_ptr()), lpstringvalue.len() as _, ::core::mem::transmute(pcchfound.unwrap_or(::std::ptr::null_mut()))) + FindNLSString(locale, dwfindnlsstringflags, ::core::mem::transmute(lpstringsource.as_ptr()), lpstringsource.len().try_into().unwrap(), ::core::mem::transmute(lpstringvalue.as_ptr()), lpstringvalue.len().try_into().unwrap(), ::core::mem::transmute(pcchfound.unwrap_or(::std::ptr::null_mut()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -249,7 +249,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn FindNLSStringEx(lplocalename : ::windows_core::PCWSTR, dwfindnlsstringflags : u32, lpstringsource : ::windows_core::PCWSTR, cchsource : i32, lpstringvalue : ::windows_core::PCWSTR, cchvalue : i32, pcchfound : *mut i32, lpversioninformation : *const NLSVERSIONINFO, lpreserved : *const ::core::ffi::c_void, sorthandle : super::Foundation:: LPARAM) -> i32); - FindNLSStringEx(lplocalename.into_param().abi(), dwfindnlsstringflags, ::core::mem::transmute(lpstringsource.as_ptr()), lpstringsource.len() as _, ::core::mem::transmute(lpstringvalue.as_ptr()), lpstringvalue.len() as _, ::core::mem::transmute(pcchfound.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpversioninformation.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null())), sorthandle.into_param().abi()) + FindNLSStringEx(lplocalename.into_param().abi(), dwfindnlsstringflags, ::core::mem::transmute(lpstringsource.as_ptr()), lpstringsource.len().try_into().unwrap(), ::core::mem::transmute(lpstringvalue.as_ptr()), lpstringvalue.len().try_into().unwrap(), ::core::mem::transmute(pcchfound.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpversioninformation.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null())), sorthandle.into_param().abi()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -259,17 +259,17 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn FindStringOrdinal(dwfindstringordinalflags : u32, lpstringsource : ::windows_core::PCWSTR, cchsource : i32, lpstringvalue : ::windows_core::PCWSTR, cchvalue : i32, bignorecase : super::Foundation:: BOOL) -> i32); - FindStringOrdinal(dwfindstringordinalflags, ::core::mem::transmute(lpstringsource.as_ptr()), lpstringsource.len() as _, ::core::mem::transmute(lpstringvalue.as_ptr()), lpstringvalue.len() as _, bignorecase.into_param().abi()) + FindStringOrdinal(dwfindstringordinalflags, ::core::mem::transmute(lpstringsource.as_ptr()), lpstringsource.len().try_into().unwrap(), ::core::mem::transmute(lpstringvalue.as_ptr()), lpstringvalue.len().try_into().unwrap(), bignorecase.into_param().abi()) } #[inline] pub unsafe fn FoldStringA(dwmapflags: FOLD_STRING_MAP_FLAGS, lpsrcstr: &[u8], lpdeststr: ::core::option::Option<&mut [u8]>) -> i32 { ::windows_targets::link!("kernel32.dll" "system" fn FoldStringA(dwmapflags : FOLD_STRING_MAP_FLAGS, lpsrcstr : ::windows_core::PCSTR, cchsrc : i32, lpdeststr : ::windows_core::PSTR, cchdest : i32) -> i32); - FoldStringA(dwmapflags, ::core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len() as _, ::core::mem::transmute(lpdeststr.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpdeststr.as_deref().map_or(0, |slice| slice.len() as _)) + FoldStringA(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())) } #[inline] pub unsafe fn FoldStringW(dwmapflags: FOLD_STRING_MAP_FLAGS, lpsrcstr: &[u16], lpdeststr: ::core::option::Option<&mut [u16]>) -> i32 { ::windows_targets::link!("kernel32.dll" "system" fn FoldStringW(dwmapflags : FOLD_STRING_MAP_FLAGS, lpsrcstr : ::windows_core::PCWSTR, cchsrc : i32, lpdeststr : ::windows_core::PWSTR, cchdest : i32) -> i32); - FoldStringW(dwmapflags, ::core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len() as _, ::core::mem::transmute(lpdeststr.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpdeststr.as_deref().map_or(0, |slice| slice.len() as _)) + FoldStringW(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())) } #[inline] pub unsafe fn GetACP() -> u32 { @@ -300,7 +300,7 @@ pub unsafe fn GetCPInfoExW(codepage: u32, dwflags: u32, lpcpinfoex: *mut CPINFOE #[inline] pub unsafe fn GetCalendarInfoA(locale: u32, calendar: u32, caltype: u32, lpcaldata: ::core::option::Option<&mut [u8]>, lpvalue: ::core::option::Option<*mut u32>) -> i32 { ::windows_targets::link!("kernel32.dll" "system" fn GetCalendarInfoA(locale : u32, calendar : u32, caltype : u32, lpcaldata : ::windows_core::PSTR, cchdata : i32, lpvalue : *mut u32) -> i32); - GetCalendarInfoA(locale, calendar, caltype, ::core::mem::transmute(lpcaldata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpcaldata.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpvalue.unwrap_or(::std::ptr::null_mut()))) + GetCalendarInfoA(locale, calendar, caltype, ::core::mem::transmute(lpcaldata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpcaldata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpvalue.unwrap_or(::std::ptr::null_mut()))) } #[inline] pub unsafe fn GetCalendarInfoEx(lplocalename: P0, calendar: u32, lpreserved: P1, caltype: u32, lpcaldata: ::core::option::Option<&mut [u16]>, lpvalue: ::core::option::Option<*mut u32>) -> i32 @@ -309,12 +309,12 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetCalendarInfoEx(lplocalename : ::windows_core::PCWSTR, calendar : u32, lpreserved : ::windows_core::PCWSTR, caltype : u32, lpcaldata : ::windows_core::PWSTR, cchdata : i32, lpvalue : *mut u32) -> i32); - GetCalendarInfoEx(lplocalename.into_param().abi(), calendar, lpreserved.into_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() as _), ::core::mem::transmute(lpvalue.unwrap_or(::std::ptr::null_mut()))) + GetCalendarInfoEx(lplocalename.into_param().abi(), calendar, lpreserved.into_param().abi(), caltype, ::core::mem::transmute(lpcaldata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpcaldata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpvalue.unwrap_or(::std::ptr::null_mut()))) } #[inline] pub unsafe fn GetCalendarInfoW(locale: u32, calendar: u32, caltype: u32, lpcaldata: ::core::option::Option<&mut [u16]>, lpvalue: ::core::option::Option<*mut u32>) -> i32 { ::windows_targets::link!("kernel32.dll" "system" fn GetCalendarInfoW(locale : u32, calendar : u32, caltype : u32, lpcaldata : ::windows_core::PWSTR, cchdata : i32, lpvalue : *mut u32) -> i32); - GetCalendarInfoW(locale, calendar, caltype, ::core::mem::transmute(lpcaldata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpcaldata.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpvalue.unwrap_or(::std::ptr::null_mut()))) + GetCalendarInfoW(locale, calendar, caltype, ::core::mem::transmute(lpcaldata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpcaldata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpvalue.unwrap_or(::std::ptr::null_mut()))) } #[inline] pub unsafe fn GetCurrencyFormatA(locale: u32, dwflags: u32, lpvalue: P0, lpformat: ::core::option::Option<*const CURRENCYFMTA>, lpcurrencystr: ::core::option::Option<&mut [u8]>) -> i32 @@ -322,7 +322,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetCurrencyFormatA(locale : u32, dwflags : u32, lpvalue : ::windows_core::PCSTR, lpformat : *const CURRENCYFMTA, lpcurrencystr : ::windows_core::PSTR, cchcurrency : i32) -> i32); - GetCurrencyFormatA(locale, dwflags, lpvalue.into_param().abi(), ::core::mem::transmute(lpformat.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpcurrencystr.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpcurrencystr.as_deref().map_or(0, |slice| slice.len() as _)) + GetCurrencyFormatA(locale, dwflags, lpvalue.into_param().abi(), ::core::mem::transmute(lpformat.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpcurrencystr.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpcurrencystr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetCurrencyFormatEx(lplocalename: P0, dwflags: u32, lpvalue: P1, lpformat: ::core::option::Option<*const CURRENCYFMTW>, lpcurrencystr: ::core::option::Option<&mut [u16]>) -> i32 @@ -331,7 +331,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetCurrencyFormatEx(lplocalename : ::windows_core::PCWSTR, dwflags : u32, lpvalue : ::windows_core::PCWSTR, lpformat : *const CURRENCYFMTW, lpcurrencystr : ::windows_core::PWSTR, cchcurrency : i32) -> i32); - GetCurrencyFormatEx(lplocalename.into_param().abi(), dwflags, lpvalue.into_param().abi(), ::core::mem::transmute(lpformat.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpcurrencystr.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpcurrencystr.as_deref().map_or(0, |slice| slice.len() as _)) + GetCurrencyFormatEx(lplocalename.into_param().abi(), dwflags, lpvalue.into_param().abi(), ::core::mem::transmute(lpformat.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpcurrencystr.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpcurrencystr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetCurrencyFormatW(locale: u32, dwflags: u32, lpvalue: P0, lpformat: ::core::option::Option<*const CURRENCYFMTW>, lpcurrencystr: ::core::option::Option<&mut [u16]>) -> i32 @@ -339,7 +339,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetCurrencyFormatW(locale : u32, dwflags : u32, lpvalue : ::windows_core::PCWSTR, lpformat : *const CURRENCYFMTW, lpcurrencystr : ::windows_core::PWSTR, cchcurrency : i32) -> i32); - GetCurrencyFormatW(locale, dwflags, lpvalue.into_param().abi(), ::core::mem::transmute(lpformat.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpcurrencystr.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpcurrencystr.as_deref().map_or(0, |slice| slice.len() as _)) + GetCurrencyFormatW(locale, dwflags, lpvalue.into_param().abi(), ::core::mem::transmute(lpformat.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpcurrencystr.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpcurrencystr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -349,7 +349,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetDateFormatA(locale : u32, dwflags : u32, lpdate : *const super::Foundation:: SYSTEMTIME, lpformat : ::windows_core::PCSTR, lpdatestr : ::windows_core::PSTR, cchdate : i32) -> i32); - GetDateFormatA(locale, dwflags, ::core::mem::transmute(lpdate.unwrap_or(::std::ptr::null())), lpformat.into_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() as _)) + GetDateFormatA(locale, dwflags, ::core::mem::transmute(lpdate.unwrap_or(::std::ptr::null())), lpformat.into_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())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -361,7 +361,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetDateFormatEx(lplocalename : ::windows_core::PCWSTR, dwflags : ENUM_DATE_FORMATS_FLAGS, lpdate : *const super::Foundation:: SYSTEMTIME, lpformat : ::windows_core::PCWSTR, lpdatestr : ::windows_core::PWSTR, cchdate : i32, lpcalendar : ::windows_core::PCWSTR) -> i32); - GetDateFormatEx(lplocalename.into_param().abi(), dwflags, ::core::mem::transmute(lpdate.unwrap_or(::std::ptr::null())), lpformat.into_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() as _), lpcalendar.into_param().abi()) + GetDateFormatEx(lplocalename.into_param().abi(), dwflags, ::core::mem::transmute(lpdate.unwrap_or(::std::ptr::null())), lpformat.into_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.into_param().abi()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -371,7 +371,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetDateFormatW(locale : u32, dwflags : u32, lpdate : *const super::Foundation:: SYSTEMTIME, lpformat : ::windows_core::PCWSTR, lpdatestr : ::windows_core::PWSTR, cchdate : i32) -> i32); - GetDateFormatW(locale, dwflags, ::core::mem::transmute(lpdate.unwrap_or(::std::ptr::null())), lpformat.into_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() as _)) + GetDateFormatW(locale, dwflags, ::core::mem::transmute(lpdate.unwrap_or(::std::ptr::null())), lpformat.into_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 @@ -391,7 +391,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetDurationFormat(locale : u32, dwflags : u32, lpduration : *const super::Foundation:: SYSTEMTIME, ullduration : u64, lpformat : ::windows_core::PCWSTR, lpdurationstr : ::windows_core::PWSTR, cchduration : i32) -> i32); - GetDurationFormat(locale, dwflags, ::core::mem::transmute(lpduration.unwrap_or(::std::ptr::null())), ullduration, lpformat.into_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() as _)) + GetDurationFormat(locale, dwflags, ::core::mem::transmute(lpduration.unwrap_or(::std::ptr::null())), ullduration, lpformat.into_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())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -402,7 +402,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetDurationFormatEx(lplocalename : ::windows_core::PCWSTR, dwflags : u32, lpduration : *const super::Foundation:: SYSTEMTIME, ullduration : u64, lpformat : ::windows_core::PCWSTR, lpdurationstr : ::windows_core::PWSTR, cchduration : i32) -> i32); - GetDurationFormatEx(lplocalename.into_param().abi(), dwflags, ::core::mem::transmute(lpduration.unwrap_or(::std::ptr::null())), ullduration, lpformat.into_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() as _)) + GetDurationFormatEx(lplocalename.into_param().abi(), dwflags, ::core::mem::transmute(lpduration.unwrap_or(::std::ptr::null())), ullduration, lpformat.into_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())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -427,7 +427,7 @@ where #[inline] pub unsafe fn GetGeoInfoA(location: i32, geotype: SYSGEOTYPE, lpgeodata: ::core::option::Option<&mut [u8]>, langid: u16) -> i32 { ::windows_targets::link!("kernel32.dll" "system" fn GetGeoInfoA(location : i32, geotype : SYSGEOTYPE, lpgeodata : ::windows_core::PSTR, cchdata : i32, langid : u16) -> i32); - GetGeoInfoA(location, geotype, ::core::mem::transmute(lpgeodata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpgeodata.as_deref().map_or(0, |slice| slice.len() as _), langid) + GetGeoInfoA(location, geotype, ::core::mem::transmute(lpgeodata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpgeodata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), langid) } #[inline] pub unsafe fn GetGeoInfoEx(location: P0, geotype: SYSGEOTYPE, geodata: ::core::option::Option<&mut [u16]>) -> i32 @@ -435,17 +435,17 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetGeoInfoEx(location : ::windows_core::PCWSTR, geotype : SYSGEOTYPE, geodata : ::windows_core::PWSTR, geodatacount : i32) -> i32); - GetGeoInfoEx(location.into_param().abi(), geotype, ::core::mem::transmute(geodata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), geodata.as_deref().map_or(0, |slice| slice.len() as _)) + GetGeoInfoEx(location.into_param().abi(), geotype, ::core::mem::transmute(geodata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), geodata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetGeoInfoW(location: i32, geotype: SYSGEOTYPE, lpgeodata: ::core::option::Option<&mut [u16]>, langid: u16) -> i32 { ::windows_targets::link!("kernel32.dll" "system" fn GetGeoInfoW(location : i32, geotype : SYSGEOTYPE, lpgeodata : ::windows_core::PWSTR, cchdata : i32, langid : u16) -> i32); - GetGeoInfoW(location, geotype, ::core::mem::transmute(lpgeodata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpgeodata.as_deref().map_or(0, |slice| slice.len() as _), langid) + GetGeoInfoW(location, geotype, ::core::mem::transmute(lpgeodata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpgeodata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), langid) } #[inline] pub unsafe fn GetLocaleInfoA(locale: u32, lctype: u32, lplcdata: ::core::option::Option<&mut [u8]>) -> i32 { ::windows_targets::link!("kernel32.dll" "system" fn GetLocaleInfoA(locale : u32, lctype : u32, lplcdata : ::windows_core::PSTR, cchdata : i32) -> i32); - GetLocaleInfoA(locale, lctype, ::core::mem::transmute(lplcdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lplcdata.as_deref().map_or(0, |slice| slice.len() as _)) + GetLocaleInfoA(locale, lctype, ::core::mem::transmute(lplcdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lplcdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetLocaleInfoEx(lplocalename: P0, lctype: u32, lplcdata: ::core::option::Option<&mut [u16]>) -> i32 @@ -453,12 +453,12 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetLocaleInfoEx(lplocalename : ::windows_core::PCWSTR, lctype : u32, lplcdata : ::windows_core::PWSTR, cchdata : i32) -> i32); - GetLocaleInfoEx(lplocalename.into_param().abi(), lctype, ::core::mem::transmute(lplcdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lplcdata.as_deref().map_or(0, |slice| slice.len() as _)) + GetLocaleInfoEx(lplocalename.into_param().abi(), lctype, ::core::mem::transmute(lplcdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lplcdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetLocaleInfoW(locale: u32, lctype: u32, lplcdata: ::core::option::Option<&mut [u16]>) -> i32 { ::windows_targets::link!("kernel32.dll" "system" fn GetLocaleInfoW(locale : u32, lctype : u32, lplcdata : ::windows_core::PWSTR, cchdata : i32) -> i32); - GetLocaleInfoW(locale, lctype, ::core::mem::transmute(lplcdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lplcdata.as_deref().map_or(0, |slice| slice.len() as _)) + GetLocaleInfoW(locale, lctype, ::core::mem::transmute(lplcdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lplcdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -483,7 +483,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetNumberFormatA(locale : u32, dwflags : u32, lpvalue : ::windows_core::PCSTR, lpformat : *const NUMBERFMTA, lpnumberstr : ::windows_core::PSTR, cchnumber : i32) -> i32); - GetNumberFormatA(locale, dwflags, lpvalue.into_param().abi(), ::core::mem::transmute(lpformat.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpnumberstr.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpnumberstr.as_deref().map_or(0, |slice| slice.len() as _)) + GetNumberFormatA(locale, dwflags, lpvalue.into_param().abi(), ::core::mem::transmute(lpformat.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpnumberstr.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpnumberstr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetNumberFormatEx(lplocalename: P0, dwflags: u32, lpvalue: P1, lpformat: ::core::option::Option<*const NUMBERFMTW>, lpnumberstr: ::core::option::Option<&mut [u16]>) -> i32 @@ -492,7 +492,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetNumberFormatEx(lplocalename : ::windows_core::PCWSTR, dwflags : u32, lpvalue : ::windows_core::PCWSTR, lpformat : *const NUMBERFMTW, lpnumberstr : ::windows_core::PWSTR, cchnumber : i32) -> i32); - GetNumberFormatEx(lplocalename.into_param().abi(), dwflags, lpvalue.into_param().abi(), ::core::mem::transmute(lpformat.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpnumberstr.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpnumberstr.as_deref().map_or(0, |slice| slice.len() as _)) + GetNumberFormatEx(lplocalename.into_param().abi(), dwflags, lpvalue.into_param().abi(), ::core::mem::transmute(lpformat.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpnumberstr.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpnumberstr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetNumberFormatW(locale: u32, dwflags: u32, lpvalue: P0, lpformat: ::core::option::Option<*const NUMBERFMTW>, lpnumberstr: ::core::option::Option<&mut [u16]>) -> i32 @@ -500,7 +500,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetNumberFormatW(locale : u32, dwflags : u32, lpvalue : ::windows_core::PCWSTR, lpformat : *const NUMBERFMTW, lpnumberstr : ::windows_core::PWSTR, cchnumber : i32) -> i32); - GetNumberFormatW(locale, dwflags, lpvalue.into_param().abi(), ::core::mem::transmute(lpformat.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpnumberstr.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpnumberstr.as_deref().map_or(0, |slice| slice.len() as _)) + GetNumberFormatW(locale, dwflags, lpvalue.into_param().abi(), ::core::mem::transmute(lpformat.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpnumberstr.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpnumberstr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetOEMCP() -> u32 { @@ -520,14 +520,14 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetStringScripts(dwflags : u32, lpstring : ::windows_core::PCWSTR, cchstring : i32, lpscripts : ::windows_core::PWSTR, cchscripts : i32) -> i32); - GetStringScripts(dwflags, lpstring.into_param().abi(), cchstring, ::core::mem::transmute(lpscripts.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpscripts.as_deref().map_or(0, |slice| slice.len() as _)) + GetStringScripts(dwflags, lpstring.into_param().abi(), cchstring, ::core::mem::transmute(lpscripts.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpscripts.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[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); - GetStringTypeA(locale, dwinfotype, ::core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len() as _, lpchartype).ok() + GetStringTypeA(locale, dwinfotype, ::core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len().try_into().unwrap(), lpchartype).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -554,7 +554,7 @@ where #[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); - GetStringTypeW(dwinfotype, ::core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len() as _, lpchartype).ok() + GetStringTypeW(dwinfotype, ::core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len().try_into().unwrap(), lpchartype).ok() } #[inline] pub unsafe fn GetSystemDefaultLCID() -> u32 { @@ -569,7 +569,7 @@ pub unsafe fn GetSystemDefaultLangID() -> u16 { #[inline] pub unsafe fn GetSystemDefaultLocaleName(lplocalename: &mut [u16]) -> i32 { ::windows_targets::link!("kernel32.dll" "system" fn GetSystemDefaultLocaleName(lplocalename : ::windows_core::PWSTR, cchlocalename : i32) -> i32); - GetSystemDefaultLocaleName(::core::mem::transmute(lplocalename.as_ptr()), lplocalename.len() as _) + GetSystemDefaultLocaleName(::core::mem::transmute(lplocalename.as_ptr()), lplocalename.len().try_into().unwrap()) } #[inline] pub unsafe fn GetSystemDefaultUILanguage() -> u16 { @@ -628,7 +628,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetTimeFormatA(locale : u32, dwflags : u32, lptime : *const super::Foundation:: SYSTEMTIME, lpformat : ::windows_core::PCSTR, lptimestr : ::windows_core::PSTR, cchtime : i32) -> i32); - GetTimeFormatA(locale, dwflags, ::core::mem::transmute(lptime.unwrap_or(::std::ptr::null())), lpformat.into_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() as _)) + GetTimeFormatA(locale, dwflags, ::core::mem::transmute(lptime.unwrap_or(::std::ptr::null())), lpformat.into_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())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -639,7 +639,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetTimeFormatEx(lplocalename : ::windows_core::PCWSTR, dwflags : TIME_FORMAT_FLAGS, lptime : *const super::Foundation:: SYSTEMTIME, lpformat : ::windows_core::PCWSTR, lptimestr : ::windows_core::PWSTR, cchtime : i32) -> i32); - GetTimeFormatEx(lplocalename.into_param().abi(), dwflags, ::core::mem::transmute(lptime.unwrap_or(::std::ptr::null())), lpformat.into_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() as _)) + GetTimeFormatEx(lplocalename.into_param().abi(), dwflags, ::core::mem::transmute(lptime.unwrap_or(::std::ptr::null())), lpformat.into_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())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -649,7 +649,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetTimeFormatW(locale : u32, dwflags : u32, lptime : *const super::Foundation:: SYSTEMTIME, lpformat : ::windows_core::PCWSTR, lptimestr : ::windows_core::PWSTR, cchtime : i32) -> i32); - GetTimeFormatW(locale, dwflags, ::core::mem::transmute(lptime.unwrap_or(::std::ptr::null())), lpformat.into_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() as _)) + GetTimeFormatW(locale, dwflags, ::core::mem::transmute(lptime.unwrap_or(::std::ptr::null())), lpformat.into_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())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -664,7 +664,7 @@ where #[inline] pub unsafe fn GetUserDefaultGeoName(geoname: &mut [u16]) -> i32 { ::windows_targets::link!("kernel32.dll" "system" fn GetUserDefaultGeoName(geoname : ::windows_core::PWSTR, geonamecount : i32) -> i32); - GetUserDefaultGeoName(::core::mem::transmute(geoname.as_ptr()), geoname.len() as _) + GetUserDefaultGeoName(::core::mem::transmute(geoname.as_ptr()), geoname.len().try_into().unwrap()) } #[inline] pub unsafe fn GetUserDefaultLCID() -> u32 { @@ -679,7 +679,7 @@ pub unsafe fn GetUserDefaultLangID() -> u16 { #[inline] pub unsafe fn GetUserDefaultLocaleName(lplocalename: &mut [u16]) -> i32 { ::windows_targets::link!("kernel32.dll" "system" fn GetUserDefaultLocaleName(lplocalename : ::windows_core::PWSTR, cchlocalename : i32) -> i32); - GetUserDefaultLocaleName(::core::mem::transmute(lplocalename.as_ptr()), lplocalename.len() as _) + GetUserDefaultLocaleName(::core::mem::transmute(lplocalename.as_ptr()), lplocalename.len().try_into().unwrap()) } #[inline] pub unsafe fn GetUserDefaultUILanguage() -> u16 { @@ -701,17 +701,17 @@ pub unsafe fn GetUserPreferredUILanguages(dwflags: u32, pulnumlanguages: *mut u3 #[inline] pub unsafe fn IdnToAscii(dwflags: u32, lpunicodecharstr: &[u16], lpasciicharstr: ::core::option::Option<&mut [u16]>) -> i32 { ::windows_targets::link!("normaliz.dll" "system" fn IdnToAscii(dwflags : u32, lpunicodecharstr : ::windows_core::PCWSTR, cchunicodechar : i32, lpasciicharstr : ::windows_core::PWSTR, cchasciichar : i32) -> i32); - IdnToAscii(dwflags, ::core::mem::transmute(lpunicodecharstr.as_ptr()), lpunicodecharstr.len() as _, ::core::mem::transmute(lpasciicharstr.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpasciicharstr.as_deref().map_or(0, |slice| slice.len() as _)) + IdnToAscii(dwflags, ::core::mem::transmute(lpunicodecharstr.as_ptr()), lpunicodecharstr.len().try_into().unwrap(), ::core::mem::transmute(lpasciicharstr.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpasciicharstr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn IdnToNameprepUnicode(dwflags: u32, lpunicodecharstr: &[u16], lpnameprepcharstr: ::core::option::Option<&mut [u16]>) -> i32 { ::windows_targets::link!("kernel32.dll" "system" fn IdnToNameprepUnicode(dwflags : u32, lpunicodecharstr : ::windows_core::PCWSTR, cchunicodechar : i32, lpnameprepcharstr : ::windows_core::PWSTR, cchnameprepchar : i32) -> i32); - IdnToNameprepUnicode(dwflags, ::core::mem::transmute(lpunicodecharstr.as_ptr()), lpunicodecharstr.len() as _, ::core::mem::transmute(lpnameprepcharstr.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpnameprepcharstr.as_deref().map_or(0, |slice| slice.len() as _)) + IdnToNameprepUnicode(dwflags, ::core::mem::transmute(lpunicodecharstr.as_ptr()), lpunicodecharstr.len().try_into().unwrap(), ::core::mem::transmute(lpnameprepcharstr.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpnameprepcharstr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn IdnToUnicode(dwflags: u32, lpasciicharstr: &[u16], lpunicodecharstr: ::core::option::Option<&mut [u16]>) -> i32 { ::windows_targets::link!("normaliz.dll" "system" fn IdnToUnicode(dwflags : u32, lpasciicharstr : ::windows_core::PCWSTR, cchasciichar : i32, lpunicodecharstr : ::windows_core::PWSTR, cchunicodechar : i32) -> i32); - IdnToUnicode(dwflags, ::core::mem::transmute(lpasciicharstr.as_ptr()), lpasciicharstr.len() as _, ::core::mem::transmute(lpunicodecharstr.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpunicodecharstr.as_deref().map_or(0, |slice| slice.len() as _)) + IdnToUnicode(dwflags, ::core::mem::transmute(lpasciicharstr.as_ptr()), lpasciicharstr.len().try_into().unwrap(), ::core::mem::transmute(lpunicodecharstr.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpunicodecharstr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -732,14 +732,14 @@ pub unsafe fn IsDBCSLeadByteEx(codepage: u32, testchar: u8) -> ::windows_core::R #[inline] pub unsafe fn IsNLSDefinedString(function: u32, dwflags: u32, lpversioninformation: *const NLSVERSIONINFO, lpstring: &[u16]) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn IsNLSDefinedString(function : u32, dwflags : u32, lpversioninformation : *const NLSVERSIONINFO, lpstring : ::windows_core::PCWSTR, cchstr : i32) -> super::Foundation:: BOOL); - IsNLSDefinedString(function, dwflags, lpversioninformation, ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _).ok() + IsNLSDefinedString(function, dwflags, lpversioninformation, ::core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn IsNormalizedString(normform: NORM_FORM, lpstring: &[u16]) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn IsNormalizedString(normform : NORM_FORM, lpstring : ::windows_core::PCWSTR, cwlength : i32) -> super::Foundation:: BOOL); - IsNormalizedString(normform, ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _).ok() + IsNormalizedString(normform, ::core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -798,12 +798,12 @@ where #[inline] pub unsafe fn LCIDToLocaleName(locale: u32, lpname: ::core::option::Option<&mut [u16]>, dwflags: u32) -> i32 { ::windows_targets::link!("kernel32.dll" "system" fn LCIDToLocaleName(locale : u32, lpname : ::windows_core::PWSTR, cchname : i32, dwflags : u32) -> i32); - LCIDToLocaleName(locale, ::core::mem::transmute(lpname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpname.as_deref().map_or(0, |slice| slice.len() as _), dwflags) + LCIDToLocaleName(locale, ::core::mem::transmute(lpname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), dwflags) } #[inline] pub unsafe fn LCMapStringA(locale: u32, dwmapflags: u32, lpsrcstr: &[u8], lpdeststr: ::windows_core::PSTR, cchdest: i32) -> i32 { ::windows_targets::link!("kernel32.dll" "system" fn LCMapStringA(locale : u32, dwmapflags : u32, lpsrcstr : ::windows_core::PCSTR, cchsrc : i32, lpdeststr : ::windows_core::PSTR, cchdest : i32) -> i32); - LCMapStringA(locale, dwmapflags, ::core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len() as _, ::core::mem::transmute(lpdeststr), cchdest) + LCMapStringA(locale, dwmapflags, ::core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len().try_into().unwrap(), ::core::mem::transmute(lpdeststr), cchdest) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -814,12 +814,12 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn LCMapStringEx(lplocalename : ::windows_core::PCWSTR, dwmapflags : u32, lpsrcstr : ::windows_core::PCWSTR, cchsrc : i32, lpdeststr : ::windows_core::PWSTR, cchdest : i32, lpversioninformation : *const NLSVERSIONINFO, lpreserved : *const ::core::ffi::c_void, sorthandle : super::Foundation:: LPARAM) -> i32); - LCMapStringEx(lplocalename.into_param().abi(), dwmapflags, ::core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len() as _, ::core::mem::transmute(lpdeststr.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpdeststr.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpversioninformation.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null())), sorthandle.into_param().abi()) + LCMapStringEx(lplocalename.into_param().abi(), dwmapflags, ::core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len().try_into().unwrap(), ::core::mem::transmute(lpdeststr.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpdeststr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpversioninformation.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null())), sorthandle.into_param().abi()) } #[inline] pub unsafe fn LCMapStringW(locale: u32, dwmapflags: u32, lpsrcstr: &[u16], lpdeststr: ::windows_core::PWSTR, cchdest: i32) -> i32 { ::windows_targets::link!("kernel32.dll" "system" fn LCMapStringW(locale : u32, dwmapflags : u32, lpsrcstr : ::windows_core::PCWSTR, cchsrc : i32, lpdeststr : ::windows_core::PWSTR, cchdest : i32) -> i32); - LCMapStringW(locale, dwmapflags, ::core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len() as _, ::core::mem::transmute(lpdeststr), cchdest) + LCMapStringW(locale, dwmapflags, ::core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len().try_into().unwrap(), ::core::mem::transmute(lpdeststr), cchdest) } #[inline] pub unsafe fn LocaleNameToLCID(lpname: P0, dwflags: u32) -> u32 @@ -855,17 +855,17 @@ pub unsafe fn MappingGetServices(poptions: ::core::option::Option<*const MAPPING #[inline] pub unsafe fn MappingRecognizeText(pserviceinfo: *const MAPPING_SERVICE_INFO, psztext: &[u16], dwindex: u32, poptions: ::core::option::Option<*const MAPPING_OPTIONS>, pbag: *mut MAPPING_PROPERTY_BAG) -> ::windows_core::Result<()> { ::windows_targets::link!("elscore.dll" "system" fn MappingRecognizeText(pserviceinfo : *const MAPPING_SERVICE_INFO, psztext : ::windows_core::PCWSTR, dwlength : u32, dwindex : u32, poptions : *const MAPPING_OPTIONS, pbag : *mut MAPPING_PROPERTY_BAG) -> ::windows_core::HRESULT); - MappingRecognizeText(pserviceinfo, ::core::mem::transmute(psztext.as_ptr()), psztext.len() as _, dwindex, ::core::mem::transmute(poptions.unwrap_or(::std::ptr::null())), pbag).ok() + MappingRecognizeText(pserviceinfo, ::core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap(), dwindex, ::core::mem::transmute(poptions.unwrap_or(::std::ptr::null())), pbag).ok() } #[inline] pub unsafe fn MultiByteToWideChar(codepage: u32, dwflags: MULTI_BYTE_TO_WIDE_CHAR_FLAGS, lpmultibytestr: &[u8], lpwidecharstr: ::core::option::Option<&mut [u16]>) -> i32 { ::windows_targets::link!("kernel32.dll" "system" fn MultiByteToWideChar(codepage : u32, dwflags : MULTI_BYTE_TO_WIDE_CHAR_FLAGS, lpmultibytestr : ::windows_core::PCSTR, cbmultibyte : i32, lpwidecharstr : ::windows_core::PWSTR, cchwidechar : i32) -> i32); - MultiByteToWideChar(codepage, dwflags, ::core::mem::transmute(lpmultibytestr.as_ptr()), lpmultibytestr.len() as _, ::core::mem::transmute(lpwidecharstr.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpwidecharstr.as_deref().map_or(0, |slice| slice.len() as _)) + MultiByteToWideChar(codepage, dwflags, ::core::mem::transmute(lpmultibytestr.as_ptr()), lpmultibytestr.len().try_into().unwrap(), ::core::mem::transmute(lpwidecharstr.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpwidecharstr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn NormalizeString(normform: NORM_FORM, lpsrcstring: &[u16], lpdststring: ::core::option::Option<&mut [u16]>) -> i32 { ::windows_targets::link!("kernel32.dll" "system" fn NormalizeString(normform : NORM_FORM, lpsrcstring : ::windows_core::PCWSTR, cwsrclength : i32, lpdststring : ::windows_core::PWSTR, cwdstlength : i32) -> i32); - NormalizeString(normform, ::core::mem::transmute(lpsrcstring.as_ptr()), lpsrcstring.len() as _, ::core::mem::transmute(lpdststring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpdststring.as_deref().map_or(0, |slice| slice.len() as _)) + NormalizeString(normform, ::core::mem::transmute(lpsrcstring.as_ptr()), lpsrcstring.len().try_into().unwrap(), ::core::mem::transmute(lpdststring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpdststring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -884,7 +884,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn ResolveLocaleName(lpnametoresolve : ::windows_core::PCWSTR, lplocalename : ::windows_core::PWSTR, cchlocalename : i32) -> i32); - ResolveLocaleName(lpnametoresolve.into_param().abi(), ::core::mem::transmute(lplocalename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lplocalename.as_deref().map_or(0, |slice| slice.len() as _)) + ResolveLocaleName(lpnametoresolve.into_param().abi(), ::core::mem::transmute(lplocalename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lplocalename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn RestoreThreadPreferredUILanguages(snapshot: P0) @@ -922,7 +922,7 @@ where P0: ::windows_core::IntoParam, { ::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); - ScriptCPtoX(icp, ftrailing.into_param().abi(), pwlogclust.len() as _, cglyphs, ::core::mem::transmute(pwlogclust.as_ptr()), psva, piadvance, psa, pix).ok() + ScriptCPtoX(icp, ftrailing.into_param().abi(), pwlogclust.len().try_into().unwrap(), cglyphs, ::core::mem::transmute(pwlogclust.as_ptr()), psva, piadvance, psa, pix).ok() } #[doc = "Required features: `\"Win32_Graphics_Gdi\"`"] #[cfg(feature = "Win32_Graphics_Gdi")] @@ -958,7 +958,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("usp10.dll" "system" fn ScriptGetFontAlternateGlyphs(hdc : super::Graphics::Gdi:: HDC, psc : *mut *mut ::core::ffi::c_void, psa : *const SCRIPT_ANALYSIS, tagscript : u32, taglangsys : u32, tagfeature : u32, wglyphid : u16, cmaxalternates : i32, palternateglyphs : *mut u16, pcalternates : *mut i32) -> ::windows_core::HRESULT); - ScriptGetFontAlternateGlyphs(hdc.into_param().abi(), psc, ::core::mem::transmute(psa.unwrap_or(::std::ptr::null())), tagscript, taglangsys, tagfeature, wglyphid, palternateglyphs.len() as _, ::core::mem::transmute(palternateglyphs.as_ptr()), pcalternates).ok() + ScriptGetFontAlternateGlyphs(hdc.into_param().abi(), psc, ::core::mem::transmute(psa.unwrap_or(::std::ptr::null())), tagscript, taglangsys, tagfeature, wglyphid, palternateglyphs.len().try_into().unwrap(), ::core::mem::transmute(palternateglyphs.as_ptr()), pcalternates).ok() } #[doc = "Required features: `\"Win32_Graphics_Gdi\"`"] #[cfg(feature = "Win32_Graphics_Gdi")] @@ -968,7 +968,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("usp10.dll" "system" fn ScriptGetFontFeatureTags(hdc : super::Graphics::Gdi:: HDC, psc : *mut *mut ::core::ffi::c_void, psa : *const SCRIPT_ANALYSIS, tagscript : u32, taglangsys : u32, cmaxtags : i32, pfeaturetags : *mut u32, pctags : *mut i32) -> ::windows_core::HRESULT); - ScriptGetFontFeatureTags(hdc.into_param().abi(), psc, ::core::mem::transmute(psa.unwrap_or(::std::ptr::null())), tagscript, taglangsys, pfeaturetags.len() as _, ::core::mem::transmute(pfeaturetags.as_ptr()), pctags).ok() + ScriptGetFontFeatureTags(hdc.into_param().abi(), psc, ::core::mem::transmute(psa.unwrap_or(::std::ptr::null())), tagscript, taglangsys, pfeaturetags.len().try_into().unwrap(), ::core::mem::transmute(pfeaturetags.as_ptr()), pctags).ok() } #[doc = "Required features: `\"Win32_Graphics_Gdi\"`"] #[cfg(feature = "Win32_Graphics_Gdi")] @@ -978,7 +978,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("usp10.dll" "system" fn ScriptGetFontLanguageTags(hdc : super::Graphics::Gdi:: HDC, psc : *mut *mut ::core::ffi::c_void, psa : *const SCRIPT_ANALYSIS, tagscript : u32, cmaxtags : i32, plangsystags : *mut u32, pctags : *mut i32) -> ::windows_core::HRESULT); - ScriptGetFontLanguageTags(hdc.into_param().abi(), psc, ::core::mem::transmute(psa.unwrap_or(::std::ptr::null())), tagscript, plangsystags.len() as _, ::core::mem::transmute(plangsystags.as_ptr()), pctags).ok() + ScriptGetFontLanguageTags(hdc.into_param().abi(), psc, ::core::mem::transmute(psa.unwrap_or(::std::ptr::null())), tagscript, plangsystags.len().try_into().unwrap(), ::core::mem::transmute(plangsystags.as_ptr()), pctags).ok() } #[doc = "Required features: `\"Win32_Graphics_Gdi\"`"] #[cfg(feature = "Win32_Graphics_Gdi")] @@ -998,7 +998,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("usp10.dll" "system" fn ScriptGetFontScriptTags(hdc : super::Graphics::Gdi:: HDC, psc : *mut *mut ::core::ffi::c_void, psa : *const SCRIPT_ANALYSIS, cmaxtags : i32, pscripttags : *mut u32, pctags : *mut i32) -> ::windows_core::HRESULT); - ScriptGetFontScriptTags(hdc.into_param().abi(), psc, ::core::mem::transmute(psa.unwrap_or(::std::ptr::null())), pscripttags.len() as _, ::core::mem::transmute(pscripttags.as_ptr()), pctags).ok() + ScriptGetFontScriptTags(hdc.into_param().abi(), psc, ::core::mem::transmute(psa.unwrap_or(::std::ptr::null())), pscripttags.len().try_into().unwrap(), ::core::mem::transmute(pscripttags.as_ptr()), pctags).ok() } #[doc = "Required features: `\"Win32_Graphics_Gdi\"`"] #[cfg(feature = "Win32_Graphics_Gdi")] @@ -1023,17 +1023,17 @@ pub unsafe fn ScriptGetProperties(ppsp: *mut *mut *mut SCRIPT_PROPERTIES, pinums #[inline] pub unsafe fn ScriptIsComplex(pwcinchars: &[u16], dwflags: SCRIPT_IS_COMPLEX_FLAGS) -> ::windows_core::Result<()> { ::windows_targets::link!("usp10.dll" "system" fn ScriptIsComplex(pwcinchars : ::windows_core::PCWSTR, cinchars : i32, dwflags : SCRIPT_IS_COMPLEX_FLAGS) -> ::windows_core::HRESULT); - ScriptIsComplex(::core::mem::transmute(pwcinchars.as_ptr()), pwcinchars.len() as _, dwflags).ok() + ScriptIsComplex(::core::mem::transmute(pwcinchars.as_ptr()), pwcinchars.len().try_into().unwrap(), dwflags).ok() } #[inline] pub unsafe fn ScriptItemize(pwcinchars: &[u16], pscontrol: ::core::option::Option<*const SCRIPT_CONTROL>, psstate: ::core::option::Option<*const SCRIPT_STATE>, pitems: &mut [SCRIPT_ITEM], pcitems: *mut i32) -> ::windows_core::Result<()> { ::windows_targets::link!("usp10.dll" "system" fn ScriptItemize(pwcinchars : ::windows_core::PCWSTR, cinchars : i32, cmaxitems : i32, pscontrol : *const SCRIPT_CONTROL, psstate : *const SCRIPT_STATE, pitems : *mut SCRIPT_ITEM, pcitems : *mut i32) -> ::windows_core::HRESULT); - ScriptItemize(::core::mem::transmute(pwcinchars.as_ptr()), pwcinchars.len() as _, pitems.len() as _, ::core::mem::transmute(pscontrol.unwrap_or(::std::ptr::null())), ::core::mem::transmute(psstate.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pitems.as_ptr()), pcitems).ok() + ScriptItemize(::core::mem::transmute(pwcinchars.as_ptr()), pwcinchars.len().try_into().unwrap(), pitems.len().try_into().unwrap(), ::core::mem::transmute(pscontrol.unwrap_or(::std::ptr::null())), ::core::mem::transmute(psstate.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pitems.as_ptr()), pcitems).ok() } #[inline] pub unsafe fn ScriptItemizeOpenType(pwcinchars: &[u16], cmaxitems: i32, pscontrol: ::core::option::Option<*const SCRIPT_CONTROL>, psstate: ::core::option::Option<*const SCRIPT_STATE>, pitems: *mut SCRIPT_ITEM, pscripttags: *mut u32, pcitems: *mut i32) -> ::windows_core::Result<()> { ::windows_targets::link!("usp10.dll" "system" fn ScriptItemizeOpenType(pwcinchars : ::windows_core::PCWSTR, cinchars : i32, cmaxitems : i32, pscontrol : *const SCRIPT_CONTROL, psstate : *const SCRIPT_STATE, pitems : *mut SCRIPT_ITEM, pscripttags : *mut u32, pcitems : *mut i32) -> ::windows_core::HRESULT); - ScriptItemizeOpenType(::core::mem::transmute(pwcinchars.as_ptr()), pwcinchars.len() as _, cmaxitems, ::core::mem::transmute(pscontrol.unwrap_or(::std::ptr::null())), ::core::mem::transmute(psstate.unwrap_or(::std::ptr::null())), pitems, pscripttags, pcitems).ok() + ScriptItemizeOpenType(::core::mem::transmute(pwcinchars.as_ptr()), pwcinchars.len().try_into().unwrap(), cmaxitems, ::core::mem::transmute(pscontrol.unwrap_or(::std::ptr::null())), ::core::mem::transmute(psstate.unwrap_or(::std::ptr::null())), pitems, pscripttags, pcitems).ok() } #[inline] pub unsafe fn ScriptJustify(psva: *const SCRIPT_VISATTR, piadvance: *const i32, cglyphs: i32, idx: i32, iminkashida: i32, pijustify: *mut i32) -> ::windows_core::Result<()> { @@ -1112,7 +1112,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("usp10.dll" "system" fn ScriptStringAnalyse(hdc : super::Graphics::Gdi:: HDC, pstring : *const ::core::ffi::c_void, cstring : i32, cglyphs : i32, icharset : i32, dwflags : u32, ireqwidth : i32, pscontrol : *const SCRIPT_CONTROL, psstate : *const SCRIPT_STATE, pidx : *const i32, ptabdef : *const SCRIPT_TABDEF, pbinclass : *const u8, pssa : *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT); - ScriptStringAnalyse(hdc.into_param().abi(), pstring, pidx.as_deref().map_or(0, |slice| slice.len() as _), cglyphs, icharset, dwflags, ireqwidth, ::core::mem::transmute(pscontrol.unwrap_or(::std::ptr::null())), ::core::mem::transmute(psstate.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pidx.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(ptabdef.unwrap_or(::std::ptr::null())), pbinclass, pssa).ok() + ScriptStringAnalyse(hdc.into_param().abi(), pstring, pidx.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), cglyphs, icharset, dwflags, ireqwidth, ::core::mem::transmute(pscontrol.unwrap_or(::std::ptr::null())), ::core::mem::transmute(psstate.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pidx.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(ptabdef.unwrap_or(::std::ptr::null())), pbinclass, pssa).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1201,7 +1201,7 @@ where #[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); - ScriptXtoCP(ix, pwlogclust.len() as _, cglyphs, ::core::mem::transmute(pwlogclust.as_ptr()), psva, piadvance, psa, picp, pitrailing).ok() + ScriptXtoCP(ix, pwlogclust.len().try_into().unwrap(), cglyphs, ::core::mem::transmute(pwlogclust.as_ptr()), psva, piadvance, psa, picp, pitrailing).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1380,7 +1380,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn WideCharToMultiByte(codepage : u32, dwflags : u32, lpwidecharstr : ::windows_core::PCWSTR, cchwidechar : i32, lpmultibytestr : ::windows_core::PSTR, cbmultibyte : i32, lpdefaultchar : ::windows_core::PCSTR, lpuseddefaultchar : *mut super::Foundation:: BOOL) -> i32); - WideCharToMultiByte(codepage, dwflags, ::core::mem::transmute(lpwidecharstr.as_ptr()), lpwidecharstr.len() as _, ::core::mem::transmute(lpmultibytestr.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpmultibytestr.as_deref().map_or(0, |slice| slice.len() as _), lpdefaultchar.into_param().abi(), ::core::mem::transmute(lpuseddefaultchar.unwrap_or(::std::ptr::null_mut()))) + WideCharToMultiByte(codepage, dwflags, ::core::mem::transmute(lpwidecharstr.as_ptr()), lpwidecharstr.len().try_into().unwrap(), ::core::mem::transmute(lpmultibytestr.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpmultibytestr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpdefaultchar.into_param().abi(), ::core::mem::transmute(lpuseddefaultchar.unwrap_or(::std::ptr::null_mut()))) } #[inline] pub unsafe fn lstrcatA(lpstring1: ::windows_core::PSTR, lpstring2: P0) -> ::windows_core::PSTR @@ -1456,7 +1456,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn lstrcpynA(lpstring1 : ::windows_core::PSTR, lpstring2 : ::windows_core::PCSTR, imaxlength : i32) -> ::windows_core::PSTR); - lstrcpynA(::core::mem::transmute(lpstring1.as_ptr()), lpstring2.into_param().abi(), lpstring1.len() as _) + lstrcpynA(::core::mem::transmute(lpstring1.as_ptr()), lpstring2.into_param().abi(), lpstring1.len().try_into().unwrap()) } #[inline] pub unsafe fn lstrcpynW(lpstring1: &mut [u16], lpstring2: P0) -> ::windows_core::PWSTR @@ -1464,7 +1464,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn lstrcpynW(lpstring1 : ::windows_core::PWSTR, lpstring2 : ::windows_core::PCWSTR, imaxlength : i32) -> ::windows_core::PWSTR); - lstrcpynW(::core::mem::transmute(lpstring1.as_ptr()), lpstring2.into_param().abi(), lpstring1.len() as _) + lstrcpynW(::core::mem::transmute(lpstring1.as_ptr()), lpstring2.into_param().abi(), lpstring1.len().try_into().unwrap()) } #[inline] pub unsafe fn lstrlenA(lpstring: P0) -> i32 @@ -7351,7 +7351,7 @@ impl IMLangCodePages { (::windows_core::Interface::vtable(self).GetCharCodePages)(::windows_core::Interface::as_raw(self), chsrc, &mut result__).from_abi(result__) } pub unsafe fn GetStrCodePages(&self, pszsrc: &[u16], dwprioritycodepages: u32, pdwcodepages: ::core::option::Option<*mut u32>, pcchcodepages: ::core::option::Option<*mut i32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetStrCodePages)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszsrc.as_ptr()), pszsrc.len() as _, dwprioritycodepages, ::core::mem::transmute(pdwcodepages.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcchcodepages.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetStrCodePages)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), dwprioritycodepages, ::core::mem::transmute(pdwcodepages.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcchcodepages.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CodePageToCodePages(&self, ucodepage: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -7441,7 +7441,7 @@ impl IMLangFontLink { (::windows_core::Interface::vtable(self).base__.GetCharCodePages)(::windows_core::Interface::as_raw(self), chsrc, &mut result__).from_abi(result__) } pub unsafe fn GetStrCodePages(&self, pszsrc: &[u16], dwprioritycodepages: u32, pdwcodepages: ::core::option::Option<*mut u32>, pcchcodepages: ::core::option::Option<*mut i32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetStrCodePages)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszsrc.as_ptr()), pszsrc.len() as _, dwprioritycodepages, ::core::mem::transmute(pdwcodepages.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcchcodepages.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetStrCodePages)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), dwprioritycodepages, ::core::mem::transmute(pdwcodepages.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcchcodepages.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CodePageToCodePages(&self, ucodepage: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -7515,7 +7515,7 @@ impl IMLangFontLink2 { (::windows_core::Interface::vtable(self).base__.GetCharCodePages)(::windows_core::Interface::as_raw(self), chsrc, &mut result__).from_abi(result__) } pub unsafe fn GetStrCodePages(&self, pszsrc: &[u16], dwprioritycodepages: u32, pdwcodepages: ::core::option::Option<*mut u32>, pcchcodepages: ::core::option::Option<*mut i32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetStrCodePages)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszsrc.as_ptr()), pszsrc.len() as _, dwprioritycodepages, ::core::mem::transmute(pdwcodepages.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcchcodepages.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetStrCodePages)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), dwprioritycodepages, ::core::mem::transmute(pdwcodepages.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcchcodepages.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CodePageToCodePages(&self, ucodepage: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -7611,10 +7611,10 @@ impl IMLangLineBreakConsole { (::windows_core::Interface::vtable(self).BreakLineML)(::windows_core::Interface::as_raw(self), psrcmlstr.into_param().abi(), lsrcpos, lsrclen, cmincolumns, cmaxcolumns, ::core::mem::transmute(pllinelen.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(plskiplen.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn BreakLineW(&self, locale: u32, pszsrc: &[u16], cmaxcolumns: i32, pcchline: ::core::option::Option<*mut i32>, pcchskip: ::core::option::Option<*mut i32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).BreakLineW)(::windows_core::Interface::as_raw(self), locale, ::core::mem::transmute(pszsrc.as_ptr()), pszsrc.len() as _, cmaxcolumns, ::core::mem::transmute(pcchline.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcchskip.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).BreakLineW)(::windows_core::Interface::as_raw(self), locale, ::core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), cmaxcolumns, ::core::mem::transmute(pcchline.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcchskip.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn BreakLineA(&self, locale: u32, ucodepage: u32, pszsrc: &[u8], cmaxcolumns: i32, pcchline: ::core::option::Option<*mut i32>, pcchskip: ::core::option::Option<*mut i32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).BreakLineA)(::windows_core::Interface::as_raw(self), locale, ucodepage, ::core::mem::transmute(pszsrc.as_ptr()), pszsrc.len() as _, cmaxcolumns, ::core::mem::transmute(pcchline.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcchskip.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).BreakLineA)(::windows_core::Interface::as_raw(self), locale, ucodepage, ::core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), cmaxcolumns, ::core::mem::transmute(pcchline.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcchskip.unwrap_or(::std::ptr::null_mut()))).ok() } } ::windows_core::imp::interface_hierarchy!(IMLangLineBreakConsole, ::windows_core::IUnknown); @@ -7707,7 +7707,7 @@ impl IMLangStringAStr { (::windows_core::Interface::vtable(self).base__.GetMLStr)(::windows_core::Interface::as_raw(self), lsrcpos, lsrclen, punkouter.into_param().abi(), dwclscontext, piid, ::core::mem::transmute(ppdestmlstr), ::core::mem::transmute(pldestpos.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pldestlen.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetAStr(&self, ldestpos: i32, ldestlen: i32, ucodepage: u32, pszsrc: &[u8], pcchactual: ::core::option::Option<*mut i32>, plactuallen: ::core::option::Option<*mut i32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetAStr)(::windows_core::Interface::as_raw(self), ldestpos, ldestlen, ucodepage, ::core::mem::transmute(pszsrc.as_ptr()), pszsrc.len() as _, ::core::mem::transmute(pcchactual.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(plactuallen.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).SetAStr)(::windows_core::Interface::as_raw(self), ldestpos, ldestlen, ucodepage, ::core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), ::core::mem::transmute(pcchactual.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(plactuallen.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetStrBufA(&self, ldestpos: i32, ldestlen: i32, ucodepage: u32, psrcbuf: P0, pcchactual: ::core::option::Option<*mut i32>, plactuallen: ::core::option::Option<*mut i32>) -> ::windows_core::Result<()> where @@ -7716,7 +7716,7 @@ impl IMLangStringAStr { (::windows_core::Interface::vtable(self).SetStrBufA)(::windows_core::Interface::as_raw(self), ldestpos, ldestlen, ucodepage, psrcbuf.into_param().abi(), ::core::mem::transmute(pcchactual.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(plactuallen.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAStr(&self, lsrcpos: i32, lsrclen: i32, ucodepagein: u32, pucodepageout: ::core::option::Option<*const u32>, pszdest: ::core::option::Option<&mut [u8]>, pcchactual: ::core::option::Option<*mut i32>, plactuallen: ::core::option::Option<*mut i32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetAStr)(::windows_core::Interface::as_raw(self), lsrcpos, lsrclen, ucodepagein, ::core::mem::transmute(pucodepageout.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pszdest.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszdest.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcchactual.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(plactuallen.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetAStr)(::windows_core::Interface::as_raw(self), lsrcpos, lsrclen, ucodepagein, ::core::mem::transmute(pucodepageout.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pszdest.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszdest.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcchactual.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(plactuallen.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetStrBufA(&self, lsrcpos: i32, lsrcmaxlen: i32, pudestcodepage: ::core::option::Option<*mut u32>, ppdestbuf: *mut ::core::option::Option, pldestlen: ::core::option::Option<*mut i32>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetStrBufA)(::windows_core::Interface::as_raw(self), lsrcpos, lsrcmaxlen, ::core::mem::transmute(pudestcodepage.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppdestbuf), ::core::mem::transmute(pldestlen.unwrap_or(::std::ptr::null_mut()))).ok() @@ -7725,7 +7725,7 @@ impl IMLangStringAStr { (::windows_core::Interface::vtable(self).LockAStr)(::windows_core::Interface::as_raw(self), lsrcpos, lsrclen, lflags, ucodepagein, cchrequest, ::core::mem::transmute(pucodepageout.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppszdest.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcchdest.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pldestlen.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn UnlockAStr(&self, pszsrc: &[u8], pcchactual: ::core::option::Option<*mut i32>, plactuallen: ::core::option::Option<*mut i32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).UnlockAStr)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszsrc.as_ptr()), pszsrc.len() as _, ::core::mem::transmute(pcchactual.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(plactuallen.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).UnlockAStr)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), ::core::mem::transmute(pcchactual.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(plactuallen.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetLocale(&self, ldestpos: i32, ldestlen: i32, locale: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).SetLocale)(::windows_core::Interface::as_raw(self), ldestpos, ldestlen, locale).ok() @@ -7862,7 +7862,7 @@ impl IMLangStringWStr { (::windows_core::Interface::vtable(self).base__.GetMLStr)(::windows_core::Interface::as_raw(self), lsrcpos, lsrclen, punkouter.into_param().abi(), dwclscontext, piid, ::core::mem::transmute(ppdestmlstr), ::core::mem::transmute(pldestpos.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pldestlen.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetWStr(&self, ldestpos: i32, ldestlen: i32, pszsrc: &[u16], pcchactual: ::core::option::Option<*mut i32>, plactuallen: ::core::option::Option<*mut i32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetWStr)(::windows_core::Interface::as_raw(self), ldestpos, ldestlen, ::core::mem::transmute(pszsrc.as_ptr()), pszsrc.len() as _, ::core::mem::transmute(pcchactual.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(plactuallen.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).SetWStr)(::windows_core::Interface::as_raw(self), ldestpos, ldestlen, ::core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), ::core::mem::transmute(pcchactual.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(plactuallen.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetStrBufW(&self, ldestpos: i32, ldestlen: i32, psrcbuf: P0, pcchactual: ::core::option::Option<*mut i32>, plactuallen: ::core::option::Option<*mut i32>) -> ::windows_core::Result<()> where @@ -7871,7 +7871,7 @@ impl IMLangStringWStr { (::windows_core::Interface::vtable(self).SetStrBufW)(::windows_core::Interface::as_raw(self), ldestpos, ldestlen, psrcbuf.into_param().abi(), ::core::mem::transmute(pcchactual.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(plactuallen.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetWStr(&self, lsrcpos: i32, lsrclen: i32, pszdest: ::core::option::Option<&mut [u16]>, pcchactual: ::core::option::Option<*mut i32>, plactuallen: ::core::option::Option<*mut i32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetWStr)(::windows_core::Interface::as_raw(self), lsrcpos, lsrclen, ::core::mem::transmute(pszdest.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszdest.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcchactual.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(plactuallen.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetWStr)(::windows_core::Interface::as_raw(self), lsrcpos, lsrclen, ::core::mem::transmute(pszdest.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszdest.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcchactual.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(plactuallen.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetStrBufW(&self, lsrcpos: i32, lsrcmaxlen: i32, ppdestbuf: *mut ::core::option::Option, pldestlen: ::core::option::Option<*mut i32>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetStrBufW)(::windows_core::Interface::as_raw(self), lsrcpos, lsrcmaxlen, ::core::mem::transmute(ppdestbuf), ::core::mem::transmute(pldestlen.unwrap_or(::std::ptr::null_mut()))).ok() @@ -7880,7 +7880,7 @@ impl IMLangStringWStr { (::windows_core::Interface::vtable(self).LockWStr)(::windows_core::Interface::as_raw(self), lsrcpos, lsrclen, lflags, cchrequest, ::core::mem::transmute(ppszdest.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcchdest.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pldestlen.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn UnlockWStr(&self, pszsrc: &[u16], pcchactual: ::core::option::Option<*mut i32>, plactuallen: ::core::option::Option<*mut i32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).UnlockWStr)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszsrc.as_ptr()), pszsrc.len() as _, ::core::mem::transmute(pcchactual.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(plactuallen.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).UnlockWStr)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), ::core::mem::transmute(pcchactual.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(plactuallen.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetLocale(&self, ldestpos: i32, ldestlen: i32, locale: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).SetLocale)(::windows_core::Interface::as_raw(self), ldestpos, ldestlen, locale).ok() @@ -8118,7 +8118,7 @@ impl IMultiLanguage2 { (::windows_core::Interface::vtable(self).ValidateCodePage)(::windows_core::Interface::as_raw(self), uicodepage, hwnd.into_param().abi()).ok() } pub unsafe fn GetCodePageDescription(&self, uicodepage: u32, lcid: u32, lpwidecharstr: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetCodePageDescription)(::windows_core::Interface::as_raw(self), uicodepage, lcid, ::core::mem::transmute(lpwidecharstr.as_ptr()), lpwidecharstr.len() as _).ok() + (::windows_core::Interface::vtable(self).GetCodePageDescription)(::windows_core::Interface::as_raw(self), uicodepage, lcid, ::core::mem::transmute(lpwidecharstr.as_ptr()), lpwidecharstr.len().try_into().unwrap()).ok() } pub unsafe fn IsCodePageInstallable(&self, uicodepage: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).IsCodePageInstallable)(::windows_core::Interface::as_raw(self), uicodepage).ok() @@ -8308,7 +8308,7 @@ impl IMultiLanguage3 { (::windows_core::Interface::vtable(self).base__.ValidateCodePage)(::windows_core::Interface::as_raw(self), uicodepage, hwnd.into_param().abi()).ok() } pub unsafe fn GetCodePageDescription(&self, uicodepage: u32, lcid: u32, lpwidecharstr: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetCodePageDescription)(::windows_core::Interface::as_raw(self), uicodepage, lcid, ::core::mem::transmute(lpwidecharstr.as_ptr()), lpwidecharstr.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.GetCodePageDescription)(::windows_core::Interface::as_raw(self), uicodepage, lcid, ::core::mem::transmute(lpwidecharstr.as_ptr()), lpwidecharstr.len().try_into().unwrap()).ok() } pub unsafe fn IsCodePageInstallable(&self, uicodepage: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.IsCodePageInstallable)(::windows_core::Interface::as_raw(self), uicodepage).ok() @@ -8336,7 +8336,7 @@ impl IMultiLanguage3 { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).DetectOutboundCodePage)(::windows_core::Interface::as_raw(self), dwflags, ::core::mem::transmute(lpwidecharstr.as_ptr()), lpwidecharstr.len() as _, ::core::mem::transmute(puipreferredcodepages.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), puipreferredcodepages.as_deref().map_or(0, |slice| slice.len() as _), puidetectedcodepages, pndetectedcodepages, lpspecialchar.into_param().abi()).ok() + (::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, pndetectedcodepages, lpspecialchar.into_param().abi()).ok() } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -8345,7 +8345,7 @@ impl IMultiLanguage3 { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).DetectOutboundCodePageInIStream)(::windows_core::Interface::as_raw(self), dwflags, pstrin.into_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() as _), puidetectedcodepages, pndetectedcodepages, lpspecialchar.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).DetectOutboundCodePageInIStream)(::windows_core::Interface::as_raw(self), dwflags, pstrin.into_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, pndetectedcodepages, lpspecialchar.into_param().abi()).ok() } } ::windows_core::imp::interface_hierarchy!(IMultiLanguage3, ::windows_core::IUnknown, IMultiLanguage2); 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 def72921ba..ec7a3947d0 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/DXCore/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/DXCore/mod.rs @@ -78,7 +78,7 @@ impl IDXCoreAdapterFactory { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).CreateAdapterList)(::windows_core::Interface::as_raw(self), filterattributes.len() as _, ::core::mem::transmute(filterattributes.as_ptr()), &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateAdapterList)(::windows_core::Interface::as_raw(self), filterattributes.len().try_into().unwrap(), ::core::mem::transmute(filterattributes.as_ptr()), &::IID, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -148,7 +148,7 @@ impl IDXCoreAdapterList { (::windows_core::Interface::vtable(self).GetFactory)(::windows_core::Interface::as_raw(self), &::IID, &mut result__).from_abi(result__) } pub unsafe fn Sort(&self, preferences: &[DXCoreAdapterPreference]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Sort)(::windows_core::Interface::as_raw(self), preferences.len() as _, ::core::mem::transmute(preferences.as_ptr())).ok() + (::windows_core::Interface::vtable(self).Sort)(::windows_core::Interface::as_raw(self), preferences.len().try_into().unwrap(), ::core::mem::transmute(preferences.as_ptr())).ok() } pub unsafe fn IsAdapterPreferenceSupported(&self, preference: DXCoreAdapterPreference) -> bool { (::windows_core::Interface::vtable(self).IsAdapterPreferenceSupported)(::windows_core::Interface::as_raw(self), preference) diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Direct2D/Common/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Direct2D/Common/mod.rs index c8a680346c..e0779ef001 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct2D/Common/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct2D/Common/mod.rs @@ -12,10 +12,10 @@ impl ID2D1SimplifiedGeometrySink { (::windows_core::Interface::vtable(self).BeginFigure)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(startpoint), figurebegin) } pub unsafe fn AddLines(&self, points: &[D2D_POINT_2F]) { - (::windows_core::Interface::vtable(self).AddLines)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(points.as_ptr()), points.len() as _) + (::windows_core::Interface::vtable(self).AddLines)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(points.as_ptr()), points.len().try_into().unwrap()) } pub unsafe fn AddBeziers(&self, beziers: &[D2D1_BEZIER_SEGMENT]) { - (::windows_core::Interface::vtable(self).AddBeziers)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(beziers.as_ptr()), beziers.len() as _) + (::windows_core::Interface::vtable(self).AddBeziers)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(beziers.as_ptr()), beziers.len().try_into().unwrap()) } pub unsafe fn EndFigure(&self, figureend: D2D1_FIGURE_END) { (::windows_core::Interface::vtable(self).EndFigure)(::windows_core::Interface::as_raw(self), figureend) 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 af3524e0d9..be140a9e2c 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct2D/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct2D/mod.rs @@ -101,7 +101,7 @@ pub unsafe fn D2D1Vec3Length(x: f32, y: f32, z: f32) -> f32 { pub struct ID2D1AnalysisTransform(::windows_core::IUnknown); impl ID2D1AnalysisTransform { pub unsafe fn ProcessAnalysisResults(&self, analysisdata: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).ProcessAnalysisResults)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(analysisdata.as_ptr()), analysisdata.len() as _).ok() + (::windows_core::Interface::vtable(self).ProcessAnalysisResults)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(analysisdata.as_ptr()), analysisdata.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(ID2D1AnalysisTransform, ::windows_core::IUnknown); @@ -513,7 +513,7 @@ impl ID2D1BitmapRenderTarget { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateGradientStopCollection(&self, gradientstops: &[D2D1_GRADIENT_STOP], colorinterpolationgamma: D2D1_GAMMA, extendmode: D2D1_EXTEND_MODE) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.CreateGradientStopCollection)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(gradientstops.as_ptr()), gradientstops.len() as _, colorinterpolationgamma, extendmode, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateGradientStopCollection)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(gradientstops.as_ptr()), gradientstops.len().try_into().unwrap(), colorinterpolationgamma, extendmode, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Foundation_Numerics\"`, `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] @@ -656,7 +656,7 @@ impl ID2D1BitmapRenderTarget { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.DrawText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len() as _, textformat.into_param().abi(), layoutrect, defaultfillbrush.into_param().abi(), options, measuringmode) + (::windows_core::Interface::vtable(self).base__.DrawText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.into_param().abi(), layoutrect, defaultfillbrush.into_param().abi(), options, measuringmode) } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`, `\"Win32_Graphics_DirectWrite\"`"] #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite"))] @@ -1016,7 +1016,7 @@ impl ID2D1ColorContext { (::windows_core::Interface::vtable(self).GetProfileSize)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetProfile(&self, profile: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetProfile)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(profile.as_ptr()), profile.len() as _).ok() + (::windows_core::Interface::vtable(self).GetProfile)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(profile.as_ptr()), profile.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(ID2D1ColorContext, ::windows_core::IUnknown, ID2D1Resource); @@ -1052,7 +1052,7 @@ impl ID2D1ColorContext1 { (::windows_core::Interface::vtable(self).base__.GetProfileSize)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetProfile(&self, profile: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetProfile)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(profile.as_ptr()), profile.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.GetProfile)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(profile.as_ptr()), profile.len().try_into().unwrap()).ok() } pub unsafe fn GetColorContextType(&self) -> D2D1_COLOR_CONTEXT_TYPE { (::windows_core::Interface::vtable(self).GetColorContextType)(::windows_core::Interface::as_raw(self)) @@ -2365,7 +2365,7 @@ impl ID2D1ComputeInfo { (::windows_core::Interface::vtable(self).base__.SetInstructionCountHint)(::windows_core::Interface::as_raw(self), instructioncount) } pub unsafe fn SetComputeShaderConstantBuffer(&self, buffer: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetComputeShaderConstantBuffer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _).ok() + (::windows_core::Interface::vtable(self).SetComputeShaderConstantBuffer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()).ok() } pub unsafe fn SetComputeShader(&self, shaderid: *const ::windows_core::GUID) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).SetComputeShader)(::windows_core::Interface::as_raw(self), shaderid).ok() @@ -2404,7 +2404,7 @@ impl ID2D1ComputeTransform { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn MapOutputRectToInputRects(&self, outputrect: *const super::super::Foundation::RECT, inputrects: &mut [super::super::Foundation::RECT]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.MapOutputRectToInputRects)(::windows_core::Interface::as_raw(self), outputrect, ::core::mem::transmute(inputrects.as_ptr()), inputrects.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.MapOutputRectToInputRects)(::windows_core::Interface::as_raw(self), outputrect, ::core::mem::transmute(inputrects.as_ptr()), inputrects.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2534,7 +2534,7 @@ impl ID2D1DCRenderTarget { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateGradientStopCollection(&self, gradientstops: &[D2D1_GRADIENT_STOP], colorinterpolationgamma: D2D1_GAMMA, extendmode: D2D1_EXTEND_MODE) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.CreateGradientStopCollection)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(gradientstops.as_ptr()), gradientstops.len() as _, colorinterpolationgamma, extendmode, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateGradientStopCollection)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(gradientstops.as_ptr()), gradientstops.len().try_into().unwrap(), colorinterpolationgamma, extendmode, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Foundation_Numerics\"`, `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] @@ -2677,7 +2677,7 @@ impl ID2D1DCRenderTarget { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.DrawText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len() as _, textformat.into_param().abi(), layoutrect, defaultfillbrush.into_param().abi(), options, measuringmode) + (::windows_core::Interface::vtable(self).base__.DrawText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.into_param().abi(), layoutrect, defaultfillbrush.into_param().abi(), options, measuringmode) } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`, `\"Win32_Graphics_DirectWrite\"`"] #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite"))] @@ -3444,7 +3444,7 @@ impl ID2D1DeviceContext { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateGradientStopCollection(&self, gradientstops: &[D2D1_GRADIENT_STOP], colorinterpolationgamma: D2D1_GAMMA, extendmode: D2D1_EXTEND_MODE) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.CreateGradientStopCollection)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(gradientstops.as_ptr()), gradientstops.len() as _, colorinterpolationgamma, extendmode, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateGradientStopCollection)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(gradientstops.as_ptr()), gradientstops.len().try_into().unwrap(), colorinterpolationgamma, extendmode, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Foundation_Numerics\"`, `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] @@ -3587,7 +3587,7 @@ impl ID2D1DeviceContext { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.DrawText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len() as _, textformat.into_param().abi(), layoutrect, defaultfillbrush.into_param().abi(), options, measuringmode) + (::windows_core::Interface::vtable(self).base__.DrawText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.into_param().abi(), layoutrect, defaultfillbrush.into_param().abi(), options, measuringmode) } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`, `\"Win32_Graphics_DirectWrite\"`"] #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite"))] @@ -3746,7 +3746,7 @@ impl ID2D1DeviceContext { } pub unsafe fn CreateColorContext(&self, space: D2D1_COLOR_SPACE, profile: ::core::option::Option<&[u8]>) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateColorContext)(::windows_core::Interface::as_raw(self), space, ::core::mem::transmute(profile.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), profile.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateColorContext)(::windows_core::Interface::as_raw(self), space, ::core::mem::transmute(profile.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), profile.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } pub unsafe fn CreateColorContextFromFilename(&self, filename: P0) -> ::windows_core::Result where @@ -3781,7 +3781,7 @@ impl ID2D1DeviceContext { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateGradientStopCollection2(&self, straightalphagradientstops: &[D2D1_GRADIENT_STOP], preinterpolationspace: D2D1_COLOR_SPACE, postinterpolationspace: D2D1_COLOR_SPACE, bufferprecision: D2D1_BUFFER_PRECISION, extendmode: D2D1_EXTEND_MODE, colorinterpolationmode: D2D1_COLOR_INTERPOLATION_MODE) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateGradientStopCollection2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(straightalphagradientstops.as_ptr()), straightalphagradientstops.len() as _, preinterpolationspace, postinterpolationspace, bufferprecision, extendmode, colorinterpolationmode, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateGradientStopCollection2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(straightalphagradientstops.as_ptr()), straightalphagradientstops.len().try_into().unwrap(), preinterpolationspace, postinterpolationspace, bufferprecision, extendmode, colorinterpolationmode, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Foundation_Numerics\"`, `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] @@ -3940,7 +3940,7 @@ impl ID2D1DeviceContext { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).GetEffectInvalidRectangles)(::windows_core::Interface::as_raw(self), effect.into_param().abi(), ::core::mem::transmute(rectangles.as_ptr()), rectangles.len() as _).ok() + (::windows_core::Interface::vtable(self).GetEffectInvalidRectangles)(::windows_core::Interface::as_raw(self), effect.into_param().abi(), ::core::mem::transmute(rectangles.as_ptr()), rectangles.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(feature = "Win32_Graphics_Direct2D_Common")] @@ -4126,7 +4126,7 @@ impl ID2D1DeviceContext1 { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateGradientStopCollection(&self, gradientstops: &[D2D1_GRADIENT_STOP], colorinterpolationgamma: D2D1_GAMMA, extendmode: D2D1_EXTEND_MODE) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.CreateGradientStopCollection)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(gradientstops.as_ptr()), gradientstops.len() as _, colorinterpolationgamma, extendmode, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.CreateGradientStopCollection)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(gradientstops.as_ptr()), gradientstops.len().try_into().unwrap(), colorinterpolationgamma, extendmode, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Foundation_Numerics\"`, `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] @@ -4269,7 +4269,7 @@ impl ID2D1DeviceContext1 { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.DrawText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len() as _, textformat.into_param().abi(), layoutrect, defaultfillbrush.into_param().abi(), options, measuringmode) + (::windows_core::Interface::vtable(self).base__.base__.DrawText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.into_param().abi(), layoutrect, defaultfillbrush.into_param().abi(), options, measuringmode) } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`, `\"Win32_Graphics_DirectWrite\"`"] #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite"))] @@ -4428,7 +4428,7 @@ impl ID2D1DeviceContext1 { } pub unsafe fn CreateColorContext(&self, space: D2D1_COLOR_SPACE, profile: ::core::option::Option<&[u8]>) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.CreateColorContext)(::windows_core::Interface::as_raw(self), space, ::core::mem::transmute(profile.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), profile.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateColorContext)(::windows_core::Interface::as_raw(self), space, ::core::mem::transmute(profile.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), profile.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } pub unsafe fn CreateColorContextFromFilename(&self, filename: P0) -> ::windows_core::Result where @@ -4463,7 +4463,7 @@ impl ID2D1DeviceContext1 { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateGradientStopCollection2(&self, straightalphagradientstops: &[D2D1_GRADIENT_STOP], preinterpolationspace: D2D1_COLOR_SPACE, postinterpolationspace: D2D1_COLOR_SPACE, bufferprecision: D2D1_BUFFER_PRECISION, extendmode: D2D1_EXTEND_MODE, colorinterpolationmode: D2D1_COLOR_INTERPOLATION_MODE) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.CreateGradientStopCollection2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(straightalphagradientstops.as_ptr()), straightalphagradientstops.len() as _, preinterpolationspace, postinterpolationspace, bufferprecision, extendmode, colorinterpolationmode, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateGradientStopCollection2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(straightalphagradientstops.as_ptr()), straightalphagradientstops.len().try_into().unwrap(), preinterpolationspace, postinterpolationspace, bufferprecision, extendmode, colorinterpolationmode, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Foundation_Numerics\"`, `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] @@ -4622,7 +4622,7 @@ impl ID2D1DeviceContext1 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.GetEffectInvalidRectangles)(::windows_core::Interface::as_raw(self), effect.into_param().abi(), ::core::mem::transmute(rectangles.as_ptr()), rectangles.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.GetEffectInvalidRectangles)(::windows_core::Interface::as_raw(self), effect.into_param().abi(), ::core::mem::transmute(rectangles.as_ptr()), rectangles.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(feature = "Win32_Graphics_Direct2D_Common")] @@ -4729,7 +4729,7 @@ impl ID2D1DeviceContext2 { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateGradientStopCollection(&self, gradientstops: &[D2D1_GRADIENT_STOP], colorinterpolationgamma: D2D1_GAMMA, extendmode: D2D1_EXTEND_MODE) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.CreateGradientStopCollection)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(gradientstops.as_ptr()), gradientstops.len() as _, colorinterpolationgamma, extendmode, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.CreateGradientStopCollection)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(gradientstops.as_ptr()), gradientstops.len().try_into().unwrap(), colorinterpolationgamma, extendmode, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Foundation_Numerics\"`, `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] @@ -4872,7 +4872,7 @@ impl ID2D1DeviceContext2 { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.DrawText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len() as _, textformat.into_param().abi(), layoutrect, defaultfillbrush.into_param().abi(), options, measuringmode) + (::windows_core::Interface::vtable(self).base__.base__.base__.DrawText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.into_param().abi(), layoutrect, defaultfillbrush.into_param().abi(), options, measuringmode) } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`, `\"Win32_Graphics_DirectWrite\"`"] #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite"))] @@ -5031,7 +5031,7 @@ impl ID2D1DeviceContext2 { } pub unsafe fn CreateColorContext(&self, space: D2D1_COLOR_SPACE, profile: ::core::option::Option<&[u8]>) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.CreateColorContext)(::windows_core::Interface::as_raw(self), space, ::core::mem::transmute(profile.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), profile.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.CreateColorContext)(::windows_core::Interface::as_raw(self), space, ::core::mem::transmute(profile.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), profile.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } pub unsafe fn CreateColorContextFromFilename(&self, filename: P0) -> ::windows_core::Result where @@ -5066,7 +5066,7 @@ impl ID2D1DeviceContext2 { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateGradientStopCollection2(&self, straightalphagradientstops: &[D2D1_GRADIENT_STOP], preinterpolationspace: D2D1_COLOR_SPACE, postinterpolationspace: D2D1_COLOR_SPACE, bufferprecision: D2D1_BUFFER_PRECISION, extendmode: D2D1_EXTEND_MODE, colorinterpolationmode: D2D1_COLOR_INTERPOLATION_MODE) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.CreateGradientStopCollection2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(straightalphagradientstops.as_ptr()), straightalphagradientstops.len() as _, preinterpolationspace, postinterpolationspace, bufferprecision, extendmode, colorinterpolationmode, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.CreateGradientStopCollection2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(straightalphagradientstops.as_ptr()), straightalphagradientstops.len().try_into().unwrap(), preinterpolationspace, postinterpolationspace, bufferprecision, extendmode, colorinterpolationmode, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Foundation_Numerics\"`, `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] @@ -5225,7 +5225,7 @@ impl ID2D1DeviceContext2 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.GetEffectInvalidRectangles)(::windows_core::Interface::as_raw(self), effect.into_param().abi(), ::core::mem::transmute(rectangles.as_ptr()), rectangles.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetEffectInvalidRectangles)(::windows_core::Interface::as_raw(self), effect.into_param().abi(), ::core::mem::transmute(rectangles.as_ptr()), rectangles.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(feature = "Win32_Graphics_Direct2D_Common")] @@ -5280,7 +5280,7 @@ impl ID2D1DeviceContext2 { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateGradientMesh(&self, patches: &[D2D1_GRADIENT_MESH_PATCH]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateGradientMesh)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(patches.as_ptr()), patches.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateGradientMesh)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(patches.as_ptr()), patches.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`, `\"Win32_Graphics_Imaging\"`"] #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_Imaging"))] @@ -5293,13 +5293,13 @@ impl ID2D1DeviceContext2 { } pub unsafe fn CreateLookupTable3D(&self, precision: D2D1_BUFFER_PRECISION, extents: &[u32; 3], data: &[u8], strides: &[u32; 2]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateLookupTable3D)(::windows_core::Interface::as_raw(self), precision, ::core::mem::transmute(extents.as_ptr()), ::core::mem::transmute(data.as_ptr()), data.len() as _, ::core::mem::transmute(strides.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateLookupTable3D)(::windows_core::Interface::as_raw(self), precision, ::core::mem::transmute(extents.as_ptr()), ::core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap(), ::core::mem::transmute(strides.as_ptr()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateImageSourceFromDxgi(&self, surfaces: &[::core::option::Option], colorspace: super::Dxgi::Common::DXGI_COLOR_SPACE_TYPE, options: D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateImageSourceFromDxgi)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(surfaces.as_ptr()), surfaces.len() as _, colorspace, options, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateImageSourceFromDxgi)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(surfaces.as_ptr()), surfaces.len().try_into().unwrap(), colorspace, options, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(feature = "Win32_Graphics_Direct2D_Common")] @@ -5431,7 +5431,7 @@ impl ID2D1DeviceContext3 { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateGradientStopCollection(&self, gradientstops: &[D2D1_GRADIENT_STOP], colorinterpolationgamma: D2D1_GAMMA, extendmode: D2D1_EXTEND_MODE) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateGradientStopCollection)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(gradientstops.as_ptr()), gradientstops.len() as _, colorinterpolationgamma, extendmode, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateGradientStopCollection)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(gradientstops.as_ptr()), gradientstops.len().try_into().unwrap(), colorinterpolationgamma, extendmode, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Foundation_Numerics\"`, `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] @@ -5574,7 +5574,7 @@ impl ID2D1DeviceContext3 { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.DrawText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len() as _, textformat.into_param().abi(), layoutrect, defaultfillbrush.into_param().abi(), options, measuringmode) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.DrawText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.into_param().abi(), layoutrect, defaultfillbrush.into_param().abi(), options, measuringmode) } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`, `\"Win32_Graphics_DirectWrite\"`"] #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite"))] @@ -5733,7 +5733,7 @@ impl ID2D1DeviceContext3 { } pub unsafe fn CreateColorContext(&self, space: D2D1_COLOR_SPACE, profile: ::core::option::Option<&[u8]>) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.CreateColorContext)(::windows_core::Interface::as_raw(self), space, ::core::mem::transmute(profile.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), profile.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.CreateColorContext)(::windows_core::Interface::as_raw(self), space, ::core::mem::transmute(profile.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), profile.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } pub unsafe fn CreateColorContextFromFilename(&self, filename: P0) -> ::windows_core::Result where @@ -5768,7 +5768,7 @@ impl ID2D1DeviceContext3 { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateGradientStopCollection2(&self, straightalphagradientstops: &[D2D1_GRADIENT_STOP], preinterpolationspace: D2D1_COLOR_SPACE, postinterpolationspace: D2D1_COLOR_SPACE, bufferprecision: D2D1_BUFFER_PRECISION, extendmode: D2D1_EXTEND_MODE, colorinterpolationmode: D2D1_COLOR_INTERPOLATION_MODE) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.CreateGradientStopCollection2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(straightalphagradientstops.as_ptr()), straightalphagradientstops.len() as _, preinterpolationspace, postinterpolationspace, bufferprecision, extendmode, colorinterpolationmode, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.CreateGradientStopCollection2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(straightalphagradientstops.as_ptr()), straightalphagradientstops.len().try_into().unwrap(), preinterpolationspace, postinterpolationspace, bufferprecision, extendmode, colorinterpolationmode, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Foundation_Numerics\"`, `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] @@ -5927,7 +5927,7 @@ impl ID2D1DeviceContext3 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetEffectInvalidRectangles)(::windows_core::Interface::as_raw(self), effect.into_param().abi(), ::core::mem::transmute(rectangles.as_ptr()), rectangles.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetEffectInvalidRectangles)(::windows_core::Interface::as_raw(self), effect.into_param().abi(), ::core::mem::transmute(rectangles.as_ptr()), rectangles.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(feature = "Win32_Graphics_Direct2D_Common")] @@ -5982,7 +5982,7 @@ impl ID2D1DeviceContext3 { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateGradientMesh(&self, patches: &[D2D1_GRADIENT_MESH_PATCH]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.CreateGradientMesh)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(patches.as_ptr()), patches.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateGradientMesh)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(patches.as_ptr()), patches.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`, `\"Win32_Graphics_Imaging\"`"] #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_Imaging"))] @@ -5995,13 +5995,13 @@ impl ID2D1DeviceContext3 { } pub unsafe fn CreateLookupTable3D(&self, precision: D2D1_BUFFER_PRECISION, extents: &[u32; 3], data: &[u8], strides: &[u32; 2]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.CreateLookupTable3D)(::windows_core::Interface::as_raw(self), precision, ::core::mem::transmute(extents.as_ptr()), ::core::mem::transmute(data.as_ptr()), data.len() as _, ::core::mem::transmute(strides.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateLookupTable3D)(::windows_core::Interface::as_raw(self), precision, ::core::mem::transmute(extents.as_ptr()), ::core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap(), ::core::mem::transmute(strides.as_ptr()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateImageSourceFromDxgi(&self, surfaces: &[::core::option::Option], colorspace: super::Dxgi::Common::DXGI_COLOR_SPACE_TYPE, options: D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.CreateImageSourceFromDxgi)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(surfaces.as_ptr()), surfaces.len() as _, colorspace, options, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateImageSourceFromDxgi)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(surfaces.as_ptr()), surfaces.len().try_into().unwrap(), colorspace, options, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(feature = "Win32_Graphics_Direct2D_Common")] @@ -6117,7 +6117,7 @@ impl ID2D1DeviceContext4 { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateGradientStopCollection(&self, gradientstops: &[D2D1_GRADIENT_STOP], colorinterpolationgamma: D2D1_GAMMA, extendmode: D2D1_EXTEND_MODE) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateGradientStopCollection)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(gradientstops.as_ptr()), gradientstops.len() as _, colorinterpolationgamma, extendmode, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateGradientStopCollection)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(gradientstops.as_ptr()), gradientstops.len().try_into().unwrap(), colorinterpolationgamma, extendmode, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Foundation_Numerics\"`, `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] @@ -6260,7 +6260,7 @@ impl ID2D1DeviceContext4 { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.DrawText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len() as _, textformat.into_param().abi(), layoutrect, defaultfillbrush.into_param().abi(), options, measuringmode) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.DrawText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.into_param().abi(), layoutrect, defaultfillbrush.into_param().abi(), options, measuringmode) } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`, `\"Win32_Graphics_DirectWrite\"`"] #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite"))] @@ -6419,7 +6419,7 @@ impl ID2D1DeviceContext4 { } pub unsafe fn CreateColorContext(&self, space: D2D1_COLOR_SPACE, profile: ::core::option::Option<&[u8]>) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateColorContext)(::windows_core::Interface::as_raw(self), space, ::core::mem::transmute(profile.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), profile.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateColorContext)(::windows_core::Interface::as_raw(self), space, ::core::mem::transmute(profile.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), profile.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } pub unsafe fn CreateColorContextFromFilename(&self, filename: P0) -> ::windows_core::Result where @@ -6454,7 +6454,7 @@ impl ID2D1DeviceContext4 { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateGradientStopCollection2(&self, straightalphagradientstops: &[D2D1_GRADIENT_STOP], preinterpolationspace: D2D1_COLOR_SPACE, postinterpolationspace: D2D1_COLOR_SPACE, bufferprecision: D2D1_BUFFER_PRECISION, extendmode: D2D1_EXTEND_MODE, colorinterpolationmode: D2D1_COLOR_INTERPOLATION_MODE) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateGradientStopCollection2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(straightalphagradientstops.as_ptr()), straightalphagradientstops.len() as _, preinterpolationspace, postinterpolationspace, bufferprecision, extendmode, colorinterpolationmode, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateGradientStopCollection2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(straightalphagradientstops.as_ptr()), straightalphagradientstops.len().try_into().unwrap(), preinterpolationspace, postinterpolationspace, bufferprecision, extendmode, colorinterpolationmode, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Foundation_Numerics\"`, `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] @@ -6613,7 +6613,7 @@ impl ID2D1DeviceContext4 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetEffectInvalidRectangles)(::windows_core::Interface::as_raw(self), effect.into_param().abi(), ::core::mem::transmute(rectangles.as_ptr()), rectangles.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetEffectInvalidRectangles)(::windows_core::Interface::as_raw(self), effect.into_param().abi(), ::core::mem::transmute(rectangles.as_ptr()), rectangles.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(feature = "Win32_Graphics_Direct2D_Common")] @@ -6668,7 +6668,7 @@ impl ID2D1DeviceContext4 { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateGradientMesh(&self, patches: &[D2D1_GRADIENT_MESH_PATCH]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.CreateGradientMesh)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(patches.as_ptr()), patches.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.CreateGradientMesh)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(patches.as_ptr()), patches.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`, `\"Win32_Graphics_Imaging\"`"] #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_Imaging"))] @@ -6681,13 +6681,13 @@ impl ID2D1DeviceContext4 { } pub unsafe fn CreateLookupTable3D(&self, precision: D2D1_BUFFER_PRECISION, extents: &[u32; 3], data: &[u8], strides: &[u32; 2]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.CreateLookupTable3D)(::windows_core::Interface::as_raw(self), precision, ::core::mem::transmute(extents.as_ptr()), ::core::mem::transmute(data.as_ptr()), data.len() as _, ::core::mem::transmute(strides.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.CreateLookupTable3D)(::windows_core::Interface::as_raw(self), precision, ::core::mem::transmute(extents.as_ptr()), ::core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap(), ::core::mem::transmute(strides.as_ptr()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateImageSourceFromDxgi(&self, surfaces: &[::core::option::Option], colorspace: super::Dxgi::Common::DXGI_COLOR_SPACE_TYPE, options: D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.CreateImageSourceFromDxgi)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(surfaces.as_ptr()), surfaces.len() as _, colorspace, options, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.CreateImageSourceFromDxgi)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(surfaces.as_ptr()), surfaces.len().try_into().unwrap(), colorspace, options, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(feature = "Win32_Graphics_Direct2D_Common")] @@ -6750,7 +6750,7 @@ impl ID2D1DeviceContext4 { P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).DrawText2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len() as _, textformat.into_param().abi(), layoutrect, defaultfillbrush.into_param().abi(), svgglyphstyle.into_param().abi(), colorpaletteindex, options, measuringmode) + (::windows_core::Interface::vtable(self).DrawText2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.into_param().abi(), layoutrect, defaultfillbrush.into_param().abi(), svgglyphstyle.into_param().abi(), colorpaletteindex, options, measuringmode) } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`, `\"Win32_Graphics_DirectWrite\"`"] #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite"))] @@ -6884,7 +6884,7 @@ impl ID2D1DeviceContext5 { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateGradientStopCollection(&self, gradientstops: &[D2D1_GRADIENT_STOP], colorinterpolationgamma: D2D1_GAMMA, extendmode: D2D1_EXTEND_MODE) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.CreateGradientStopCollection)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(gradientstops.as_ptr()), gradientstops.len() as _, colorinterpolationgamma, extendmode, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.CreateGradientStopCollection)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(gradientstops.as_ptr()), gradientstops.len().try_into().unwrap(), colorinterpolationgamma, extendmode, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Foundation_Numerics\"`, `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] @@ -7027,7 +7027,7 @@ impl ID2D1DeviceContext5 { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.DrawText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len() as _, textformat.into_param().abi(), layoutrect, defaultfillbrush.into_param().abi(), options, measuringmode) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.DrawText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.into_param().abi(), layoutrect, defaultfillbrush.into_param().abi(), options, measuringmode) } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`, `\"Win32_Graphics_DirectWrite\"`"] #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite"))] @@ -7186,7 +7186,7 @@ impl ID2D1DeviceContext5 { } pub unsafe fn CreateColorContext(&self, space: D2D1_COLOR_SPACE, profile: ::core::option::Option<&[u8]>) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateColorContext)(::windows_core::Interface::as_raw(self), space, ::core::mem::transmute(profile.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), profile.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateColorContext)(::windows_core::Interface::as_raw(self), space, ::core::mem::transmute(profile.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), profile.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } pub unsafe fn CreateColorContextFromFilename(&self, filename: P0) -> ::windows_core::Result where @@ -7221,7 +7221,7 @@ impl ID2D1DeviceContext5 { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateGradientStopCollection2(&self, straightalphagradientstops: &[D2D1_GRADIENT_STOP], preinterpolationspace: D2D1_COLOR_SPACE, postinterpolationspace: D2D1_COLOR_SPACE, bufferprecision: D2D1_BUFFER_PRECISION, extendmode: D2D1_EXTEND_MODE, colorinterpolationmode: D2D1_COLOR_INTERPOLATION_MODE) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateGradientStopCollection2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(straightalphagradientstops.as_ptr()), straightalphagradientstops.len() as _, preinterpolationspace, postinterpolationspace, bufferprecision, extendmode, colorinterpolationmode, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateGradientStopCollection2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(straightalphagradientstops.as_ptr()), straightalphagradientstops.len().try_into().unwrap(), preinterpolationspace, postinterpolationspace, bufferprecision, extendmode, colorinterpolationmode, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Foundation_Numerics\"`, `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] @@ -7380,7 +7380,7 @@ impl ID2D1DeviceContext5 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetEffectInvalidRectangles)(::windows_core::Interface::as_raw(self), effect.into_param().abi(), ::core::mem::transmute(rectangles.as_ptr()), rectangles.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetEffectInvalidRectangles)(::windows_core::Interface::as_raw(self), effect.into_param().abi(), ::core::mem::transmute(rectangles.as_ptr()), rectangles.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(feature = "Win32_Graphics_Direct2D_Common")] @@ -7435,7 +7435,7 @@ impl ID2D1DeviceContext5 { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateGradientMesh(&self, patches: &[D2D1_GRADIENT_MESH_PATCH]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.CreateGradientMesh)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(patches.as_ptr()), patches.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.CreateGradientMesh)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(patches.as_ptr()), patches.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`, `\"Win32_Graphics_Imaging\"`"] #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_Imaging"))] @@ -7448,13 +7448,13 @@ impl ID2D1DeviceContext5 { } pub unsafe fn CreateLookupTable3D(&self, precision: D2D1_BUFFER_PRECISION, extents: &[u32; 3], data: &[u8], strides: &[u32; 2]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.CreateLookupTable3D)(::windows_core::Interface::as_raw(self), precision, ::core::mem::transmute(extents.as_ptr()), ::core::mem::transmute(data.as_ptr()), data.len() as _, ::core::mem::transmute(strides.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.CreateLookupTable3D)(::windows_core::Interface::as_raw(self), precision, ::core::mem::transmute(extents.as_ptr()), ::core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap(), ::core::mem::transmute(strides.as_ptr()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateImageSourceFromDxgi(&self, surfaces: &[::core::option::Option], colorspace: super::Dxgi::Common::DXGI_COLOR_SPACE_TYPE, options: D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.CreateImageSourceFromDxgi)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(surfaces.as_ptr()), surfaces.len() as _, colorspace, options, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.CreateImageSourceFromDxgi)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(surfaces.as_ptr()), surfaces.len().try_into().unwrap(), colorspace, options, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(feature = "Win32_Graphics_Direct2D_Common")] @@ -7517,7 +7517,7 @@ impl ID2D1DeviceContext5 { P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.DrawText2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len() as _, textformat.into_param().abi(), layoutrect, defaultfillbrush.into_param().abi(), svgglyphstyle.into_param().abi(), colorpaletteindex, options, measuringmode) + (::windows_core::Interface::vtable(self).base__.DrawText2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.into_param().abi(), layoutrect, defaultfillbrush.into_param().abi(), svgglyphstyle.into_param().abi(), colorpaletteindex, options, measuringmode) } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`, `\"Win32_Graphics_DirectWrite\"`"] #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite"))] @@ -7666,7 +7666,7 @@ impl ID2D1DeviceContext6 { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateGradientStopCollection(&self, gradientstops: &[D2D1_GRADIENT_STOP], colorinterpolationgamma: D2D1_GAMMA, extendmode: D2D1_EXTEND_MODE) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.CreateGradientStopCollection)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(gradientstops.as_ptr()), gradientstops.len() as _, colorinterpolationgamma, extendmode, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.CreateGradientStopCollection)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(gradientstops.as_ptr()), gradientstops.len().try_into().unwrap(), colorinterpolationgamma, extendmode, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Foundation_Numerics\"`, `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] @@ -7809,7 +7809,7 @@ impl ID2D1DeviceContext6 { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.DrawText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len() as _, textformat.into_param().abi(), layoutrect, defaultfillbrush.into_param().abi(), options, measuringmode) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.DrawText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.into_param().abi(), layoutrect, defaultfillbrush.into_param().abi(), options, measuringmode) } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`, `\"Win32_Graphics_DirectWrite\"`"] #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite"))] @@ -7968,7 +7968,7 @@ impl ID2D1DeviceContext6 { } pub unsafe fn CreateColorContext(&self, space: D2D1_COLOR_SPACE, profile: ::core::option::Option<&[u8]>) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.CreateColorContext)(::windows_core::Interface::as_raw(self), space, ::core::mem::transmute(profile.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), profile.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.CreateColorContext)(::windows_core::Interface::as_raw(self), space, ::core::mem::transmute(profile.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), profile.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } pub unsafe fn CreateColorContextFromFilename(&self, filename: P0) -> ::windows_core::Result where @@ -8003,7 +8003,7 @@ impl ID2D1DeviceContext6 { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateGradientStopCollection2(&self, straightalphagradientstops: &[D2D1_GRADIENT_STOP], preinterpolationspace: D2D1_COLOR_SPACE, postinterpolationspace: D2D1_COLOR_SPACE, bufferprecision: D2D1_BUFFER_PRECISION, extendmode: D2D1_EXTEND_MODE, colorinterpolationmode: D2D1_COLOR_INTERPOLATION_MODE) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.CreateGradientStopCollection2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(straightalphagradientstops.as_ptr()), straightalphagradientstops.len() as _, preinterpolationspace, postinterpolationspace, bufferprecision, extendmode, colorinterpolationmode, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.CreateGradientStopCollection2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(straightalphagradientstops.as_ptr()), straightalphagradientstops.len().try_into().unwrap(), preinterpolationspace, postinterpolationspace, bufferprecision, extendmode, colorinterpolationmode, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Foundation_Numerics\"`, `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] @@ -8162,7 +8162,7 @@ impl ID2D1DeviceContext6 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetEffectInvalidRectangles)(::windows_core::Interface::as_raw(self), effect.into_param().abi(), ::core::mem::transmute(rectangles.as_ptr()), rectangles.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetEffectInvalidRectangles)(::windows_core::Interface::as_raw(self), effect.into_param().abi(), ::core::mem::transmute(rectangles.as_ptr()), rectangles.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(feature = "Win32_Graphics_Direct2D_Common")] @@ -8217,7 +8217,7 @@ impl ID2D1DeviceContext6 { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateGradientMesh(&self, patches: &[D2D1_GRADIENT_MESH_PATCH]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateGradientMesh)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(patches.as_ptr()), patches.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateGradientMesh)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(patches.as_ptr()), patches.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`, `\"Win32_Graphics_Imaging\"`"] #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_Imaging"))] @@ -8230,13 +8230,13 @@ impl ID2D1DeviceContext6 { } pub unsafe fn CreateLookupTable3D(&self, precision: D2D1_BUFFER_PRECISION, extents: &[u32; 3], data: &[u8], strides: &[u32; 2]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateLookupTable3D)(::windows_core::Interface::as_raw(self), precision, ::core::mem::transmute(extents.as_ptr()), ::core::mem::transmute(data.as_ptr()), data.len() as _, ::core::mem::transmute(strides.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateLookupTable3D)(::windows_core::Interface::as_raw(self), precision, ::core::mem::transmute(extents.as_ptr()), ::core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap(), ::core::mem::transmute(strides.as_ptr()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateImageSourceFromDxgi(&self, surfaces: &[::core::option::Option], colorspace: super::Dxgi::Common::DXGI_COLOR_SPACE_TYPE, options: D2D1_IMAGE_SOURCE_FROM_DXGI_OPTIONS) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateImageSourceFromDxgi)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(surfaces.as_ptr()), surfaces.len() as _, colorspace, options, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateImageSourceFromDxgi)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(surfaces.as_ptr()), surfaces.len().try_into().unwrap(), colorspace, options, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(feature = "Win32_Graphics_Direct2D_Common")] @@ -8299,7 +8299,7 @@ impl ID2D1DeviceContext6 { P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.DrawText2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len() as _, textformat.into_param().abi(), layoutrect, defaultfillbrush.into_param().abi(), svgglyphstyle.into_param().abi(), colorpaletteindex, options, measuringmode) + (::windows_core::Interface::vtable(self).base__.base__.DrawText2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.into_param().abi(), layoutrect, defaultfillbrush.into_param().abi(), svgglyphstyle.into_param().abi(), colorpaletteindex, options, measuringmode) } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`, `\"Win32_Graphics_DirectWrite\"`"] #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite"))] @@ -8421,7 +8421,7 @@ impl ID2D1DrawInfo { (::windows_core::Interface::vtable(self).base__.SetInstructionCountHint)(::windows_core::Interface::as_raw(self), instructioncount) } pub unsafe fn SetPixelShaderConstantBuffer(&self, buffer: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetPixelShaderConstantBuffer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _).ok() + (::windows_core::Interface::vtable(self).SetPixelShaderConstantBuffer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()).ok() } pub unsafe fn SetResourceTexture(&self, textureindex: u32, resourcetexture: P0) -> ::windows_core::Result<()> where @@ -8430,7 +8430,7 @@ impl ID2D1DrawInfo { (::windows_core::Interface::vtable(self).SetResourceTexture)(::windows_core::Interface::as_raw(self), textureindex, resourcetexture.into_param().abi()).ok() } pub unsafe fn SetVertexShaderConstantBuffer(&self, buffer: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetVertexShaderConstantBuffer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _).ok() + (::windows_core::Interface::vtable(self).SetVertexShaderConstantBuffer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()).ok() } pub unsafe fn SetPixelShader(&self, shaderid: *const ::windows_core::GUID, pixeloptions: D2D1_PIXEL_OPTIONS) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).SetPixelShader)(::windows_core::Interface::as_raw(self), shaderid, pixeloptions).ok() @@ -8471,7 +8471,7 @@ impl ID2D1DrawTransform { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn MapOutputRectToInputRects(&self, outputrect: *const super::super::Foundation::RECT, inputrects: &mut [super::super::Foundation::RECT]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.MapOutputRectToInputRects)(::windows_core::Interface::as_raw(self), outputrect, ::core::mem::transmute(inputrects.as_ptr()), inputrects.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.MapOutputRectToInputRects)(::windows_core::Interface::as_raw(self), outputrect, ::core::mem::transmute(inputrects.as_ptr()), inputrects.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -8646,7 +8646,7 @@ impl ID2D1Effect { (::windows_core::Interface::vtable(self).base__.GetPropertyCount)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetPropertyName(&self, index: u32, name: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetPropertyName)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(name.as_ptr()), name.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.GetPropertyName)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(name.as_ptr()), name.len().try_into().unwrap()).ok() } pub unsafe fn GetPropertyNameLength(&self, index: u32) -> u32 { (::windows_core::Interface::vtable(self).base__.GetPropertyNameLength)(::windows_core::Interface::as_raw(self), index) @@ -8664,19 +8664,19 @@ impl ID2D1Effect { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).base__.SetValueByName)(::windows_core::Interface::as_raw(self), name.into_param().abi(), r#type, ::core::mem::transmute(data.as_ptr()), data.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.SetValueByName)(::windows_core::Interface::as_raw(self), name.into_param().abi(), r#type, ::core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap()).ok() } pub unsafe fn SetValue(&self, index: u32, r#type: D2D1_PROPERTY_TYPE, data: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetValue)(::windows_core::Interface::as_raw(self), index, r#type, ::core::mem::transmute(data.as_ptr()), data.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.SetValue)(::windows_core::Interface::as_raw(self), index, r#type, ::core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap()).ok() } pub unsafe fn GetValueByName(&self, name: P0, r#type: D2D1_PROPERTY_TYPE, data: &mut [u8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).base__.GetValueByName)(::windows_core::Interface::as_raw(self), name.into_param().abi(), r#type, ::core::mem::transmute(data.as_ptr()), data.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.GetValueByName)(::windows_core::Interface::as_raw(self), name.into_param().abi(), r#type, ::core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap()).ok() } pub unsafe fn GetValue(&self, index: u32, r#type: D2D1_PROPERTY_TYPE, data: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetValue)(::windows_core::Interface::as_raw(self), index, r#type, ::core::mem::transmute(data.as_ptr()), data.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.GetValue)(::windows_core::Interface::as_raw(self), index, r#type, ::core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap()).ok() } pub unsafe fn GetValueSize(&self, index: u32) -> u32 { (::windows_core::Interface::vtable(self).base__.GetValueSize)(::windows_core::Interface::as_raw(self), index) @@ -8748,7 +8748,7 @@ impl ID2D1EffectContext { #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetMaximumSupportedFeatureLevel(&self, featurelevels: &[super::Direct3D::D3D_FEATURE_LEVEL]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).GetMaximumSupportedFeatureLevel)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(featurelevels.as_ptr()), featurelevels.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).GetMaximumSupportedFeatureLevel)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(featurelevels.as_ptr()), featurelevels.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn CreateTransformNodeFromEffect(&self, effect: P0) -> ::windows_core::Result where @@ -8778,13 +8778,13 @@ impl ID2D1EffectContext { (::windows_core::Interface::vtable(self).CreateBoundsAdjustmentTransform)(::windows_core::Interface::as_raw(self), outputrectangle, &mut result__).from_abi(result__) } pub unsafe fn LoadPixelShader(&self, shaderid: *const ::windows_core::GUID, shaderbuffer: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).LoadPixelShader)(::windows_core::Interface::as_raw(self), shaderid, ::core::mem::transmute(shaderbuffer.as_ptr()), shaderbuffer.len() as _).ok() + (::windows_core::Interface::vtable(self).LoadPixelShader)(::windows_core::Interface::as_raw(self), shaderid, ::core::mem::transmute(shaderbuffer.as_ptr()), shaderbuffer.len().try_into().unwrap()).ok() } pub unsafe fn LoadVertexShader(&self, resourceid: *const ::windows_core::GUID, shaderbuffer: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).LoadVertexShader)(::windows_core::Interface::as_raw(self), resourceid, ::core::mem::transmute(shaderbuffer.as_ptr()), shaderbuffer.len() as _).ok() + (::windows_core::Interface::vtable(self).LoadVertexShader)(::windows_core::Interface::as_raw(self), resourceid, ::core::mem::transmute(shaderbuffer.as_ptr()), shaderbuffer.len().try_into().unwrap()).ok() } pub unsafe fn LoadComputeShader(&self, resourceid: *const ::windows_core::GUID, shaderbuffer: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).LoadComputeShader)(::windows_core::Interface::as_raw(self), resourceid, ::core::mem::transmute(shaderbuffer.as_ptr()), shaderbuffer.len() as _).ok() + (::windows_core::Interface::vtable(self).LoadComputeShader)(::windows_core::Interface::as_raw(self), resourceid, ::core::mem::transmute(shaderbuffer.as_ptr()), shaderbuffer.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -8793,7 +8793,7 @@ impl ID2D1EffectContext { } pub unsafe fn CreateResourceTexture(&self, resourceid: ::core::option::Option<*const ::windows_core::GUID>, resourcetextureproperties: *const D2D1_RESOURCE_TEXTURE_PROPERTIES, data: ::core::option::Option<&[u8]>, strides: ::core::option::Option<*const u32>) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateResourceTexture)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(resourceid.unwrap_or(::std::ptr::null())), resourcetextureproperties, ::core::mem::transmute(data.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(strides.unwrap_or(::std::ptr::null())), data.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateResourceTexture)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(resourceid.unwrap_or(::std::ptr::null())), resourcetextureproperties, ::core::mem::transmute(data.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(strides.unwrap_or(::std::ptr::null())), data.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } pub unsafe fn FindResourceTexture(&self, resourceid: *const ::windows_core::GUID) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -8811,7 +8811,7 @@ impl ID2D1EffectContext { } pub unsafe fn CreateColorContext(&self, space: D2D1_COLOR_SPACE, profile: ::core::option::Option<&[u8]>) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateColorContext)(::windows_core::Interface::as_raw(self), space, ::core::mem::transmute(profile.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), profile.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateColorContext)(::windows_core::Interface::as_raw(self), space, ::core::mem::transmute(profile.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), profile.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } pub unsafe fn CreateColorContextFromFilename(&self, filename: P0) -> ::windows_core::Result where @@ -8909,7 +8909,7 @@ impl ID2D1EffectContext1 { #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetMaximumSupportedFeatureLevel(&self, featurelevels: &[super::Direct3D::D3D_FEATURE_LEVEL]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.GetMaximumSupportedFeatureLevel)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(featurelevels.as_ptr()), featurelevels.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.GetMaximumSupportedFeatureLevel)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(featurelevels.as_ptr()), featurelevels.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn CreateTransformNodeFromEffect(&self, effect: P0) -> ::windows_core::Result where @@ -8939,13 +8939,13 @@ impl ID2D1EffectContext1 { (::windows_core::Interface::vtable(self).base__.CreateBoundsAdjustmentTransform)(::windows_core::Interface::as_raw(self), outputrectangle, &mut result__).from_abi(result__) } pub unsafe fn LoadPixelShader(&self, shaderid: *const ::windows_core::GUID, shaderbuffer: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.LoadPixelShader)(::windows_core::Interface::as_raw(self), shaderid, ::core::mem::transmute(shaderbuffer.as_ptr()), shaderbuffer.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.LoadPixelShader)(::windows_core::Interface::as_raw(self), shaderid, ::core::mem::transmute(shaderbuffer.as_ptr()), shaderbuffer.len().try_into().unwrap()).ok() } pub unsafe fn LoadVertexShader(&self, resourceid: *const ::windows_core::GUID, shaderbuffer: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.LoadVertexShader)(::windows_core::Interface::as_raw(self), resourceid, ::core::mem::transmute(shaderbuffer.as_ptr()), shaderbuffer.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.LoadVertexShader)(::windows_core::Interface::as_raw(self), resourceid, ::core::mem::transmute(shaderbuffer.as_ptr()), shaderbuffer.len().try_into().unwrap()).ok() } pub unsafe fn LoadComputeShader(&self, resourceid: *const ::windows_core::GUID, shaderbuffer: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.LoadComputeShader)(::windows_core::Interface::as_raw(self), resourceid, ::core::mem::transmute(shaderbuffer.as_ptr()), shaderbuffer.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.LoadComputeShader)(::windows_core::Interface::as_raw(self), resourceid, ::core::mem::transmute(shaderbuffer.as_ptr()), shaderbuffer.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -8954,7 +8954,7 @@ impl ID2D1EffectContext1 { } pub unsafe fn CreateResourceTexture(&self, resourceid: ::core::option::Option<*const ::windows_core::GUID>, resourcetextureproperties: *const D2D1_RESOURCE_TEXTURE_PROPERTIES, data: ::core::option::Option<&[u8]>, strides: ::core::option::Option<*const u32>) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.CreateResourceTexture)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(resourceid.unwrap_or(::std::ptr::null())), resourcetextureproperties, ::core::mem::transmute(data.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(strides.unwrap_or(::std::ptr::null())), data.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateResourceTexture)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(resourceid.unwrap_or(::std::ptr::null())), resourcetextureproperties, ::core::mem::transmute(data.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(strides.unwrap_or(::std::ptr::null())), data.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } pub unsafe fn FindResourceTexture(&self, resourceid: *const ::windows_core::GUID) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -8972,7 +8972,7 @@ impl ID2D1EffectContext1 { } pub unsafe fn CreateColorContext(&self, space: D2D1_COLOR_SPACE, profile: ::core::option::Option<&[u8]>) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.CreateColorContext)(::windows_core::Interface::as_raw(self), space, ::core::mem::transmute(profile.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), profile.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateColorContext)(::windows_core::Interface::as_raw(self), space, ::core::mem::transmute(profile.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), profile.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } pub unsafe fn CreateColorContextFromFilename(&self, filename: P0) -> ::windows_core::Result where @@ -9000,7 +9000,7 @@ impl ID2D1EffectContext1 { } pub unsafe fn CreateLookupTable3D(&self, precision: D2D1_BUFFER_PRECISION, extents: &[u32; 3], data: &[u8], strides: &[u32; 2]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateLookupTable3D)(::windows_core::Interface::as_raw(self), precision, ::core::mem::transmute(extents.as_ptr()), ::core::mem::transmute(data.as_ptr()), data.len() as _, ::core::mem::transmute(strides.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateLookupTable3D)(::windows_core::Interface::as_raw(self), precision, ::core::mem::transmute(extents.as_ptr()), ::core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap(), ::core::mem::transmute(strides.as_ptr()), &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(ID2D1EffectContext1, ::windows_core::IUnknown, ID2D1EffectContext); @@ -9033,7 +9033,7 @@ impl ID2D1EffectContext2 { #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetMaximumSupportedFeatureLevel(&self, featurelevels: &[super::Direct3D::D3D_FEATURE_LEVEL]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.GetMaximumSupportedFeatureLevel)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(featurelevels.as_ptr()), featurelevels.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.GetMaximumSupportedFeatureLevel)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(featurelevels.as_ptr()), featurelevels.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn CreateTransformNodeFromEffect(&self, effect: P0) -> ::windows_core::Result where @@ -9063,13 +9063,13 @@ impl ID2D1EffectContext2 { (::windows_core::Interface::vtable(self).base__.base__.CreateBoundsAdjustmentTransform)(::windows_core::Interface::as_raw(self), outputrectangle, &mut result__).from_abi(result__) } pub unsafe fn LoadPixelShader(&self, shaderid: *const ::windows_core::GUID, shaderbuffer: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.LoadPixelShader)(::windows_core::Interface::as_raw(self), shaderid, ::core::mem::transmute(shaderbuffer.as_ptr()), shaderbuffer.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.LoadPixelShader)(::windows_core::Interface::as_raw(self), shaderid, ::core::mem::transmute(shaderbuffer.as_ptr()), shaderbuffer.len().try_into().unwrap()).ok() } pub unsafe fn LoadVertexShader(&self, resourceid: *const ::windows_core::GUID, shaderbuffer: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.LoadVertexShader)(::windows_core::Interface::as_raw(self), resourceid, ::core::mem::transmute(shaderbuffer.as_ptr()), shaderbuffer.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.LoadVertexShader)(::windows_core::Interface::as_raw(self), resourceid, ::core::mem::transmute(shaderbuffer.as_ptr()), shaderbuffer.len().try_into().unwrap()).ok() } pub unsafe fn LoadComputeShader(&self, resourceid: *const ::windows_core::GUID, shaderbuffer: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.LoadComputeShader)(::windows_core::Interface::as_raw(self), resourceid, ::core::mem::transmute(shaderbuffer.as_ptr()), shaderbuffer.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.LoadComputeShader)(::windows_core::Interface::as_raw(self), resourceid, ::core::mem::transmute(shaderbuffer.as_ptr()), shaderbuffer.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -9078,7 +9078,7 @@ impl ID2D1EffectContext2 { } pub unsafe fn CreateResourceTexture(&self, resourceid: ::core::option::Option<*const ::windows_core::GUID>, resourcetextureproperties: *const D2D1_RESOURCE_TEXTURE_PROPERTIES, data: ::core::option::Option<&[u8]>, strides: ::core::option::Option<*const u32>) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.CreateResourceTexture)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(resourceid.unwrap_or(::std::ptr::null())), resourcetextureproperties, ::core::mem::transmute(data.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(strides.unwrap_or(::std::ptr::null())), data.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.CreateResourceTexture)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(resourceid.unwrap_or(::std::ptr::null())), resourcetextureproperties, ::core::mem::transmute(data.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(strides.unwrap_or(::std::ptr::null())), data.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } pub unsafe fn FindResourceTexture(&self, resourceid: *const ::windows_core::GUID) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -9096,7 +9096,7 @@ impl ID2D1EffectContext2 { } pub unsafe fn CreateColorContext(&self, space: D2D1_COLOR_SPACE, profile: ::core::option::Option<&[u8]>) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.CreateColorContext)(::windows_core::Interface::as_raw(self), space, ::core::mem::transmute(profile.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), profile.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.CreateColorContext)(::windows_core::Interface::as_raw(self), space, ::core::mem::transmute(profile.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), profile.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } pub unsafe fn CreateColorContextFromFilename(&self, filename: P0) -> ::windows_core::Result where @@ -9124,7 +9124,7 @@ impl ID2D1EffectContext2 { } pub unsafe fn CreateLookupTable3D(&self, precision: D2D1_BUFFER_PRECISION, extents: &[u32; 3], data: &[u8], strides: &[u32; 2]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.CreateLookupTable3D)(::windows_core::Interface::as_raw(self), precision, ::core::mem::transmute(extents.as_ptr()), ::core::mem::transmute(data.as_ptr()), data.len() as _, ::core::mem::transmute(strides.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateLookupTable3D)(::windows_core::Interface::as_raw(self), precision, ::core::mem::transmute(extents.as_ptr()), ::core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap(), ::core::mem::transmute(strides.as_ptr()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(feature = "Win32_Graphics_Dxgi_Common")] @@ -9364,7 +9364,7 @@ impl ID2D1Factory { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateGeometryGroup(&self, fillmode: Common::D2D1_FILL_MODE, geometries: &[::core::option::Option]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateGeometryGroup)(::windows_core::Interface::as_raw(self), fillmode, ::core::mem::transmute(geometries.as_ptr()), geometries.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateGeometryGroup)(::windows_core::Interface::as_raw(self), fillmode, ::core::mem::transmute(geometries.as_ptr()), geometries.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Foundation_Numerics\"`"] #[cfg(feature = "Foundation_Numerics")] @@ -9381,7 +9381,7 @@ impl ID2D1Factory { } pub unsafe fn CreateStrokeStyle(&self, strokestyleproperties: *const D2D1_STROKE_STYLE_PROPERTIES, dashes: ::core::option::Option<&[f32]>) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateStrokeStyle)(::windows_core::Interface::as_raw(self), strokestyleproperties, ::core::mem::transmute(dashes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dashes.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateStrokeStyle)(::windows_core::Interface::as_raw(self), strokestyleproperties, ::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()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Foundation_Numerics\"`, `\"Win32_Graphics_DirectWrite\"`"] #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_DirectWrite"))] @@ -9513,7 +9513,7 @@ impl ID2D1Factory1 { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateGeometryGroup(&self, fillmode: Common::D2D1_FILL_MODE, geometries: &[::core::option::Option]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.CreateGeometryGroup)(::windows_core::Interface::as_raw(self), fillmode, ::core::mem::transmute(geometries.as_ptr()), geometries.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateGeometryGroup)(::windows_core::Interface::as_raw(self), fillmode, ::core::mem::transmute(geometries.as_ptr()), geometries.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Foundation_Numerics\"`"] #[cfg(feature = "Foundation_Numerics")] @@ -9530,7 +9530,7 @@ impl ID2D1Factory1 { } pub unsafe fn CreateStrokeStyle(&self, strokestyleproperties: *const D2D1_STROKE_STYLE_PROPERTIES, dashes: ::core::option::Option<&[f32]>) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.CreateStrokeStyle)(::windows_core::Interface::as_raw(self), strokestyleproperties, ::core::mem::transmute(dashes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dashes.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateStrokeStyle)(::windows_core::Interface::as_raw(self), strokestyleproperties, ::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()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Foundation_Numerics\"`, `\"Win32_Graphics_DirectWrite\"`"] #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_DirectWrite"))] @@ -9582,7 +9582,7 @@ impl ID2D1Factory1 { } pub unsafe fn CreateStrokeStyle2(&self, strokestyleproperties: *const D2D1_STROKE_STYLE_PROPERTIES1, dashes: ::core::option::Option<&[f32]>) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateStrokeStyle2)(::windows_core::Interface::as_raw(self), strokestyleproperties, ::core::mem::transmute(dashes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dashes.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateStrokeStyle2)(::windows_core::Interface::as_raw(self), strokestyleproperties, ::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()), &mut result__).from_abi(result__) } pub unsafe fn CreatePathGeometry2(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -9612,19 +9612,19 @@ impl ID2D1Factory1 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).RegisterEffectFromStream)(::windows_core::Interface::as_raw(self), classid, propertyxml.into_param().abi(), ::core::mem::transmute(bindings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), bindings.as_deref().map_or(0, |slice| slice.len() as _), effectfactory).ok() + (::windows_core::Interface::vtable(self).RegisterEffectFromStream)(::windows_core::Interface::as_raw(self), classid, propertyxml.into_param().abi(), ::core::mem::transmute(bindings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), bindings.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), effectfactory).ok() } pub unsafe fn RegisterEffectFromString(&self, classid: *const ::windows_core::GUID, propertyxml: P0, bindings: ::core::option::Option<&[D2D1_PROPERTY_BINDING]>, effectfactory: PD2D1_EFFECT_FACTORY) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).RegisterEffectFromString)(::windows_core::Interface::as_raw(self), classid, propertyxml.into_param().abi(), ::core::mem::transmute(bindings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), bindings.as_deref().map_or(0, |slice| slice.len() as _), effectfactory).ok() + (::windows_core::Interface::vtable(self).RegisterEffectFromString)(::windows_core::Interface::as_raw(self), classid, propertyxml.into_param().abi(), ::core::mem::transmute(bindings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), bindings.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), effectfactory).ok() } pub unsafe fn UnregisterEffect(&self, classid: *const ::windows_core::GUID) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).UnregisterEffect)(::windows_core::Interface::as_raw(self), classid).ok() } pub unsafe fn GetRegisteredEffects(&self, effects: ::core::option::Option<&mut [::windows_core::GUID]>, effectsreturned: ::core::option::Option<*mut u32>, effectsregistered: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetRegisteredEffects)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(effects.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), effects.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(effectsreturned.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(effectsregistered.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetRegisteredEffects)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(effects.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), effects.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(effectsreturned.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(effectsregistered.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetEffectProperties(&self, effectid: *const ::windows_core::GUID) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -9699,7 +9699,7 @@ impl ID2D1Factory2 { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateGeometryGroup(&self, fillmode: Common::D2D1_FILL_MODE, geometries: &[::core::option::Option]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.CreateGeometryGroup)(::windows_core::Interface::as_raw(self), fillmode, ::core::mem::transmute(geometries.as_ptr()), geometries.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.CreateGeometryGroup)(::windows_core::Interface::as_raw(self), fillmode, ::core::mem::transmute(geometries.as_ptr()), geometries.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Foundation_Numerics\"`"] #[cfg(feature = "Foundation_Numerics")] @@ -9716,7 +9716,7 @@ impl ID2D1Factory2 { } pub unsafe fn CreateStrokeStyle(&self, strokestyleproperties: *const D2D1_STROKE_STYLE_PROPERTIES, dashes: ::core::option::Option<&[f32]>) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.CreateStrokeStyle)(::windows_core::Interface::as_raw(self), strokestyleproperties, ::core::mem::transmute(dashes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dashes.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.CreateStrokeStyle)(::windows_core::Interface::as_raw(self), strokestyleproperties, ::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()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Foundation_Numerics\"`, `\"Win32_Graphics_DirectWrite\"`"] #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_DirectWrite"))] @@ -9768,7 +9768,7 @@ impl ID2D1Factory2 { } pub unsafe fn CreateStrokeStyle2(&self, strokestyleproperties: *const D2D1_STROKE_STYLE_PROPERTIES1, dashes: ::core::option::Option<&[f32]>) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.CreateStrokeStyle2)(::windows_core::Interface::as_raw(self), strokestyleproperties, ::core::mem::transmute(dashes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dashes.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateStrokeStyle2)(::windows_core::Interface::as_raw(self), strokestyleproperties, ::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()), &mut result__).from_abi(result__) } pub unsafe fn CreatePathGeometry2(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -9798,19 +9798,19 @@ impl ID2D1Factory2 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.RegisterEffectFromStream)(::windows_core::Interface::as_raw(self), classid, propertyxml.into_param().abi(), ::core::mem::transmute(bindings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), bindings.as_deref().map_or(0, |slice| slice.len() as _), effectfactory).ok() + (::windows_core::Interface::vtable(self).base__.RegisterEffectFromStream)(::windows_core::Interface::as_raw(self), classid, propertyxml.into_param().abi(), ::core::mem::transmute(bindings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), bindings.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), effectfactory).ok() } pub unsafe fn RegisterEffectFromString(&self, classid: *const ::windows_core::GUID, propertyxml: P0, bindings: ::core::option::Option<&[D2D1_PROPERTY_BINDING]>, effectfactory: PD2D1_EFFECT_FACTORY) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).base__.RegisterEffectFromString)(::windows_core::Interface::as_raw(self), classid, propertyxml.into_param().abi(), ::core::mem::transmute(bindings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), bindings.as_deref().map_or(0, |slice| slice.len() as _), effectfactory).ok() + (::windows_core::Interface::vtable(self).base__.RegisterEffectFromString)(::windows_core::Interface::as_raw(self), classid, propertyxml.into_param().abi(), ::core::mem::transmute(bindings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), bindings.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), effectfactory).ok() } pub unsafe fn UnregisterEffect(&self, classid: *const ::windows_core::GUID) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.UnregisterEffect)(::windows_core::Interface::as_raw(self), classid).ok() } pub unsafe fn GetRegisteredEffects(&self, effects: ::core::option::Option<&mut [::windows_core::GUID]>, effectsreturned: ::core::option::Option<*mut u32>, effectsregistered: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.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() as _), ::core::mem::transmute(effectsreturned.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(effectsregistered.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetRegisteredEffects)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(effects.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), effects.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(effectsreturned.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(effectsregistered.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetEffectProperties(&self, effectid: *const ::windows_core::GUID) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -9876,7 +9876,7 @@ impl ID2D1Factory3 { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateGeometryGroup(&self, fillmode: Common::D2D1_FILL_MODE, geometries: &[::core::option::Option]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.CreateGeometryGroup)(::windows_core::Interface::as_raw(self), fillmode, ::core::mem::transmute(geometries.as_ptr()), geometries.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.CreateGeometryGroup)(::windows_core::Interface::as_raw(self), fillmode, ::core::mem::transmute(geometries.as_ptr()), geometries.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Foundation_Numerics\"`"] #[cfg(feature = "Foundation_Numerics")] @@ -9893,7 +9893,7 @@ impl ID2D1Factory3 { } pub unsafe fn CreateStrokeStyle(&self, strokestyleproperties: *const D2D1_STROKE_STYLE_PROPERTIES, dashes: ::core::option::Option<&[f32]>) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.CreateStrokeStyle)(::windows_core::Interface::as_raw(self), strokestyleproperties, ::core::mem::transmute(dashes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dashes.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.CreateStrokeStyle)(::windows_core::Interface::as_raw(self), strokestyleproperties, ::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()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Foundation_Numerics\"`, `\"Win32_Graphics_DirectWrite\"`"] #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_DirectWrite"))] @@ -9945,7 +9945,7 @@ impl ID2D1Factory3 { } pub unsafe fn CreateStrokeStyle2(&self, strokestyleproperties: *const D2D1_STROKE_STYLE_PROPERTIES1, dashes: ::core::option::Option<&[f32]>) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.CreateStrokeStyle2)(::windows_core::Interface::as_raw(self), strokestyleproperties, ::core::mem::transmute(dashes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dashes.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.CreateStrokeStyle2)(::windows_core::Interface::as_raw(self), strokestyleproperties, ::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()), &mut result__).from_abi(result__) } pub unsafe fn CreatePathGeometry2(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -9975,19 +9975,19 @@ impl ID2D1Factory3 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.RegisterEffectFromStream)(::windows_core::Interface::as_raw(self), classid, propertyxml.into_param().abi(), ::core::mem::transmute(bindings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), bindings.as_deref().map_or(0, |slice| slice.len() as _), effectfactory).ok() + (::windows_core::Interface::vtable(self).base__.base__.RegisterEffectFromStream)(::windows_core::Interface::as_raw(self), classid, propertyxml.into_param().abi(), ::core::mem::transmute(bindings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), bindings.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), effectfactory).ok() } pub unsafe fn RegisterEffectFromString(&self, classid: *const ::windows_core::GUID, propertyxml: P0, bindings: ::core::option::Option<&[D2D1_PROPERTY_BINDING]>, effectfactory: PD2D1_EFFECT_FACTORY) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).base__.base__.RegisterEffectFromString)(::windows_core::Interface::as_raw(self), classid, propertyxml.into_param().abi(), ::core::mem::transmute(bindings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), bindings.as_deref().map_or(0, |slice| slice.len() as _), effectfactory).ok() + (::windows_core::Interface::vtable(self).base__.base__.RegisterEffectFromString)(::windows_core::Interface::as_raw(self), classid, propertyxml.into_param().abi(), ::core::mem::transmute(bindings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), bindings.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), effectfactory).ok() } pub unsafe fn UnregisterEffect(&self, classid: *const ::windows_core::GUID) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.UnregisterEffect)(::windows_core::Interface::as_raw(self), classid).ok() } pub unsafe fn GetRegisteredEffects(&self, effects: ::core::option::Option<&mut [::windows_core::GUID]>, effectsreturned: ::core::option::Option<*mut u32>, effectsregistered: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.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() as _), ::core::mem::transmute(effectsreturned.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(effectsregistered.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetRegisteredEffects)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(effects.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), effects.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(effectsreturned.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(effectsregistered.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetEffectProperties(&self, effectid: *const ::windows_core::GUID) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -10062,7 +10062,7 @@ impl ID2D1Factory4 { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateGeometryGroup(&self, fillmode: Common::D2D1_FILL_MODE, geometries: &[::core::option::Option]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateGeometryGroup)(::windows_core::Interface::as_raw(self), fillmode, ::core::mem::transmute(geometries.as_ptr()), geometries.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateGeometryGroup)(::windows_core::Interface::as_raw(self), fillmode, ::core::mem::transmute(geometries.as_ptr()), geometries.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Foundation_Numerics\"`"] #[cfg(feature = "Foundation_Numerics")] @@ -10079,7 +10079,7 @@ impl ID2D1Factory4 { } pub unsafe fn CreateStrokeStyle(&self, strokestyleproperties: *const D2D1_STROKE_STYLE_PROPERTIES, dashes: ::core::option::Option<&[f32]>) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateStrokeStyle)(::windows_core::Interface::as_raw(self), strokestyleproperties, ::core::mem::transmute(dashes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dashes.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateStrokeStyle)(::windows_core::Interface::as_raw(self), strokestyleproperties, ::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()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Foundation_Numerics\"`, `\"Win32_Graphics_DirectWrite\"`"] #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_DirectWrite"))] @@ -10131,7 +10131,7 @@ impl ID2D1Factory4 { } pub unsafe fn CreateStrokeStyle2(&self, strokestyleproperties: *const D2D1_STROKE_STYLE_PROPERTIES1, dashes: ::core::option::Option<&[f32]>) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.CreateStrokeStyle2)(::windows_core::Interface::as_raw(self), strokestyleproperties, ::core::mem::transmute(dashes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dashes.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.CreateStrokeStyle2)(::windows_core::Interface::as_raw(self), strokestyleproperties, ::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()), &mut result__).from_abi(result__) } pub unsafe fn CreatePathGeometry2(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -10161,19 +10161,19 @@ impl ID2D1Factory4 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.RegisterEffectFromStream)(::windows_core::Interface::as_raw(self), classid, propertyxml.into_param().abi(), ::core::mem::transmute(bindings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), bindings.as_deref().map_or(0, |slice| slice.len() as _), effectfactory).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.RegisterEffectFromStream)(::windows_core::Interface::as_raw(self), classid, propertyxml.into_param().abi(), ::core::mem::transmute(bindings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), bindings.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), effectfactory).ok() } pub unsafe fn RegisterEffectFromString(&self, classid: *const ::windows_core::GUID, propertyxml: P0, bindings: ::core::option::Option<&[D2D1_PROPERTY_BINDING]>, effectfactory: PD2D1_EFFECT_FACTORY) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).base__.base__.base__.RegisterEffectFromString)(::windows_core::Interface::as_raw(self), classid, propertyxml.into_param().abi(), ::core::mem::transmute(bindings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), bindings.as_deref().map_or(0, |slice| slice.len() as _), effectfactory).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.RegisterEffectFromString)(::windows_core::Interface::as_raw(self), classid, propertyxml.into_param().abi(), ::core::mem::transmute(bindings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), bindings.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), effectfactory).ok() } pub unsafe fn UnregisterEffect(&self, classid: *const ::windows_core::GUID) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.UnregisterEffect)(::windows_core::Interface::as_raw(self), classid).ok() } pub unsafe fn GetRegisteredEffects(&self, effects: ::core::option::Option<&mut [::windows_core::GUID]>, effectsreturned: ::core::option::Option<*mut u32>, effectsregistered: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.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() as _), ::core::mem::transmute(effectsreturned.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(effectsregistered.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetRegisteredEffects)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(effects.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), effects.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(effectsreturned.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(effectsregistered.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetEffectProperties(&self, effectid: *const ::windows_core::GUID) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -10257,7 +10257,7 @@ impl ID2D1Factory5 { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateGeometryGroup(&self, fillmode: Common::D2D1_FILL_MODE, geometries: &[::core::option::Option]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateGeometryGroup)(::windows_core::Interface::as_raw(self), fillmode, ::core::mem::transmute(geometries.as_ptr()), geometries.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateGeometryGroup)(::windows_core::Interface::as_raw(self), fillmode, ::core::mem::transmute(geometries.as_ptr()), geometries.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Foundation_Numerics\"`"] #[cfg(feature = "Foundation_Numerics")] @@ -10274,7 +10274,7 @@ impl ID2D1Factory5 { } pub unsafe fn CreateStrokeStyle(&self, strokestyleproperties: *const D2D1_STROKE_STYLE_PROPERTIES, dashes: ::core::option::Option<&[f32]>) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateStrokeStyle)(::windows_core::Interface::as_raw(self), strokestyleproperties, ::core::mem::transmute(dashes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dashes.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateStrokeStyle)(::windows_core::Interface::as_raw(self), strokestyleproperties, ::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()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Foundation_Numerics\"`, `\"Win32_Graphics_DirectWrite\"`"] #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_DirectWrite"))] @@ -10326,7 +10326,7 @@ impl ID2D1Factory5 { } pub unsafe fn CreateStrokeStyle2(&self, strokestyleproperties: *const D2D1_STROKE_STYLE_PROPERTIES1, dashes: ::core::option::Option<&[f32]>) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateStrokeStyle2)(::windows_core::Interface::as_raw(self), strokestyleproperties, ::core::mem::transmute(dashes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dashes.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateStrokeStyle2)(::windows_core::Interface::as_raw(self), strokestyleproperties, ::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()), &mut result__).from_abi(result__) } pub unsafe fn CreatePathGeometry2(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -10356,19 +10356,19 @@ impl ID2D1Factory5 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.RegisterEffectFromStream)(::windows_core::Interface::as_raw(self), classid, propertyxml.into_param().abi(), ::core::mem::transmute(bindings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), bindings.as_deref().map_or(0, |slice| slice.len() as _), effectfactory).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.RegisterEffectFromStream)(::windows_core::Interface::as_raw(self), classid, propertyxml.into_param().abi(), ::core::mem::transmute(bindings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), bindings.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), effectfactory).ok() } pub unsafe fn RegisterEffectFromString(&self, classid: *const ::windows_core::GUID, propertyxml: P0, bindings: ::core::option::Option<&[D2D1_PROPERTY_BINDING]>, effectfactory: PD2D1_EFFECT_FACTORY) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.RegisterEffectFromString)(::windows_core::Interface::as_raw(self), classid, propertyxml.into_param().abi(), ::core::mem::transmute(bindings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), bindings.as_deref().map_or(0, |slice| slice.len() as _), effectfactory).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.RegisterEffectFromString)(::windows_core::Interface::as_raw(self), classid, propertyxml.into_param().abi(), ::core::mem::transmute(bindings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), bindings.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), effectfactory).ok() } pub unsafe fn UnregisterEffect(&self, classid: *const ::windows_core::GUID) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.UnregisterEffect)(::windows_core::Interface::as_raw(self), classid).ok() } pub unsafe fn GetRegisteredEffects(&self, effects: ::core::option::Option<&mut [::windows_core::GUID]>, effectsreturned: ::core::option::Option<*mut u32>, effectsregistered: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.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() as _), ::core::mem::transmute(effectsreturned.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(effectsregistered.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetRegisteredEffects)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(effects.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), effects.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(effectsreturned.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(effectsregistered.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetEffectProperties(&self, effectid: *const ::windows_core::GUID) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -10461,7 +10461,7 @@ impl ID2D1Factory6 { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateGeometryGroup(&self, fillmode: Common::D2D1_FILL_MODE, geometries: &[::core::option::Option]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.CreateGeometryGroup)(::windows_core::Interface::as_raw(self), fillmode, ::core::mem::transmute(geometries.as_ptr()), geometries.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.CreateGeometryGroup)(::windows_core::Interface::as_raw(self), fillmode, ::core::mem::transmute(geometries.as_ptr()), geometries.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Foundation_Numerics\"`"] #[cfg(feature = "Foundation_Numerics")] @@ -10478,7 +10478,7 @@ impl ID2D1Factory6 { } pub unsafe fn CreateStrokeStyle(&self, strokestyleproperties: *const D2D1_STROKE_STYLE_PROPERTIES, dashes: ::core::option::Option<&[f32]>) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.CreateStrokeStyle)(::windows_core::Interface::as_raw(self), strokestyleproperties, ::core::mem::transmute(dashes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dashes.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.CreateStrokeStyle)(::windows_core::Interface::as_raw(self), strokestyleproperties, ::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()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Foundation_Numerics\"`, `\"Win32_Graphics_DirectWrite\"`"] #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_DirectWrite"))] @@ -10530,7 +10530,7 @@ impl ID2D1Factory6 { } pub unsafe fn CreateStrokeStyle2(&self, strokestyleproperties: *const D2D1_STROKE_STYLE_PROPERTIES1, dashes: ::core::option::Option<&[f32]>) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateStrokeStyle2)(::windows_core::Interface::as_raw(self), strokestyleproperties, ::core::mem::transmute(dashes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dashes.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateStrokeStyle2)(::windows_core::Interface::as_raw(self), strokestyleproperties, ::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()), &mut result__).from_abi(result__) } pub unsafe fn CreatePathGeometry2(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -10560,19 +10560,19 @@ impl ID2D1Factory6 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.RegisterEffectFromStream)(::windows_core::Interface::as_raw(self), classid, propertyxml.into_param().abi(), ::core::mem::transmute(bindings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), bindings.as_deref().map_or(0, |slice| slice.len() as _), effectfactory).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.RegisterEffectFromStream)(::windows_core::Interface::as_raw(self), classid, propertyxml.into_param().abi(), ::core::mem::transmute(bindings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), bindings.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), effectfactory).ok() } pub unsafe fn RegisterEffectFromString(&self, classid: *const ::windows_core::GUID, propertyxml: P0, bindings: ::core::option::Option<&[D2D1_PROPERTY_BINDING]>, effectfactory: PD2D1_EFFECT_FACTORY) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.RegisterEffectFromString)(::windows_core::Interface::as_raw(self), classid, propertyxml.into_param().abi(), ::core::mem::transmute(bindings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), bindings.as_deref().map_or(0, |slice| slice.len() as _), effectfactory).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.RegisterEffectFromString)(::windows_core::Interface::as_raw(self), classid, propertyxml.into_param().abi(), ::core::mem::transmute(bindings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), bindings.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), effectfactory).ok() } pub unsafe fn UnregisterEffect(&self, classid: *const ::windows_core::GUID) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.UnregisterEffect)(::windows_core::Interface::as_raw(self), classid).ok() } pub unsafe fn GetRegisteredEffects(&self, effects: ::core::option::Option<&mut [::windows_core::GUID]>, effectsreturned: ::core::option::Option<*mut u32>, effectsregistered: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.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() as _), ::core::mem::transmute(effectsreturned.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(effectsregistered.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetRegisteredEffects)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(effects.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), effects.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(effectsreturned.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(effectsregistered.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetEffectProperties(&self, effectid: *const ::windows_core::GUID) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -10674,7 +10674,7 @@ impl ID2D1Factory7 { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateGeometryGroup(&self, fillmode: Common::D2D1_FILL_MODE, geometries: &[::core::option::Option]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.CreateGeometryGroup)(::windows_core::Interface::as_raw(self), fillmode, ::core::mem::transmute(geometries.as_ptr()), geometries.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.CreateGeometryGroup)(::windows_core::Interface::as_raw(self), fillmode, ::core::mem::transmute(geometries.as_ptr()), geometries.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Foundation_Numerics\"`"] #[cfg(feature = "Foundation_Numerics")] @@ -10691,7 +10691,7 @@ impl ID2D1Factory7 { } pub unsafe fn CreateStrokeStyle(&self, strokestyleproperties: *const D2D1_STROKE_STYLE_PROPERTIES, dashes: ::core::option::Option<&[f32]>) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.CreateStrokeStyle)(::windows_core::Interface::as_raw(self), strokestyleproperties, ::core::mem::transmute(dashes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dashes.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.CreateStrokeStyle)(::windows_core::Interface::as_raw(self), strokestyleproperties, ::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()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Foundation_Numerics\"`, `\"Win32_Graphics_DirectWrite\"`"] #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_DirectWrite"))] @@ -10743,7 +10743,7 @@ impl ID2D1Factory7 { } pub unsafe fn CreateStrokeStyle2(&self, strokestyleproperties: *const D2D1_STROKE_STYLE_PROPERTIES1, dashes: ::core::option::Option<&[f32]>) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.CreateStrokeStyle2)(::windows_core::Interface::as_raw(self), strokestyleproperties, ::core::mem::transmute(dashes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dashes.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.CreateStrokeStyle2)(::windows_core::Interface::as_raw(self), strokestyleproperties, ::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()), &mut result__).from_abi(result__) } pub unsafe fn CreatePathGeometry2(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -10773,19 +10773,19 @@ impl ID2D1Factory7 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.RegisterEffectFromStream)(::windows_core::Interface::as_raw(self), classid, propertyxml.into_param().abi(), ::core::mem::transmute(bindings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), bindings.as_deref().map_or(0, |slice| slice.len() as _), effectfactory).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.RegisterEffectFromStream)(::windows_core::Interface::as_raw(self), classid, propertyxml.into_param().abi(), ::core::mem::transmute(bindings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), bindings.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), effectfactory).ok() } pub unsafe fn RegisterEffectFromString(&self, classid: *const ::windows_core::GUID, propertyxml: P0, bindings: ::core::option::Option<&[D2D1_PROPERTY_BINDING]>, effectfactory: PD2D1_EFFECT_FACTORY) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.RegisterEffectFromString)(::windows_core::Interface::as_raw(self), classid, propertyxml.into_param().abi(), ::core::mem::transmute(bindings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), bindings.as_deref().map_or(0, |slice| slice.len() as _), effectfactory).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.RegisterEffectFromString)(::windows_core::Interface::as_raw(self), classid, propertyxml.into_param().abi(), ::core::mem::transmute(bindings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), bindings.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), effectfactory).ok() } pub unsafe fn UnregisterEffect(&self, classid: *const ::windows_core::GUID) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.UnregisterEffect)(::windows_core::Interface::as_raw(self), classid).ok() } pub unsafe fn GetRegisteredEffects(&self, effects: ::core::option::Option<&mut [::windows_core::GUID]>, effectsreturned: ::core::option::Option<*mut u32>, effectsregistered: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.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() as _), ::core::mem::transmute(effectsreturned.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(effectsregistered.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetRegisteredEffects)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(effects.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), effects.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(effectsreturned.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(effectsregistered.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetEffectProperties(&self, effectid: *const ::windows_core::GUID) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -11332,7 +11332,7 @@ impl ID2D1GeometryGroup { (::windows_core::Interface::vtable(self).GetSourceGeometryCount)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetSourceGeometries(&self, geometries: &mut [::core::option::Option]) { - (::windows_core::Interface::vtable(self).GetSourceGeometries)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(geometries.as_ptr()), geometries.len() as _) + (::windows_core::Interface::vtable(self).GetSourceGeometries)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(geometries.as_ptr()), geometries.len().try_into().unwrap()) } } ::windows_core::imp::interface_hierarchy!(ID2D1GeometryGroup, ::windows_core::IUnknown, ID2D1Resource, ID2D1Geometry); @@ -11404,12 +11404,12 @@ impl ID2D1GeometrySink { #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn AddLines(&self, points: &[Common::D2D_POINT_2F]) { - (::windows_core::Interface::vtable(self).base__.AddLines)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(points.as_ptr()), points.len() as _) + (::windows_core::Interface::vtable(self).base__.AddLines)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(points.as_ptr()), points.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn AddBeziers(&self, beziers: &[Common::D2D1_BEZIER_SEGMENT]) { - (::windows_core::Interface::vtable(self).base__.AddBeziers)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(beziers.as_ptr()), beziers.len() as _) + (::windows_core::Interface::vtable(self).base__.AddBeziers)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(beziers.as_ptr()), beziers.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(feature = "Win32_Graphics_Direct2D_Common")] @@ -11439,7 +11439,7 @@ impl ID2D1GeometrySink { #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn AddQuadraticBeziers(&self, beziers: &[D2D1_QUADRATIC_BEZIER_SEGMENT]) { - (::windows_core::Interface::vtable(self).AddQuadraticBeziers)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(beziers.as_ptr()), beziers.len() as _) + (::windows_core::Interface::vtable(self).AddQuadraticBeziers)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(beziers.as_ptr()), beziers.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(feature = "Win32_Graphics_Direct2D_Common")] @@ -11502,7 +11502,7 @@ impl ID2D1GradientMesh { #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn GetPatches(&self, startindex: u32, patches: &mut [D2D1_GRADIENT_MESH_PATCH]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPatches)(::windows_core::Interface::as_raw(self), startindex, ::core::mem::transmute(patches.as_ptr()), patches.len() as _).ok() + (::windows_core::Interface::vtable(self).GetPatches)(::windows_core::Interface::as_raw(self), startindex, ::core::mem::transmute(patches.as_ptr()), patches.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(ID2D1GradientMesh, ::windows_core::IUnknown, ID2D1Resource); @@ -11539,7 +11539,7 @@ impl ID2D1GradientStopCollection { #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn GetGradientStops(&self, gradientstops: &mut [D2D1_GRADIENT_STOP]) { - (::windows_core::Interface::vtable(self).GetGradientStops)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(gradientstops.as_ptr()), gradientstops.len() as _) + (::windows_core::Interface::vtable(self).GetGradientStops)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(gradientstops.as_ptr()), gradientstops.len().try_into().unwrap()) } pub unsafe fn GetColorInterpolationGamma(&self) -> D2D1_GAMMA { (::windows_core::Interface::vtable(self).GetColorInterpolationGamma)(::windows_core::Interface::as_raw(self)) @@ -11584,7 +11584,7 @@ impl ID2D1GradientStopCollection1 { #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn GetGradientStops(&self, gradientstops: &mut [D2D1_GRADIENT_STOP]) { - (::windows_core::Interface::vtable(self).base__.GetGradientStops)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(gradientstops.as_ptr()), gradientstops.len() as _) + (::windows_core::Interface::vtable(self).base__.GetGradientStops)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(gradientstops.as_ptr()), gradientstops.len().try_into().unwrap()) } pub unsafe fn GetColorInterpolationGamma(&self) -> D2D1_GAMMA { (::windows_core::Interface::vtable(self).base__.GetColorInterpolationGamma)(::windows_core::Interface::as_raw(self)) @@ -11595,7 +11595,7 @@ impl ID2D1GradientStopCollection1 { #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn GetGradientStops1(&self, gradientstops: &mut [D2D1_GRADIENT_STOP]) { - (::windows_core::Interface::vtable(self).GetGradientStops1)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(gradientstops.as_ptr()), gradientstops.len() as _) + (::windows_core::Interface::vtable(self).GetGradientStops1)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(gradientstops.as_ptr()), gradientstops.len().try_into().unwrap()) } pub unsafe fn GetPreInterpolationSpace(&self) -> D2D1_COLOR_SPACE { (::windows_core::Interface::vtable(self).GetPreInterpolationSpace)(::windows_core::Interface::as_raw(self)) @@ -11680,7 +11680,7 @@ impl ID2D1HwndRenderTarget { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateGradientStopCollection(&self, gradientstops: &[D2D1_GRADIENT_STOP], colorinterpolationgamma: D2D1_GAMMA, extendmode: D2D1_EXTEND_MODE) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.CreateGradientStopCollection)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(gradientstops.as_ptr()), gradientstops.len() as _, colorinterpolationgamma, extendmode, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateGradientStopCollection)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(gradientstops.as_ptr()), gradientstops.len().try_into().unwrap(), colorinterpolationgamma, extendmode, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Foundation_Numerics\"`, `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] @@ -11823,7 +11823,7 @@ impl ID2D1HwndRenderTarget { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.DrawText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len() as _, textformat.into_param().abi(), layoutrect, defaultfillbrush.into_param().abi(), options, measuringmode) + (::windows_core::Interface::vtable(self).base__.DrawText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.into_param().abi(), layoutrect, defaultfillbrush.into_param().abi(), options, measuringmode) } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`, `\"Win32_Graphics_DirectWrite\"`"] #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite"))] @@ -12241,13 +12241,13 @@ impl ID2D1Ink { result__ } pub unsafe fn AddSegments(&self, segments: &[D2D1_INK_BEZIER_SEGMENT]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).AddSegments)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(segments.as_ptr()), segments.len() as _).ok() + (::windows_core::Interface::vtable(self).AddSegments)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(segments.as_ptr()), segments.len().try_into().unwrap()).ok() } pub unsafe fn RemoveSegmentsAtEnd(&self, segmentscount: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).RemoveSegmentsAtEnd)(::windows_core::Interface::as_raw(self), segmentscount).ok() } pub unsafe fn SetSegments(&self, startsegment: u32, segments: &[D2D1_INK_BEZIER_SEGMENT]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetSegments)(::windows_core::Interface::as_raw(self), startsegment, ::core::mem::transmute(segments.as_ptr()), segments.len() as _).ok() + (::windows_core::Interface::vtable(self).SetSegments)(::windows_core::Interface::as_raw(self), startsegment, ::core::mem::transmute(segments.as_ptr()), segments.len().try_into().unwrap()).ok() } pub unsafe fn SetSegmentAtEnd(&self, segment: *const D2D1_INK_BEZIER_SEGMENT) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).SetSegmentAtEnd)(::windows_core::Interface::as_raw(self), segment).ok() @@ -12256,7 +12256,7 @@ impl ID2D1Ink { (::windows_core::Interface::vtable(self).GetSegmentCount)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetSegments(&self, startsegment: u32, segments: &mut [D2D1_INK_BEZIER_SEGMENT]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSegments)(::windows_core::Interface::as_raw(self), startsegment, ::core::mem::transmute(segments.as_ptr()), segments.len() as _).ok() + (::windows_core::Interface::vtable(self).GetSegments)(::windows_core::Interface::as_raw(self), startsegment, ::core::mem::transmute(segments.as_ptr()), segments.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Foundation_Numerics\"`, `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] @@ -12960,7 +12960,7 @@ impl ID2D1Properties { (::windows_core::Interface::vtable(self).GetPropertyCount)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetPropertyName(&self, index: u32, name: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPropertyName)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(name.as_ptr()), name.len() as _).ok() + (::windows_core::Interface::vtable(self).GetPropertyName)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(name.as_ptr()), name.len().try_into().unwrap()).ok() } pub unsafe fn GetPropertyNameLength(&self, index: u32) -> u32 { (::windows_core::Interface::vtable(self).GetPropertyNameLength)(::windows_core::Interface::as_raw(self), index) @@ -12978,19 +12978,19 @@ impl ID2D1Properties { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).SetValueByName)(::windows_core::Interface::as_raw(self), name.into_param().abi(), r#type, ::core::mem::transmute(data.as_ptr()), data.len() as _).ok() + (::windows_core::Interface::vtable(self).SetValueByName)(::windows_core::Interface::as_raw(self), name.into_param().abi(), r#type, ::core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap()).ok() } pub unsafe fn SetValue(&self, index: u32, r#type: D2D1_PROPERTY_TYPE, data: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetValue)(::windows_core::Interface::as_raw(self), index, r#type, ::core::mem::transmute(data.as_ptr()), data.len() as _).ok() + (::windows_core::Interface::vtable(self).SetValue)(::windows_core::Interface::as_raw(self), index, r#type, ::core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap()).ok() } pub unsafe fn GetValueByName(&self, name: P0, r#type: D2D1_PROPERTY_TYPE, data: &mut [u8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).GetValueByName)(::windows_core::Interface::as_raw(self), name.into_param().abi(), r#type, ::core::mem::transmute(data.as_ptr()), data.len() as _).ok() + (::windows_core::Interface::vtable(self).GetValueByName)(::windows_core::Interface::as_raw(self), name.into_param().abi(), r#type, ::core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap()).ok() } pub unsafe fn GetValue(&self, index: u32, r#type: D2D1_PROPERTY_TYPE, data: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetValue)(::windows_core::Interface::as_raw(self), index, r#type, ::core::mem::transmute(data.as_ptr()), data.len() as _).ok() + (::windows_core::Interface::vtable(self).GetValue)(::windows_core::Interface::as_raw(self), index, r#type, ::core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap()).ok() } pub unsafe fn GetValueSize(&self, index: u32) -> u32 { (::windows_core::Interface::vtable(self).GetValueSize)(::windows_core::Interface::as_raw(self), index) @@ -13351,7 +13351,7 @@ impl ID2D1RenderTarget { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateGradientStopCollection(&self, gradientstops: &[D2D1_GRADIENT_STOP], colorinterpolationgamma: D2D1_GAMMA, extendmode: D2D1_EXTEND_MODE) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateGradientStopCollection)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(gradientstops.as_ptr()), gradientstops.len() as _, colorinterpolationgamma, extendmode, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateGradientStopCollection)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(gradientstops.as_ptr()), gradientstops.len().try_into().unwrap(), colorinterpolationgamma, extendmode, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Foundation_Numerics\"`, `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] @@ -13494,7 +13494,7 @@ impl ID2D1RenderTarget { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).DrawText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len() as _, textformat.into_param().abi(), layoutrect, defaultfillbrush.into_param().abi(), options, measuringmode) + (::windows_core::Interface::vtable(self).DrawText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.into_param().abi(), layoutrect, defaultfillbrush.into_param().abi(), options, measuringmode) } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`, `\"Win32_Graphics_DirectWrite\"`"] #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite"))] @@ -13833,7 +13833,7 @@ pub struct ID2D1Resource_Vtbl { pub struct ID2D1ResourceTexture(::windows_core::IUnknown); impl ID2D1ResourceTexture { pub unsafe fn Update(&self, minimumextents: ::core::option::Option<*const u32>, maximimumextents: ::core::option::Option<*const u32>, strides: ::core::option::Option<*const u32>, dimensions: u32, data: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Update)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(minimumextents.unwrap_or(::std::ptr::null())), ::core::mem::transmute(maximimumextents.unwrap_or(::std::ptr::null())), ::core::mem::transmute(strides.unwrap_or(::std::ptr::null())), dimensions, ::core::mem::transmute(data.as_ptr()), data.len() as _).ok() + (::windows_core::Interface::vtable(self).Update)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(minimumextents.unwrap_or(::std::ptr::null())), ::core::mem::transmute(maximimumextents.unwrap_or(::std::ptr::null())), ::core::mem::transmute(strides.unwrap_or(::std::ptr::null())), dimensions, ::core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(ID2D1ResourceTexture, ::windows_core::IUnknown); @@ -14052,7 +14052,7 @@ impl ID2D1SourceTransform { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn MapOutputRectToInputRects(&self, outputrect: *const super::super::Foundation::RECT, inputrects: &mut [super::super::Foundation::RECT]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.MapOutputRectToInputRects)(::windows_core::Interface::as_raw(self), outputrect, ::core::mem::transmute(inputrects.as_ptr()), inputrects.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.MapOutputRectToInputRects)(::windows_core::Interface::as_raw(self), outputrect, ::core::mem::transmute(inputrects.as_ptr()), inputrects.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -14192,7 +14192,7 @@ impl ID2D1StrokeStyle { (::windows_core::Interface::vtable(self).GetDashesCount)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetDashes(&self, dashes: &mut [f32]) { - (::windows_core::Interface::vtable(self).GetDashes)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(dashes.as_ptr()), dashes.len() as _) + (::windows_core::Interface::vtable(self).GetDashes)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(dashes.as_ptr()), dashes.len().try_into().unwrap()) } } ::windows_core::imp::interface_hierarchy!(ID2D1StrokeStyle, ::windows_core::IUnknown, ID2D1Resource); @@ -14252,7 +14252,7 @@ impl ID2D1StrokeStyle1 { (::windows_core::Interface::vtable(self).base__.GetDashesCount)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetDashes(&self, dashes: &mut [f32]) { - (::windows_core::Interface::vtable(self).base__.GetDashes)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(dashes.as_ptr()), dashes.len() as _) + (::windows_core::Interface::vtable(self).base__.GetDashes)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(dashes.as_ptr()), dashes.len().try_into().unwrap()) } pub unsafe fn GetStrokeTransformType(&self) -> D2D1_STROKE_TRANSFORM_TYPE { (::windows_core::Interface::vtable(self).GetStrokeTransformType)(::windows_core::Interface::as_raw(self)) @@ -14376,17 +14376,17 @@ impl ID2D1SvgDocument { } pub unsafe fn CreateStrokeDashArray(&self, dashes: ::core::option::Option<&[D2D1_SVG_LENGTH]>) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateStrokeDashArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(dashes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dashes.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateStrokeDashArray)(::windows_core::Interface::as_raw(self), ::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()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreatePointCollection(&self, points: ::core::option::Option<&[Common::D2D_POINT_2F]>) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreatePointCollection)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(points.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), points.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreatePointCollection)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(points.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), points.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } pub unsafe fn CreatePathData(&self, segmentdata: ::core::option::Option<&[f32]>, commands: ::core::option::Option<&[D2D1_SVG_PATH_COMMAND]>) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreatePathData)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(segmentdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), segmentdata.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(commands.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), commands.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreatePathData)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(segmentdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), segmentdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(commands.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), commands.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(ID2D1SvgDocument, ::windows_core::IUnknown, ID2D1Resource); @@ -14447,7 +14447,7 @@ impl ID2D1SvgElement { ::windows_core::from_abi(result__) } pub unsafe fn GetTagName(&self, name: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetTagName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(name.as_ptr()), name.len() as _).ok() + (::windows_core::Interface::vtable(self).GetTagName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(name.as_ptr()), name.len().try_into().unwrap()).ok() } pub unsafe fn GetTagNameLength(&self) -> u32 { (::windows_core::Interface::vtable(self).GetTagNameLength)(::windows_core::Interface::as_raw(self)) @@ -14538,7 +14538,7 @@ impl ID2D1SvgElement { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetSpecifiedAttributeName(&self, index: u32, name: &mut [u16], inherited: ::core::option::Option<*mut super::super::Foundation::BOOL>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSpecifiedAttributeName)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(name.as_ptr()), name.len() as _, ::core::mem::transmute(inherited.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSpecifiedAttributeName)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(name.as_ptr()), name.len().try_into().unwrap(), ::core::mem::transmute(inherited.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -14552,10 +14552,10 @@ impl ID2D1SvgElement { (::windows_core::Interface::vtable(self).RemoveAttribute)(::windows_core::Interface::as_raw(self), name.into_param().abi()).ok() } pub unsafe fn SetTextValue(&self, name: &[u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetTextValue)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(name.as_ptr()), name.len() as _).ok() + (::windows_core::Interface::vtable(self).SetTextValue)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(name.as_ptr()), name.len().try_into().unwrap()).ok() } pub unsafe fn GetTextValue(&self, name: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetTextValue)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(name.as_ptr()), name.len() as _).ok() + (::windows_core::Interface::vtable(self).GetTextValue)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(name.as_ptr()), name.len().try_into().unwrap()).ok() } pub unsafe fn GetTextValueLength(&self) -> u32 { (::windows_core::Interface::vtable(self).GetTextValueLength)(::windows_core::Interface::as_raw(self)) @@ -14598,7 +14598,7 @@ impl ID2D1SvgElement { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).GetAttributeValue3)(::windows_core::Interface::as_raw(self), name.into_param().abi(), r#type, ::core::mem::transmute(value.as_ptr()), value.len() as _).ok() + (::windows_core::Interface::vtable(self).GetAttributeValue3)(::windows_core::Interface::as_raw(self), name.into_param().abi(), r#type, ::core::mem::transmute(value.as_ptr()), value.len().try_into().unwrap()).ok() } pub unsafe fn GetAttributeValueLength(&self, name: P0, r#type: D2D1_SVG_ATTRIBUTE_STRING_TYPE) -> ::windows_core::Result where @@ -14691,13 +14691,13 @@ impl ID2D1SvgGlyphStyle { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).SetStroke)(::windows_core::Interface::as_raw(self), brush.into_param().abi(), strokewidth, ::core::mem::transmute(dashes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dashes.as_deref().map_or(0, |slice| slice.len() as _), dashoffset).ok() + (::windows_core::Interface::vtable(self).SetStroke)(::windows_core::Interface::as_raw(self), brush.into_param().abi(), strokewidth, ::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).ok() } pub unsafe fn GetStrokeDashesCount(&self) -> u32 { (::windows_core::Interface::vtable(self).GetStrokeDashesCount)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetStroke(&self, brush: ::core::option::Option<*mut ::core::option::Option>, strokewidth: ::core::option::Option<*mut f32>, dashes: ::core::option::Option<&mut [f32]>, dashoffset: ::core::option::Option<*mut f32>) { - (::windows_core::Interface::vtable(self).GetStroke)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(brush.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(strokewidth.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(dashes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dashes.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(dashoffset.unwrap_or(::std::ptr::null_mut()))) + (::windows_core::Interface::vtable(self).GetStroke)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(brush.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(strokewidth.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(dashes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dashes.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(dashoffset.unwrap_or(::std::ptr::null_mut()))) } } ::windows_core::imp::interface_hierarchy!(ID2D1SvgGlyphStyle, ::windows_core::IUnknown, ID2D1Resource); @@ -14762,7 +14762,7 @@ impl ID2D1SvgPaint { (::windows_core::Interface::vtable(self).SetId)(::windows_core::Interface::as_raw(self), id.into_param().abi()).ok() } pub unsafe fn GetId(&self, id: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetId)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(id.as_ptr()), id.len() as _).ok() + (::windows_core::Interface::vtable(self).GetId)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(id.as_ptr()), id.len().try_into().unwrap()).ok() } pub unsafe fn GetIdLength(&self) -> u32 { (::windows_core::Interface::vtable(self).GetIdLength)(::windows_core::Interface::as_raw(self)) @@ -14817,10 +14817,10 @@ impl ID2D1SvgPathData { (::windows_core::Interface::vtable(self).RemoveSegmentDataAtEnd)(::windows_core::Interface::as_raw(self), datacount).ok() } pub unsafe fn UpdateSegmentData(&self, data: &[f32], startindex: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).UpdateSegmentData)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(data.as_ptr()), data.len() as _, startindex).ok() + (::windows_core::Interface::vtable(self).UpdateSegmentData)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap(), startindex).ok() } pub unsafe fn GetSegmentData(&self, data: &mut [f32], startindex: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSegmentData)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(data.as_ptr()), data.len() as _, startindex).ok() + (::windows_core::Interface::vtable(self).GetSegmentData)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap(), startindex).ok() } pub unsafe fn GetSegmentDataCount(&self) -> u32 { (::windows_core::Interface::vtable(self).GetSegmentDataCount)(::windows_core::Interface::as_raw(self)) @@ -14829,10 +14829,10 @@ impl ID2D1SvgPathData { (::windows_core::Interface::vtable(self).RemoveCommandsAtEnd)(::windows_core::Interface::as_raw(self), commandscount).ok() } pub unsafe fn UpdateCommands(&self, commands: &[D2D1_SVG_PATH_COMMAND], startindex: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).UpdateCommands)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(commands.as_ptr()), commands.len() as _, startindex).ok() + (::windows_core::Interface::vtable(self).UpdateCommands)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(commands.as_ptr()), commands.len().try_into().unwrap(), startindex).ok() } pub unsafe fn GetCommands(&self, commands: &mut [D2D1_SVG_PATH_COMMAND], startindex: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetCommands)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(commands.as_ptr()), commands.len() as _, startindex).ok() + (::windows_core::Interface::vtable(self).GetCommands)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(commands.as_ptr()), commands.len().try_into().unwrap(), startindex).ok() } pub unsafe fn GetCommandsCount(&self) -> u32 { (::windows_core::Interface::vtable(self).GetCommandsCount)(::windows_core::Interface::as_raw(self)) @@ -14894,12 +14894,12 @@ impl ID2D1SvgPointCollection { #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn UpdatePoints(&self, points: &[Common::D2D_POINT_2F], startindex: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).UpdatePoints)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(points.as_ptr()), points.len() as _, startindex).ok() + (::windows_core::Interface::vtable(self).UpdatePoints)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(points.as_ptr()), points.len().try_into().unwrap(), startindex).ok() } #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn GetPoints(&self, points: &mut [Common::D2D_POINT_2F], startindex: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPoints)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(points.as_ptr()), points.len() as _, startindex).ok() + (::windows_core::Interface::vtable(self).GetPoints)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(points.as_ptr()), points.len().try_into().unwrap(), startindex).ok() } pub unsafe fn GetPointsCount(&self) -> u32 { (::windows_core::Interface::vtable(self).GetPointsCount)(::windows_core::Interface::as_raw(self)) @@ -14951,16 +14951,16 @@ impl ID2D1SvgStrokeDashArray { (::windows_core::Interface::vtable(self).RemoveDashesAtEnd)(::windows_core::Interface::as_raw(self), dashescount).ok() } pub unsafe fn UpdateDashes(&self, dashes: &[D2D1_SVG_LENGTH], startindex: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).UpdateDashes)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(dashes.as_ptr()), dashes.len() as _, startindex).ok() + (::windows_core::Interface::vtable(self).UpdateDashes)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(dashes.as_ptr()), dashes.len().try_into().unwrap(), startindex).ok() } pub unsafe fn UpdateDashes2(&self, dashes: &[f32], startindex: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).UpdateDashes2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(dashes.as_ptr()), dashes.len() as _, startindex).ok() + (::windows_core::Interface::vtable(self).UpdateDashes2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(dashes.as_ptr()), dashes.len().try_into().unwrap(), startindex).ok() } pub unsafe fn GetDashes(&self, dashes: &mut [D2D1_SVG_LENGTH], startindex: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDashes)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(dashes.as_ptr()), dashes.len() as _, startindex).ok() + (::windows_core::Interface::vtable(self).GetDashes)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(dashes.as_ptr()), dashes.len().try_into().unwrap(), startindex).ok() } pub unsafe fn GetDashes2(&self, dashes: &mut [f32], startindex: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDashes2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(dashes.as_ptr()), dashes.len() as _, startindex).ok() + (::windows_core::Interface::vtable(self).GetDashes2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(dashes.as_ptr()), dashes.len().try_into().unwrap(), startindex).ok() } pub unsafe fn GetDashesCount(&self) -> u32 { (::windows_core::Interface::vtable(self).GetDashesCount)(::windows_core::Interface::as_raw(self)) @@ -14993,7 +14993,7 @@ impl ID2D1TessellationSink { #[doc = "Required features: `\"Win32_Graphics_Direct2D_Common\"`"] #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn AddTriangles(&self, triangles: &[D2D1_TRIANGLE]) { - (::windows_core::Interface::vtable(self).AddTriangles)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(triangles.as_ptr()), triangles.len() as _) + (::windows_core::Interface::vtable(self).AddTriangles)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(triangles.as_ptr()), triangles.len().try_into().unwrap()) } pub unsafe fn Close(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Close)(::windows_core::Interface::as_raw(self)).ok() @@ -15028,7 +15028,7 @@ impl ID2D1Transform { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn MapOutputRectToInputRects(&self, outputrect: *const super::super::Foundation::RECT, inputrects: &mut [super::super::Foundation::RECT]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).MapOutputRectToInputRects)(::windows_core::Interface::as_raw(self), outputrect, ::core::mem::transmute(inputrects.as_ptr()), inputrects.len() as _).ok() + (::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() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 9d60081115..9e388f10de 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 @@ -186,7 +186,7 @@ impl IDxcCompiler { P4: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).Compile)(::windows_core::Interface::as_raw(self), psource.into_param().abi(), psourcename.into_param().abi(), pentrypoint.into_param().abi(), ptargetprofile.into_param().abi(), ::core::mem::transmute(parguments.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), parguments.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pdefines.as_ptr()), pdefines.len() as _, pincludehandler.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).Compile)(::windows_core::Interface::as_raw(self), psource.into_param().abi(), psourcename.into_param().abi(), pentrypoint.into_param().abi(), ptargetprofile.into_param().abi(), ::core::mem::transmute(parguments.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), parguments.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pdefines.as_ptr()), pdefines.len().try_into().unwrap(), pincludehandler.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn Preprocess(&self, psource: P0, psourcename: P1, parguments: ::core::option::Option<&[::windows_core::PCWSTR]>, pdefines: &[DxcDefine], pincludehandler: P2) -> ::windows_core::Result where @@ -195,7 +195,7 @@ impl IDxcCompiler { P2: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).Preprocess)(::windows_core::Interface::as_raw(self), psource.into_param().abi(), psourcename.into_param().abi(), ::core::mem::transmute(parguments.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), parguments.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pdefines.as_ptr()), pdefines.len() as _, pincludehandler.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).Preprocess)(::windows_core::Interface::as_raw(self), psource.into_param().abi(), psourcename.into_param().abi(), ::core::mem::transmute(parguments.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), parguments.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pdefines.as_ptr()), pdefines.len().try_into().unwrap(), pincludehandler.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn Disassemble(&self, psource: P0) -> ::windows_core::Result where @@ -233,7 +233,7 @@ impl IDxcCompiler2 { P4: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.Compile)(::windows_core::Interface::as_raw(self), psource.into_param().abi(), psourcename.into_param().abi(), pentrypoint.into_param().abi(), ptargetprofile.into_param().abi(), ::core::mem::transmute(parguments.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), parguments.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pdefines.as_ptr()), pdefines.len() as _, pincludehandler.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.Compile)(::windows_core::Interface::as_raw(self), psource.into_param().abi(), psourcename.into_param().abi(), pentrypoint.into_param().abi(), ptargetprofile.into_param().abi(), ::core::mem::transmute(parguments.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), parguments.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pdefines.as_ptr()), pdefines.len().try_into().unwrap(), pincludehandler.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn Preprocess(&self, psource: P0, psourcename: P1, parguments: ::core::option::Option<&[::windows_core::PCWSTR]>, pdefines: &[DxcDefine], pincludehandler: P2) -> ::windows_core::Result where @@ -242,7 +242,7 @@ impl IDxcCompiler2 { P2: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.Preprocess)(::windows_core::Interface::as_raw(self), psource.into_param().abi(), psourcename.into_param().abi(), ::core::mem::transmute(parguments.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), parguments.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pdefines.as_ptr()), pdefines.len() as _, pincludehandler.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.Preprocess)(::windows_core::Interface::as_raw(self), psource.into_param().abi(), psourcename.into_param().abi(), ::core::mem::transmute(parguments.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), parguments.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pdefines.as_ptr()), pdefines.len().try_into().unwrap(), pincludehandler.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn Disassemble(&self, psource: P0) -> ::windows_core::Result where @@ -266,9 +266,9 @@ impl IDxcCompiler2 { pentrypoint.into_param().abi(), ptargetprofile.into_param().abi(), ::core::mem::transmute(parguments.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - parguments.as_deref().map_or(0, |slice| slice.len() as _), + parguments.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pdefines.as_ptr()), - pdefines.len() as _, + pdefines.len().try_into().unwrap(), pincludehandler.into_param().abi(), ::core::mem::transmute(ppresult), ::core::mem::transmute(ppdebugblobname.unwrap_or(::std::ptr::null_mut())), @@ -300,7 +300,7 @@ impl IDxcCompiler3 { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).Compile)(::windows_core::Interface::as_raw(self), psource, ::core::mem::transmute(parguments.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), parguments.as_deref().map_or(0, |slice| slice.len() as _), pincludehandler.into_param().abi(), &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).Compile)(::windows_core::Interface::as_raw(self), psource, ::core::mem::transmute(parguments.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), parguments.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pincludehandler.into_param().abi(), &::IID, &mut result__).from_abi(result__) } pub unsafe fn Disassemble(&self, pobject: *const DxcBuffer) -> ::windows_core::Result where @@ -335,13 +335,13 @@ impl IDxcCompilerArgs { (::windows_core::Interface::vtable(self).GetCount)(::windows_core::Interface::as_raw(self)) } pub unsafe fn AddArguments(&self, parguments: ::core::option::Option<&[::windows_core::PCWSTR]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).AddArguments)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(parguments.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), parguments.as_deref().map_or(0, |slice| slice.len() as _)).ok() + (::windows_core::Interface::vtable(self).AddArguments)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(parguments.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), parguments.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } pub unsafe fn AddArgumentsUTF8(&self, parguments: ::core::option::Option<&[::windows_core::PCSTR]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).AddArgumentsUTF8)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(parguments.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), parguments.as_deref().map_or(0, |slice| slice.len() as _)).ok() + (::windows_core::Interface::vtable(self).AddArgumentsUTF8)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(parguments.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), parguments.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } pub unsafe fn AddDefines(&self, pdefines: &[DxcDefine]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).AddDefines)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdefines.as_ptr()), pdefines.len() as _).ok() + (::windows_core::Interface::vtable(self).AddDefines)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdefines.as_ptr()), pdefines.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(IDxcCompilerArgs, ::windows_core::IUnknown); @@ -621,7 +621,7 @@ impl IDxcLinker { P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).Link)(::windows_core::Interface::as_raw(self), pentryname.into_param().abi(), ptargetprofile.into_param().abi(), ::core::mem::transmute(plibnames.as_ptr()), plibnames.len() as _, ::core::mem::transmute(parguments.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), parguments.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).Link)(::windows_core::Interface::as_raw(self), pentryname.into_param().abi(), ptargetprofile.into_param().abi(), ::core::mem::transmute(plibnames.as_ptr()), plibnames.len().try_into().unwrap(), ::core::mem::transmute(parguments.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), parguments.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IDxcLinker, ::windows_core::IUnknown); @@ -686,7 +686,7 @@ impl IDxcOptimizer { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).RunOptimizer)(::windows_core::Interface::as_raw(self), pblob.into_param().abi(), ::core::mem::transmute(ppoptions.as_ptr()), ppoptions.len() as _, ::core::mem::transmute(poutputmodule), ::core::mem::transmute(ppoutputtext.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).RunOptimizer)(::windows_core::Interface::as_raw(self), pblob.into_param().abi(), ::core::mem::transmute(ppoptions.as_ptr()), ppoptions.len().try_into().unwrap(), ::core::mem::transmute(poutputmodule), ::core::mem::transmute(ppoutputtext.unwrap_or(::std::ptr::null_mut()))).ok() } } ::windows_core::imp::interface_hierarchy!(IDxcOptimizer, ::windows_core::IUnknown); @@ -1023,7 +1023,7 @@ impl IDxcUtils { P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).BuildArguments)(::windows_core::Interface::as_raw(self), psourcename.into_param().abi(), pentrypoint.into_param().abi(), ptargetprofile.into_param().abi(), ::core::mem::transmute(parguments.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), parguments.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pdefines.as_ptr()), pdefines.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).BuildArguments)(::windows_core::Interface::as_raw(self), psourcename.into_param().abi(), pentrypoint.into_param().abi(), ptargetprofile.into_param().abi(), ::core::mem::transmute(parguments.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), parguments.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pdefines.as_ptr()), pdefines.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn GetPDBContents(&self, ppdbblob: P0, pphash: *mut ::core::option::Option, ppcontainer: *mut ::core::option::Option) -> ::windows_core::Result<()> where 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 f0dc483820..95dfc1b864 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 @@ -35,7 +35,7 @@ where pub unsafe fn D3DCompressShaders(pshaderdata: &[D3D_SHADER_DATA], uflags: u32) -> ::windows_core::Result { ::windows_targets::link!("d3dcompiler_47.dll" "system" fn D3DCompressShaders(unumshaders : u32, pshaderdata : *const D3D_SHADER_DATA, uflags : u32, ppcompresseddata : *mut * mut::core::ffi::c_void) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - D3DCompressShaders(pshaderdata.len() as _, ::core::mem::transmute(pshaderdata.as_ptr()), uflags, &mut result__).from_abi(result__) + D3DCompressShaders(pshaderdata.len().try_into().unwrap(), ::core::mem::transmute(pshaderdata.as_ptr()), uflags, &mut result__).from_abi(result__) } #[inline] pub unsafe fn D3DCreateBlob(size: usize) -> ::windows_core::Result { @@ -125,7 +125,7 @@ pub unsafe fn D3DGetOutputSignatureBlob(psrcdata: *const ::core::ffi::c_void, sr #[inline] pub unsafe fn D3DGetTraceInstructionOffsets(psrcdata: *const ::core::ffi::c_void, srcdatasize: usize, flags: u32, startinstindex: usize, poffsets: ::core::option::Option<&mut [usize]>, ptotalinsts: ::core::option::Option<*mut usize>) -> ::windows_core::Result<()> { ::windows_targets::link!("d3dcompiler_47.dll" "system" fn D3DGetTraceInstructionOffsets(psrcdata : *const ::core::ffi::c_void, srcdatasize : usize, flags : u32, startinstindex : usize, numinsts : usize, poffsets : *mut usize, ptotalinsts : *mut usize) -> ::windows_core::HRESULT); - D3DGetTraceInstructionOffsets(psrcdata, srcdatasize, flags, startinstindex, poffsets.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(poffsets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(ptotalinsts.unwrap_or(::std::ptr::null_mut()))).ok() + D3DGetTraceInstructionOffsets(psrcdata, srcdatasize, flags, startinstindex, poffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(poffsets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(ptotalinsts.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Graphics_Direct3D11\"`"] #[cfg(feature = "Win32_Graphics_Direct3D11")] 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 73b0d92f83..c6c0940bd5 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D10/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D10/mod.rs @@ -20,7 +20,7 @@ where P3: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("d3d10.dll" "system" fn D3D10CompileShader(psrcdata : ::windows_core::PCSTR, srcdatasize : usize, pfilename : ::windows_core::PCSTR, pdefines : *const super::Direct3D:: D3D_SHADER_MACRO, pinclude : * mut::core::ffi::c_void, pfunctionname : ::windows_core::PCSTR, pprofile : ::windows_core::PCSTR, flags : u32, ppshader : *mut * mut::core::ffi::c_void, pperrormsgs : *mut * mut::core::ffi::c_void) -> ::windows_core::HRESULT); - D3D10CompileShader(::core::mem::transmute(psrcdata.as_ptr()), psrcdata.len() as _, pfilename.into_param().abi(), ::core::mem::transmute(pdefines.unwrap_or(::std::ptr::null())), pinclude.into_param().abi(), pfunctionname.into_param().abi(), pprofile.into_param().abi(), flags, ::core::mem::transmute(ppshader), ::core::mem::transmute(pperrormsgs.unwrap_or(::std::ptr::null_mut()))).ok() + D3D10CompileShader(::core::mem::transmute(psrcdata.as_ptr()), psrcdata.len().try_into().unwrap(), pfilename.into_param().abi(), ::core::mem::transmute(pdefines.unwrap_or(::std::ptr::null())), pinclude.into_param().abi(), pfunctionname.into_param().abi(), pprofile.into_param().abi(), flags, ::core::mem::transmute(ppshader), ::core::mem::transmute(pperrormsgs.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Graphics_Direct3D\"`"] #[cfg(feature = "Win32_Graphics_Direct3D")] @@ -191,7 +191,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("d3d10.dll" "system" fn D3D10PreprocessShader(psrcdata : ::windows_core::PCSTR, srcdatasize : usize, pfilename : ::windows_core::PCSTR, pdefines : *const super::Direct3D:: D3D_SHADER_MACRO, pinclude : * mut::core::ffi::c_void, ppshadertext : *mut * mut::core::ffi::c_void, pperrormsgs : *mut * mut::core::ffi::c_void) -> ::windows_core::HRESULT); - D3D10PreprocessShader(::core::mem::transmute(psrcdata.as_ptr()), psrcdata.len() as _, pfilename.into_param().abi(), ::core::mem::transmute(pdefines.unwrap_or(::std::ptr::null())), pinclude.into_param().abi(), ::core::mem::transmute(ppshadertext), ::core::mem::transmute(pperrormsgs.unwrap_or(::std::ptr::null_mut()))).ok() + D3D10PreprocessShader(::core::mem::transmute(psrcdata.as_ptr()), psrcdata.len().try_into().unwrap(), pfilename.into_param().abi(), ::core::mem::transmute(pdefines.unwrap_or(::std::ptr::null())), pinclude.into_param().abi(), ::core::mem::transmute(ppshadertext), ::core::mem::transmute(pperrormsgs.unwrap_or(::std::ptr::null_mut()))).ok() } #[inline] pub unsafe fn D3D10ReflectShader(pshaderbytecode: *const ::core::ffi::c_void, bytecodelength: usize) -> ::windows_core::Result { @@ -662,10 +662,10 @@ pub struct ID3D10DepthStencilView_Vtbl { pub struct ID3D10Device(::windows_core::IUnknown); impl ID3D10Device { pub unsafe fn VSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).VSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).VSSetConstantBuffers)(::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 PSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).PSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).PSSetShaderResources)(::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 PSSetShader(&self, ppixelshader: P0) where @@ -674,7 +674,7 @@ impl ID3D10Device { (::windows_core::Interface::vtable(self).PSSetShader)(::windows_core::Interface::as_raw(self), ppixelshader.into_param().abi()) } pub unsafe fn PSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).PSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).PSSetSamplers)(::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 VSSetShader(&self, pvertexshader: P0) where @@ -689,7 +689,7 @@ impl ID3D10Device { (::windows_core::Interface::vtable(self).Draw)(::windows_core::Interface::as_raw(self), vertexcount, startvertexlocation) } pub unsafe fn PSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).PSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).PSSetConstantBuffers)(::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 IASetInputLayout(&self, pinputlayout: P0) where @@ -715,7 +715,7 @@ impl ID3D10Device { (::windows_core::Interface::vtable(self).DrawInstanced)(::windows_core::Interface::as_raw(self), vertexcountperinstance, instancecount, startvertexlocation, startinstancelocation) } pub unsafe fn GSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).GSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).GSSetConstantBuffers)(::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 GSSetShader(&self, pshader: P0) where @@ -729,10 +729,10 @@ impl ID3D10Device { (::windows_core::Interface::vtable(self).IASetPrimitiveTopology)(::windows_core::Interface::as_raw(self), topology) } pub unsafe fn VSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).VSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).VSSetShaderResources)(::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 VSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).VSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).VSSetSamplers)(::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()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -744,16 +744,16 @@ impl ID3D10Device { (::windows_core::Interface::vtable(self).SetPredication)(::windows_core::Interface::as_raw(self), ppredicate.into_param().abi(), predicatevalue.into_param().abi()) } pub unsafe fn GSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).GSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).GSSetShaderResources)(::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 GSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).GSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).GSSetSamplers)(::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 OMSetRenderTargets(&self, pprendertargetviews: ::core::option::Option<&[::core::option::Option]>, pdepthstencilview: P0) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).OMSetRenderTargets)(::windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pprendertargetviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdepthstencilview.into_param().abi()) + (::windows_core::Interface::vtable(self).OMSetRenderTargets)(::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.into_param().abi()) } pub unsafe fn OMSetBlendState(&self, pblendstate: P0, blendfactor: &[f32; 4], samplemask: u32) where @@ -780,12 +780,12 @@ impl ID3D10Device { (::windows_core::Interface::vtable(self).RSSetState)(::windows_core::Interface::as_raw(self), prasterizerstate.into_param().abi()) } pub unsafe fn RSSetViewports(&self, pviewports: ::core::option::Option<&[D3D10_VIEWPORT]>) { - (::windows_core::Interface::vtable(self).RSSetViewports)(::windows_core::Interface::as_raw(self), pviewports.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pviewports.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).RSSetViewports)(::windows_core::Interface::as_raw(self), pviewports.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pviewports.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn RSSetScissorRects(&self, prects: ::core::option::Option<&[super::super::Foundation::RECT]>) { - (::windows_core::Interface::vtable(self).RSSetScissorRects)(::windows_core::Interface::as_raw(self), prects.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prects.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).RSSetScissorRects)(::windows_core::Interface::as_raw(self), 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()))) } pub unsafe fn CopySubresourceRegion(&self, pdstresource: P0, dstsubresource: u32, dstx: u32, dsty: u32, dstz: u32, psrcresource: P1, srcsubresource: u32, psrcbox: ::core::option::Option<*const D3D10_BOX>) where @@ -835,10 +835,10 @@ impl ID3D10Device { (::windows_core::Interface::vtable(self).ResolveSubresource)(::windows_core::Interface::as_raw(self), pdstresource.into_param().abi(), dstsubresource, psrcresource.into_param().abi(), srcsubresource, format) } pub unsafe fn VSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).VSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).VSGetConstantBuffers)(::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 PSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).PSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::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) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -846,7 +846,7 @@ impl ID3D10Device { ::windows_core::from_abi(result__) } pub unsafe fn PSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).PSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::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) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -854,7 +854,7 @@ impl ID3D10Device { ::windows_core::from_abi(result__) } pub unsafe fn PSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).PSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::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()))) } pub unsafe fn IAGetInputLayout(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -870,7 +870,7 @@ impl ID3D10Device { (::windows_core::Interface::vtable(self).IAGetIndexBuffer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pindexbuffer.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(format.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(offset.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn GSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).GSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::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) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -885,10 +885,10 @@ impl ID3D10Device { ::std::mem::transmute(result__) } pub unsafe fn VSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).VSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).VSGetShaderResources)(::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 VSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).VSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::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()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -896,13 +896,13 @@ impl ID3D10Device { (::windows_core::Interface::vtable(self).GetPredication)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pppredicate.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppredicatevalue.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn GSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).GSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::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()))) } pub unsafe fn GSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).GSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::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: ::core::option::Option<&mut [::core::option::Option]>, ppdepthstencilview: ::core::option::Option<*mut ::core::option::Option>) { - (::windows_core::Interface::vtable(self).OMGetRenderTargets)(::windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pprendertargetviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(ppdepthstencilview.unwrap_or(::std::ptr::null_mut()))) + (::windows_core::Interface::vtable(self).OMGetRenderTargets)(::windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pprendertargetviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(ppdepthstencilview.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn OMGetBlendState(&self, ppblendstate: ::core::option::Option<*mut ::core::option::Option>, blendfactor: ::core::option::Option<&mut [f32; 4]>, psamplemask: ::core::option::Option<*mut u32>) { (::windows_core::Interface::vtable(self).OMGetBlendState)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppblendstate.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(blendfactor.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(psamplemask.unwrap_or(::std::ptr::null_mut()))) @@ -1001,19 +1001,19 @@ impl ID3D10Device { #[doc = "Required features: `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateInputLayout(&self, pinputelementdescs: &[D3D10_INPUT_ELEMENT_DESC], pshaderbytecodewithinputsignature: &[u8], ppinputlayout: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).CreateInputLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pinputelementdescs.as_ptr()), pinputelementdescs.len() as _, ::core::mem::transmute(pshaderbytecodewithinputsignature.as_ptr()), pshaderbytecodewithinputsignature.len() as _, ::core::mem::transmute(ppinputlayout.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).CreateInputLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pinputelementdescs.as_ptr()), pinputelementdescs.len().try_into().unwrap(), ::core::mem::transmute(pshaderbytecodewithinputsignature.as_ptr()), pshaderbytecodewithinputsignature.len().try_into().unwrap(), ::core::mem::transmute(ppinputlayout.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateVertexShader(&self, pshaderbytecode: &[u8], ppvertexshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).CreateVertexShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, ::core::mem::transmute(ppvertexshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).CreateVertexShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), ::core::mem::transmute(ppvertexshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateGeometryShader(&self, pshaderbytecode: &[u8], ppgeometryshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).CreateGeometryShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, ::core::mem::transmute(ppgeometryshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).CreateGeometryShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), ::core::mem::transmute(ppgeometryshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateGeometryShaderWithStreamOutput(&self, pshaderbytecode: &[u8], psodeclaration: ::core::option::Option<&[D3D10_SO_DECLARATION_ENTRY]>, outputstreamstride: u32, ppgeometryshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).CreateGeometryShaderWithStreamOutput)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, ::core::mem::transmute(psodeclaration.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), psodeclaration.as_deref().map_or(0, |slice| slice.len() as _), outputstreamstride, ::core::mem::transmute(ppgeometryshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).CreateGeometryShaderWithStreamOutput)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), ::core::mem::transmute(psodeclaration.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), psodeclaration.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), outputstreamstride, ::core::mem::transmute(ppgeometryshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreatePixelShader(&self, pshaderbytecode: &[u8], pppixelshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).CreatePixelShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, ::core::mem::transmute(pppixelshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).CreatePixelShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), ::core::mem::transmute(pppixelshader.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1260,10 +1260,10 @@ pub struct ID3D10Device_Vtbl { pub struct ID3D10Device1(::windows_core::IUnknown); impl ID3D10Device1 { pub unsafe fn VSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.VSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.VSSetConstantBuffers)(::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 PSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.PSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.PSSetShaderResources)(::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 PSSetShader(&self, ppixelshader: P0) where @@ -1272,7 +1272,7 @@ impl ID3D10Device1 { (::windows_core::Interface::vtable(self).base__.PSSetShader)(::windows_core::Interface::as_raw(self), ppixelshader.into_param().abi()) } pub unsafe fn PSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.PSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.PSSetSamplers)(::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 VSSetShader(&self, pvertexshader: P0) where @@ -1287,7 +1287,7 @@ impl ID3D10Device1 { (::windows_core::Interface::vtable(self).base__.Draw)(::windows_core::Interface::as_raw(self), vertexcount, startvertexlocation) } pub unsafe fn PSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.PSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.PSSetConstantBuffers)(::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 IASetInputLayout(&self, pinputlayout: P0) where @@ -1313,7 +1313,7 @@ impl ID3D10Device1 { (::windows_core::Interface::vtable(self).base__.DrawInstanced)(::windows_core::Interface::as_raw(self), vertexcountperinstance, instancecount, startvertexlocation, startinstancelocation) } pub unsafe fn GSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.GSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.GSSetConstantBuffers)(::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 GSSetShader(&self, pshader: P0) where @@ -1327,10 +1327,10 @@ impl ID3D10Device1 { (::windows_core::Interface::vtable(self).base__.IASetPrimitiveTopology)(::windows_core::Interface::as_raw(self), topology) } pub unsafe fn VSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.VSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.VSSetShaderResources)(::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 VSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.VSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.VSSetSamplers)(::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()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1342,16 +1342,16 @@ impl ID3D10Device1 { (::windows_core::Interface::vtable(self).base__.SetPredication)(::windows_core::Interface::as_raw(self), ppredicate.into_param().abi(), predicatevalue.into_param().abi()) } pub unsafe fn GSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.GSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.GSSetShaderResources)(::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 GSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.GSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.GSSetSamplers)(::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 OMSetRenderTargets(&self, pprendertargetviews: ::core::option::Option<&[::core::option::Option]>, pdepthstencilview: P0) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.OMSetRenderTargets)(::windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pprendertargetviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdepthstencilview.into_param().abi()) + (::windows_core::Interface::vtable(self).base__.OMSetRenderTargets)(::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.into_param().abi()) } pub unsafe fn OMSetBlendState(&self, pblendstate: P0, blendfactor: &[f32; 4], samplemask: u32) where @@ -1378,12 +1378,12 @@ impl ID3D10Device1 { (::windows_core::Interface::vtable(self).base__.RSSetState)(::windows_core::Interface::as_raw(self), prasterizerstate.into_param().abi()) } pub unsafe fn RSSetViewports(&self, pviewports: ::core::option::Option<&[D3D10_VIEWPORT]>) { - (::windows_core::Interface::vtable(self).base__.RSSetViewports)(::windows_core::Interface::as_raw(self), pviewports.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pviewports.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.RSSetViewports)(::windows_core::Interface::as_raw(self), pviewports.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pviewports.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn RSSetScissorRects(&self, prects: ::core::option::Option<&[super::super::Foundation::RECT]>) { - (::windows_core::Interface::vtable(self).base__.RSSetScissorRects)(::windows_core::Interface::as_raw(self), prects.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prects.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.RSSetScissorRects)(::windows_core::Interface::as_raw(self), 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()))) } pub unsafe fn CopySubresourceRegion(&self, pdstresource: P0, dstsubresource: u32, dstx: u32, dsty: u32, dstz: u32, psrcresource: P1, srcsubresource: u32, psrcbox: ::core::option::Option<*const D3D10_BOX>) where @@ -1433,10 +1433,10 @@ impl ID3D10Device1 { (::windows_core::Interface::vtable(self).base__.ResolveSubresource)(::windows_core::Interface::as_raw(self), pdstresource.into_param().abi(), dstsubresource, psrcresource.into_param().abi(), srcsubresource, format) } pub unsafe fn VSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.VSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.VSGetConstantBuffers)(::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 PSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.PSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.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) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1444,7 +1444,7 @@ impl ID3D10Device1 { ::windows_core::from_abi(result__) } pub unsafe fn PSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.PSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.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) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1452,7 +1452,7 @@ impl ID3D10Device1 { ::windows_core::from_abi(result__) } pub unsafe fn PSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.PSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.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()))) } pub unsafe fn IAGetInputLayout(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1468,7 +1468,7 @@ impl ID3D10Device1 { (::windows_core::Interface::vtable(self).base__.IAGetIndexBuffer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pindexbuffer.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(format.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(offset.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn GSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.GSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.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) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1483,10 +1483,10 @@ impl ID3D10Device1 { ::std::mem::transmute(result__) } pub unsafe fn VSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.VSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.VSGetShaderResources)(::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 VSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.VSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.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()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1494,13 +1494,13 @@ impl ID3D10Device1 { (::windows_core::Interface::vtable(self).base__.GetPredication)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pppredicate.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppredicatevalue.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn GSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.GSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.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()))) } pub unsafe fn GSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.GSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.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: ::core::option::Option<&mut [::core::option::Option]>, ppdepthstencilview: ::core::option::Option<*mut ::core::option::Option>) { - (::windows_core::Interface::vtable(self).base__.OMGetRenderTargets)(::windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pprendertargetviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(ppdepthstencilview.unwrap_or(::std::ptr::null_mut()))) + (::windows_core::Interface::vtable(self).base__.OMGetRenderTargets)(::windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pprendertargetviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(ppdepthstencilview.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn OMGetBlendState(&self, ppblendstate: ::core::option::Option<*mut ::core::option::Option>, blendfactor: ::core::option::Option<&mut [f32; 4]>, psamplemask: ::core::option::Option<*mut u32>) { (::windows_core::Interface::vtable(self).base__.OMGetBlendState)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppblendstate.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(blendfactor.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(psamplemask.unwrap_or(::std::ptr::null_mut()))) @@ -1599,19 +1599,19 @@ impl ID3D10Device1 { #[doc = "Required features: `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateInputLayout(&self, pinputelementdescs: &[D3D10_INPUT_ELEMENT_DESC], pshaderbytecodewithinputsignature: &[u8], ppinputlayout: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.CreateInputLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pinputelementdescs.as_ptr()), pinputelementdescs.len() as _, ::core::mem::transmute(pshaderbytecodewithinputsignature.as_ptr()), pshaderbytecodewithinputsignature.len() as _, ::core::mem::transmute(ppinputlayout.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.CreateInputLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pinputelementdescs.as_ptr()), pinputelementdescs.len().try_into().unwrap(), ::core::mem::transmute(pshaderbytecodewithinputsignature.as_ptr()), pshaderbytecodewithinputsignature.len().try_into().unwrap(), ::core::mem::transmute(ppinputlayout.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateVertexShader(&self, pshaderbytecode: &[u8], ppvertexshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.CreateVertexShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, ::core::mem::transmute(ppvertexshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.CreateVertexShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), ::core::mem::transmute(ppvertexshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateGeometryShader(&self, pshaderbytecode: &[u8], ppgeometryshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.CreateGeometryShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, ::core::mem::transmute(ppgeometryshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.CreateGeometryShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), ::core::mem::transmute(ppgeometryshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateGeometryShaderWithStreamOutput(&self, pshaderbytecode: &[u8], psodeclaration: ::core::option::Option<&[D3D10_SO_DECLARATION_ENTRY]>, outputstreamstride: u32, ppgeometryshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.CreateGeometryShaderWithStreamOutput)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, ::core::mem::transmute(psodeclaration.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), psodeclaration.as_deref().map_or(0, |slice| slice.len() as _), outputstreamstride, ::core::mem::transmute(ppgeometryshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.CreateGeometryShaderWithStreamOutput)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), ::core::mem::transmute(psodeclaration.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), psodeclaration.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), outputstreamstride, ::core::mem::transmute(ppgeometryshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreatePixelShader(&self, pshaderbytecode: &[u8], pppixelshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.CreatePixelShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, ::core::mem::transmute(pppixelshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.CreatePixelShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), ::core::mem::transmute(pppixelshader.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2320,10 +2320,10 @@ impl ID3D10EffectDepthStencilViewVariable { (::windows_core::Interface::vtable(self).GetDepthStencil)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn SetDepthStencilArray(&self, ppresources: &[::core::option::Option], offset: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetDepthStencilArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppresources.as_ptr()), offset, ppresources.len() as _).ok() + (::windows_core::Interface::vtable(self).SetDepthStencilArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppresources.as_ptr()), offset, ppresources.len().try_into().unwrap()).ok() } pub unsafe fn GetDepthStencilArray(&self, ppresources: &mut [::core::option::Option], offset: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDepthStencilArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppresources.as_ptr()), offset, ppresources.len() as _).ok() + (::windows_core::Interface::vtable(self).GetDepthStencilArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppresources.as_ptr()), offset, ppresources.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(ID3D10EffectDepthStencilViewVariable, ID3D10EffectVariable); @@ -2773,10 +2773,10 @@ impl ID3D10EffectRenderTargetViewVariable { (::windows_core::Interface::vtable(self).GetRenderTarget)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn SetRenderTargetArray(&self, ppresources: &[::core::option::Option], offset: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetRenderTargetArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppresources.as_ptr()), offset, ppresources.len() as _).ok() + (::windows_core::Interface::vtable(self).SetRenderTargetArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppresources.as_ptr()), offset, ppresources.len().try_into().unwrap()).ok() } pub unsafe fn GetRenderTargetArray(&self, ppresources: &mut [::core::option::Option], offset: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetRenderTargetArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppresources.as_ptr()), offset, ppresources.len() as _).ok() + (::windows_core::Interface::vtable(self).GetRenderTargetArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppresources.as_ptr()), offset, ppresources.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(ID3D10EffectRenderTargetViewVariable, ID3D10EffectVariable); @@ -3003,10 +3003,10 @@ impl ID3D10EffectScalarVariable { (::windows_core::Interface::vtable(self).GetFloat)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn SetFloatArray(&self, pdata: &[f32], offset: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetFloatArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdata.as_ptr()), offset, pdata.len() as _).ok() + (::windows_core::Interface::vtable(self).SetFloatArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdata.as_ptr()), offset, pdata.len().try_into().unwrap()).ok() } pub unsafe fn GetFloatArray(&self, pdata: &mut [f32], offset: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetFloatArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdata.as_ptr()), offset, pdata.len() as _).ok() + (::windows_core::Interface::vtable(self).GetFloatArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdata.as_ptr()), offset, pdata.len().try_into().unwrap()).ok() } pub unsafe fn SetInt(&self, value: i32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).SetInt)(::windows_core::Interface::as_raw(self), value).ok() @@ -3016,10 +3016,10 @@ impl ID3D10EffectScalarVariable { (::windows_core::Interface::vtable(self).GetInt)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn SetIntArray(&self, pdata: &[i32], offset: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetIntArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdata.as_ptr()), offset, pdata.len() as _).ok() + (::windows_core::Interface::vtable(self).SetIntArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdata.as_ptr()), offset, pdata.len().try_into().unwrap()).ok() } pub unsafe fn GetIntArray(&self, pdata: &mut [i32], offset: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetIntArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdata.as_ptr()), offset, pdata.len() as _).ok() + (::windows_core::Interface::vtable(self).GetIntArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdata.as_ptr()), offset, pdata.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3038,12 +3038,12 @@ impl ID3D10EffectScalarVariable { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetBoolArray(&self, pdata: &[super::super::Foundation::BOOL], offset: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetBoolArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdata.as_ptr()), offset, pdata.len() as _).ok() + (::windows_core::Interface::vtable(self).SetBoolArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdata.as_ptr()), offset, pdata.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetBoolArray(&self, pdata: &mut [super::super::Foundation::BOOL], offset: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetBoolArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdata.as_ptr()), offset, pdata.len() as _).ok() + (::windows_core::Interface::vtable(self).GetBoolArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdata.as_ptr()), offset, pdata.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(ID3D10EffectScalarVariable, ID3D10EffectVariable); @@ -3182,10 +3182,10 @@ impl ID3D10EffectShaderResourceVariable { (::windows_core::Interface::vtable(self).GetResource)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn SetResourceArray(&self, ppresources: &[::core::option::Option], offset: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetResourceArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppresources.as_ptr()), offset, ppresources.len() as _).ok() + (::windows_core::Interface::vtable(self).SetResourceArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppresources.as_ptr()), offset, ppresources.len().try_into().unwrap()).ok() } pub unsafe fn GetResourceArray(&self, ppresources: &mut [::core::option::Option], offset: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetResourceArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppresources.as_ptr()), offset, ppresources.len() as _).ok() + (::windows_core::Interface::vtable(self).GetResourceArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppresources.as_ptr()), offset, ppresources.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(ID3D10EffectShaderResourceVariable, ID3D10EffectVariable); @@ -3442,7 +3442,7 @@ impl ID3D10EffectStringVariable { (::windows_core::Interface::vtable(self).GetString)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetStringArray(&self, ppstrings: &mut [::windows_core::PCSTR], offset: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetStringArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppstrings.as_ptr()), offset, ppstrings.len() as _).ok() + (::windows_core::Interface::vtable(self).GetStringArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppstrings.as_ptr()), offset, ppstrings.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(ID3D10EffectStringVariable, ID3D10EffectVariable); 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 8cd58adb32..e011df0546 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11/mod.rs @@ -7,7 +7,19 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("d3d11.dll" "system" fn D3D11CreateDevice(padapter : * mut::core::ffi::c_void, drivertype : super::Direct3D:: D3D_DRIVER_TYPE, software : super::super::Foundation:: HMODULE, flags : D3D11_CREATE_DEVICE_FLAG, pfeaturelevels : *const super::Direct3D:: D3D_FEATURE_LEVEL, featurelevels : u32, sdkversion : u32, ppdevice : *mut * mut::core::ffi::c_void, pfeaturelevel : *mut super::Direct3D:: D3D_FEATURE_LEVEL, ppimmediatecontext : *mut * mut::core::ffi::c_void) -> ::windows_core::HRESULT); - D3D11CreateDevice(padapter.into_param().abi(), drivertype, software.into_param().abi(), flags, ::core::mem::transmute(pfeaturelevels.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pfeaturelevels.as_deref().map_or(0, |slice| slice.len() as _), sdkversion, ::core::mem::transmute(ppdevice.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pfeaturelevel.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppimmediatecontext.unwrap_or(::std::ptr::null_mut()))).ok() + D3D11CreateDevice( + padapter.into_param().abi(), + drivertype, + software.into_param().abi(), + flags, + ::core::mem::transmute(pfeaturelevels.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), + pfeaturelevels.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), + sdkversion, + ::core::mem::transmute(ppdevice.unwrap_or(::std::ptr::null_mut())), + ::core::mem::transmute(pfeaturelevel.unwrap_or(::std::ptr::null_mut())), + ::core::mem::transmute(ppimmediatecontext.unwrap_or(::std::ptr::null_mut())), + ) + .ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D\"`, `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] @@ -24,7 +36,7 @@ where software.into_param().abi(), flags, ::core::mem::transmute(pfeaturelevels.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - pfeaturelevels.as_deref().map_or(0, |slice| slice.len() as _), + pfeaturelevels.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), sdkversion, ::core::mem::transmute(pswapchaindesc.unwrap_or(::std::ptr::null())), ::core::mem::transmute(ppswapchain.unwrap_or(::std::ptr::null_mut())), @@ -185,7 +197,7 @@ impl ID3D11AuthenticatedChannel { (::windows_core::Interface::vtable(self).GetCertificateSize)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetCertificate(&self, pcertificate: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetCertificate)(::windows_core::Interface::as_raw(self), pcertificate.len() as _, ::core::mem::transmute(pcertificate.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetCertificate)(::windows_core::Interface::as_raw(self), pcertificate.len().try_into().unwrap(), ::core::mem::transmute(pcertificate.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -629,7 +641,7 @@ impl ID3D11CryptoSession { (::windows_core::Interface::vtable(self).GetCertificateSize)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetCertificate(&self, pcertificate: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetCertificate)(::windows_core::Interface::as_raw(self), pcertificate.len() as _, ::core::mem::transmute(pcertificate.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetCertificate)(::windows_core::Interface::as_raw(self), pcertificate.len().try_into().unwrap(), ::core::mem::transmute(pcertificate.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -888,19 +900,19 @@ impl ID3D11Device { #[doc = "Required features: `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateInputLayout(&self, pinputelementdescs: &[D3D11_INPUT_ELEMENT_DESC], pshaderbytecodewithinputsignature: &[u8], ppinputlayout: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).CreateInputLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pinputelementdescs.as_ptr()), pinputelementdescs.len() as _, ::core::mem::transmute(pshaderbytecodewithinputsignature.as_ptr()), pshaderbytecodewithinputsignature.len() as _, ::core::mem::transmute(ppinputlayout.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).CreateInputLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pinputelementdescs.as_ptr()), pinputelementdescs.len().try_into().unwrap(), ::core::mem::transmute(pshaderbytecodewithinputsignature.as_ptr()), pshaderbytecodewithinputsignature.len().try_into().unwrap(), ::core::mem::transmute(ppinputlayout.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateVertexShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, ppvertexshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).CreateVertexShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(ppvertexshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).CreateVertexShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(ppvertexshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateGeometryShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, ppgeometryshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).CreateGeometryShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(ppgeometryshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).CreateGeometryShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(ppgeometryshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateGeometryShaderWithStreamOutput(&self, pshaderbytecode: &[u8], psodeclaration: ::core::option::Option<&[D3D11_SO_DECLARATION_ENTRY]>, pbufferstrides: ::core::option::Option<&[u32]>, rasterizedstream: u32, pclasslinkage: P0, ppgeometryshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where @@ -909,11 +921,11 @@ impl ID3D11Device { (::windows_core::Interface::vtable(self).CreateGeometryShaderWithStreamOutput)( ::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), - pshaderbytecode.len() as _, + 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() as _), + psodeclaration.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pbufferstrides.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - pbufferstrides.as_deref().map_or(0, |slice| slice.len() as _), + pbufferstrides.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), rasterizedstream, pclasslinkage.into_param().abi(), ::core::mem::transmute(ppgeometryshader.unwrap_or(::std::ptr::null_mut())), @@ -924,25 +936,25 @@ impl ID3D11Device { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).CreatePixelShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(pppixelshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).CreatePixelShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(pppixelshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateHullShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, pphullshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).CreateHullShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(pphullshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).CreateHullShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(pphullshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateDomainShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, ppdomainshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).CreateDomainShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(ppdomainshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).CreateDomainShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(ppdomainshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateComputeShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, ppcomputeshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).CreateComputeShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(ppcomputeshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).CreateComputeShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(ppcomputeshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateClassLinkage(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1201,19 +1213,19 @@ impl ID3D11Device1 { #[doc = "Required features: `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateInputLayout(&self, pinputelementdescs: &[D3D11_INPUT_ELEMENT_DESC], pshaderbytecodewithinputsignature: &[u8], ppinputlayout: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.CreateInputLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pinputelementdescs.as_ptr()), pinputelementdescs.len() as _, ::core::mem::transmute(pshaderbytecodewithinputsignature.as_ptr()), pshaderbytecodewithinputsignature.len() as _, ::core::mem::transmute(ppinputlayout.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.CreateInputLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pinputelementdescs.as_ptr()), pinputelementdescs.len().try_into().unwrap(), ::core::mem::transmute(pshaderbytecodewithinputsignature.as_ptr()), pshaderbytecodewithinputsignature.len().try_into().unwrap(), ::core::mem::transmute(ppinputlayout.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateVertexShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, ppvertexshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.CreateVertexShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(ppvertexshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.CreateVertexShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(ppvertexshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateGeometryShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, ppgeometryshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.CreateGeometryShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(ppgeometryshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.CreateGeometryShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(ppgeometryshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateGeometryShaderWithStreamOutput(&self, pshaderbytecode: &[u8], psodeclaration: ::core::option::Option<&[D3D11_SO_DECLARATION_ENTRY]>, pbufferstrides: ::core::option::Option<&[u32]>, rasterizedstream: u32, pclasslinkage: P0, ppgeometryshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where @@ -1222,11 +1234,11 @@ impl ID3D11Device1 { (::windows_core::Interface::vtable(self).base__.CreateGeometryShaderWithStreamOutput)( ::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), - pshaderbytecode.len() as _, + 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() as _), + psodeclaration.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pbufferstrides.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - pbufferstrides.as_deref().map_or(0, |slice| slice.len() as _), + pbufferstrides.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), rasterizedstream, pclasslinkage.into_param().abi(), ::core::mem::transmute(ppgeometryshader.unwrap_or(::std::ptr::null_mut())), @@ -1237,25 +1249,25 @@ impl ID3D11Device1 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.CreatePixelShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(pppixelshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.CreatePixelShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(pppixelshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateHullShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, pphullshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.CreateHullShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(pphullshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.CreateHullShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(pphullshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateDomainShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, ppdomainshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.CreateDomainShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(ppdomainshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.CreateDomainShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(ppdomainshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateComputeShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, ppcomputeshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.CreateComputeShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(ppcomputeshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.CreateComputeShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(ppcomputeshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateClassLinkage(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1378,7 +1390,7 @@ impl ID3D11Device1 { #[doc = "Required features: `\"Win32_Graphics_Direct3D\"`"] #[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: ::core::option::Option<*mut super::Direct3D::D3D_FEATURE_LEVEL>, ppcontextstate: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).CreateDeviceContextState)(::windows_core::Interface::as_raw(self), flags, ::core::mem::transmute(pfeaturelevels.as_ptr()), pfeaturelevels.len() as _, sdkversion, emulatedinterface, ::core::mem::transmute(pchosenfeaturelevel.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppcontextstate.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).CreateDeviceContextState)(::windows_core::Interface::as_raw(self), flags, ::core::mem::transmute(pfeaturelevels.as_ptr()), pfeaturelevels.len().try_into().unwrap(), sdkversion, emulatedinterface, ::core::mem::transmute(pchosenfeaturelevel.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppcontextstate.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1489,19 +1501,19 @@ impl ID3D11Device2 { #[doc = "Required features: `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateInputLayout(&self, pinputelementdescs: &[D3D11_INPUT_ELEMENT_DESC], pshaderbytecodewithinputsignature: &[u8], ppinputlayout: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.CreateInputLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pinputelementdescs.as_ptr()), pinputelementdescs.len() as _, ::core::mem::transmute(pshaderbytecodewithinputsignature.as_ptr()), pshaderbytecodewithinputsignature.len() as _, ::core::mem::transmute(ppinputlayout.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.CreateInputLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pinputelementdescs.as_ptr()), pinputelementdescs.len().try_into().unwrap(), ::core::mem::transmute(pshaderbytecodewithinputsignature.as_ptr()), pshaderbytecodewithinputsignature.len().try_into().unwrap(), ::core::mem::transmute(ppinputlayout.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateVertexShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, ppvertexshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.CreateVertexShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(ppvertexshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.CreateVertexShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(ppvertexshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateGeometryShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, ppgeometryshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.CreateGeometryShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(ppgeometryshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.CreateGeometryShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(ppgeometryshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateGeometryShaderWithStreamOutput(&self, pshaderbytecode: &[u8], psodeclaration: ::core::option::Option<&[D3D11_SO_DECLARATION_ENTRY]>, pbufferstrides: ::core::option::Option<&[u32]>, rasterizedstream: u32, pclasslinkage: P0, ppgeometryshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where @@ -1510,11 +1522,11 @@ impl ID3D11Device2 { (::windows_core::Interface::vtable(self).base__.base__.CreateGeometryShaderWithStreamOutput)( ::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), - pshaderbytecode.len() as _, + 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() as _), + psodeclaration.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pbufferstrides.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - pbufferstrides.as_deref().map_or(0, |slice| slice.len() as _), + pbufferstrides.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), rasterizedstream, pclasslinkage.into_param().abi(), ::core::mem::transmute(ppgeometryshader.unwrap_or(::std::ptr::null_mut())), @@ -1525,25 +1537,25 @@ impl ID3D11Device2 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.CreatePixelShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(pppixelshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.CreatePixelShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(pppixelshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateHullShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, pphullshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.CreateHullShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(pphullshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.CreateHullShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(pphullshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateDomainShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, ppdomainshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.CreateDomainShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(ppdomainshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.CreateDomainShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(ppdomainshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateComputeShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, ppcomputeshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.CreateComputeShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(ppcomputeshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.CreateComputeShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(ppcomputeshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateClassLinkage(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1666,7 +1678,7 @@ impl ID3D11Device2 { #[doc = "Required features: `\"Win32_Graphics_Direct3D\"`"] #[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: ::core::option::Option<*mut super::Direct3D::D3D_FEATURE_LEVEL>, ppcontextstate: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.CreateDeviceContextState)(::windows_core::Interface::as_raw(self), flags, ::core::mem::transmute(pfeaturelevels.as_ptr()), pfeaturelevels.len() as _, sdkversion, emulatedinterface, ::core::mem::transmute(pchosenfeaturelevel.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppcontextstate.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.CreateDeviceContextState)(::windows_core::Interface::as_raw(self), flags, ::core::mem::transmute(pfeaturelevels.as_ptr()), pfeaturelevels.len().try_into().unwrap(), sdkversion, emulatedinterface, ::core::mem::transmute(pchosenfeaturelevel.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppcontextstate.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1785,19 +1797,19 @@ impl ID3D11Device3 { #[doc = "Required features: `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateInputLayout(&self, pinputelementdescs: &[D3D11_INPUT_ELEMENT_DESC], pshaderbytecodewithinputsignature: &[u8], ppinputlayout: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.CreateInputLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pinputelementdescs.as_ptr()), pinputelementdescs.len() as _, ::core::mem::transmute(pshaderbytecodewithinputsignature.as_ptr()), pshaderbytecodewithinputsignature.len() as _, ::core::mem::transmute(ppinputlayout.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.CreateInputLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pinputelementdescs.as_ptr()), pinputelementdescs.len().try_into().unwrap(), ::core::mem::transmute(pshaderbytecodewithinputsignature.as_ptr()), pshaderbytecodewithinputsignature.len().try_into().unwrap(), ::core::mem::transmute(ppinputlayout.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateVertexShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, ppvertexshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.CreateVertexShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(ppvertexshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.CreateVertexShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(ppvertexshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateGeometryShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, ppgeometryshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.CreateGeometryShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(ppgeometryshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.CreateGeometryShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(ppgeometryshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateGeometryShaderWithStreamOutput(&self, pshaderbytecode: &[u8], psodeclaration: ::core::option::Option<&[D3D11_SO_DECLARATION_ENTRY]>, pbufferstrides: ::core::option::Option<&[u32]>, rasterizedstream: u32, pclasslinkage: P0, ppgeometryshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where @@ -1806,11 +1818,11 @@ impl ID3D11Device3 { (::windows_core::Interface::vtable(self).base__.base__.base__.CreateGeometryShaderWithStreamOutput)( ::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), - pshaderbytecode.len() as _, + 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() as _), + psodeclaration.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pbufferstrides.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - pbufferstrides.as_deref().map_or(0, |slice| slice.len() as _), + pbufferstrides.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), rasterizedstream, pclasslinkage.into_param().abi(), ::core::mem::transmute(ppgeometryshader.unwrap_or(::std::ptr::null_mut())), @@ -1821,25 +1833,25 @@ impl ID3D11Device3 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.CreatePixelShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(pppixelshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.CreatePixelShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(pppixelshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateHullShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, pphullshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.CreateHullShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(pphullshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.CreateHullShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(pphullshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateDomainShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, ppdomainshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.CreateDomainShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(ppdomainshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.CreateDomainShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(ppdomainshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateComputeShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, ppcomputeshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.CreateComputeShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(ppcomputeshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.CreateComputeShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(ppcomputeshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateClassLinkage(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1962,7 +1974,7 @@ impl ID3D11Device3 { #[doc = "Required features: `\"Win32_Graphics_Direct3D\"`"] #[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: ::core::option::Option<*mut super::Direct3D::D3D_FEATURE_LEVEL>, ppcontextstate: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.CreateDeviceContextState)(::windows_core::Interface::as_raw(self), flags, ::core::mem::transmute(pfeaturelevels.as_ptr()), pfeaturelevels.len() as _, sdkversion, emulatedinterface, ::core::mem::transmute(pchosenfeaturelevel.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppcontextstate.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.CreateDeviceContextState)(::windows_core::Interface::as_raw(self), flags, ::core::mem::transmute(pfeaturelevels.as_ptr()), pfeaturelevels.len().try_into().unwrap(), sdkversion, emulatedinterface, ::core::mem::transmute(pchosenfeaturelevel.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppcontextstate.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2165,19 +2177,19 @@ impl ID3D11Device4 { #[doc = "Required features: `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateInputLayout(&self, pinputelementdescs: &[D3D11_INPUT_ELEMENT_DESC], pshaderbytecodewithinputsignature: &[u8], ppinputlayout: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateInputLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pinputelementdescs.as_ptr()), pinputelementdescs.len() as _, ::core::mem::transmute(pshaderbytecodewithinputsignature.as_ptr()), pshaderbytecodewithinputsignature.len() as _, ::core::mem::transmute(ppinputlayout.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateInputLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pinputelementdescs.as_ptr()), pinputelementdescs.len().try_into().unwrap(), ::core::mem::transmute(pshaderbytecodewithinputsignature.as_ptr()), pshaderbytecodewithinputsignature.len().try_into().unwrap(), ::core::mem::transmute(ppinputlayout.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateVertexShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, ppvertexshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateVertexShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(ppvertexshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateVertexShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(ppvertexshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateGeometryShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, ppgeometryshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateGeometryShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(ppgeometryshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateGeometryShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(ppgeometryshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateGeometryShaderWithStreamOutput(&self, pshaderbytecode: &[u8], psodeclaration: ::core::option::Option<&[D3D11_SO_DECLARATION_ENTRY]>, pbufferstrides: ::core::option::Option<&[u32]>, rasterizedstream: u32, pclasslinkage: P0, ppgeometryshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where @@ -2186,11 +2198,11 @@ impl ID3D11Device4 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateGeometryShaderWithStreamOutput)( ::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), - pshaderbytecode.len() as _, + 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() as _), + psodeclaration.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pbufferstrides.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - pbufferstrides.as_deref().map_or(0, |slice| slice.len() as _), + pbufferstrides.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), rasterizedstream, pclasslinkage.into_param().abi(), ::core::mem::transmute(ppgeometryshader.unwrap_or(::std::ptr::null_mut())), @@ -2201,25 +2213,25 @@ impl ID3D11Device4 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreatePixelShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(pppixelshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreatePixelShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(pppixelshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateHullShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, pphullshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateHullShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(pphullshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateHullShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(pphullshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateDomainShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, ppdomainshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateDomainShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(ppdomainshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateDomainShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(ppdomainshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateComputeShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, ppcomputeshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateComputeShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(ppcomputeshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateComputeShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(ppcomputeshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateClassLinkage(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -2342,7 +2354,7 @@ impl ID3D11Device4 { #[doc = "Required features: `\"Win32_Graphics_Direct3D\"`"] #[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: ::core::option::Option<*mut super::Direct3D::D3D_FEATURE_LEVEL>, ppcontextstate: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.CreateDeviceContextState)(::windows_core::Interface::as_raw(self), flags, ::core::mem::transmute(pfeaturelevels.as_ptr()), pfeaturelevels.len() as _, sdkversion, emulatedinterface, ::core::mem::transmute(pchosenfeaturelevel.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppcontextstate.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.CreateDeviceContextState)(::windows_core::Interface::as_raw(self), flags, ::core::mem::transmute(pfeaturelevels.as_ptr()), pfeaturelevels.len().try_into().unwrap(), sdkversion, emulatedinterface, ::core::mem::transmute(pchosenfeaturelevel.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppcontextstate.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2533,19 +2545,19 @@ impl ID3D11Device5 { #[doc = "Required features: `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateInputLayout(&self, pinputelementdescs: &[D3D11_INPUT_ELEMENT_DESC], pshaderbytecodewithinputsignature: &[u8], ppinputlayout: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateInputLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pinputelementdescs.as_ptr()), pinputelementdescs.len() as _, ::core::mem::transmute(pshaderbytecodewithinputsignature.as_ptr()), pshaderbytecodewithinputsignature.len() as _, ::core::mem::transmute(ppinputlayout.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateInputLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pinputelementdescs.as_ptr()), pinputelementdescs.len().try_into().unwrap(), ::core::mem::transmute(pshaderbytecodewithinputsignature.as_ptr()), pshaderbytecodewithinputsignature.len().try_into().unwrap(), ::core::mem::transmute(ppinputlayout.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateVertexShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, ppvertexshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateVertexShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(ppvertexshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateVertexShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(ppvertexshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateGeometryShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, ppgeometryshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateGeometryShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(ppgeometryshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateGeometryShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(ppgeometryshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateGeometryShaderWithStreamOutput(&self, pshaderbytecode: &[u8], psodeclaration: ::core::option::Option<&[D3D11_SO_DECLARATION_ENTRY]>, pbufferstrides: ::core::option::Option<&[u32]>, rasterizedstream: u32, pclasslinkage: P0, ppgeometryshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where @@ -2554,11 +2566,11 @@ impl ID3D11Device5 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateGeometryShaderWithStreamOutput)( ::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), - pshaderbytecode.len() as _, + 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() as _), + psodeclaration.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pbufferstrides.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - pbufferstrides.as_deref().map_or(0, |slice| slice.len() as _), + pbufferstrides.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), rasterizedstream, pclasslinkage.into_param().abi(), ::core::mem::transmute(ppgeometryshader.unwrap_or(::std::ptr::null_mut())), @@ -2569,25 +2581,25 @@ impl ID3D11Device5 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreatePixelShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(pppixelshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreatePixelShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(pppixelshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateHullShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, pphullshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateHullShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(pphullshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateHullShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(pphullshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateDomainShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, ppdomainshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateDomainShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(ppdomainshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateDomainShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(ppdomainshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateComputeShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, ppcomputeshader: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateComputeShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len() as _, pclasslinkage.into_param().abi(), ::core::mem::transmute(ppcomputeshader.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateComputeShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.into_param().abi(), ::core::mem::transmute(ppcomputeshader.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn CreateClassLinkage(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -2710,7 +2722,7 @@ impl ID3D11Device5 { #[doc = "Required features: `\"Win32_Graphics_Direct3D\"`"] #[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: ::core::option::Option<*mut super::Direct3D::D3D_FEATURE_LEVEL>, ppcontextstate: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateDeviceContextState)(::windows_core::Interface::as_raw(self), flags, ::core::mem::transmute(pfeaturelevels.as_ptr()), pfeaturelevels.len() as _, sdkversion, emulatedinterface, ::core::mem::transmute(pchosenfeaturelevel.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppcontextstate.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateDeviceContextState)(::windows_core::Interface::as_raw(self), flags, ::core::mem::transmute(pfeaturelevels.as_ptr()), pfeaturelevels.len().try_into().unwrap(), sdkversion, emulatedinterface, ::core::mem::transmute(pchosenfeaturelevel.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppcontextstate.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2921,25 +2933,25 @@ impl ID3D11DeviceContext { (::windows_core::Interface::vtable(self).base__.SetPrivateDataInterface)(::windows_core::Interface::as_raw(self), guid, pdata.into_param().abi()).ok() } pub unsafe fn VSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).VSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).VSSetConstantBuffers)(::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 PSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).PSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).PSSetShaderResources)(::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 PSSetShader(&self, ppixelshader: P0, ppclassinstances: ::core::option::Option<&[::core::option::Option]>) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).PSSetShader)(::windows_core::Interface::as_raw(self), ppixelshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).PSSetShader)(::windows_core::Interface::as_raw(self), ppixelshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } pub unsafe fn PSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).PSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).PSSetSamplers)(::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 VSSetShader(&self, pvertexshader: P0, ppclassinstances: ::core::option::Option<&[::core::option::Option]>) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).VSSetShader)(::windows_core::Interface::as_raw(self), pvertexshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).VSSetShader)(::windows_core::Interface::as_raw(self), pvertexshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } pub unsafe fn DrawIndexed(&self, indexcount: u32, startindexlocation: u32, basevertexlocation: i32) { (::windows_core::Interface::vtable(self).DrawIndexed)(::windows_core::Interface::as_raw(self), indexcount, startindexlocation, basevertexlocation) @@ -2960,7 +2972,7 @@ impl ID3D11DeviceContext { (::windows_core::Interface::vtable(self).Unmap)(::windows_core::Interface::as_raw(self), presource.into_param().abi(), subresource) } pub unsafe fn PSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).PSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).PSSetConstantBuffers)(::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 IASetInputLayout(&self, pinputlayout: P0) where @@ -2986,13 +2998,13 @@ impl ID3D11DeviceContext { (::windows_core::Interface::vtable(self).DrawInstanced)(::windows_core::Interface::as_raw(self), vertexcountperinstance, instancecount, startvertexlocation, startinstancelocation) } pub unsafe fn GSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).GSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).GSSetConstantBuffers)(::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 GSSetShader(&self, pshader: P0, ppclassinstances: ::core::option::Option<&[::core::option::Option]>) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).GSSetShader)(::windows_core::Interface::as_raw(self), pshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).GSSetShader)(::windows_core::Interface::as_raw(self), pshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Graphics_Direct3D\"`"] #[cfg(feature = "Win32_Graphics_Direct3D")] @@ -3000,10 +3012,10 @@ impl ID3D11DeviceContext { (::windows_core::Interface::vtable(self).IASetPrimitiveTopology)(::windows_core::Interface::as_raw(self), topology) } pub unsafe fn VSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).VSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).VSSetShaderResources)(::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 VSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).VSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).VSSetSamplers)(::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 Begin(&self, pasync: P0) where @@ -3033,22 +3045,22 @@ impl ID3D11DeviceContext { (::windows_core::Interface::vtable(self).SetPredication)(::windows_core::Interface::as_raw(self), ppredicate.into_param().abi(), predicatevalue.into_param().abi()) } pub unsafe fn GSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).GSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).GSSetShaderResources)(::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 GSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).GSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).GSSetSamplers)(::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 OMSetRenderTargets(&self, pprendertargetviews: ::core::option::Option<&[::core::option::Option]>, pdepthstencilview: P0) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).OMSetRenderTargets)(::windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pprendertargetviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdepthstencilview.into_param().abi()) + (::windows_core::Interface::vtable(self).OMSetRenderTargets)(::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.into_param().abi()) } pub unsafe fn OMSetRenderTargetsAndUnorderedAccessViews(&self, pprendertargetviews: ::core::option::Option<&[::core::option::Option]>, pdepthstencilview: P0, uavstartslot: u32, numuavs: u32, ppunorderedaccessviews: ::core::option::Option<*const ::core::option::Option>, puavinitialcounts: ::core::option::Option<*const u32>) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).OMSetRenderTargetsAndUnorderedAccessViews)(::windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pprendertargetviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdepthstencilview.into_param().abi(), uavstartslot, numuavs, ::core::mem::transmute(ppunorderedaccessviews.unwrap_or(::std::ptr::null())), ::core::mem::transmute(puavinitialcounts.unwrap_or(::std::ptr::null()))) + (::windows_core::Interface::vtable(self).OMSetRenderTargetsAndUnorderedAccessViews)(::windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pprendertargetviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdepthstencilview.into_param().abi(), uavstartslot, numuavs, ::core::mem::transmute(ppunorderedaccessviews.unwrap_or(::std::ptr::null())), ::core::mem::transmute(puavinitialcounts.unwrap_or(::std::ptr::null()))) } pub unsafe fn OMSetBlendState(&self, pblendstate: P0, blendfactor: ::core::option::Option<&[f32; 4]>, samplemask: u32) where @@ -3096,12 +3108,12 @@ impl ID3D11DeviceContext { (::windows_core::Interface::vtable(self).RSSetState)(::windows_core::Interface::as_raw(self), prasterizerstate.into_param().abi()) } pub unsafe fn RSSetViewports(&self, pviewports: ::core::option::Option<&[D3D11_VIEWPORT]>) { - (::windows_core::Interface::vtable(self).RSSetViewports)(::windows_core::Interface::as_raw(self), pviewports.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pviewports.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).RSSetViewports)(::windows_core::Interface::as_raw(self), pviewports.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pviewports.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn RSSetScissorRects(&self, prects: ::core::option::Option<&[super::super::Foundation::RECT]>) { - (::windows_core::Interface::vtable(self).RSSetScissorRects)(::windows_core::Interface::as_raw(self), prects.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prects.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).RSSetScissorRects)(::windows_core::Interface::as_raw(self), 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()))) } pub unsafe fn CopySubresourceRegion(&self, pdstresource: P0, dstsubresource: u32, dstx: u32, dsty: u32, dstz: u32, psrcresource: P1, srcsubresource: u32, psrcbox: ::core::option::Option<*const D3D11_BOX>) where @@ -3191,37 +3203,37 @@ impl ID3D11DeviceContext { (::windows_core::Interface::vtable(self).ExecuteCommandList)(::windows_core::Interface::as_raw(self), pcommandlist.into_param().abi(), restorecontextstate.into_param().abi()) } pub unsafe fn HSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).HSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).HSSetShaderResources)(::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 HSSetShader(&self, phullshader: P0, ppclassinstances: ::core::option::Option<&[::core::option::Option]>) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).HSSetShader)(::windows_core::Interface::as_raw(self), phullshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).HSSetShader)(::windows_core::Interface::as_raw(self), phullshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } pub unsafe fn HSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).HSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).HSSetSamplers)(::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 HSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).HSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).HSSetConstantBuffers)(::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 DSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).DSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).DSSetShaderResources)(::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 DSSetShader(&self, pdomainshader: P0, ppclassinstances: ::core::option::Option<&[::core::option::Option]>) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).DSSetShader)(::windows_core::Interface::as_raw(self), pdomainshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).DSSetShader)(::windows_core::Interface::as_raw(self), pdomainshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } pub unsafe fn DSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).DSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).DSSetSamplers)(::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 DSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).DSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).DSSetConstantBuffers)(::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 CSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).CSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::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: ::core::option::Option<*const ::core::option::Option>, puavinitialcounts: ::core::option::Option<*const u32>) { (::windows_core::Interface::vtable(self).CSSetUnorderedAccessViews)(::windows_core::Interface::as_raw(self), startslot, numuavs, ::core::mem::transmute(ppunorderedaccessviews.unwrap_or(::std::ptr::null())), ::core::mem::transmute(puavinitialcounts.unwrap_or(::std::ptr::null()))) @@ -3230,31 +3242,31 @@ impl ID3D11DeviceContext { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).CSSetShader)(::windows_core::Interface::as_raw(self), pcomputeshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).CSSetShader)(::windows_core::Interface::as_raw(self), pcomputeshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } pub unsafe fn CSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).CSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).CSSetSamplers)(::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 CSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).CSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).CSSetConstantBuffers)(::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 VSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).VSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).VSGetConstantBuffers)(::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 PSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).PSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::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 ::core::option::Option, ppclassinstances: ::core::option::Option<*mut ::core::option::Option>, pnumclassinstances: ::core::option::Option<*mut u32>) { (::windows_core::Interface::vtable(self).PSGetShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pppixelshader), ::core::mem::transmute(ppclassinstances.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pnumclassinstances.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn PSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).PSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::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 ::core::option::Option, ppclassinstances: ::core::option::Option<*mut ::core::option::Option>, pnumclassinstances: ::core::option::Option<*mut u32>) { (::windows_core::Interface::vtable(self).VSGetShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppvertexshader), ::core::mem::transmute(ppclassinstances.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pnumclassinstances.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn PSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).PSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::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()))) } pub unsafe fn IAGetInputLayout(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -3270,7 +3282,7 @@ impl ID3D11DeviceContext { (::windows_core::Interface::vtable(self).IAGetIndexBuffer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pindexbuffer.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(format.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(offset.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn GSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).GSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::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 ::core::option::Option, ppclassinstances: ::core::option::Option<*mut ::core::option::Option>, pnumclassinstances: ::core::option::Option<*mut u32>) { (::windows_core::Interface::vtable(self).GSGetShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppgeometryshader), ::core::mem::transmute(ppclassinstances.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pnumclassinstances.unwrap_or(::std::ptr::null_mut()))) @@ -3283,10 +3295,10 @@ impl ID3D11DeviceContext { ::std::mem::transmute(result__) } pub unsafe fn VSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).VSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).VSGetShaderResources)(::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 VSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).VSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::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()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3294,22 +3306,22 @@ impl ID3D11DeviceContext { (::windows_core::Interface::vtable(self).GetPredication)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pppredicate.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppredicatevalue.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn GSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).GSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::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()))) } pub unsafe fn GSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).GSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::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: ::core::option::Option<&mut [::core::option::Option]>, ppdepthstencilview: ::core::option::Option<*mut ::core::option::Option>) { - (::windows_core::Interface::vtable(self).OMGetRenderTargets)(::windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pprendertargetviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(ppdepthstencilview.unwrap_or(::std::ptr::null_mut()))) + (::windows_core::Interface::vtable(self).OMGetRenderTargets)(::windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pprendertargetviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(ppdepthstencilview.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn OMGetRenderTargetsAndUnorderedAccessViews(&self, pprendertargetviews: ::core::option::Option<&mut [::core::option::Option]>, ppdepthstencilview: ::core::option::Option<*mut ::core::option::Option>, uavstartslot: u32, ppunorderedaccessviews: ::core::option::Option<&mut [::core::option::Option]>) { (::windows_core::Interface::vtable(self).OMGetRenderTargetsAndUnorderedAccessViews)( ::windows_core::Interface::as_raw(self), - pprendertargetviews.as_deref().map_or(0, |slice| slice.len() as _), + pprendertargetviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pprendertargetviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(ppdepthstencilview.unwrap_or(::std::ptr::null_mut())), uavstartslot, - ppunorderedaccessviews.as_deref().map_or(0, |slice| slice.len() as _), + 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())), ) } @@ -3320,7 +3332,7 @@ impl ID3D11DeviceContext { (::windows_core::Interface::vtable(self).OMGetDepthStencilState)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppdepthstencilstate.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pstencilref.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn SOGetTargets(&self, ppsotargets: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).SOGetTargets)(::windows_core::Interface::as_raw(self), ppsotargets.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsotargets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::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()))) } pub unsafe fn RSGetState(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -3336,43 +3348,43 @@ impl ID3D11DeviceContext { (::windows_core::Interface::vtable(self).RSGetScissorRects)(::windows_core::Interface::as_raw(self), pnumrects, ::core::mem::transmute(prects.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn HSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).HSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::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 ::core::option::Option, ppclassinstances: ::core::option::Option<*mut ::core::option::Option>, pnumclassinstances: ::core::option::Option<*mut u32>) { (::windows_core::Interface::vtable(self).HSGetShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pphullshader), ::core::mem::transmute(ppclassinstances.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pnumclassinstances.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn HSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).HSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::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()))) } pub unsafe fn HSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).HSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).HSGetConstantBuffers)(::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 DSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).DSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::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 ::core::option::Option, ppclassinstances: ::core::option::Option<*mut ::core::option::Option>, pnumclassinstances: ::core::option::Option<*mut u32>) { (::windows_core::Interface::vtable(self).DSGetShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppdomainshader), ::core::mem::transmute(ppclassinstances.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pnumclassinstances.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn DSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).DSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::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()))) } pub unsafe fn DSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).DSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).DSGetConstantBuffers)(::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 CSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).CSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).CSGetShaderResources)(::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 CSGetUnorderedAccessViews(&self, startslot: u32, ppunorderedaccessviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).CSGetUnorderedAccessViews)(::windows_core::Interface::as_raw(self), startslot, ppunorderedaccessviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppunorderedaccessviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::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 ::core::option::Option, ppclassinstances: ::core::option::Option<*mut ::core::option::Option>, pnumclassinstances: ::core::option::Option<*mut u32>) { (::windows_core::Interface::vtable(self).CSGetShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppcomputeshader), ::core::mem::transmute(ppclassinstances.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pnumclassinstances.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn CSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).CSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::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()))) } pub unsafe fn CSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).CSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).CSGetConstantBuffers)(::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 ClearState(&self) { (::windows_core::Interface::vtable(self).ClearState)(::windows_core::Interface::as_raw(self)) @@ -3572,25 +3584,25 @@ impl ID3D11DeviceContext1 { (::windows_core::Interface::vtable(self).base__.base__.SetPrivateDataInterface)(::windows_core::Interface::as_raw(self), guid, pdata.into_param().abi()).ok() } pub unsafe fn VSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.VSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.VSSetConstantBuffers)(::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 PSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.PSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.PSSetShaderResources)(::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 PSSetShader(&self, ppixelshader: P0, ppclassinstances: ::core::option::Option<&[::core::option::Option]>) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.PSSetShader)(::windows_core::Interface::as_raw(self), ppixelshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).base__.PSSetShader)(::windows_core::Interface::as_raw(self), ppixelshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } pub unsafe fn PSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.PSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.PSSetSamplers)(::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 VSSetShader(&self, pvertexshader: P0, ppclassinstances: ::core::option::Option<&[::core::option::Option]>) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.VSSetShader)(::windows_core::Interface::as_raw(self), pvertexshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).base__.VSSetShader)(::windows_core::Interface::as_raw(self), pvertexshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } pub unsafe fn DrawIndexed(&self, indexcount: u32, startindexlocation: u32, basevertexlocation: i32) { (::windows_core::Interface::vtable(self).base__.DrawIndexed)(::windows_core::Interface::as_raw(self), indexcount, startindexlocation, basevertexlocation) @@ -3611,7 +3623,7 @@ impl ID3D11DeviceContext1 { (::windows_core::Interface::vtable(self).base__.Unmap)(::windows_core::Interface::as_raw(self), presource.into_param().abi(), subresource) } pub unsafe fn PSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.PSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.PSSetConstantBuffers)(::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 IASetInputLayout(&self, pinputlayout: P0) where @@ -3637,13 +3649,13 @@ impl ID3D11DeviceContext1 { (::windows_core::Interface::vtable(self).base__.DrawInstanced)(::windows_core::Interface::as_raw(self), vertexcountperinstance, instancecount, startvertexlocation, startinstancelocation) } pub unsafe fn GSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.GSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.GSSetConstantBuffers)(::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 GSSetShader(&self, pshader: P0, ppclassinstances: ::core::option::Option<&[::core::option::Option]>) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.GSSetShader)(::windows_core::Interface::as_raw(self), pshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).base__.GSSetShader)(::windows_core::Interface::as_raw(self), pshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Graphics_Direct3D\"`"] #[cfg(feature = "Win32_Graphics_Direct3D")] @@ -3651,10 +3663,10 @@ impl ID3D11DeviceContext1 { (::windows_core::Interface::vtable(self).base__.IASetPrimitiveTopology)(::windows_core::Interface::as_raw(self), topology) } pub unsafe fn VSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.VSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.VSSetShaderResources)(::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 VSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.VSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.VSSetSamplers)(::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 Begin(&self, pasync: P0) where @@ -3684,22 +3696,22 @@ impl ID3D11DeviceContext1 { (::windows_core::Interface::vtable(self).base__.SetPredication)(::windows_core::Interface::as_raw(self), ppredicate.into_param().abi(), predicatevalue.into_param().abi()) } pub unsafe fn GSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.GSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.GSSetShaderResources)(::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 GSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.GSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.GSSetSamplers)(::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 OMSetRenderTargets(&self, pprendertargetviews: ::core::option::Option<&[::core::option::Option]>, pdepthstencilview: P0) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.OMSetRenderTargets)(::windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pprendertargetviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdepthstencilview.into_param().abi()) + (::windows_core::Interface::vtable(self).base__.OMSetRenderTargets)(::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.into_param().abi()) } pub unsafe fn OMSetRenderTargetsAndUnorderedAccessViews(&self, pprendertargetviews: ::core::option::Option<&[::core::option::Option]>, pdepthstencilview: P0, uavstartslot: u32, numuavs: u32, ppunorderedaccessviews: ::core::option::Option<*const ::core::option::Option>, puavinitialcounts: ::core::option::Option<*const u32>) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.OMSetRenderTargetsAndUnorderedAccessViews)(::windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pprendertargetviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdepthstencilview.into_param().abi(), uavstartslot, numuavs, ::core::mem::transmute(ppunorderedaccessviews.unwrap_or(::std::ptr::null())), ::core::mem::transmute(puavinitialcounts.unwrap_or(::std::ptr::null()))) + (::windows_core::Interface::vtable(self).base__.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.into_param().abi(), uavstartslot, numuavs, ::core::mem::transmute(ppunorderedaccessviews.unwrap_or(::std::ptr::null())), ::core::mem::transmute(puavinitialcounts.unwrap_or(::std::ptr::null()))) } pub unsafe fn OMSetBlendState(&self, pblendstate: P0, blendfactor: ::core::option::Option<&[f32; 4]>, samplemask: u32) where @@ -3747,12 +3759,12 @@ impl ID3D11DeviceContext1 { (::windows_core::Interface::vtable(self).base__.RSSetState)(::windows_core::Interface::as_raw(self), prasterizerstate.into_param().abi()) } pub unsafe fn RSSetViewports(&self, pviewports: ::core::option::Option<&[D3D11_VIEWPORT]>) { - (::windows_core::Interface::vtable(self).base__.RSSetViewports)(::windows_core::Interface::as_raw(self), pviewports.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pviewports.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.RSSetViewports)(::windows_core::Interface::as_raw(self), pviewports.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pviewports.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn RSSetScissorRects(&self, prects: ::core::option::Option<&[super::super::Foundation::RECT]>) { - (::windows_core::Interface::vtable(self).base__.RSSetScissorRects)(::windows_core::Interface::as_raw(self), prects.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prects.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.RSSetScissorRects)(::windows_core::Interface::as_raw(self), 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()))) } pub unsafe fn CopySubresourceRegion(&self, pdstresource: P0, dstsubresource: u32, dstx: u32, dsty: u32, dstz: u32, psrcresource: P1, srcsubresource: u32, psrcbox: ::core::option::Option<*const D3D11_BOX>) where @@ -3842,37 +3854,37 @@ impl ID3D11DeviceContext1 { (::windows_core::Interface::vtable(self).base__.ExecuteCommandList)(::windows_core::Interface::as_raw(self), pcommandlist.into_param().abi(), restorecontextstate.into_param().abi()) } pub unsafe fn HSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.HSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.HSSetShaderResources)(::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 HSSetShader(&self, phullshader: P0, ppclassinstances: ::core::option::Option<&[::core::option::Option]>) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.HSSetShader)(::windows_core::Interface::as_raw(self), phullshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).base__.HSSetShader)(::windows_core::Interface::as_raw(self), phullshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } pub unsafe fn HSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.HSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.HSSetSamplers)(::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 HSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.HSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.HSSetConstantBuffers)(::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 DSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.DSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.DSSetShaderResources)(::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 DSSetShader(&self, pdomainshader: P0, ppclassinstances: ::core::option::Option<&[::core::option::Option]>) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.DSSetShader)(::windows_core::Interface::as_raw(self), pdomainshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).base__.DSSetShader)(::windows_core::Interface::as_raw(self), pdomainshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } pub unsafe fn DSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.DSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.DSSetSamplers)(::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 DSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.DSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.DSSetConstantBuffers)(::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 CSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.CSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.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: ::core::option::Option<*const ::core::option::Option>, puavinitialcounts: ::core::option::Option<*const u32>) { (::windows_core::Interface::vtable(self).base__.CSSetUnorderedAccessViews)(::windows_core::Interface::as_raw(self), startslot, numuavs, ::core::mem::transmute(ppunorderedaccessviews.unwrap_or(::std::ptr::null())), ::core::mem::transmute(puavinitialcounts.unwrap_or(::std::ptr::null()))) @@ -3881,31 +3893,31 @@ impl ID3D11DeviceContext1 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.CSSetShader)(::windows_core::Interface::as_raw(self), pcomputeshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).base__.CSSetShader)(::windows_core::Interface::as_raw(self), pcomputeshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } pub unsafe fn CSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.CSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.CSSetSamplers)(::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 CSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.CSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.CSSetConstantBuffers)(::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 VSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.VSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.VSGetConstantBuffers)(::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 PSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.PSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.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 ::core::option::Option, ppclassinstances: ::core::option::Option<*mut ::core::option::Option>, pnumclassinstances: ::core::option::Option<*mut u32>) { (::windows_core::Interface::vtable(self).base__.PSGetShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pppixelshader), ::core::mem::transmute(ppclassinstances.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pnumclassinstances.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn PSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.PSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.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 ::core::option::Option, ppclassinstances: ::core::option::Option<*mut ::core::option::Option>, pnumclassinstances: ::core::option::Option<*mut u32>) { (::windows_core::Interface::vtable(self).base__.VSGetShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppvertexshader), ::core::mem::transmute(ppclassinstances.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pnumclassinstances.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn PSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.PSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.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()))) } pub unsafe fn IAGetInputLayout(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -3921,7 +3933,7 @@ impl ID3D11DeviceContext1 { (::windows_core::Interface::vtable(self).base__.IAGetIndexBuffer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pindexbuffer.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(format.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(offset.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn GSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.GSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.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 ::core::option::Option, ppclassinstances: ::core::option::Option<*mut ::core::option::Option>, pnumclassinstances: ::core::option::Option<*mut u32>) { (::windows_core::Interface::vtable(self).base__.GSGetShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppgeometryshader), ::core::mem::transmute(ppclassinstances.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pnumclassinstances.unwrap_or(::std::ptr::null_mut()))) @@ -3934,10 +3946,10 @@ impl ID3D11DeviceContext1 { ::std::mem::transmute(result__) } pub unsafe fn VSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.VSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.VSGetShaderResources)(::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 VSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.VSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.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()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3945,22 +3957,22 @@ impl ID3D11DeviceContext1 { (::windows_core::Interface::vtable(self).base__.GetPredication)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pppredicate.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppredicatevalue.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn GSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.GSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.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()))) } pub unsafe fn GSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.GSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.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: ::core::option::Option<&mut [::core::option::Option]>, ppdepthstencilview: ::core::option::Option<*mut ::core::option::Option>) { - (::windows_core::Interface::vtable(self).base__.OMGetRenderTargets)(::windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pprendertargetviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(ppdepthstencilview.unwrap_or(::std::ptr::null_mut()))) + (::windows_core::Interface::vtable(self).base__.OMGetRenderTargets)(::windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pprendertargetviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(ppdepthstencilview.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn OMGetRenderTargetsAndUnorderedAccessViews(&self, pprendertargetviews: ::core::option::Option<&mut [::core::option::Option]>, ppdepthstencilview: ::core::option::Option<*mut ::core::option::Option>, uavstartslot: u32, ppunorderedaccessviews: ::core::option::Option<&mut [::core::option::Option]>) { (::windows_core::Interface::vtable(self).base__.OMGetRenderTargetsAndUnorderedAccessViews)( ::windows_core::Interface::as_raw(self), - pprendertargetviews.as_deref().map_or(0, |slice| slice.len() as _), + pprendertargetviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pprendertargetviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(ppdepthstencilview.unwrap_or(::std::ptr::null_mut())), uavstartslot, - ppunorderedaccessviews.as_deref().map_or(0, |slice| slice.len() as _), + 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())), ) } @@ -3971,7 +3983,7 @@ impl ID3D11DeviceContext1 { (::windows_core::Interface::vtable(self).base__.OMGetDepthStencilState)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppdepthstencilstate.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pstencilref.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn SOGetTargets(&self, ppsotargets: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.SOGetTargets)(::windows_core::Interface::as_raw(self), ppsotargets.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsotargets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.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()))) } pub unsafe fn RSGetState(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -3987,43 +3999,43 @@ impl ID3D11DeviceContext1 { (::windows_core::Interface::vtable(self).base__.RSGetScissorRects)(::windows_core::Interface::as_raw(self), pnumrects, ::core::mem::transmute(prects.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn HSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.HSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.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 ::core::option::Option, ppclassinstances: ::core::option::Option<*mut ::core::option::Option>, pnumclassinstances: ::core::option::Option<*mut u32>) { (::windows_core::Interface::vtable(self).base__.HSGetShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pphullshader), ::core::mem::transmute(ppclassinstances.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pnumclassinstances.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn HSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.HSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.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()))) } pub unsafe fn HSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.HSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.HSGetConstantBuffers)(::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 DSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.DSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.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 ::core::option::Option, ppclassinstances: ::core::option::Option<*mut ::core::option::Option>, pnumclassinstances: ::core::option::Option<*mut u32>) { (::windows_core::Interface::vtable(self).base__.DSGetShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppdomainshader), ::core::mem::transmute(ppclassinstances.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pnumclassinstances.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn DSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.DSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.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()))) } pub unsafe fn DSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.DSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.DSGetConstantBuffers)(::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 CSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.CSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.CSGetShaderResources)(::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 CSGetUnorderedAccessViews(&self, startslot: u32, ppunorderedaccessviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.CSGetUnorderedAccessViews)(::windows_core::Interface::as_raw(self), startslot, ppunorderedaccessviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppunorderedaccessviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.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 ::core::option::Option, ppclassinstances: ::core::option::Option<*mut ::core::option::Option>, pnumclassinstances: ::core::option::Option<*mut u32>) { (::windows_core::Interface::vtable(self).base__.CSGetShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppcomputeshader), ::core::mem::transmute(ppclassinstances.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pnumclassinstances.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn CSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.CSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.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()))) } pub unsafe fn CSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.CSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.CSGetConstantBuffers)(::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 ClearState(&self) { (::windows_core::Interface::vtable(self).base__.ClearState)(::windows_core::Interface::as_raw(self)) @@ -4118,7 +4130,7 @@ impl ID3D11DeviceContext1 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).ClearView)(::windows_core::Interface::as_raw(self), pview.into_param().abi(), ::core::mem::transmute(color.as_ptr()), ::core::mem::transmute(prect.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prect.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).ClearView)(::windows_core::Interface::as_raw(self), pview.into_param().abi(), ::core::mem::transmute(color.as_ptr()), ::core::mem::transmute(prect.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prect.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -4126,7 +4138,7 @@ impl ID3D11DeviceContext1 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).DiscardView1)(::windows_core::Interface::as_raw(self), presourceview.into_param().abi(), ::core::mem::transmute(prects.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prects.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).DiscardView1)(::windows_core::Interface::as_raw(self), presourceview.into_param().abi(), ::core::mem::transmute(prects.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prects.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } } ::windows_core::imp::interface_hierarchy!(ID3D11DeviceContext1, ::windows_core::IUnknown, ID3D11DeviceChild, ID3D11DeviceContext); @@ -4190,25 +4202,25 @@ impl ID3D11DeviceContext2 { (::windows_core::Interface::vtable(self).base__.base__.base__.SetPrivateDataInterface)(::windows_core::Interface::as_raw(self), guid, pdata.into_param().abi()).ok() } pub unsafe fn VSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.VSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.VSSetConstantBuffers)(::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 PSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.PSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.PSSetShaderResources)(::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 PSSetShader(&self, ppixelshader: P0, ppclassinstances: ::core::option::Option<&[::core::option::Option]>) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.PSSetShader)(::windows_core::Interface::as_raw(self), ppixelshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).base__.base__.PSSetShader)(::windows_core::Interface::as_raw(self), ppixelshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } pub unsafe fn PSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.PSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.PSSetSamplers)(::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 VSSetShader(&self, pvertexshader: P0, ppclassinstances: ::core::option::Option<&[::core::option::Option]>) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.VSSetShader)(::windows_core::Interface::as_raw(self), pvertexshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).base__.base__.VSSetShader)(::windows_core::Interface::as_raw(self), pvertexshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } pub unsafe fn DrawIndexed(&self, indexcount: u32, startindexlocation: u32, basevertexlocation: i32) { (::windows_core::Interface::vtable(self).base__.base__.DrawIndexed)(::windows_core::Interface::as_raw(self), indexcount, startindexlocation, basevertexlocation) @@ -4229,7 +4241,7 @@ impl ID3D11DeviceContext2 { (::windows_core::Interface::vtable(self).base__.base__.Unmap)(::windows_core::Interface::as_raw(self), presource.into_param().abi(), subresource) } pub unsafe fn PSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.PSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.PSSetConstantBuffers)(::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 IASetInputLayout(&self, pinputlayout: P0) where @@ -4255,13 +4267,13 @@ impl ID3D11DeviceContext2 { (::windows_core::Interface::vtable(self).base__.base__.DrawInstanced)(::windows_core::Interface::as_raw(self), vertexcountperinstance, instancecount, startvertexlocation, startinstancelocation) } pub unsafe fn GSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.GSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.GSSetConstantBuffers)(::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 GSSetShader(&self, pshader: P0, ppclassinstances: ::core::option::Option<&[::core::option::Option]>) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.GSSetShader)(::windows_core::Interface::as_raw(self), pshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).base__.base__.GSSetShader)(::windows_core::Interface::as_raw(self), pshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Graphics_Direct3D\"`"] #[cfg(feature = "Win32_Graphics_Direct3D")] @@ -4269,10 +4281,10 @@ impl ID3D11DeviceContext2 { (::windows_core::Interface::vtable(self).base__.base__.IASetPrimitiveTopology)(::windows_core::Interface::as_raw(self), topology) } pub unsafe fn VSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.VSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.VSSetShaderResources)(::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 VSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.VSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.VSSetSamplers)(::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 Begin(&self, pasync: P0) where @@ -4302,22 +4314,22 @@ impl ID3D11DeviceContext2 { (::windows_core::Interface::vtable(self).base__.base__.SetPredication)(::windows_core::Interface::as_raw(self), ppredicate.into_param().abi(), predicatevalue.into_param().abi()) } pub unsafe fn GSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.GSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.GSSetShaderResources)(::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 GSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.GSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.GSSetSamplers)(::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 OMSetRenderTargets(&self, pprendertargetviews: ::core::option::Option<&[::core::option::Option]>, pdepthstencilview: P0) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.OMSetRenderTargets)(::windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pprendertargetviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdepthstencilview.into_param().abi()) + (::windows_core::Interface::vtable(self).base__.base__.OMSetRenderTargets)(::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.into_param().abi()) } pub unsafe fn OMSetRenderTargetsAndUnorderedAccessViews(&self, pprendertargetviews: ::core::option::Option<&[::core::option::Option]>, pdepthstencilview: P0, uavstartslot: u32, numuavs: u32, ppunorderedaccessviews: ::core::option::Option<*const ::core::option::Option>, puavinitialcounts: ::core::option::Option<*const u32>) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.OMSetRenderTargetsAndUnorderedAccessViews)(::windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pprendertargetviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdepthstencilview.into_param().abi(), uavstartslot, numuavs, ::core::mem::transmute(ppunorderedaccessviews.unwrap_or(::std::ptr::null())), ::core::mem::transmute(puavinitialcounts.unwrap_or(::std::ptr::null()))) + (::windows_core::Interface::vtable(self).base__.base__.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.into_param().abi(), uavstartslot, numuavs, ::core::mem::transmute(ppunorderedaccessviews.unwrap_or(::std::ptr::null())), ::core::mem::transmute(puavinitialcounts.unwrap_or(::std::ptr::null()))) } pub unsafe fn OMSetBlendState(&self, pblendstate: P0, blendfactor: ::core::option::Option<&[f32; 4]>, samplemask: u32) where @@ -4365,12 +4377,12 @@ impl ID3D11DeviceContext2 { (::windows_core::Interface::vtable(self).base__.base__.RSSetState)(::windows_core::Interface::as_raw(self), prasterizerstate.into_param().abi()) } pub unsafe fn RSSetViewports(&self, pviewports: ::core::option::Option<&[D3D11_VIEWPORT]>) { - (::windows_core::Interface::vtable(self).base__.base__.RSSetViewports)(::windows_core::Interface::as_raw(self), pviewports.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pviewports.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.RSSetViewports)(::windows_core::Interface::as_raw(self), pviewports.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pviewports.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn RSSetScissorRects(&self, prects: ::core::option::Option<&[super::super::Foundation::RECT]>) { - (::windows_core::Interface::vtable(self).base__.base__.RSSetScissorRects)(::windows_core::Interface::as_raw(self), prects.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prects.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.RSSetScissorRects)(::windows_core::Interface::as_raw(self), 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()))) } pub unsafe fn CopySubresourceRegion(&self, pdstresource: P0, dstsubresource: u32, dstx: u32, dsty: u32, dstz: u32, psrcresource: P1, srcsubresource: u32, psrcbox: ::core::option::Option<*const D3D11_BOX>) where @@ -4460,37 +4472,37 @@ impl ID3D11DeviceContext2 { (::windows_core::Interface::vtable(self).base__.base__.ExecuteCommandList)(::windows_core::Interface::as_raw(self), pcommandlist.into_param().abi(), restorecontextstate.into_param().abi()) } pub unsafe fn HSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.HSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.HSSetShaderResources)(::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 HSSetShader(&self, phullshader: P0, ppclassinstances: ::core::option::Option<&[::core::option::Option]>) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.HSSetShader)(::windows_core::Interface::as_raw(self), phullshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).base__.base__.HSSetShader)(::windows_core::Interface::as_raw(self), phullshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } pub unsafe fn HSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.HSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.HSSetSamplers)(::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 HSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.HSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.HSSetConstantBuffers)(::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 DSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.DSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.DSSetShaderResources)(::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 DSSetShader(&self, pdomainshader: P0, ppclassinstances: ::core::option::Option<&[::core::option::Option]>) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.DSSetShader)(::windows_core::Interface::as_raw(self), pdomainshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).base__.base__.DSSetShader)(::windows_core::Interface::as_raw(self), pdomainshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } pub unsafe fn DSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.DSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.DSSetSamplers)(::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 DSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.DSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.DSSetConstantBuffers)(::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 CSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.CSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.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: ::core::option::Option<*const ::core::option::Option>, puavinitialcounts: ::core::option::Option<*const u32>) { (::windows_core::Interface::vtable(self).base__.base__.CSSetUnorderedAccessViews)(::windows_core::Interface::as_raw(self), startslot, numuavs, ::core::mem::transmute(ppunorderedaccessviews.unwrap_or(::std::ptr::null())), ::core::mem::transmute(puavinitialcounts.unwrap_or(::std::ptr::null()))) @@ -4499,31 +4511,31 @@ impl ID3D11DeviceContext2 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.CSSetShader)(::windows_core::Interface::as_raw(self), pcomputeshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).base__.base__.CSSetShader)(::windows_core::Interface::as_raw(self), pcomputeshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } pub unsafe fn CSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.CSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.CSSetSamplers)(::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 CSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.CSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.CSSetConstantBuffers)(::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 VSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.VSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.VSGetConstantBuffers)(::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 PSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.PSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.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 ::core::option::Option, ppclassinstances: ::core::option::Option<*mut ::core::option::Option>, pnumclassinstances: ::core::option::Option<*mut u32>) { (::windows_core::Interface::vtable(self).base__.base__.PSGetShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pppixelshader), ::core::mem::transmute(ppclassinstances.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pnumclassinstances.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn PSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.PSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.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 ::core::option::Option, ppclassinstances: ::core::option::Option<*mut ::core::option::Option>, pnumclassinstances: ::core::option::Option<*mut u32>) { (::windows_core::Interface::vtable(self).base__.base__.VSGetShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppvertexshader), ::core::mem::transmute(ppclassinstances.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pnumclassinstances.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn PSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.PSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.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()))) } pub unsafe fn IAGetInputLayout(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -4539,7 +4551,7 @@ impl ID3D11DeviceContext2 { (::windows_core::Interface::vtable(self).base__.base__.IAGetIndexBuffer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pindexbuffer.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(format.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(offset.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn GSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.GSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.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 ::core::option::Option, ppclassinstances: ::core::option::Option<*mut ::core::option::Option>, pnumclassinstances: ::core::option::Option<*mut u32>) { (::windows_core::Interface::vtable(self).base__.base__.GSGetShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppgeometryshader), ::core::mem::transmute(ppclassinstances.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pnumclassinstances.unwrap_or(::std::ptr::null_mut()))) @@ -4552,10 +4564,10 @@ impl ID3D11DeviceContext2 { ::std::mem::transmute(result__) } pub unsafe fn VSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.VSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.VSGetShaderResources)(::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 VSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.VSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.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()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -4563,22 +4575,22 @@ impl ID3D11DeviceContext2 { (::windows_core::Interface::vtable(self).base__.base__.GetPredication)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pppredicate.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppredicatevalue.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn GSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.GSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.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()))) } pub unsafe fn GSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.GSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.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: ::core::option::Option<&mut [::core::option::Option]>, ppdepthstencilview: ::core::option::Option<*mut ::core::option::Option>) { - (::windows_core::Interface::vtable(self).base__.base__.OMGetRenderTargets)(::windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pprendertargetviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(ppdepthstencilview.unwrap_or(::std::ptr::null_mut()))) + (::windows_core::Interface::vtable(self).base__.base__.OMGetRenderTargets)(::windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pprendertargetviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(ppdepthstencilview.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn OMGetRenderTargetsAndUnorderedAccessViews(&self, pprendertargetviews: ::core::option::Option<&mut [::core::option::Option]>, ppdepthstencilview: ::core::option::Option<*mut ::core::option::Option>, uavstartslot: u32, ppunorderedaccessviews: ::core::option::Option<&mut [::core::option::Option]>) { (::windows_core::Interface::vtable(self).base__.base__.OMGetRenderTargetsAndUnorderedAccessViews)( ::windows_core::Interface::as_raw(self), - pprendertargetviews.as_deref().map_or(0, |slice| slice.len() as _), + pprendertargetviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pprendertargetviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(ppdepthstencilview.unwrap_or(::std::ptr::null_mut())), uavstartslot, - ppunorderedaccessviews.as_deref().map_or(0, |slice| slice.len() as _), + 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())), ) } @@ -4589,7 +4601,7 @@ impl ID3D11DeviceContext2 { (::windows_core::Interface::vtable(self).base__.base__.OMGetDepthStencilState)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppdepthstencilstate.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pstencilref.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn SOGetTargets(&self, ppsotargets: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.SOGetTargets)(::windows_core::Interface::as_raw(self), ppsotargets.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsotargets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.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()))) } pub unsafe fn RSGetState(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -4605,43 +4617,43 @@ impl ID3D11DeviceContext2 { (::windows_core::Interface::vtable(self).base__.base__.RSGetScissorRects)(::windows_core::Interface::as_raw(self), pnumrects, ::core::mem::transmute(prects.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn HSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.HSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.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 ::core::option::Option, ppclassinstances: ::core::option::Option<*mut ::core::option::Option>, pnumclassinstances: ::core::option::Option<*mut u32>) { (::windows_core::Interface::vtable(self).base__.base__.HSGetShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pphullshader), ::core::mem::transmute(ppclassinstances.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pnumclassinstances.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn HSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.HSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.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()))) } pub unsafe fn HSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.HSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.HSGetConstantBuffers)(::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 DSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.DSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.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 ::core::option::Option, ppclassinstances: ::core::option::Option<*mut ::core::option::Option>, pnumclassinstances: ::core::option::Option<*mut u32>) { (::windows_core::Interface::vtable(self).base__.base__.DSGetShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppdomainshader), ::core::mem::transmute(ppclassinstances.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pnumclassinstances.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn DSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.DSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.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()))) } pub unsafe fn DSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.DSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.DSGetConstantBuffers)(::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 CSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.CSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.CSGetShaderResources)(::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 CSGetUnorderedAccessViews(&self, startslot: u32, ppunorderedaccessviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.CSGetUnorderedAccessViews)(::windows_core::Interface::as_raw(self), startslot, ppunorderedaccessviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppunorderedaccessviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.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 ::core::option::Option, ppclassinstances: ::core::option::Option<*mut ::core::option::Option>, pnumclassinstances: ::core::option::Option<*mut u32>) { (::windows_core::Interface::vtable(self).base__.base__.CSGetShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppcomputeshader), ::core::mem::transmute(ppclassinstances.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pnumclassinstances.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn CSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.CSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.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()))) } pub unsafe fn CSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.CSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.CSGetConstantBuffers)(::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 ClearState(&self) { (::windows_core::Interface::vtable(self).base__.base__.ClearState)(::windows_core::Interface::as_raw(self)) @@ -4736,7 +4748,7 @@ impl ID3D11DeviceContext2 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.ClearView)(::windows_core::Interface::as_raw(self), pview.into_param().abi(), ::core::mem::transmute(color.as_ptr()), ::core::mem::transmute(prect.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prect.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).base__.ClearView)(::windows_core::Interface::as_raw(self), pview.into_param().abi(), ::core::mem::transmute(color.as_ptr()), ::core::mem::transmute(prect.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prect.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -4744,7 +4756,7 @@ impl ID3D11DeviceContext2 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.DiscardView1)(::windows_core::Interface::as_raw(self), presourceview.into_param().abi(), ::core::mem::transmute(prects.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prects.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).base__.DiscardView1)(::windows_core::Interface::as_raw(self), presourceview.into_param().abi(), ::core::mem::transmute(prects.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prects.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -4889,25 +4901,25 @@ impl ID3D11DeviceContext3 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.SetPrivateDataInterface)(::windows_core::Interface::as_raw(self), guid, pdata.into_param().abi()).ok() } pub unsafe fn VSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.VSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.VSSetConstantBuffers)(::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 PSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.PSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.PSSetShaderResources)(::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 PSSetShader(&self, ppixelshader: P0, ppclassinstances: ::core::option::Option<&[::core::option::Option]>) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.PSSetShader)(::windows_core::Interface::as_raw(self), ppixelshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).base__.base__.base__.PSSetShader)(::windows_core::Interface::as_raw(self), ppixelshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } pub unsafe fn PSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.PSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.PSSetSamplers)(::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 VSSetShader(&self, pvertexshader: P0, ppclassinstances: ::core::option::Option<&[::core::option::Option]>) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.VSSetShader)(::windows_core::Interface::as_raw(self), pvertexshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).base__.base__.base__.VSSetShader)(::windows_core::Interface::as_raw(self), pvertexshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } pub unsafe fn DrawIndexed(&self, indexcount: u32, startindexlocation: u32, basevertexlocation: i32) { (::windows_core::Interface::vtable(self).base__.base__.base__.DrawIndexed)(::windows_core::Interface::as_raw(self), indexcount, startindexlocation, basevertexlocation) @@ -4928,7 +4940,7 @@ impl ID3D11DeviceContext3 { (::windows_core::Interface::vtable(self).base__.base__.base__.Unmap)(::windows_core::Interface::as_raw(self), presource.into_param().abi(), subresource) } pub unsafe fn PSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.PSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.PSSetConstantBuffers)(::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 IASetInputLayout(&self, pinputlayout: P0) where @@ -4954,13 +4966,13 @@ impl ID3D11DeviceContext3 { (::windows_core::Interface::vtable(self).base__.base__.base__.DrawInstanced)(::windows_core::Interface::as_raw(self), vertexcountperinstance, instancecount, startvertexlocation, startinstancelocation) } pub unsafe fn GSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.GSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.GSSetConstantBuffers)(::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 GSSetShader(&self, pshader: P0, ppclassinstances: ::core::option::Option<&[::core::option::Option]>) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.GSSetShader)(::windows_core::Interface::as_raw(self), pshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).base__.base__.base__.GSSetShader)(::windows_core::Interface::as_raw(self), pshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Graphics_Direct3D\"`"] #[cfg(feature = "Win32_Graphics_Direct3D")] @@ -4968,10 +4980,10 @@ impl ID3D11DeviceContext3 { (::windows_core::Interface::vtable(self).base__.base__.base__.IASetPrimitiveTopology)(::windows_core::Interface::as_raw(self), topology) } pub unsafe fn VSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.VSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.VSSetShaderResources)(::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 VSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.VSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.VSSetSamplers)(::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 Begin(&self, pasync: P0) where @@ -5001,22 +5013,22 @@ impl ID3D11DeviceContext3 { (::windows_core::Interface::vtable(self).base__.base__.base__.SetPredication)(::windows_core::Interface::as_raw(self), ppredicate.into_param().abi(), predicatevalue.into_param().abi()) } pub unsafe fn GSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.GSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.GSSetShaderResources)(::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 GSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.GSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.GSSetSamplers)(::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 OMSetRenderTargets(&self, pprendertargetviews: ::core::option::Option<&[::core::option::Option]>, pdepthstencilview: P0) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.OMSetRenderTargets)(::windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pprendertargetviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdepthstencilview.into_param().abi()) + (::windows_core::Interface::vtable(self).base__.base__.base__.OMSetRenderTargets)(::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.into_param().abi()) } pub unsafe fn OMSetRenderTargetsAndUnorderedAccessViews(&self, pprendertargetviews: ::core::option::Option<&[::core::option::Option]>, pdepthstencilview: P0, uavstartslot: u32, numuavs: u32, ppunorderedaccessviews: ::core::option::Option<*const ::core::option::Option>, puavinitialcounts: ::core::option::Option<*const u32>) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.OMSetRenderTargetsAndUnorderedAccessViews)(::windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pprendertargetviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdepthstencilview.into_param().abi(), uavstartslot, numuavs, ::core::mem::transmute(ppunorderedaccessviews.unwrap_or(::std::ptr::null())), ::core::mem::transmute(puavinitialcounts.unwrap_or(::std::ptr::null()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.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.into_param().abi(), uavstartslot, numuavs, ::core::mem::transmute(ppunorderedaccessviews.unwrap_or(::std::ptr::null())), ::core::mem::transmute(puavinitialcounts.unwrap_or(::std::ptr::null()))) } pub unsafe fn OMSetBlendState(&self, pblendstate: P0, blendfactor: ::core::option::Option<&[f32; 4]>, samplemask: u32) where @@ -5064,12 +5076,12 @@ impl ID3D11DeviceContext3 { (::windows_core::Interface::vtable(self).base__.base__.base__.RSSetState)(::windows_core::Interface::as_raw(self), prasterizerstate.into_param().abi()) } pub unsafe fn RSSetViewports(&self, pviewports: ::core::option::Option<&[D3D11_VIEWPORT]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.RSSetViewports)(::windows_core::Interface::as_raw(self), pviewports.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pviewports.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.RSSetViewports)(::windows_core::Interface::as_raw(self), pviewports.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pviewports.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn RSSetScissorRects(&self, prects: ::core::option::Option<&[super::super::Foundation::RECT]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.RSSetScissorRects)(::windows_core::Interface::as_raw(self), prects.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prects.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.RSSetScissorRects)(::windows_core::Interface::as_raw(self), 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()))) } pub unsafe fn CopySubresourceRegion(&self, pdstresource: P0, dstsubresource: u32, dstx: u32, dsty: u32, dstz: u32, psrcresource: P1, srcsubresource: u32, psrcbox: ::core::option::Option<*const D3D11_BOX>) where @@ -5159,37 +5171,37 @@ impl ID3D11DeviceContext3 { (::windows_core::Interface::vtable(self).base__.base__.base__.ExecuteCommandList)(::windows_core::Interface::as_raw(self), pcommandlist.into_param().abi(), restorecontextstate.into_param().abi()) } pub unsafe fn HSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.HSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.HSSetShaderResources)(::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 HSSetShader(&self, phullshader: P0, ppclassinstances: ::core::option::Option<&[::core::option::Option]>) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.HSSetShader)(::windows_core::Interface::as_raw(self), phullshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).base__.base__.base__.HSSetShader)(::windows_core::Interface::as_raw(self), phullshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } pub unsafe fn HSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.HSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.HSSetSamplers)(::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 HSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.HSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.HSSetConstantBuffers)(::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 DSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.DSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.DSSetShaderResources)(::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 DSSetShader(&self, pdomainshader: P0, ppclassinstances: ::core::option::Option<&[::core::option::Option]>) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.DSSetShader)(::windows_core::Interface::as_raw(self), pdomainshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).base__.base__.base__.DSSetShader)(::windows_core::Interface::as_raw(self), pdomainshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } pub unsafe fn DSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.DSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.DSSetSamplers)(::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 DSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.DSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.DSSetConstantBuffers)(::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 CSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.CSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.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: ::core::option::Option<*const ::core::option::Option>, puavinitialcounts: ::core::option::Option<*const u32>) { (::windows_core::Interface::vtable(self).base__.base__.base__.CSSetUnorderedAccessViews)(::windows_core::Interface::as_raw(self), startslot, numuavs, ::core::mem::transmute(ppunorderedaccessviews.unwrap_or(::std::ptr::null())), ::core::mem::transmute(puavinitialcounts.unwrap_or(::std::ptr::null()))) @@ -5198,31 +5210,31 @@ impl ID3D11DeviceContext3 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.CSSetShader)(::windows_core::Interface::as_raw(self), pcomputeshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).base__.base__.base__.CSSetShader)(::windows_core::Interface::as_raw(self), pcomputeshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } pub unsafe fn CSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.CSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.CSSetSamplers)(::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 CSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.CSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.CSSetConstantBuffers)(::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 VSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.VSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.VSGetConstantBuffers)(::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 PSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.PSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.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 ::core::option::Option, ppclassinstances: ::core::option::Option<*mut ::core::option::Option>, pnumclassinstances: ::core::option::Option<*mut u32>) { (::windows_core::Interface::vtable(self).base__.base__.base__.PSGetShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pppixelshader), ::core::mem::transmute(ppclassinstances.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pnumclassinstances.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn PSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.PSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.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 ::core::option::Option, ppclassinstances: ::core::option::Option<*mut ::core::option::Option>, pnumclassinstances: ::core::option::Option<*mut u32>) { (::windows_core::Interface::vtable(self).base__.base__.base__.VSGetShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppvertexshader), ::core::mem::transmute(ppclassinstances.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pnumclassinstances.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn PSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.PSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.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()))) } pub unsafe fn IAGetInputLayout(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -5238,7 +5250,7 @@ impl ID3D11DeviceContext3 { (::windows_core::Interface::vtable(self).base__.base__.base__.IAGetIndexBuffer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pindexbuffer.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(format.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(offset.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn GSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.GSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.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 ::core::option::Option, ppclassinstances: ::core::option::Option<*mut ::core::option::Option>, pnumclassinstances: ::core::option::Option<*mut u32>) { (::windows_core::Interface::vtable(self).base__.base__.base__.GSGetShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppgeometryshader), ::core::mem::transmute(ppclassinstances.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pnumclassinstances.unwrap_or(::std::ptr::null_mut()))) @@ -5251,10 +5263,10 @@ impl ID3D11DeviceContext3 { ::std::mem::transmute(result__) } pub unsafe fn VSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.VSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.VSGetShaderResources)(::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 VSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.VSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.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()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -5262,22 +5274,22 @@ impl ID3D11DeviceContext3 { (::windows_core::Interface::vtable(self).base__.base__.base__.GetPredication)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pppredicate.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppredicatevalue.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn GSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.GSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.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()))) } pub unsafe fn GSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.GSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.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: ::core::option::Option<&mut [::core::option::Option]>, ppdepthstencilview: ::core::option::Option<*mut ::core::option::Option>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.OMGetRenderTargets)(::windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pprendertargetviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(ppdepthstencilview.unwrap_or(::std::ptr::null_mut()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.OMGetRenderTargets)(::windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pprendertargetviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(ppdepthstencilview.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn OMGetRenderTargetsAndUnorderedAccessViews(&self, pprendertargetviews: ::core::option::Option<&mut [::core::option::Option]>, ppdepthstencilview: ::core::option::Option<*mut ::core::option::Option>, uavstartslot: u32, ppunorderedaccessviews: ::core::option::Option<&mut [::core::option::Option]>) { (::windows_core::Interface::vtable(self).base__.base__.base__.OMGetRenderTargetsAndUnorderedAccessViews)( ::windows_core::Interface::as_raw(self), - pprendertargetviews.as_deref().map_or(0, |slice| slice.len() as _), + pprendertargetviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pprendertargetviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(ppdepthstencilview.unwrap_or(::std::ptr::null_mut())), uavstartslot, - ppunorderedaccessviews.as_deref().map_or(0, |slice| slice.len() as _), + 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())), ) } @@ -5288,7 +5300,7 @@ impl ID3D11DeviceContext3 { (::windows_core::Interface::vtable(self).base__.base__.base__.OMGetDepthStencilState)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppdepthstencilstate.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pstencilref.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn SOGetTargets(&self, ppsotargets: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.SOGetTargets)(::windows_core::Interface::as_raw(self), ppsotargets.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsotargets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.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()))) } pub unsafe fn RSGetState(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -5304,43 +5316,43 @@ impl ID3D11DeviceContext3 { (::windows_core::Interface::vtable(self).base__.base__.base__.RSGetScissorRects)(::windows_core::Interface::as_raw(self), pnumrects, ::core::mem::transmute(prects.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn HSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.HSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.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 ::core::option::Option, ppclassinstances: ::core::option::Option<*mut ::core::option::Option>, pnumclassinstances: ::core::option::Option<*mut u32>) { (::windows_core::Interface::vtable(self).base__.base__.base__.HSGetShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pphullshader), ::core::mem::transmute(ppclassinstances.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pnumclassinstances.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn HSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.HSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.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()))) } pub unsafe fn HSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.HSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.HSGetConstantBuffers)(::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 DSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.DSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.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 ::core::option::Option, ppclassinstances: ::core::option::Option<*mut ::core::option::Option>, pnumclassinstances: ::core::option::Option<*mut u32>) { (::windows_core::Interface::vtable(self).base__.base__.base__.DSGetShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppdomainshader), ::core::mem::transmute(ppclassinstances.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pnumclassinstances.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn DSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.DSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.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()))) } pub unsafe fn DSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.DSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.DSGetConstantBuffers)(::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 CSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.CSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.CSGetShaderResources)(::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 CSGetUnorderedAccessViews(&self, startslot: u32, ppunorderedaccessviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.CSGetUnorderedAccessViews)(::windows_core::Interface::as_raw(self), startslot, ppunorderedaccessviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppunorderedaccessviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.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 ::core::option::Option, ppclassinstances: ::core::option::Option<*mut ::core::option::Option>, pnumclassinstances: ::core::option::Option<*mut u32>) { (::windows_core::Interface::vtable(self).base__.base__.base__.CSGetShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppcomputeshader), ::core::mem::transmute(ppclassinstances.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pnumclassinstances.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn CSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.CSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.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()))) } pub unsafe fn CSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.CSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.CSGetConstantBuffers)(::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 ClearState(&self) { (::windows_core::Interface::vtable(self).base__.base__.base__.ClearState)(::windows_core::Interface::as_raw(self)) @@ -5435,7 +5447,7 @@ impl ID3D11DeviceContext3 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.ClearView)(::windows_core::Interface::as_raw(self), pview.into_param().abi(), ::core::mem::transmute(color.as_ptr()), ::core::mem::transmute(prect.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prect.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).base__.base__.ClearView)(::windows_core::Interface::as_raw(self), pview.into_param().abi(), ::core::mem::transmute(color.as_ptr()), ::core::mem::transmute(prect.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prect.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -5443,7 +5455,7 @@ impl ID3D11DeviceContext3 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.DiscardView1)(::windows_core::Interface::as_raw(self), presourceview.into_param().abi(), ::core::mem::transmute(prects.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prects.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).base__.base__.DiscardView1)(::windows_core::Interface::as_raw(self), presourceview.into_param().abi(), ::core::mem::transmute(prects.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prects.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -5598,25 +5610,25 @@ impl ID3D11DeviceContext4 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.SetPrivateDataInterface)(::windows_core::Interface::as_raw(self), guid, pdata.into_param().abi()).ok() } pub unsafe fn VSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.VSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.VSSetConstantBuffers)(::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 PSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.PSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.PSSetShaderResources)(::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 PSSetShader(&self, ppixelshader: P0, ppclassinstances: ::core::option::Option<&[::core::option::Option]>) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.PSSetShader)(::windows_core::Interface::as_raw(self), ppixelshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.PSSetShader)(::windows_core::Interface::as_raw(self), ppixelshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } pub unsafe fn PSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.PSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.PSSetSamplers)(::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 VSSetShader(&self, pvertexshader: P0, ppclassinstances: ::core::option::Option<&[::core::option::Option]>) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.VSSetShader)(::windows_core::Interface::as_raw(self), pvertexshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.VSSetShader)(::windows_core::Interface::as_raw(self), pvertexshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } pub unsafe fn DrawIndexed(&self, indexcount: u32, startindexlocation: u32, basevertexlocation: i32) { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.DrawIndexed)(::windows_core::Interface::as_raw(self), indexcount, startindexlocation, basevertexlocation) @@ -5637,7 +5649,7 @@ impl ID3D11DeviceContext4 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.Unmap)(::windows_core::Interface::as_raw(self), presource.into_param().abi(), subresource) } pub unsafe fn PSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.PSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.PSSetConstantBuffers)(::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 IASetInputLayout(&self, pinputlayout: P0) where @@ -5663,13 +5675,13 @@ impl ID3D11DeviceContext4 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.DrawInstanced)(::windows_core::Interface::as_raw(self), vertexcountperinstance, instancecount, startvertexlocation, startinstancelocation) } pub unsafe fn GSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GSSetConstantBuffers)(::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 GSSetShader(&self, pshader: P0, ppclassinstances: ::core::option::Option<&[::core::option::Option]>) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GSSetShader)(::windows_core::Interface::as_raw(self), pshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GSSetShader)(::windows_core::Interface::as_raw(self), pshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Graphics_Direct3D\"`"] #[cfg(feature = "Win32_Graphics_Direct3D")] @@ -5677,10 +5689,10 @@ impl ID3D11DeviceContext4 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.IASetPrimitiveTopology)(::windows_core::Interface::as_raw(self), topology) } pub unsafe fn VSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.VSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.VSSetShaderResources)(::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 VSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.VSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.VSSetSamplers)(::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 Begin(&self, pasync: P0) where @@ -5710,22 +5722,22 @@ impl ID3D11DeviceContext4 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.SetPredication)(::windows_core::Interface::as_raw(self), ppredicate.into_param().abi(), predicatevalue.into_param().abi()) } pub unsafe fn GSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GSSetShaderResources)(::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 GSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GSSetSamplers)(::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 OMSetRenderTargets(&self, pprendertargetviews: ::core::option::Option<&[::core::option::Option]>, pdepthstencilview: P0) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.OMSetRenderTargets)(::windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pprendertargetviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdepthstencilview.into_param().abi()) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.OMSetRenderTargets)(::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.into_param().abi()) } pub unsafe fn OMSetRenderTargetsAndUnorderedAccessViews(&self, pprendertargetviews: ::core::option::Option<&[::core::option::Option]>, pdepthstencilview: P0, uavstartslot: u32, numuavs: u32, ppunorderedaccessviews: ::core::option::Option<*const ::core::option::Option>, puavinitialcounts: ::core::option::Option<*const u32>) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.OMSetRenderTargetsAndUnorderedAccessViews)(::windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pprendertargetviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdepthstencilview.into_param().abi(), uavstartslot, numuavs, ::core::mem::transmute(ppunorderedaccessviews.unwrap_or(::std::ptr::null())), ::core::mem::transmute(puavinitialcounts.unwrap_or(::std::ptr::null()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.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.into_param().abi(), uavstartslot, numuavs, ::core::mem::transmute(ppunorderedaccessviews.unwrap_or(::std::ptr::null())), ::core::mem::transmute(puavinitialcounts.unwrap_or(::std::ptr::null()))) } pub unsafe fn OMSetBlendState(&self, pblendstate: P0, blendfactor: ::core::option::Option<&[f32; 4]>, samplemask: u32) where @@ -5773,12 +5785,12 @@ impl ID3D11DeviceContext4 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.RSSetState)(::windows_core::Interface::as_raw(self), prasterizerstate.into_param().abi()) } pub unsafe fn RSSetViewports(&self, pviewports: ::core::option::Option<&[D3D11_VIEWPORT]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.RSSetViewports)(::windows_core::Interface::as_raw(self), pviewports.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pviewports.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.RSSetViewports)(::windows_core::Interface::as_raw(self), pviewports.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pviewports.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn RSSetScissorRects(&self, prects: ::core::option::Option<&[super::super::Foundation::RECT]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.RSSetScissorRects)(::windows_core::Interface::as_raw(self), prects.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prects.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.RSSetScissorRects)(::windows_core::Interface::as_raw(self), 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()))) } pub unsafe fn CopySubresourceRegion(&self, pdstresource: P0, dstsubresource: u32, dstx: u32, dsty: u32, dstz: u32, psrcresource: P1, srcsubresource: u32, psrcbox: ::core::option::Option<*const D3D11_BOX>) where @@ -5868,37 +5880,37 @@ impl ID3D11DeviceContext4 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.ExecuteCommandList)(::windows_core::Interface::as_raw(self), pcommandlist.into_param().abi(), restorecontextstate.into_param().abi()) } pub unsafe fn HSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.HSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.HSSetShaderResources)(::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 HSSetShader(&self, phullshader: P0, ppclassinstances: ::core::option::Option<&[::core::option::Option]>) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.HSSetShader)(::windows_core::Interface::as_raw(self), phullshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.HSSetShader)(::windows_core::Interface::as_raw(self), phullshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } pub unsafe fn HSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.HSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.HSSetSamplers)(::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 HSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.HSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.HSSetConstantBuffers)(::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 DSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.DSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.DSSetShaderResources)(::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 DSSetShader(&self, pdomainshader: P0, ppclassinstances: ::core::option::Option<&[::core::option::Option]>) where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.DSSetShader)(::windows_core::Interface::as_raw(self), pdomainshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.DSSetShader)(::windows_core::Interface::as_raw(self), pdomainshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } pub unsafe fn DSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.DSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.DSSetSamplers)(::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 DSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.DSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.DSSetConstantBuffers)(::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 CSSetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CSSetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.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: ::core::option::Option<*const ::core::option::Option>, puavinitialcounts: ::core::option::Option<*const u32>) { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CSSetUnorderedAccessViews)(::windows_core::Interface::as_raw(self), startslot, numuavs, ::core::mem::transmute(ppunorderedaccessviews.unwrap_or(::std::ptr::null())), ::core::mem::transmute(puavinitialcounts.unwrap_or(::std::ptr::null()))) @@ -5907,31 +5919,31 @@ impl ID3D11DeviceContext4 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CSSetShader)(::windows_core::Interface::as_raw(self), pcomputeshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CSSetShader)(::windows_core::Interface::as_raw(self), pcomputeshader.into_param().abi(), ::core::mem::transmute(ppclassinstances.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppclassinstances.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } pub unsafe fn CSSetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CSSetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CSSetSamplers)(::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 CSSetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&[::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CSSetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CSSetConstantBuffers)(::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 VSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.VSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.VSGetConstantBuffers)(::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 PSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.PSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.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 ::core::option::Option, ppclassinstances: ::core::option::Option<*mut ::core::option::Option>, pnumclassinstances: ::core::option::Option<*mut u32>) { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.PSGetShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pppixelshader), ::core::mem::transmute(ppclassinstances.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pnumclassinstances.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn PSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.PSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.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 ::core::option::Option, ppclassinstances: ::core::option::Option<*mut ::core::option::Option>, pnumclassinstances: ::core::option::Option<*mut u32>) { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.VSGetShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppvertexshader), ::core::mem::transmute(ppclassinstances.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pnumclassinstances.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn PSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.PSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.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()))) } pub unsafe fn IAGetInputLayout(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -5947,7 +5959,7 @@ impl ID3D11DeviceContext4 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.IAGetIndexBuffer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pindexbuffer.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(format.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(offset.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn GSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.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 ::core::option::Option, ppclassinstances: ::core::option::Option<*mut ::core::option::Option>, pnumclassinstances: ::core::option::Option<*mut u32>) { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GSGetShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppgeometryshader), ::core::mem::transmute(ppclassinstances.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pnumclassinstances.unwrap_or(::std::ptr::null_mut()))) @@ -5960,10 +5972,10 @@ impl ID3D11DeviceContext4 { ::std::mem::transmute(result__) } pub unsafe fn VSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.VSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.VSGetShaderResources)(::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 VSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.VSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.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()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -5971,22 +5983,22 @@ impl ID3D11DeviceContext4 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetPredication)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pppredicate.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppredicatevalue.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn GSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.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()))) } pub unsafe fn GSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.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: ::core::option::Option<&mut [::core::option::Option]>, ppdepthstencilview: ::core::option::Option<*mut ::core::option::Option>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.OMGetRenderTargets)(::windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pprendertargetviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(ppdepthstencilview.unwrap_or(::std::ptr::null_mut()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.OMGetRenderTargets)(::windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pprendertargetviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(ppdepthstencilview.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn OMGetRenderTargetsAndUnorderedAccessViews(&self, pprendertargetviews: ::core::option::Option<&mut [::core::option::Option]>, ppdepthstencilview: ::core::option::Option<*mut ::core::option::Option>, uavstartslot: u32, ppunorderedaccessviews: ::core::option::Option<&mut [::core::option::Option]>) { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.OMGetRenderTargetsAndUnorderedAccessViews)( ::windows_core::Interface::as_raw(self), - pprendertargetviews.as_deref().map_or(0, |slice| slice.len() as _), + pprendertargetviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pprendertargetviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(ppdepthstencilview.unwrap_or(::std::ptr::null_mut())), uavstartslot, - ppunorderedaccessviews.as_deref().map_or(0, |slice| slice.len() as _), + 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())), ) } @@ -5997,7 +6009,7 @@ impl ID3D11DeviceContext4 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.OMGetDepthStencilState)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppdepthstencilstate.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pstencilref.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn SOGetTargets(&self, ppsotargets: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.SOGetTargets)(::windows_core::Interface::as_raw(self), ppsotargets.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsotargets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.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()))) } pub unsafe fn RSGetState(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -6013,43 +6025,43 @@ impl ID3D11DeviceContext4 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.RSGetScissorRects)(::windows_core::Interface::as_raw(self), pnumrects, ::core::mem::transmute(prects.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn HSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.HSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.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 ::core::option::Option, ppclassinstances: ::core::option::Option<*mut ::core::option::Option>, pnumclassinstances: ::core::option::Option<*mut u32>) { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.HSGetShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pphullshader), ::core::mem::transmute(ppclassinstances.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pnumclassinstances.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn HSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.HSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.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()))) } pub unsafe fn HSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.HSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.HSGetConstantBuffers)(::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 DSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.DSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.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 ::core::option::Option, ppclassinstances: ::core::option::Option<*mut ::core::option::Option>, pnumclassinstances: ::core::option::Option<*mut u32>) { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.DSGetShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppdomainshader), ::core::mem::transmute(ppclassinstances.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pnumclassinstances.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn DSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.DSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.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()))) } pub unsafe fn DSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.DSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.DSGetConstantBuffers)(::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 CSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CSGetShaderResources)(::windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppshaderresourceviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CSGetShaderResources)(::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 CSGetUnorderedAccessViews(&self, startslot: u32, ppunorderedaccessviews: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CSGetUnorderedAccessViews)(::windows_core::Interface::as_raw(self), startslot, ppunorderedaccessviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppunorderedaccessviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.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 ::core::option::Option, ppclassinstances: ::core::option::Option<*mut ::core::option::Option>, pnumclassinstances: ::core::option::Option<*mut u32>) { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CSGetShader)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppcomputeshader), ::core::mem::transmute(ppclassinstances.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pnumclassinstances.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn CSGetSamplers(&self, startslot: u32, ppsamplers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CSGetSamplers)(::windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppsamplers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.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()))) } pub unsafe fn CSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: ::core::option::Option<&mut [::core::option::Option]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CSGetConstantBuffers)(::windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppconstantbuffers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CSGetConstantBuffers)(::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 ClearState(&self) { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.ClearState)(::windows_core::Interface::as_raw(self)) @@ -6144,7 +6156,7 @@ impl ID3D11DeviceContext4 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.ClearView)(::windows_core::Interface::as_raw(self), pview.into_param().abi(), ::core::mem::transmute(color.as_ptr()), ::core::mem::transmute(prect.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prect.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).base__.base__.base__.ClearView)(::windows_core::Interface::as_raw(self), pview.into_param().abi(), ::core::mem::transmute(color.as_ptr()), ::core::mem::transmute(prect.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prect.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -6152,7 +6164,7 @@ impl ID3D11DeviceContext4 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.DiscardView1)(::windows_core::Interface::as_raw(self), presourceview.into_param().abi(), ::core::mem::transmute(prects.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prects.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).base__.base__.base__.DiscardView1)(::windows_core::Interface::as_raw(self), presourceview.into_param().abi(), ::core::mem::transmute(prects.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prects.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -6401,13 +6413,13 @@ impl ID3D11FunctionLinkingGraph { #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn SetInputSignature(&self, pinputparameters: &[D3D11_PARAMETER_DESC]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).SetInputSignature)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pinputparameters.as_ptr()), pinputparameters.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).SetInputSignature)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pinputparameters.as_ptr()), pinputparameters.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Graphics_Direct3D\"`"] #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn SetOutputSignature(&self, poutputparameters: &[D3D11_PARAMETER_DESC]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).SetOutputSignature)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(poutputparameters.as_ptr()), poutputparameters.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).SetOutputSignature)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(poutputparameters.as_ptr()), poutputparameters.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn CallFunction(&self, pmoduleinstancenamespace: P0, pmodulewithfunctionprototype: P1, pfunctionname: P2) -> ::windows_core::Result where @@ -8737,7 +8749,7 @@ impl ID3D11VideoContext { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).SubmitDecoderBuffers)(::windows_core::Interface::as_raw(self), pdecoder.into_param().abi(), pbufferdesc.len() as _, ::core::mem::transmute(pbufferdesc.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SubmitDecoderBuffers)(::windows_core::Interface::as_raw(self), pdecoder.into_param().abi(), pbufferdesc.len().try_into().unwrap(), ::core::mem::transmute(pbufferdesc.as_ptr())).ok() } pub unsafe fn DecoderExtension(&self, pdecoder: P0, pextensiondata: *const D3D11_VIDEO_DECODER_EXTENSION) -> i32 where @@ -8905,7 +8917,7 @@ impl ID3D11VideoContext { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).VideoProcessorSetStreamPalette)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), streamindex, pentries.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pentries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).VideoProcessorSetStreamPalette)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), streamindex, pentries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pentries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Dxgi_Common"))] @@ -9012,7 +9024,7 @@ impl ID3D11VideoContext { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).VideoProcessorGetStreamPalette)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), streamindex, pentries.len() as _, ::core::mem::transmute(pentries.as_ptr())) + (::windows_core::Interface::vtable(self).VideoProcessorGetStreamPalette)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), streamindex, pentries.len().try_into().unwrap(), ::core::mem::transmute(pentries.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Dxgi_Common"))] @@ -9069,7 +9081,7 @@ impl ID3D11VideoContext { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).VideoProcessorBlt)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), pview.into_param().abi(), outputframe, pstreams.len() as _, ::core::mem::transmute(pstreams.as_ptr())).ok() + (::windows_core::Interface::vtable(self).VideoProcessorBlt)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), pview.into_param().abi(), outputframe, pstreams.len().try_into().unwrap(), ::core::mem::transmute(pstreams.as_ptr())).ok() } pub unsafe fn NegotiateCryptoSessionKeyExchange(&self, pcryptosession: P0, datasize: u32, pdata: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where @@ -9366,7 +9378,7 @@ impl ID3D11VideoContext1 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.SubmitDecoderBuffers)(::windows_core::Interface::as_raw(self), pdecoder.into_param().abi(), pbufferdesc.len() as _, ::core::mem::transmute(pbufferdesc.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.SubmitDecoderBuffers)(::windows_core::Interface::as_raw(self), pdecoder.into_param().abi(), pbufferdesc.len().try_into().unwrap(), ::core::mem::transmute(pbufferdesc.as_ptr())).ok() } pub unsafe fn DecoderExtension(&self, pdecoder: P0, pextensiondata: *const D3D11_VIDEO_DECODER_EXTENSION) -> i32 where @@ -9534,7 +9546,7 @@ impl ID3D11VideoContext1 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.VideoProcessorSetStreamPalette)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), streamindex, pentries.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pentries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.VideoProcessorSetStreamPalette)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), streamindex, pentries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pentries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Dxgi_Common"))] @@ -9641,7 +9653,7 @@ impl ID3D11VideoContext1 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.VideoProcessorGetStreamPalette)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), streamindex, pentries.len() as _, ::core::mem::transmute(pentries.as_ptr())) + (::windows_core::Interface::vtable(self).base__.VideoProcessorGetStreamPalette)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), streamindex, pentries.len().try_into().unwrap(), ::core::mem::transmute(pentries.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Dxgi_Common"))] @@ -9698,7 +9710,7 @@ impl ID3D11VideoContext1 { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.VideoProcessorBlt)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), pview.into_param().abi(), outputframe, pstreams.len() as _, ::core::mem::transmute(pstreams.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.VideoProcessorBlt)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), pview.into_param().abi(), outputframe, pstreams.len().try_into().unwrap(), ::core::mem::transmute(pstreams.as_ptr())).ok() } pub unsafe fn NegotiateCryptoSessionKeyExchange(&self, pcryptosession: P0, datasize: u32, pdata: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where @@ -9781,14 +9793,14 @@ impl ID3D11VideoContext1 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).SubmitDecoderBuffers1)(::windows_core::Interface::as_raw(self), pdecoder.into_param().abi(), pbufferdesc.len() as _, ::core::mem::transmute(pbufferdesc.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SubmitDecoderBuffers1)(::windows_core::Interface::as_raw(self), pdecoder.into_param().abi(), pbufferdesc.len().try_into().unwrap(), ::core::mem::transmute(pbufferdesc.as_ptr())).ok() } pub unsafe fn GetDataForNewHardwareKey(&self, pcryptosession: P0, pprivatinputdata: &[u8]) -> ::windows_core::Result where P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).GetDataForNewHardwareKey)(::windows_core::Interface::as_raw(self), pcryptosession.into_param().abi(), pprivatinputdata.len() as _, ::core::mem::transmute(pprivatinputdata.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).GetDataForNewHardwareKey)(::windows_core::Interface::as_raw(self), pcryptosession.into_param().abi(), pprivatinputdata.len().try_into().unwrap(), ::core::mem::transmute(pprivatinputdata.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn CheckCryptoSessionStatus(&self, pcryptosession: P0) -> ::windows_core::Result where @@ -9894,7 +9906,7 @@ impl ID3D11VideoContext1 { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).VideoProcessorGetBehaviorHints)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), outputwidth, outputheight, outputformat, pstreams.len() as _, ::core::mem::transmute(pstreams.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).VideoProcessorGetBehaviorHints)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), outputwidth, outputheight, outputformat, pstreams.len().try_into().unwrap(), ::core::mem::transmute(pstreams.as_ptr()), &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(ID3D11VideoContext1, ::windows_core::IUnknown, ID3D11DeviceChild, ID3D11VideoContext); @@ -10010,7 +10022,7 @@ impl ID3D11VideoContext2 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.SubmitDecoderBuffers)(::windows_core::Interface::as_raw(self), pdecoder.into_param().abi(), pbufferdesc.len() as _, ::core::mem::transmute(pbufferdesc.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.SubmitDecoderBuffers)(::windows_core::Interface::as_raw(self), pdecoder.into_param().abi(), pbufferdesc.len().try_into().unwrap(), ::core::mem::transmute(pbufferdesc.as_ptr())).ok() } pub unsafe fn DecoderExtension(&self, pdecoder: P0, pextensiondata: *const D3D11_VIDEO_DECODER_EXTENSION) -> i32 where @@ -10178,7 +10190,7 @@ impl ID3D11VideoContext2 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.VideoProcessorSetStreamPalette)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), streamindex, pentries.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pentries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.VideoProcessorSetStreamPalette)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), streamindex, pentries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pentries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Dxgi_Common"))] @@ -10285,7 +10297,7 @@ impl ID3D11VideoContext2 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.VideoProcessorGetStreamPalette)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), streamindex, pentries.len() as _, ::core::mem::transmute(pentries.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.VideoProcessorGetStreamPalette)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), streamindex, pentries.len().try_into().unwrap(), ::core::mem::transmute(pentries.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Dxgi_Common"))] @@ -10342,7 +10354,7 @@ impl ID3D11VideoContext2 { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.VideoProcessorBlt)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), pview.into_param().abi(), outputframe, pstreams.len() as _, ::core::mem::transmute(pstreams.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.VideoProcessorBlt)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), pview.into_param().abi(), outputframe, pstreams.len().try_into().unwrap(), ::core::mem::transmute(pstreams.as_ptr())).ok() } pub unsafe fn NegotiateCryptoSessionKeyExchange(&self, pcryptosession: P0, datasize: u32, pdata: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where @@ -10425,14 +10437,14 @@ impl ID3D11VideoContext2 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.SubmitDecoderBuffers1)(::windows_core::Interface::as_raw(self), pdecoder.into_param().abi(), pbufferdesc.len() as _, ::core::mem::transmute(pbufferdesc.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.SubmitDecoderBuffers1)(::windows_core::Interface::as_raw(self), pdecoder.into_param().abi(), pbufferdesc.len().try_into().unwrap(), ::core::mem::transmute(pbufferdesc.as_ptr())).ok() } pub unsafe fn GetDataForNewHardwareKey(&self, pcryptosession: P0, pprivatinputdata: &[u8]) -> ::windows_core::Result where P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.GetDataForNewHardwareKey)(::windows_core::Interface::as_raw(self), pcryptosession.into_param().abi(), pprivatinputdata.len() as _, ::core::mem::transmute(pprivatinputdata.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.GetDataForNewHardwareKey)(::windows_core::Interface::as_raw(self), pcryptosession.into_param().abi(), pprivatinputdata.len().try_into().unwrap(), ::core::mem::transmute(pprivatinputdata.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn CheckCryptoSessionStatus(&self, pcryptosession: P0) -> ::windows_core::Result where @@ -10538,7 +10550,7 @@ impl ID3D11VideoContext2 { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.VideoProcessorGetBehaviorHints)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), outputwidth, outputheight, outputformat, pstreams.len() as _, ::core::mem::transmute(pstreams.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.VideoProcessorGetBehaviorHints)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), outputwidth, outputheight, outputformat, pstreams.len().try_into().unwrap(), ::core::mem::transmute(pstreams.as_ptr()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Graphics_Dxgi\"`"] #[cfg(feature = "Win32_Graphics_Dxgi")] @@ -10655,7 +10667,7 @@ impl ID3D11VideoContext3 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.SubmitDecoderBuffers)(::windows_core::Interface::as_raw(self), pdecoder.into_param().abi(), pbufferdesc.len() as _, ::core::mem::transmute(pbufferdesc.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.SubmitDecoderBuffers)(::windows_core::Interface::as_raw(self), pdecoder.into_param().abi(), pbufferdesc.len().try_into().unwrap(), ::core::mem::transmute(pbufferdesc.as_ptr())).ok() } pub unsafe fn DecoderExtension(&self, pdecoder: P0, pextensiondata: *const D3D11_VIDEO_DECODER_EXTENSION) -> i32 where @@ -10823,7 +10835,7 @@ impl ID3D11VideoContext3 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.VideoProcessorSetStreamPalette)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), streamindex, pentries.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pentries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.VideoProcessorSetStreamPalette)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), streamindex, pentries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pentries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Dxgi_Common"))] @@ -10930,7 +10942,7 @@ impl ID3D11VideoContext3 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.VideoProcessorGetStreamPalette)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), streamindex, pentries.len() as _, ::core::mem::transmute(pentries.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.VideoProcessorGetStreamPalette)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), streamindex, pentries.len().try_into().unwrap(), ::core::mem::transmute(pentries.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Dxgi_Common"))] @@ -10987,7 +10999,7 @@ impl ID3D11VideoContext3 { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.VideoProcessorBlt)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), pview.into_param().abi(), outputframe, pstreams.len() as _, ::core::mem::transmute(pstreams.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.VideoProcessorBlt)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), pview.into_param().abi(), outputframe, pstreams.len().try_into().unwrap(), ::core::mem::transmute(pstreams.as_ptr())).ok() } pub unsafe fn NegotiateCryptoSessionKeyExchange(&self, pcryptosession: P0, datasize: u32, pdata: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where @@ -11070,14 +11082,14 @@ impl ID3D11VideoContext3 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.SubmitDecoderBuffers1)(::windows_core::Interface::as_raw(self), pdecoder.into_param().abi(), pbufferdesc.len() as _, ::core::mem::transmute(pbufferdesc.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.SubmitDecoderBuffers1)(::windows_core::Interface::as_raw(self), pdecoder.into_param().abi(), pbufferdesc.len().try_into().unwrap(), ::core::mem::transmute(pbufferdesc.as_ptr())).ok() } pub unsafe fn GetDataForNewHardwareKey(&self, pcryptosession: P0, pprivatinputdata: &[u8]) -> ::windows_core::Result where P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.GetDataForNewHardwareKey)(::windows_core::Interface::as_raw(self), pcryptosession.into_param().abi(), pprivatinputdata.len() as _, ::core::mem::transmute(pprivatinputdata.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.GetDataForNewHardwareKey)(::windows_core::Interface::as_raw(self), pcryptosession.into_param().abi(), pprivatinputdata.len().try_into().unwrap(), ::core::mem::transmute(pprivatinputdata.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn CheckCryptoSessionStatus(&self, pcryptosession: P0) -> ::windows_core::Result where @@ -11183,7 +11195,7 @@ impl ID3D11VideoContext3 { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.VideoProcessorGetBehaviorHints)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), outputwidth, outputheight, outputformat, pstreams.len() as _, ::core::mem::transmute(pstreams.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.VideoProcessorGetBehaviorHints)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), outputwidth, outputheight, outputformat, pstreams.len().try_into().unwrap(), ::core::mem::transmute(pstreams.as_ptr()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Graphics_Dxgi\"`"] #[cfg(feature = "Win32_Graphics_Dxgi")] @@ -11228,7 +11240,7 @@ impl ID3D11VideoContext3 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).SubmitDecoderBuffers2)(::windows_core::Interface::as_raw(self), pdecoder.into_param().abi(), pbufferdesc.len() as _, ::core::mem::transmute(pbufferdesc.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SubmitDecoderBuffers2)(::windows_core::Interface::as_raw(self), pdecoder.into_param().abi(), pbufferdesc.len().try_into().unwrap(), ::core::mem::transmute(pbufferdesc.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(ID3D11VideoContext3, ::windows_core::IUnknown, ID3D11DeviceChild, ID3D11VideoContext, ID3D11VideoContext1, ID3D11VideoContext2); @@ -12194,7 +12206,7 @@ impl ID3DX11FFT { (::windows_core::Interface::vtable(self).GetInverseScale)(::windows_core::Interface::as_raw(self)) } pub unsafe fn AttachBuffersAndPrecompute(&self, pptempbuffers: &[::core::option::Option], ppprecomputebuffersizes: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).AttachBuffersAndPrecompute)(::windows_core::Interface::as_raw(self), pptempbuffers.len() as _, ::core::mem::transmute(pptempbuffers.as_ptr()), ppprecomputebuffersizes.len() as _, ::core::mem::transmute(ppprecomputebuffersizes.as_ptr())).ok() + (::windows_core::Interface::vtable(self).AttachBuffersAndPrecompute)(::windows_core::Interface::as_raw(self), pptempbuffers.len().try_into().unwrap(), ::core::mem::transmute(pptempbuffers.as_ptr()), ppprecomputebuffersizes.len().try_into().unwrap(), ::core::mem::transmute(ppprecomputebuffersizes.as_ptr())).ok() } pub unsafe fn ForwardTransform(&self, pinputbuffer: P0, ppoutputbuffer: *mut ::core::option::Option) -> ::windows_core::Result<()> where 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 85b4cac542..1839d2ca44 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11on12/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11on12/mod.rs @@ -10,9 +10,9 @@ where pdevice.into_param().abi(), flags, ::core::mem::transmute(pfeaturelevels.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - pfeaturelevels.as_deref().map_or(0, |slice| slice.len() as _), + pfeaturelevels.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(ppcommandqueues.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - ppcommandqueues.as_deref().map_or(0, |slice| slice.len() as _), + ppcommandqueues.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), nodemask, ::core::mem::transmute(ppdevice.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppimmediatecontext.unwrap_or(::std::ptr::null_mut())), @@ -36,12 +36,12 @@ impl ID3D11On12Device { #[doc = "Required features: `\"Win32_Graphics_Direct3D11\"`"] #[cfg(feature = "Win32_Graphics_Direct3D11")] pub unsafe fn ReleaseWrappedResources(&self, ppresources: &[::core::option::Option]) { - (::windows_core::Interface::vtable(self).ReleaseWrappedResources)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppresources.as_ptr()), ppresources.len() as _) + (::windows_core::Interface::vtable(self).ReleaseWrappedResources)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppresources.as_ptr()), ppresources.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Graphics_Direct3D11\"`"] #[cfg(feature = "Win32_Graphics_Direct3D11")] pub unsafe fn AcquireWrappedResources(&self, ppresources: &[::core::option::Option]) { - (::windows_core::Interface::vtable(self).AcquireWrappedResources)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppresources.as_ptr()), ppresources.len() as _) + (::windows_core::Interface::vtable(self).AcquireWrappedResources)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppresources.as_ptr()), ppresources.len().try_into().unwrap()) } } ::windows_core::imp::interface_hierarchy!(ID3D11On12Device, ::windows_core::IUnknown); @@ -86,12 +86,12 @@ impl ID3D11On12Device1 { #[doc = "Required features: `\"Win32_Graphics_Direct3D11\"`"] #[cfg(feature = "Win32_Graphics_Direct3D11")] pub unsafe fn ReleaseWrappedResources(&self, ppresources: &[::core::option::Option]) { - (::windows_core::Interface::vtable(self).base__.ReleaseWrappedResources)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppresources.as_ptr()), ppresources.len() as _) + (::windows_core::Interface::vtable(self).base__.ReleaseWrappedResources)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppresources.as_ptr()), ppresources.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Graphics_Direct3D11\"`"] #[cfg(feature = "Win32_Graphics_Direct3D11")] pub unsafe fn AcquireWrappedResources(&self, ppresources: &[::core::option::Option]) { - (::windows_core::Interface::vtable(self).base__.AcquireWrappedResources)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppresources.as_ptr()), ppresources.len() as _) + (::windows_core::Interface::vtable(self).base__.AcquireWrappedResources)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppresources.as_ptr()), ppresources.len().try_into().unwrap()) } pub unsafe fn GetD3D12Device(&self) -> ::windows_core::Result where @@ -132,12 +132,12 @@ impl ID3D11On12Device2 { #[doc = "Required features: `\"Win32_Graphics_Direct3D11\"`"] #[cfg(feature = "Win32_Graphics_Direct3D11")] pub unsafe fn ReleaseWrappedResources(&self, ppresources: &[::core::option::Option]) { - (::windows_core::Interface::vtable(self).base__.base__.ReleaseWrappedResources)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppresources.as_ptr()), ppresources.len() as _) + (::windows_core::Interface::vtable(self).base__.base__.ReleaseWrappedResources)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppresources.as_ptr()), ppresources.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Graphics_Direct3D11\"`"] #[cfg(feature = "Win32_Graphics_Direct3D11")] pub unsafe fn AcquireWrappedResources(&self, ppresources: &[::core::option::Option]) { - (::windows_core::Interface::vtable(self).base__.base__.AcquireWrappedResources)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppresources.as_ptr()), ppresources.len() as _) + (::windows_core::Interface::vtable(self).base__.base__.AcquireWrappedResources)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppresources.as_ptr()), ppresources.len().try_into().unwrap()) } pub unsafe fn GetD3D12Device(&self) -> ::windows_core::Result where 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 6f1100b6f6..61e0e3b6dc 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D12/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D12/mod.rs @@ -207,7 +207,7 @@ impl ID3D12CommandQueue { (::windows_core::Interface::vtable(self).CopyTileMappings)(::windows_core::Interface::as_raw(self), pdstresource.into_param().abi(), pdstregionstartcoordinate, psrcresource.into_param().abi(), psrcregionstartcoordinate, pregionsize, flags) } pub unsafe fn ExecuteCommandLists(&self, ppcommandlists: &[::core::option::Option]) { - (::windows_core::Interface::vtable(self).ExecuteCommandLists)(::windows_core::Interface::as_raw(self), ppcommandlists.len() as _, ::core::mem::transmute(ppcommandlists.as_ptr())) + (::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: ::core::option::Option<*const ::core::ffi::c_void>, size: u32) { (::windows_core::Interface::vtable(self).SetMarker)(::windows_core::Interface::as_raw(self), metadata, ::core::mem::transmute(pdata.unwrap_or(::std::ptr::null())), size) @@ -1138,7 +1138,7 @@ impl ID3D12Device { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).CreateRootSignature)(::windows_core::Interface::as_raw(self), nodemask, ::core::mem::transmute(pblobwithrootsignature.as_ptr()), pblobwithrootsignature.len() as _, &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateRootSignature)(::windows_core::Interface::as_raw(self), nodemask, ::core::mem::transmute(pblobwithrootsignature.as_ptr()), pblobwithrootsignature.len().try_into().unwrap(), &::IID, &mut result__).from_abi(result__) } pub unsafe fn CreateConstantBufferView(&self, pdesc: ::core::option::Option<*const D3D12_CONSTANT_BUFFER_VIEW_DESC>, destdescriptor: D3D12_CPU_DESCRIPTOR_HANDLE) { (::windows_core::Interface::vtable(self).CreateConstantBufferView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdesc.unwrap_or(::std::ptr::null())), ::core::mem::transmute(destdescriptor)) @@ -1189,7 +1189,7 @@ impl ID3D12Device { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetResourceAllocationInfo(&self, visiblemask: u32, presourcedescs: &[D3D12_RESOURCE_DESC]) -> D3D12_RESOURCE_ALLOCATION_INFO { let mut result__: D3D12_RESOURCE_ALLOCATION_INFO = ::core::mem::zeroed(); - (::windows_core::Interface::vtable(self).GetResourceAllocationInfo)(::windows_core::Interface::as_raw(self), &mut result__, visiblemask, presourcedescs.len() as _, ::core::mem::transmute(presourcedescs.as_ptr())); + (::windows_core::Interface::vtable(self).GetResourceAllocationInfo)(::windows_core::Interface::as_raw(self), &mut result__, visiblemask, presourcedescs.len().try_into().unwrap(), ::core::mem::transmute(presourcedescs.as_ptr())); result__ } pub unsafe fn GetCustomHeapProperties(&self, nodemask: u32, heaptype: D3D12_HEAP_TYPE) -> D3D12_HEAP_PROPERTIES { @@ -1257,10 +1257,10 @@ impl ID3D12Device { (::windows_core::Interface::vtable(self).OpenSharedHandleByName)(::windows_core::Interface::as_raw(self), name.into_param().abi(), access, &mut result__).from_abi(result__) } pub unsafe fn MakeResident(&self, ppobjects: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).MakeResident)(::windows_core::Interface::as_raw(self), ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr())).ok() + (::windows_core::Interface::vtable(self).MakeResident)(::windows_core::Interface::as_raw(self), ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr())).ok() } pub unsafe fn Evict(&self, ppobjects: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Evict)(::windows_core::Interface::as_raw(self), ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr())).ok() + (::windows_core::Interface::vtable(self).Evict)(::windows_core::Interface::as_raw(self), ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr())).ok() } pub unsafe fn CreateFence(&self, initialvalue: u64, flags: D3D12_FENCE_FLAGS) -> ::windows_core::Result where @@ -1490,7 +1490,7 @@ impl ID3D12Device1 { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).base__.CreateRootSignature)(::windows_core::Interface::as_raw(self), nodemask, ::core::mem::transmute(pblobwithrootsignature.as_ptr()), pblobwithrootsignature.len() as _, &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateRootSignature)(::windows_core::Interface::as_raw(self), nodemask, ::core::mem::transmute(pblobwithrootsignature.as_ptr()), pblobwithrootsignature.len().try_into().unwrap(), &::IID, &mut result__).from_abi(result__) } pub unsafe fn CreateConstantBufferView(&self, pdesc: ::core::option::Option<*const D3D12_CONSTANT_BUFFER_VIEW_DESC>, destdescriptor: D3D12_CPU_DESCRIPTOR_HANDLE) { (::windows_core::Interface::vtable(self).base__.CreateConstantBufferView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdesc.unwrap_or(::std::ptr::null())), ::core::mem::transmute(destdescriptor)) @@ -1541,7 +1541,7 @@ impl ID3D12Device1 { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetResourceAllocationInfo(&self, visiblemask: u32, presourcedescs: &[D3D12_RESOURCE_DESC]) -> D3D12_RESOURCE_ALLOCATION_INFO { let mut result__: D3D12_RESOURCE_ALLOCATION_INFO = ::core::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.GetResourceAllocationInfo)(::windows_core::Interface::as_raw(self), &mut result__, visiblemask, presourcedescs.len() as _, ::core::mem::transmute(presourcedescs.as_ptr())); + (::windows_core::Interface::vtable(self).base__.GetResourceAllocationInfo)(::windows_core::Interface::as_raw(self), &mut result__, visiblemask, presourcedescs.len().try_into().unwrap(), ::core::mem::transmute(presourcedescs.as_ptr())); result__ } pub unsafe fn GetCustomHeapProperties(&self, nodemask: u32, heaptype: D3D12_HEAP_TYPE) -> D3D12_HEAP_PROPERTIES { @@ -1609,10 +1609,10 @@ impl ID3D12Device1 { (::windows_core::Interface::vtable(self).base__.OpenSharedHandleByName)(::windows_core::Interface::as_raw(self), name.into_param().abi(), access, &mut result__).from_abi(result__) } pub unsafe fn MakeResident(&self, ppobjects: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.MakeResident)(::windows_core::Interface::as_raw(self), ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.MakeResident)(::windows_core::Interface::as_raw(self), ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr())).ok() } pub unsafe fn Evict(&self, ppobjects: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.Evict)(::windows_core::Interface::as_raw(self), ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.Evict)(::windows_core::Interface::as_raw(self), ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr())).ok() } pub unsafe fn CreateFence(&self, initialvalue: u64, flags: D3D12_FENCE_FLAGS) -> ::windows_core::Result where @@ -1668,7 +1668,7 @@ impl ID3D12Device1 { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).CreatePipelineLibrary)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(plibraryblob.as_ptr()), plibraryblob.len() as _, &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreatePipelineLibrary)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(plibraryblob.as_ptr()), plibraryblob.len().try_into().unwrap(), &::IID, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1784,7 +1784,7 @@ impl ID3D12Device10 { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.CreateRootSignature)(::windows_core::Interface::as_raw(self), nodemask, ::core::mem::transmute(pblobwithrootsignature.as_ptr()), pblobwithrootsignature.len() as _, &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.CreateRootSignature)(::windows_core::Interface::as_raw(self), nodemask, ::core::mem::transmute(pblobwithrootsignature.as_ptr()), pblobwithrootsignature.len().try_into().unwrap(), &::IID, &mut result__).from_abi(result__) } pub unsafe fn CreateConstantBufferView(&self, pdesc: ::core::option::Option<*const D3D12_CONSTANT_BUFFER_VIEW_DESC>, destdescriptor: D3D12_CPU_DESCRIPTOR_HANDLE) { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.CreateConstantBufferView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdesc.unwrap_or(::std::ptr::null())), ::core::mem::transmute(destdescriptor)) @@ -1835,7 +1835,7 @@ impl ID3D12Device10 { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetResourceAllocationInfo(&self, visiblemask: u32, presourcedescs: &[D3D12_RESOURCE_DESC]) -> D3D12_RESOURCE_ALLOCATION_INFO { let mut result__: D3D12_RESOURCE_ALLOCATION_INFO = ::core::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetResourceAllocationInfo)(::windows_core::Interface::as_raw(self), &mut result__, visiblemask, presourcedescs.len() as _, ::core::mem::transmute(presourcedescs.as_ptr())); + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetResourceAllocationInfo)(::windows_core::Interface::as_raw(self), &mut result__, visiblemask, presourcedescs.len().try_into().unwrap(), ::core::mem::transmute(presourcedescs.as_ptr())); result__ } pub unsafe fn GetCustomHeapProperties(&self, nodemask: u32, heaptype: D3D12_HEAP_TYPE) -> D3D12_HEAP_PROPERTIES { @@ -1903,10 +1903,10 @@ impl ID3D12Device10 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.OpenSharedHandleByName)(::windows_core::Interface::as_raw(self), name.into_param().abi(), access, &mut result__).from_abi(result__) } pub unsafe fn MakeResident(&self, ppobjects: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.MakeResident)(::windows_core::Interface::as_raw(self), ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.MakeResident)(::windows_core::Interface::as_raw(self), ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr())).ok() } pub unsafe fn Evict(&self, ppobjects: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.Evict)(::windows_core::Interface::as_raw(self), ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.Evict)(::windows_core::Interface::as_raw(self), ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr())).ok() } pub unsafe fn CreateFence(&self, initialvalue: u64, flags: D3D12_FENCE_FLAGS) -> ::windows_core::Result where @@ -1962,7 +1962,7 @@ impl ID3D12Device10 { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.CreatePipelineLibrary)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(plibraryblob.as_ptr()), plibraryblob.len() as _, &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.CreatePipelineLibrary)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(plibraryblob.as_ptr()), plibraryblob.len().try_into().unwrap(), &::IID, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2003,7 +2003,7 @@ impl ID3D12Device10 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.EnqueueMakeResident)(::windows_core::Interface::as_raw(self), flags, ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr()), pfencetosignal.into_param().abi(), fencevaluetosignal).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.EnqueueMakeResident)(::windows_core::Interface::as_raw(self), flags, ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr()), pfencetosignal.into_param().abi(), fencevaluetosignal).ok() } pub unsafe fn CreateCommandList1(&self, nodemask: u32, r#type: D3D12_COMMAND_LIST_TYPE, flags: D3D12_COMMAND_LIST_FLAGS) -> ::windows_core::Result where @@ -2173,7 +2173,7 @@ impl ID3D12Device10 { P0: ::windows_core::IntoParam, T: ::windows_core::ComInterface, { - (::windows_core::Interface::vtable(self).CreateCommittedResource3)(::windows_core::Interface::as_raw(self), pheapproperties, heapflags, pdesc, initiallayout, ::core::mem::transmute(poptimizedclearvalue.unwrap_or(::std::ptr::null())), pprotectedsession.into_param().abi(), pcastableformats.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcastableformats.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), &::IID, result__ as *mut _ as *mut _).ok() + (::windows_core::Interface::vtable(self).CreateCommittedResource3)(::windows_core::Interface::as_raw(self), pheapproperties, heapflags, pdesc, initiallayout, ::core::mem::transmute(poptimizedclearvalue.unwrap_or(::std::ptr::null())), pprotectedsession.into_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())), &::IID, result__ as *mut _ as *mut _).ok() } #[doc = "Required features: `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(feature = "Win32_Graphics_Dxgi_Common")] @@ -2182,7 +2182,7 @@ impl ID3D12Device10 { P0: ::windows_core::IntoParam, T: ::windows_core::ComInterface, { - (::windows_core::Interface::vtable(self).CreatePlacedResource2)(::windows_core::Interface::as_raw(self), pheap.into_param().abi(), heapoffset, pdesc, initiallayout, ::core::mem::transmute(poptimizedclearvalue.unwrap_or(::std::ptr::null())), pcastableformats.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcastableformats.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), &::IID, result__ as *mut _ as *mut _).ok() + (::windows_core::Interface::vtable(self).CreatePlacedResource2)(::windows_core::Interface::as_raw(self), pheap.into_param().abi(), heapoffset, pdesc, initiallayout, ::core::mem::transmute(poptimizedclearvalue.unwrap_or(::std::ptr::null())), pcastableformats.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcastableformats.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), &::IID, result__ as *mut _ as *mut _).ok() } #[doc = "Required features: `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(feature = "Win32_Graphics_Dxgi_Common")] @@ -2191,7 +2191,7 @@ impl ID3D12Device10 { P0: ::windows_core::IntoParam, T: ::windows_core::ComInterface, { - (::windows_core::Interface::vtable(self).CreateReservedResource2)(::windows_core::Interface::as_raw(self), pdesc, initiallayout, ::core::mem::transmute(poptimizedclearvalue.unwrap_or(::std::ptr::null())), pprotectedsession.into_param().abi(), pcastableformats.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcastableformats.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), &::IID, result__ as *mut _ as *mut _).ok() + (::windows_core::Interface::vtable(self).CreateReservedResource2)(::windows_core::Interface::as_raw(self), pdesc, initiallayout, ::core::mem::transmute(poptimizedclearvalue.unwrap_or(::std::ptr::null())), pprotectedsession.into_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())), &::IID, result__ as *mut _ as *mut _).ok() } } ::windows_core::imp::interface_hierarchy!(ID3D12Device10, ::windows_core::IUnknown, ID3D12Object, ID3D12Device, ID3D12Device1, ID3D12Device2, ID3D12Device3, ID3D12Device4, ID3D12Device5, ID3D12Device6, ID3D12Device7, ID3D12Device8, ID3D12Device9); @@ -2302,7 +2302,7 @@ impl ID3D12Device11 { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.CreateRootSignature)(::windows_core::Interface::as_raw(self), nodemask, ::core::mem::transmute(pblobwithrootsignature.as_ptr()), pblobwithrootsignature.len() as _, &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.CreateRootSignature)(::windows_core::Interface::as_raw(self), nodemask, ::core::mem::transmute(pblobwithrootsignature.as_ptr()), pblobwithrootsignature.len().try_into().unwrap(), &::IID, &mut result__).from_abi(result__) } pub unsafe fn CreateConstantBufferView(&self, pdesc: ::core::option::Option<*const D3D12_CONSTANT_BUFFER_VIEW_DESC>, destdescriptor: D3D12_CPU_DESCRIPTOR_HANDLE) { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.CreateConstantBufferView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdesc.unwrap_or(::std::ptr::null())), ::core::mem::transmute(destdescriptor)) @@ -2353,7 +2353,7 @@ impl ID3D12Device11 { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetResourceAllocationInfo(&self, visiblemask: u32, presourcedescs: &[D3D12_RESOURCE_DESC]) -> D3D12_RESOURCE_ALLOCATION_INFO { let mut result__: D3D12_RESOURCE_ALLOCATION_INFO = ::core::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetResourceAllocationInfo)(::windows_core::Interface::as_raw(self), &mut result__, visiblemask, presourcedescs.len() as _, ::core::mem::transmute(presourcedescs.as_ptr())); + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetResourceAllocationInfo)(::windows_core::Interface::as_raw(self), &mut result__, visiblemask, presourcedescs.len().try_into().unwrap(), ::core::mem::transmute(presourcedescs.as_ptr())); result__ } pub unsafe fn GetCustomHeapProperties(&self, nodemask: u32, heaptype: D3D12_HEAP_TYPE) -> D3D12_HEAP_PROPERTIES { @@ -2421,10 +2421,10 @@ impl ID3D12Device11 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.OpenSharedHandleByName)(::windows_core::Interface::as_raw(self), name.into_param().abi(), access, &mut result__).from_abi(result__) } pub unsafe fn MakeResident(&self, ppobjects: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.MakeResident)(::windows_core::Interface::as_raw(self), ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.MakeResident)(::windows_core::Interface::as_raw(self), ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr())).ok() } pub unsafe fn Evict(&self, ppobjects: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.Evict)(::windows_core::Interface::as_raw(self), ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.Evict)(::windows_core::Interface::as_raw(self), ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr())).ok() } pub unsafe fn CreateFence(&self, initialvalue: u64, flags: D3D12_FENCE_FLAGS) -> ::windows_core::Result where @@ -2480,7 +2480,7 @@ impl ID3D12Device11 { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.CreatePipelineLibrary)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(plibraryblob.as_ptr()), plibraryblob.len() as _, &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.CreatePipelineLibrary)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(plibraryblob.as_ptr()), plibraryblob.len().try_into().unwrap(), &::IID, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2521,7 +2521,7 @@ impl ID3D12Device11 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.EnqueueMakeResident)(::windows_core::Interface::as_raw(self), flags, ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr()), pfencetosignal.into_param().abi(), fencevaluetosignal).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.EnqueueMakeResident)(::windows_core::Interface::as_raw(self), flags, ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr()), pfencetosignal.into_param().abi(), fencevaluetosignal).ok() } pub unsafe fn CreateCommandList1(&self, nodemask: u32, r#type: D3D12_COMMAND_LIST_TYPE, flags: D3D12_COMMAND_LIST_FLAGS) -> ::windows_core::Result where @@ -2691,7 +2691,7 @@ impl ID3D12Device11 { P0: ::windows_core::IntoParam, T: ::windows_core::ComInterface, { - (::windows_core::Interface::vtable(self).base__.CreateCommittedResource3)(::windows_core::Interface::as_raw(self), pheapproperties, heapflags, pdesc, initiallayout, ::core::mem::transmute(poptimizedclearvalue.unwrap_or(::std::ptr::null())), pprotectedsession.into_param().abi(), pcastableformats.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcastableformats.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), &::IID, result__ as *mut _ as *mut _).ok() + (::windows_core::Interface::vtable(self).base__.CreateCommittedResource3)(::windows_core::Interface::as_raw(self), pheapproperties, heapflags, pdesc, initiallayout, ::core::mem::transmute(poptimizedclearvalue.unwrap_or(::std::ptr::null())), pprotectedsession.into_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())), &::IID, result__ as *mut _ as *mut _).ok() } #[doc = "Required features: `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(feature = "Win32_Graphics_Dxgi_Common")] @@ -2700,7 +2700,7 @@ impl ID3D12Device11 { P0: ::windows_core::IntoParam, T: ::windows_core::ComInterface, { - (::windows_core::Interface::vtable(self).base__.CreatePlacedResource2)(::windows_core::Interface::as_raw(self), pheap.into_param().abi(), heapoffset, pdesc, initiallayout, ::core::mem::transmute(poptimizedclearvalue.unwrap_or(::std::ptr::null())), pcastableformats.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcastableformats.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), &::IID, result__ as *mut _ as *mut _).ok() + (::windows_core::Interface::vtable(self).base__.CreatePlacedResource2)(::windows_core::Interface::as_raw(self), pheap.into_param().abi(), heapoffset, pdesc, initiallayout, ::core::mem::transmute(poptimizedclearvalue.unwrap_or(::std::ptr::null())), pcastableformats.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcastableformats.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), &::IID, result__ as *mut _ as *mut _).ok() } #[doc = "Required features: `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(feature = "Win32_Graphics_Dxgi_Common")] @@ -2709,7 +2709,7 @@ impl ID3D12Device11 { P0: ::windows_core::IntoParam, T: ::windows_core::ComInterface, { - (::windows_core::Interface::vtable(self).base__.CreateReservedResource2)(::windows_core::Interface::as_raw(self), pdesc, initiallayout, ::core::mem::transmute(poptimizedclearvalue.unwrap_or(::std::ptr::null())), pprotectedsession.into_param().abi(), pcastableformats.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcastableformats.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), &::IID, result__ as *mut _ as *mut _).ok() + (::windows_core::Interface::vtable(self).base__.CreateReservedResource2)(::windows_core::Interface::as_raw(self), pdesc, initiallayout, ::core::mem::transmute(poptimizedclearvalue.unwrap_or(::std::ptr::null())), pprotectedsession.into_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())), &::IID, result__ as *mut _ as *mut _).ok() } pub unsafe fn CreateSampler2(&self, pdesc: *const D3D12_SAMPLER_DESC2, destdescriptor: D3D12_CPU_DESCRIPTOR_HANDLE) { (::windows_core::Interface::vtable(self).CreateSampler2)(::windows_core::Interface::as_raw(self), pdesc, ::core::mem::transmute(destdescriptor)) @@ -2812,7 +2812,7 @@ impl ID3D12Device12 { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.CreateRootSignature)(::windows_core::Interface::as_raw(self), nodemask, ::core::mem::transmute(pblobwithrootsignature.as_ptr()), pblobwithrootsignature.len() as _, &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.CreateRootSignature)(::windows_core::Interface::as_raw(self), nodemask, ::core::mem::transmute(pblobwithrootsignature.as_ptr()), pblobwithrootsignature.len().try_into().unwrap(), &::IID, &mut result__).from_abi(result__) } pub unsafe fn CreateConstantBufferView(&self, pdesc: ::core::option::Option<*const D3D12_CONSTANT_BUFFER_VIEW_DESC>, destdescriptor: D3D12_CPU_DESCRIPTOR_HANDLE) { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.CreateConstantBufferView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdesc.unwrap_or(::std::ptr::null())), ::core::mem::transmute(destdescriptor)) @@ -2863,7 +2863,7 @@ impl ID3D12Device12 { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetResourceAllocationInfo(&self, visiblemask: u32, presourcedescs: &[D3D12_RESOURCE_DESC]) -> D3D12_RESOURCE_ALLOCATION_INFO { let mut result__: D3D12_RESOURCE_ALLOCATION_INFO = ::core::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetResourceAllocationInfo)(::windows_core::Interface::as_raw(self), &mut result__, visiblemask, presourcedescs.len() as _, ::core::mem::transmute(presourcedescs.as_ptr())); + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetResourceAllocationInfo)(::windows_core::Interface::as_raw(self), &mut result__, visiblemask, presourcedescs.len().try_into().unwrap(), ::core::mem::transmute(presourcedescs.as_ptr())); result__ } pub unsafe fn GetCustomHeapProperties(&self, nodemask: u32, heaptype: D3D12_HEAP_TYPE) -> D3D12_HEAP_PROPERTIES { @@ -2931,10 +2931,10 @@ impl ID3D12Device12 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.OpenSharedHandleByName)(::windows_core::Interface::as_raw(self), name.into_param().abi(), access, &mut result__).from_abi(result__) } pub unsafe fn MakeResident(&self, ppobjects: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.MakeResident)(::windows_core::Interface::as_raw(self), ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.MakeResident)(::windows_core::Interface::as_raw(self), ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr())).ok() } pub unsafe fn Evict(&self, ppobjects: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.Evict)(::windows_core::Interface::as_raw(self), ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.Evict)(::windows_core::Interface::as_raw(self), ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr())).ok() } pub unsafe fn CreateFence(&self, initialvalue: u64, flags: D3D12_FENCE_FLAGS) -> ::windows_core::Result where @@ -2990,7 +2990,7 @@ impl ID3D12Device12 { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.CreatePipelineLibrary)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(plibraryblob.as_ptr()), plibraryblob.len() as _, &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.CreatePipelineLibrary)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(plibraryblob.as_ptr()), plibraryblob.len().try_into().unwrap(), &::IID, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3031,7 +3031,7 @@ impl ID3D12Device12 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.EnqueueMakeResident)(::windows_core::Interface::as_raw(self), flags, ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr()), pfencetosignal.into_param().abi(), fencevaluetosignal).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.EnqueueMakeResident)(::windows_core::Interface::as_raw(self), flags, ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr()), pfencetosignal.into_param().abi(), fencevaluetosignal).ok() } pub unsafe fn CreateCommandList1(&self, nodemask: u32, r#type: D3D12_COMMAND_LIST_TYPE, flags: D3D12_COMMAND_LIST_FLAGS) -> ::windows_core::Result where @@ -3201,7 +3201,7 @@ impl ID3D12Device12 { P0: ::windows_core::IntoParam, T: ::windows_core::ComInterface, { - (::windows_core::Interface::vtable(self).base__.base__.CreateCommittedResource3)(::windows_core::Interface::as_raw(self), pheapproperties, heapflags, pdesc, initiallayout, ::core::mem::transmute(poptimizedclearvalue.unwrap_or(::std::ptr::null())), pprotectedsession.into_param().abi(), pcastableformats.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcastableformats.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), &::IID, result__ as *mut _ as *mut _).ok() + (::windows_core::Interface::vtable(self).base__.base__.CreateCommittedResource3)(::windows_core::Interface::as_raw(self), pheapproperties, heapflags, pdesc, initiallayout, ::core::mem::transmute(poptimizedclearvalue.unwrap_or(::std::ptr::null())), pprotectedsession.into_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())), &::IID, result__ as *mut _ as *mut _).ok() } #[doc = "Required features: `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(feature = "Win32_Graphics_Dxgi_Common")] @@ -3210,7 +3210,7 @@ impl ID3D12Device12 { P0: ::windows_core::IntoParam, T: ::windows_core::ComInterface, { - (::windows_core::Interface::vtable(self).base__.base__.CreatePlacedResource2)(::windows_core::Interface::as_raw(self), pheap.into_param().abi(), heapoffset, pdesc, initiallayout, ::core::mem::transmute(poptimizedclearvalue.unwrap_or(::std::ptr::null())), pcastableformats.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcastableformats.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), &::IID, result__ as *mut _ as *mut _).ok() + (::windows_core::Interface::vtable(self).base__.base__.CreatePlacedResource2)(::windows_core::Interface::as_raw(self), pheap.into_param().abi(), heapoffset, pdesc, initiallayout, ::core::mem::transmute(poptimizedclearvalue.unwrap_or(::std::ptr::null())), pcastableformats.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcastableformats.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), &::IID, result__ as *mut _ as *mut _).ok() } #[doc = "Required features: `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(feature = "Win32_Graphics_Dxgi_Common")] @@ -3219,7 +3219,7 @@ impl ID3D12Device12 { P0: ::windows_core::IntoParam, T: ::windows_core::ComInterface, { - (::windows_core::Interface::vtable(self).base__.base__.CreateReservedResource2)(::windows_core::Interface::as_raw(self), pdesc, initiallayout, ::core::mem::transmute(poptimizedclearvalue.unwrap_or(::std::ptr::null())), pprotectedsession.into_param().abi(), pcastableformats.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcastableformats.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), &::IID, result__ as *mut _ as *mut _).ok() + (::windows_core::Interface::vtable(self).base__.base__.CreateReservedResource2)(::windows_core::Interface::as_raw(self), pdesc, initiallayout, ::core::mem::transmute(poptimizedclearvalue.unwrap_or(::std::ptr::null())), pprotectedsession.into_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())), &::IID, result__ as *mut _ as *mut _).ok() } pub unsafe fn CreateSampler2(&self, pdesc: *const D3D12_SAMPLER_DESC2, destdescriptor: D3D12_CPU_DESCRIPTOR_HANDLE) { (::windows_core::Interface::vtable(self).base__.CreateSampler2)(::windows_core::Interface::as_raw(self), pdesc, ::core::mem::transmute(destdescriptor)) @@ -3332,7 +3332,7 @@ impl ID3D12Device2 { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).base__.base__.CreateRootSignature)(::windows_core::Interface::as_raw(self), nodemask, ::core::mem::transmute(pblobwithrootsignature.as_ptr()), pblobwithrootsignature.len() as _, &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.CreateRootSignature)(::windows_core::Interface::as_raw(self), nodemask, ::core::mem::transmute(pblobwithrootsignature.as_ptr()), pblobwithrootsignature.len().try_into().unwrap(), &::IID, &mut result__).from_abi(result__) } pub unsafe fn CreateConstantBufferView(&self, pdesc: ::core::option::Option<*const D3D12_CONSTANT_BUFFER_VIEW_DESC>, destdescriptor: D3D12_CPU_DESCRIPTOR_HANDLE) { (::windows_core::Interface::vtable(self).base__.base__.CreateConstantBufferView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdesc.unwrap_or(::std::ptr::null())), ::core::mem::transmute(destdescriptor)) @@ -3383,7 +3383,7 @@ impl ID3D12Device2 { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetResourceAllocationInfo(&self, visiblemask: u32, presourcedescs: &[D3D12_RESOURCE_DESC]) -> D3D12_RESOURCE_ALLOCATION_INFO { let mut result__: D3D12_RESOURCE_ALLOCATION_INFO = ::core::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.GetResourceAllocationInfo)(::windows_core::Interface::as_raw(self), &mut result__, visiblemask, presourcedescs.len() as _, ::core::mem::transmute(presourcedescs.as_ptr())); + (::windows_core::Interface::vtable(self).base__.base__.GetResourceAllocationInfo)(::windows_core::Interface::as_raw(self), &mut result__, visiblemask, presourcedescs.len().try_into().unwrap(), ::core::mem::transmute(presourcedescs.as_ptr())); result__ } pub unsafe fn GetCustomHeapProperties(&self, nodemask: u32, heaptype: D3D12_HEAP_TYPE) -> D3D12_HEAP_PROPERTIES { @@ -3451,10 +3451,10 @@ impl ID3D12Device2 { (::windows_core::Interface::vtable(self).base__.base__.OpenSharedHandleByName)(::windows_core::Interface::as_raw(self), name.into_param().abi(), access, &mut result__).from_abi(result__) } pub unsafe fn MakeResident(&self, ppobjects: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.MakeResident)(::windows_core::Interface::as_raw(self), ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.MakeResident)(::windows_core::Interface::as_raw(self), ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr())).ok() } pub unsafe fn Evict(&self, ppobjects: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.Evict)(::windows_core::Interface::as_raw(self), ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.Evict)(::windows_core::Interface::as_raw(self), ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr())).ok() } pub unsafe fn CreateFence(&self, initialvalue: u64, flags: D3D12_FENCE_FLAGS) -> ::windows_core::Result where @@ -3510,7 +3510,7 @@ impl ID3D12Device2 { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).base__.CreatePipelineLibrary)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(plibraryblob.as_ptr()), plibraryblob.len() as _, &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreatePipelineLibrary)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(plibraryblob.as_ptr()), plibraryblob.len().try_into().unwrap(), &::IID, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3628,7 +3628,7 @@ impl ID3D12Device3 { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).base__.base__.base__.CreateRootSignature)(::windows_core::Interface::as_raw(self), nodemask, ::core::mem::transmute(pblobwithrootsignature.as_ptr()), pblobwithrootsignature.len() as _, &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.CreateRootSignature)(::windows_core::Interface::as_raw(self), nodemask, ::core::mem::transmute(pblobwithrootsignature.as_ptr()), pblobwithrootsignature.len().try_into().unwrap(), &::IID, &mut result__).from_abi(result__) } pub unsafe fn CreateConstantBufferView(&self, pdesc: ::core::option::Option<*const D3D12_CONSTANT_BUFFER_VIEW_DESC>, destdescriptor: D3D12_CPU_DESCRIPTOR_HANDLE) { (::windows_core::Interface::vtable(self).base__.base__.base__.CreateConstantBufferView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdesc.unwrap_or(::std::ptr::null())), ::core::mem::transmute(destdescriptor)) @@ -3679,7 +3679,7 @@ impl ID3D12Device3 { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetResourceAllocationInfo(&self, visiblemask: u32, presourcedescs: &[D3D12_RESOURCE_DESC]) -> D3D12_RESOURCE_ALLOCATION_INFO { let mut result__: D3D12_RESOURCE_ALLOCATION_INFO = ::core::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.GetResourceAllocationInfo)(::windows_core::Interface::as_raw(self), &mut result__, visiblemask, presourcedescs.len() as _, ::core::mem::transmute(presourcedescs.as_ptr())); + (::windows_core::Interface::vtable(self).base__.base__.base__.GetResourceAllocationInfo)(::windows_core::Interface::as_raw(self), &mut result__, visiblemask, presourcedescs.len().try_into().unwrap(), ::core::mem::transmute(presourcedescs.as_ptr())); result__ } pub unsafe fn GetCustomHeapProperties(&self, nodemask: u32, heaptype: D3D12_HEAP_TYPE) -> D3D12_HEAP_PROPERTIES { @@ -3747,10 +3747,10 @@ impl ID3D12Device3 { (::windows_core::Interface::vtable(self).base__.base__.base__.OpenSharedHandleByName)(::windows_core::Interface::as_raw(self), name.into_param().abi(), access, &mut result__).from_abi(result__) } pub unsafe fn MakeResident(&self, ppobjects: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.MakeResident)(::windows_core::Interface::as_raw(self), ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.MakeResident)(::windows_core::Interface::as_raw(self), ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr())).ok() } pub unsafe fn Evict(&self, ppobjects: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.Evict)(::windows_core::Interface::as_raw(self), ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.Evict)(::windows_core::Interface::as_raw(self), ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr())).ok() } pub unsafe fn CreateFence(&self, initialvalue: u64, flags: D3D12_FENCE_FLAGS) -> ::windows_core::Result where @@ -3806,7 +3806,7 @@ impl ID3D12Device3 { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).base__.base__.CreatePipelineLibrary)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(plibraryblob.as_ptr()), plibraryblob.len() as _, &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.CreatePipelineLibrary)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(plibraryblob.as_ptr()), plibraryblob.len().try_into().unwrap(), &::IID, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3847,7 +3847,7 @@ impl ID3D12Device3 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).EnqueueMakeResident)(::windows_core::Interface::as_raw(self), flags, ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr()), pfencetosignal.into_param().abi(), fencevaluetosignal).ok() + (::windows_core::Interface::vtable(self).EnqueueMakeResident)(::windows_core::Interface::as_raw(self), flags, ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr()), pfencetosignal.into_param().abi(), fencevaluetosignal).ok() } } ::windows_core::imp::interface_hierarchy!(ID3D12Device3, ::windows_core::IUnknown, ID3D12Object, ID3D12Device, ID3D12Device1, ID3D12Device2); @@ -3952,7 +3952,7 @@ impl ID3D12Device4 { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateRootSignature)(::windows_core::Interface::as_raw(self), nodemask, ::core::mem::transmute(pblobwithrootsignature.as_ptr()), pblobwithrootsignature.len() as _, &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateRootSignature)(::windows_core::Interface::as_raw(self), nodemask, ::core::mem::transmute(pblobwithrootsignature.as_ptr()), pblobwithrootsignature.len().try_into().unwrap(), &::IID, &mut result__).from_abi(result__) } pub unsafe fn CreateConstantBufferView(&self, pdesc: ::core::option::Option<*const D3D12_CONSTANT_BUFFER_VIEW_DESC>, destdescriptor: D3D12_CPU_DESCRIPTOR_HANDLE) { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateConstantBufferView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdesc.unwrap_or(::std::ptr::null())), ::core::mem::transmute(destdescriptor)) @@ -4003,7 +4003,7 @@ impl ID3D12Device4 { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetResourceAllocationInfo(&self, visiblemask: u32, presourcedescs: &[D3D12_RESOURCE_DESC]) -> D3D12_RESOURCE_ALLOCATION_INFO { let mut result__: D3D12_RESOURCE_ALLOCATION_INFO = ::core::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetResourceAllocationInfo)(::windows_core::Interface::as_raw(self), &mut result__, visiblemask, presourcedescs.len() as _, ::core::mem::transmute(presourcedescs.as_ptr())); + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetResourceAllocationInfo)(::windows_core::Interface::as_raw(self), &mut result__, visiblemask, presourcedescs.len().try_into().unwrap(), ::core::mem::transmute(presourcedescs.as_ptr())); result__ } pub unsafe fn GetCustomHeapProperties(&self, nodemask: u32, heaptype: D3D12_HEAP_TYPE) -> D3D12_HEAP_PROPERTIES { @@ -4071,10 +4071,10 @@ impl ID3D12Device4 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.OpenSharedHandleByName)(::windows_core::Interface::as_raw(self), name.into_param().abi(), access, &mut result__).from_abi(result__) } pub unsafe fn MakeResident(&self, ppobjects: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.MakeResident)(::windows_core::Interface::as_raw(self), ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.MakeResident)(::windows_core::Interface::as_raw(self), ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr())).ok() } pub unsafe fn Evict(&self, ppobjects: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.Evict)(::windows_core::Interface::as_raw(self), ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.Evict)(::windows_core::Interface::as_raw(self), ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr())).ok() } pub unsafe fn CreateFence(&self, initialvalue: u64, flags: D3D12_FENCE_FLAGS) -> ::windows_core::Result where @@ -4130,7 +4130,7 @@ impl ID3D12Device4 { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).base__.base__.base__.CreatePipelineLibrary)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(plibraryblob.as_ptr()), plibraryblob.len() as _, &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.CreatePipelineLibrary)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(plibraryblob.as_ptr()), plibraryblob.len().try_into().unwrap(), &::IID, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -4171,7 +4171,7 @@ impl ID3D12Device4 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.EnqueueMakeResident)(::windows_core::Interface::as_raw(self), flags, ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr()), pfencetosignal.into_param().abi(), fencevaluetosignal).ok() + (::windows_core::Interface::vtable(self).base__.EnqueueMakeResident)(::windows_core::Interface::as_raw(self), flags, ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr()), pfencetosignal.into_param().abi(), fencevaluetosignal).ok() } pub unsafe fn CreateCommandList1(&self, nodemask: u32, r#type: D3D12_COMMAND_LIST_TYPE, flags: D3D12_COMMAND_LIST_FLAGS) -> ::windows_core::Result where @@ -4331,7 +4331,7 @@ impl ID3D12Device5 { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateRootSignature)(::windows_core::Interface::as_raw(self), nodemask, ::core::mem::transmute(pblobwithrootsignature.as_ptr()), pblobwithrootsignature.len() as _, &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateRootSignature)(::windows_core::Interface::as_raw(self), nodemask, ::core::mem::transmute(pblobwithrootsignature.as_ptr()), pblobwithrootsignature.len().try_into().unwrap(), &::IID, &mut result__).from_abi(result__) } pub unsafe fn CreateConstantBufferView(&self, pdesc: ::core::option::Option<*const D3D12_CONSTANT_BUFFER_VIEW_DESC>, destdescriptor: D3D12_CPU_DESCRIPTOR_HANDLE) { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateConstantBufferView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdesc.unwrap_or(::std::ptr::null())), ::core::mem::transmute(destdescriptor)) @@ -4382,7 +4382,7 @@ impl ID3D12Device5 { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetResourceAllocationInfo(&self, visiblemask: u32, presourcedescs: &[D3D12_RESOURCE_DESC]) -> D3D12_RESOURCE_ALLOCATION_INFO { let mut result__: D3D12_RESOURCE_ALLOCATION_INFO = ::core::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetResourceAllocationInfo)(::windows_core::Interface::as_raw(self), &mut result__, visiblemask, presourcedescs.len() as _, ::core::mem::transmute(presourcedescs.as_ptr())); + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetResourceAllocationInfo)(::windows_core::Interface::as_raw(self), &mut result__, visiblemask, presourcedescs.len().try_into().unwrap(), ::core::mem::transmute(presourcedescs.as_ptr())); result__ } pub unsafe fn GetCustomHeapProperties(&self, nodemask: u32, heaptype: D3D12_HEAP_TYPE) -> D3D12_HEAP_PROPERTIES { @@ -4450,10 +4450,10 @@ impl ID3D12Device5 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.OpenSharedHandleByName)(::windows_core::Interface::as_raw(self), name.into_param().abi(), access, &mut result__).from_abi(result__) } pub unsafe fn MakeResident(&self, ppobjects: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.MakeResident)(::windows_core::Interface::as_raw(self), ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.MakeResident)(::windows_core::Interface::as_raw(self), ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr())).ok() } pub unsafe fn Evict(&self, ppobjects: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.Evict)(::windows_core::Interface::as_raw(self), ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.Evict)(::windows_core::Interface::as_raw(self), ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr())).ok() } pub unsafe fn CreateFence(&self, initialvalue: u64, flags: D3D12_FENCE_FLAGS) -> ::windows_core::Result where @@ -4509,7 +4509,7 @@ impl ID3D12Device5 { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreatePipelineLibrary)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(plibraryblob.as_ptr()), plibraryblob.len() as _, &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreatePipelineLibrary)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(plibraryblob.as_ptr()), plibraryblob.len().try_into().unwrap(), &::IID, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -4550,7 +4550,7 @@ impl ID3D12Device5 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.EnqueueMakeResident)(::windows_core::Interface::as_raw(self), flags, ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr()), pfencetosignal.into_param().abi(), fencevaluetosignal).ok() + (::windows_core::Interface::vtable(self).base__.base__.EnqueueMakeResident)(::windows_core::Interface::as_raw(self), flags, ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr()), pfencetosignal.into_param().abi(), fencevaluetosignal).ok() } pub unsafe fn CreateCommandList1(&self, nodemask: u32, r#type: D3D12_COMMAND_LIST_TYPE, flags: D3D12_COMMAND_LIST_FLAGS) -> ::windows_core::Result where @@ -4745,7 +4745,7 @@ impl ID3D12Device6 { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.CreateRootSignature)(::windows_core::Interface::as_raw(self), nodemask, ::core::mem::transmute(pblobwithrootsignature.as_ptr()), pblobwithrootsignature.len() as _, &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.CreateRootSignature)(::windows_core::Interface::as_raw(self), nodemask, ::core::mem::transmute(pblobwithrootsignature.as_ptr()), pblobwithrootsignature.len().try_into().unwrap(), &::IID, &mut result__).from_abi(result__) } pub unsafe fn CreateConstantBufferView(&self, pdesc: ::core::option::Option<*const D3D12_CONSTANT_BUFFER_VIEW_DESC>, destdescriptor: D3D12_CPU_DESCRIPTOR_HANDLE) { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.CreateConstantBufferView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdesc.unwrap_or(::std::ptr::null())), ::core::mem::transmute(destdescriptor)) @@ -4796,7 +4796,7 @@ impl ID3D12Device6 { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetResourceAllocationInfo(&self, visiblemask: u32, presourcedescs: &[D3D12_RESOURCE_DESC]) -> D3D12_RESOURCE_ALLOCATION_INFO { let mut result__: D3D12_RESOURCE_ALLOCATION_INFO = ::core::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetResourceAllocationInfo)(::windows_core::Interface::as_raw(self), &mut result__, visiblemask, presourcedescs.len() as _, ::core::mem::transmute(presourcedescs.as_ptr())); + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetResourceAllocationInfo)(::windows_core::Interface::as_raw(self), &mut result__, visiblemask, presourcedescs.len().try_into().unwrap(), ::core::mem::transmute(presourcedescs.as_ptr())); result__ } pub unsafe fn GetCustomHeapProperties(&self, nodemask: u32, heaptype: D3D12_HEAP_TYPE) -> D3D12_HEAP_PROPERTIES { @@ -4864,10 +4864,10 @@ impl ID3D12Device6 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.OpenSharedHandleByName)(::windows_core::Interface::as_raw(self), name.into_param().abi(), access, &mut result__).from_abi(result__) } pub unsafe fn MakeResident(&self, ppobjects: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.MakeResident)(::windows_core::Interface::as_raw(self), ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.MakeResident)(::windows_core::Interface::as_raw(self), ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr())).ok() } pub unsafe fn Evict(&self, ppobjects: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.Evict)(::windows_core::Interface::as_raw(self), ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.Evict)(::windows_core::Interface::as_raw(self), ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr())).ok() } pub unsafe fn CreateFence(&self, initialvalue: u64, flags: D3D12_FENCE_FLAGS) -> ::windows_core::Result where @@ -4923,7 +4923,7 @@ impl ID3D12Device6 { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreatePipelineLibrary)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(plibraryblob.as_ptr()), plibraryblob.len() as _, &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreatePipelineLibrary)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(plibraryblob.as_ptr()), plibraryblob.len().try_into().unwrap(), &::IID, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -4964,7 +4964,7 @@ impl ID3D12Device6 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.EnqueueMakeResident)(::windows_core::Interface::as_raw(self), flags, ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr()), pfencetosignal.into_param().abi(), fencevaluetosignal).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.EnqueueMakeResident)(::windows_core::Interface::as_raw(self), flags, ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr()), pfencetosignal.into_param().abi(), fencevaluetosignal).ok() } pub unsafe fn CreateCommandList1(&self, nodemask: u32, r#type: D3D12_COMMAND_LIST_TYPE, flags: D3D12_COMMAND_LIST_FLAGS) -> ::windows_core::Result where @@ -5160,7 +5160,7 @@ impl ID3D12Device7 { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.CreateRootSignature)(::windows_core::Interface::as_raw(self), nodemask, ::core::mem::transmute(pblobwithrootsignature.as_ptr()), pblobwithrootsignature.len() as _, &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.CreateRootSignature)(::windows_core::Interface::as_raw(self), nodemask, ::core::mem::transmute(pblobwithrootsignature.as_ptr()), pblobwithrootsignature.len().try_into().unwrap(), &::IID, &mut result__).from_abi(result__) } pub unsafe fn CreateConstantBufferView(&self, pdesc: ::core::option::Option<*const D3D12_CONSTANT_BUFFER_VIEW_DESC>, destdescriptor: D3D12_CPU_DESCRIPTOR_HANDLE) { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.CreateConstantBufferView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdesc.unwrap_or(::std::ptr::null())), ::core::mem::transmute(destdescriptor)) @@ -5211,7 +5211,7 @@ impl ID3D12Device7 { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetResourceAllocationInfo(&self, visiblemask: u32, presourcedescs: &[D3D12_RESOURCE_DESC]) -> D3D12_RESOURCE_ALLOCATION_INFO { let mut result__: D3D12_RESOURCE_ALLOCATION_INFO = ::core::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetResourceAllocationInfo)(::windows_core::Interface::as_raw(self), &mut result__, visiblemask, presourcedescs.len() as _, ::core::mem::transmute(presourcedescs.as_ptr())); + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetResourceAllocationInfo)(::windows_core::Interface::as_raw(self), &mut result__, visiblemask, presourcedescs.len().try_into().unwrap(), ::core::mem::transmute(presourcedescs.as_ptr())); result__ } pub unsafe fn GetCustomHeapProperties(&self, nodemask: u32, heaptype: D3D12_HEAP_TYPE) -> D3D12_HEAP_PROPERTIES { @@ -5279,10 +5279,10 @@ impl ID3D12Device7 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.OpenSharedHandleByName)(::windows_core::Interface::as_raw(self), name.into_param().abi(), access, &mut result__).from_abi(result__) } pub unsafe fn MakeResident(&self, ppobjects: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.MakeResident)(::windows_core::Interface::as_raw(self), ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.MakeResident)(::windows_core::Interface::as_raw(self), ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr())).ok() } pub unsafe fn Evict(&self, ppobjects: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.Evict)(::windows_core::Interface::as_raw(self), ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.Evict)(::windows_core::Interface::as_raw(self), ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr())).ok() } pub unsafe fn CreateFence(&self, initialvalue: u64, flags: D3D12_FENCE_FLAGS) -> ::windows_core::Result where @@ -5338,7 +5338,7 @@ impl ID3D12Device7 { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.CreatePipelineLibrary)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(plibraryblob.as_ptr()), plibraryblob.len() as _, &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.CreatePipelineLibrary)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(plibraryblob.as_ptr()), plibraryblob.len().try_into().unwrap(), &::IID, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -5379,7 +5379,7 @@ impl ID3D12Device7 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.EnqueueMakeResident)(::windows_core::Interface::as_raw(self), flags, ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr()), pfencetosignal.into_param().abi(), fencevaluetosignal).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.EnqueueMakeResident)(::windows_core::Interface::as_raw(self), flags, ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr()), pfencetosignal.into_param().abi(), fencevaluetosignal).ok() } pub unsafe fn CreateCommandList1(&self, nodemask: u32, r#type: D3D12_COMMAND_LIST_TYPE, flags: D3D12_COMMAND_LIST_FLAGS) -> ::windows_core::Result where @@ -5588,7 +5588,7 @@ impl ID3D12Device8 { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.CreateRootSignature)(::windows_core::Interface::as_raw(self), nodemask, ::core::mem::transmute(pblobwithrootsignature.as_ptr()), pblobwithrootsignature.len() as _, &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.CreateRootSignature)(::windows_core::Interface::as_raw(self), nodemask, ::core::mem::transmute(pblobwithrootsignature.as_ptr()), pblobwithrootsignature.len().try_into().unwrap(), &::IID, &mut result__).from_abi(result__) } pub unsafe fn CreateConstantBufferView(&self, pdesc: ::core::option::Option<*const D3D12_CONSTANT_BUFFER_VIEW_DESC>, destdescriptor: D3D12_CPU_DESCRIPTOR_HANDLE) { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.CreateConstantBufferView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdesc.unwrap_or(::std::ptr::null())), ::core::mem::transmute(destdescriptor)) @@ -5639,7 +5639,7 @@ impl ID3D12Device8 { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetResourceAllocationInfo(&self, visiblemask: u32, presourcedescs: &[D3D12_RESOURCE_DESC]) -> D3D12_RESOURCE_ALLOCATION_INFO { let mut result__: D3D12_RESOURCE_ALLOCATION_INFO = ::core::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetResourceAllocationInfo)(::windows_core::Interface::as_raw(self), &mut result__, visiblemask, presourcedescs.len() as _, ::core::mem::transmute(presourcedescs.as_ptr())); + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetResourceAllocationInfo)(::windows_core::Interface::as_raw(self), &mut result__, visiblemask, presourcedescs.len().try_into().unwrap(), ::core::mem::transmute(presourcedescs.as_ptr())); result__ } pub unsafe fn GetCustomHeapProperties(&self, nodemask: u32, heaptype: D3D12_HEAP_TYPE) -> D3D12_HEAP_PROPERTIES { @@ -5707,10 +5707,10 @@ impl ID3D12Device8 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.OpenSharedHandleByName)(::windows_core::Interface::as_raw(self), name.into_param().abi(), access, &mut result__).from_abi(result__) } pub unsafe fn MakeResident(&self, ppobjects: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.MakeResident)(::windows_core::Interface::as_raw(self), ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.MakeResident)(::windows_core::Interface::as_raw(self), ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr())).ok() } pub unsafe fn Evict(&self, ppobjects: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.Evict)(::windows_core::Interface::as_raw(self), ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.Evict)(::windows_core::Interface::as_raw(self), ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr())).ok() } pub unsafe fn CreateFence(&self, initialvalue: u64, flags: D3D12_FENCE_FLAGS) -> ::windows_core::Result where @@ -5766,7 +5766,7 @@ impl ID3D12Device8 { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.CreatePipelineLibrary)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(plibraryblob.as_ptr()), plibraryblob.len() as _, &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.CreatePipelineLibrary)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(plibraryblob.as_ptr()), plibraryblob.len().try_into().unwrap(), &::IID, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -5807,7 +5807,7 @@ impl ID3D12Device8 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.EnqueueMakeResident)(::windows_core::Interface::as_raw(self), flags, ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr()), pfencetosignal.into_param().abi(), fencevaluetosignal).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.EnqueueMakeResident)(::windows_core::Interface::as_raw(self), flags, ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr()), pfencetosignal.into_param().abi(), fencevaluetosignal).ok() } pub unsafe fn CreateCommandList1(&self, nodemask: u32, r#type: D3D12_COMMAND_LIST_TYPE, flags: D3D12_COMMAND_LIST_FLAGS) -> ::windows_core::Result where @@ -6068,7 +6068,7 @@ impl ID3D12Device9 { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.CreateRootSignature)(::windows_core::Interface::as_raw(self), nodemask, ::core::mem::transmute(pblobwithrootsignature.as_ptr()), pblobwithrootsignature.len() as _, &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.CreateRootSignature)(::windows_core::Interface::as_raw(self), nodemask, ::core::mem::transmute(pblobwithrootsignature.as_ptr()), pblobwithrootsignature.len().try_into().unwrap(), &::IID, &mut result__).from_abi(result__) } pub unsafe fn CreateConstantBufferView(&self, pdesc: ::core::option::Option<*const D3D12_CONSTANT_BUFFER_VIEW_DESC>, destdescriptor: D3D12_CPU_DESCRIPTOR_HANDLE) { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.CreateConstantBufferView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdesc.unwrap_or(::std::ptr::null())), ::core::mem::transmute(destdescriptor)) @@ -6119,7 +6119,7 @@ impl ID3D12Device9 { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetResourceAllocationInfo(&self, visiblemask: u32, presourcedescs: &[D3D12_RESOURCE_DESC]) -> D3D12_RESOURCE_ALLOCATION_INFO { let mut result__: D3D12_RESOURCE_ALLOCATION_INFO = ::core::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetResourceAllocationInfo)(::windows_core::Interface::as_raw(self), &mut result__, visiblemask, presourcedescs.len() as _, ::core::mem::transmute(presourcedescs.as_ptr())); + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetResourceAllocationInfo)(::windows_core::Interface::as_raw(self), &mut result__, visiblemask, presourcedescs.len().try_into().unwrap(), ::core::mem::transmute(presourcedescs.as_ptr())); result__ } pub unsafe fn GetCustomHeapProperties(&self, nodemask: u32, heaptype: D3D12_HEAP_TYPE) -> D3D12_HEAP_PROPERTIES { @@ -6187,10 +6187,10 @@ impl ID3D12Device9 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.OpenSharedHandleByName)(::windows_core::Interface::as_raw(self), name.into_param().abi(), access, &mut result__).from_abi(result__) } pub unsafe fn MakeResident(&self, ppobjects: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.MakeResident)(::windows_core::Interface::as_raw(self), ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.MakeResident)(::windows_core::Interface::as_raw(self), ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr())).ok() } pub unsafe fn Evict(&self, ppobjects: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.Evict)(::windows_core::Interface::as_raw(self), ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.Evict)(::windows_core::Interface::as_raw(self), ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr())).ok() } pub unsafe fn CreateFence(&self, initialvalue: u64, flags: D3D12_FENCE_FLAGS) -> ::windows_core::Result where @@ -6246,7 +6246,7 @@ impl ID3D12Device9 { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.CreatePipelineLibrary)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(plibraryblob.as_ptr()), plibraryblob.len() as _, &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.CreatePipelineLibrary)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(plibraryblob.as_ptr()), plibraryblob.len().try_into().unwrap(), &::IID, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -6287,7 +6287,7 @@ impl ID3D12Device9 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.EnqueueMakeResident)(::windows_core::Interface::as_raw(self), flags, ppobjects.len() as _, ::core::mem::transmute(ppobjects.as_ptr()), pfencetosignal.into_param().abi(), fencevaluetosignal).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.EnqueueMakeResident)(::windows_core::Interface::as_raw(self), flags, ppobjects.len().try_into().unwrap(), ::core::mem::transmute(ppobjects.as_ptr()), pfencetosignal.into_param().abi(), fencevaluetosignal).ok() } pub unsafe fn CreateCommandList1(&self, nodemask: u32, r#type: D3D12_COMMAND_LIST_TYPE, flags: D3D12_COMMAND_LIST_FLAGS) -> ::windows_core::Result where @@ -6522,7 +6522,7 @@ impl ID3D12DeviceConfiguration { result__ } pub unsafe fn GetEnabledExperimentalFeatures(&self, pguids: &mut [::windows_core::GUID]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetEnabledExperimentalFeatures)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pguids.as_ptr()), pguids.len() as _).ok() + (::windows_core::Interface::vtable(self).GetEnabledExperimentalFeatures)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pguids.as_ptr()), pguids.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Graphics_Direct3D\"`"] #[cfg(feature = "Win32_Graphics_Direct3D")] @@ -7145,12 +7145,12 @@ impl ID3D12GraphicsCommandList { (::windows_core::Interface::vtable(self).IASetPrimitiveTopology)(::windows_core::Interface::as_raw(self), primitivetopology) } pub unsafe fn RSSetViewports(&self, pviewports: &[D3D12_VIEWPORT]) { - (::windows_core::Interface::vtable(self).RSSetViewports)(::windows_core::Interface::as_raw(self), pviewports.len() as _, ::core::mem::transmute(pviewports.as_ptr())) + (::windows_core::Interface::vtable(self).RSSetViewports)(::windows_core::Interface::as_raw(self), pviewports.len().try_into().unwrap(), ::core::mem::transmute(pviewports.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn RSSetScissorRects(&self, prects: &[super::super::Foundation::RECT]) { - (::windows_core::Interface::vtable(self).RSSetScissorRects)(::windows_core::Interface::as_raw(self), prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).RSSetScissorRects)(::windows_core::Interface::as_raw(self), prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } pub unsafe fn OMSetBlendFactor(&self, blendfactor: ::core::option::Option<&[f32; 4]>) { (::windows_core::Interface::vtable(self).OMSetBlendFactor)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(blendfactor.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) @@ -7165,7 +7165,7 @@ impl ID3D12GraphicsCommandList { (::windows_core::Interface::vtable(self).SetPipelineState)(::windows_core::Interface::as_raw(self), ppipelinestate.into_param().abi()) } pub unsafe fn ResourceBarrier(&self, pbarriers: &[D3D12_RESOURCE_BARRIER]) { - (::windows_core::Interface::vtable(self).ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len() as _, ::core::mem::transmute(pbarriers.as_ptr())) + (::windows_core::Interface::vtable(self).ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len().try_into().unwrap(), ::core::mem::transmute(pbarriers.as_ptr())) } pub unsafe fn ExecuteBundle(&self, pcommandlist: P0) where @@ -7174,7 +7174,7 @@ impl ID3D12GraphicsCommandList { (::windows_core::Interface::vtable(self).ExecuteBundle)(::windows_core::Interface::as_raw(self), pcommandlist.into_param().abi()) } pub unsafe fn SetDescriptorHeaps(&self, ppdescriptorheaps: &[::core::option::Option]) { - (::windows_core::Interface::vtable(self).SetDescriptorHeaps)(::windows_core::Interface::as_raw(self), ppdescriptorheaps.len() as _, ::core::mem::transmute(ppdescriptorheaps.as_ptr())) + (::windows_core::Interface::vtable(self).SetDescriptorHeaps)(::windows_core::Interface::as_raw(self), ppdescriptorheaps.len().try_into().unwrap(), ::core::mem::transmute(ppdescriptorheaps.as_ptr())) } pub unsafe fn SetComputeRootSignature(&self, prootsignature: P0) where @@ -7230,10 +7230,10 @@ impl ID3D12GraphicsCommandList { (::windows_core::Interface::vtable(self).IASetIndexBuffer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pview.unwrap_or(::std::ptr::null()))) } pub unsafe fn IASetVertexBuffers(&self, startslot: u32, pviews: ::core::option::Option<&[D3D12_VERTEX_BUFFER_VIEW]>) { - (::windows_core::Interface::vtable(self).IASetVertexBuffers)(::windows_core::Interface::as_raw(self), startslot, pviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::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()))) } pub unsafe fn SOSetTargets(&self, startslot: u32, pviews: ::core::option::Option<&[D3D12_STREAM_OUTPUT_BUFFER_VIEW]>) { - (::windows_core::Interface::vtable(self).SOSetTargets)(::windows_core::Interface::as_raw(self), startslot, pviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::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()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -7246,12 +7246,12 @@ impl ID3D12GraphicsCommandList { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn ClearDepthStencilView(&self, depthstencilview: D3D12_CPU_DESCRIPTOR_HANDLE, clearflags: D3D12_CLEAR_FLAGS, depth: f32, stencil: u8, prects: &[super::super::Foundation::RECT]) { - (::windows_core::Interface::vtable(self).ClearDepthStencilView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(depthstencilview), clearflags, depth, stencil, prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).ClearDepthStencilView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(depthstencilview), clearflags, depth, stencil, prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn ClearRenderTargetView(&self, rendertargetview: D3D12_CPU_DESCRIPTOR_HANDLE, colorrgba: &[f32; 4], prects: ::core::option::Option<&[super::super::Foundation::RECT]>) { - (::windows_core::Interface::vtable(self).ClearRenderTargetView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rendertargetview), ::core::mem::transmute(colorrgba.as_ptr()), prects.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prects.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).ClearRenderTargetView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rendertargetview), ::core::mem::transmute(colorrgba.as_ptr()), 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()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -7259,7 +7259,7 @@ impl ID3D12GraphicsCommandList { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).ClearUnorderedAccessViewUint)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).ClearUnorderedAccessViewUint)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -7267,7 +7267,7 @@ impl ID3D12GraphicsCommandList { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).ClearUnorderedAccessViewFloat)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).ClearUnorderedAccessViewFloat)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -7520,12 +7520,12 @@ impl ID3D12GraphicsCommandList1 { (::windows_core::Interface::vtable(self).base__.IASetPrimitiveTopology)(::windows_core::Interface::as_raw(self), primitivetopology) } pub unsafe fn RSSetViewports(&self, pviewports: &[D3D12_VIEWPORT]) { - (::windows_core::Interface::vtable(self).base__.RSSetViewports)(::windows_core::Interface::as_raw(self), pviewports.len() as _, ::core::mem::transmute(pviewports.as_ptr())) + (::windows_core::Interface::vtable(self).base__.RSSetViewports)(::windows_core::Interface::as_raw(self), pviewports.len().try_into().unwrap(), ::core::mem::transmute(pviewports.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn RSSetScissorRects(&self, prects: &[super::super::Foundation::RECT]) { - (::windows_core::Interface::vtable(self).base__.RSSetScissorRects)(::windows_core::Interface::as_raw(self), prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.RSSetScissorRects)(::windows_core::Interface::as_raw(self), prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } pub unsafe fn OMSetBlendFactor(&self, blendfactor: ::core::option::Option<&[f32; 4]>) { (::windows_core::Interface::vtable(self).base__.OMSetBlendFactor)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(blendfactor.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) @@ -7540,7 +7540,7 @@ impl ID3D12GraphicsCommandList1 { (::windows_core::Interface::vtable(self).base__.SetPipelineState)(::windows_core::Interface::as_raw(self), ppipelinestate.into_param().abi()) } pub unsafe fn ResourceBarrier(&self, pbarriers: &[D3D12_RESOURCE_BARRIER]) { - (::windows_core::Interface::vtable(self).base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len() as _, ::core::mem::transmute(pbarriers.as_ptr())) + (::windows_core::Interface::vtable(self).base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len().try_into().unwrap(), ::core::mem::transmute(pbarriers.as_ptr())) } pub unsafe fn ExecuteBundle(&self, pcommandlist: P0) where @@ -7549,7 +7549,7 @@ impl ID3D12GraphicsCommandList1 { (::windows_core::Interface::vtable(self).base__.ExecuteBundle)(::windows_core::Interface::as_raw(self), pcommandlist.into_param().abi()) } pub unsafe fn SetDescriptorHeaps(&self, ppdescriptorheaps: &[::core::option::Option]) { - (::windows_core::Interface::vtable(self).base__.SetDescriptorHeaps)(::windows_core::Interface::as_raw(self), ppdescriptorheaps.len() as _, ::core::mem::transmute(ppdescriptorheaps.as_ptr())) + (::windows_core::Interface::vtable(self).base__.SetDescriptorHeaps)(::windows_core::Interface::as_raw(self), ppdescriptorheaps.len().try_into().unwrap(), ::core::mem::transmute(ppdescriptorheaps.as_ptr())) } pub unsafe fn SetComputeRootSignature(&self, prootsignature: P0) where @@ -7605,10 +7605,10 @@ impl ID3D12GraphicsCommandList1 { (::windows_core::Interface::vtable(self).base__.IASetIndexBuffer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pview.unwrap_or(::std::ptr::null()))) } pub unsafe fn IASetVertexBuffers(&self, startslot: u32, pviews: ::core::option::Option<&[D3D12_VERTEX_BUFFER_VIEW]>) { - (::windows_core::Interface::vtable(self).base__.IASetVertexBuffers)(::windows_core::Interface::as_raw(self), startslot, pviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.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()))) } pub unsafe fn SOSetTargets(&self, startslot: u32, pviews: ::core::option::Option<&[D3D12_STREAM_OUTPUT_BUFFER_VIEW]>) { - (::windows_core::Interface::vtable(self).base__.SOSetTargets)(::windows_core::Interface::as_raw(self), startslot, pviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.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()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -7621,12 +7621,12 @@ impl ID3D12GraphicsCommandList1 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn ClearDepthStencilView(&self, depthstencilview: D3D12_CPU_DESCRIPTOR_HANDLE, clearflags: D3D12_CLEAR_FLAGS, depth: f32, stencil: u8, prects: &[super::super::Foundation::RECT]) { - (::windows_core::Interface::vtable(self).base__.ClearDepthStencilView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(depthstencilview), clearflags, depth, stencil, prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.ClearDepthStencilView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(depthstencilview), clearflags, depth, stencil, prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn ClearRenderTargetView(&self, rendertargetview: D3D12_CPU_DESCRIPTOR_HANDLE, colorrgba: &[f32; 4], prects: ::core::option::Option<&[super::super::Foundation::RECT]>) { - (::windows_core::Interface::vtable(self).base__.ClearRenderTargetView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rendertargetview), ::core::mem::transmute(colorrgba.as_ptr()), prects.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prects.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.ClearRenderTargetView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rendertargetview), ::core::mem::transmute(colorrgba.as_ptr()), 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()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -7634,7 +7634,7 @@ impl ID3D12GraphicsCommandList1 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.ClearUnorderedAccessViewUint)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.ClearUnorderedAccessViewUint)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -7642,7 +7642,7 @@ impl ID3D12GraphicsCommandList1 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.ClearUnorderedAccessViewFloat)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.ClearUnorderedAccessViewFloat)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -7849,12 +7849,12 @@ impl ID3D12GraphicsCommandList2 { (::windows_core::Interface::vtable(self).base__.base__.IASetPrimitiveTopology)(::windows_core::Interface::as_raw(self), primitivetopology) } pub unsafe fn RSSetViewports(&self, pviewports: &[D3D12_VIEWPORT]) { - (::windows_core::Interface::vtable(self).base__.base__.RSSetViewports)(::windows_core::Interface::as_raw(self), pviewports.len() as _, ::core::mem::transmute(pviewports.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.RSSetViewports)(::windows_core::Interface::as_raw(self), pviewports.len().try_into().unwrap(), ::core::mem::transmute(pviewports.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn RSSetScissorRects(&self, prects: &[super::super::Foundation::RECT]) { - (::windows_core::Interface::vtable(self).base__.base__.RSSetScissorRects)(::windows_core::Interface::as_raw(self), prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.RSSetScissorRects)(::windows_core::Interface::as_raw(self), prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } pub unsafe fn OMSetBlendFactor(&self, blendfactor: ::core::option::Option<&[f32; 4]>) { (::windows_core::Interface::vtable(self).base__.base__.OMSetBlendFactor)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(blendfactor.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) @@ -7869,7 +7869,7 @@ impl ID3D12GraphicsCommandList2 { (::windows_core::Interface::vtable(self).base__.base__.SetPipelineState)(::windows_core::Interface::as_raw(self), ppipelinestate.into_param().abi()) } pub unsafe fn ResourceBarrier(&self, pbarriers: &[D3D12_RESOURCE_BARRIER]) { - (::windows_core::Interface::vtable(self).base__.base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len() as _, ::core::mem::transmute(pbarriers.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len().try_into().unwrap(), ::core::mem::transmute(pbarriers.as_ptr())) } pub unsafe fn ExecuteBundle(&self, pcommandlist: P0) where @@ -7878,7 +7878,7 @@ impl ID3D12GraphicsCommandList2 { (::windows_core::Interface::vtable(self).base__.base__.ExecuteBundle)(::windows_core::Interface::as_raw(self), pcommandlist.into_param().abi()) } pub unsafe fn SetDescriptorHeaps(&self, ppdescriptorheaps: &[::core::option::Option]) { - (::windows_core::Interface::vtable(self).base__.base__.SetDescriptorHeaps)(::windows_core::Interface::as_raw(self), ppdescriptorheaps.len() as _, ::core::mem::transmute(ppdescriptorheaps.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.SetDescriptorHeaps)(::windows_core::Interface::as_raw(self), ppdescriptorheaps.len().try_into().unwrap(), ::core::mem::transmute(ppdescriptorheaps.as_ptr())) } pub unsafe fn SetComputeRootSignature(&self, prootsignature: P0) where @@ -7934,10 +7934,10 @@ impl ID3D12GraphicsCommandList2 { (::windows_core::Interface::vtable(self).base__.base__.IASetIndexBuffer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pview.unwrap_or(::std::ptr::null()))) } pub unsafe fn IASetVertexBuffers(&self, startslot: u32, pviews: ::core::option::Option<&[D3D12_VERTEX_BUFFER_VIEW]>) { - (::windows_core::Interface::vtable(self).base__.base__.IASetVertexBuffers)(::windows_core::Interface::as_raw(self), startslot, pviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.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()))) } pub unsafe fn SOSetTargets(&self, startslot: u32, pviews: ::core::option::Option<&[D3D12_STREAM_OUTPUT_BUFFER_VIEW]>) { - (::windows_core::Interface::vtable(self).base__.base__.SOSetTargets)(::windows_core::Interface::as_raw(self), startslot, pviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.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()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -7950,12 +7950,12 @@ impl ID3D12GraphicsCommandList2 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn ClearDepthStencilView(&self, depthstencilview: D3D12_CPU_DESCRIPTOR_HANDLE, clearflags: D3D12_CLEAR_FLAGS, depth: f32, stencil: u8, prects: &[super::super::Foundation::RECT]) { - (::windows_core::Interface::vtable(self).base__.base__.ClearDepthStencilView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(depthstencilview), clearflags, depth, stencil, prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.ClearDepthStencilView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(depthstencilview), clearflags, depth, stencil, prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn ClearRenderTargetView(&self, rendertargetview: D3D12_CPU_DESCRIPTOR_HANDLE, colorrgba: &[f32; 4], prects: ::core::option::Option<&[super::super::Foundation::RECT]>) { - (::windows_core::Interface::vtable(self).base__.base__.ClearRenderTargetView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rendertargetview), ::core::mem::transmute(colorrgba.as_ptr()), prects.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prects.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.ClearRenderTargetView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rendertargetview), ::core::mem::transmute(colorrgba.as_ptr()), 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()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -7963,7 +7963,7 @@ impl ID3D12GraphicsCommandList2 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.ClearUnorderedAccessViewUint)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.ClearUnorderedAccessViewUint)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -7971,7 +7971,7 @@ impl ID3D12GraphicsCommandList2 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.ClearUnorderedAccessViewFloat)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.ClearUnorderedAccessViewFloat)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -8173,12 +8173,12 @@ impl ID3D12GraphicsCommandList3 { (::windows_core::Interface::vtable(self).base__.base__.base__.IASetPrimitiveTopology)(::windows_core::Interface::as_raw(self), primitivetopology) } pub unsafe fn RSSetViewports(&self, pviewports: &[D3D12_VIEWPORT]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.RSSetViewports)(::windows_core::Interface::as_raw(self), pviewports.len() as _, ::core::mem::transmute(pviewports.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.RSSetViewports)(::windows_core::Interface::as_raw(self), pviewports.len().try_into().unwrap(), ::core::mem::transmute(pviewports.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn RSSetScissorRects(&self, prects: &[super::super::Foundation::RECT]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.RSSetScissorRects)(::windows_core::Interface::as_raw(self), prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.RSSetScissorRects)(::windows_core::Interface::as_raw(self), prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } pub unsafe fn OMSetBlendFactor(&self, blendfactor: ::core::option::Option<&[f32; 4]>) { (::windows_core::Interface::vtable(self).base__.base__.base__.OMSetBlendFactor)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(blendfactor.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) @@ -8193,7 +8193,7 @@ impl ID3D12GraphicsCommandList3 { (::windows_core::Interface::vtable(self).base__.base__.base__.SetPipelineState)(::windows_core::Interface::as_raw(self), ppipelinestate.into_param().abi()) } pub unsafe fn ResourceBarrier(&self, pbarriers: &[D3D12_RESOURCE_BARRIER]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len() as _, ::core::mem::transmute(pbarriers.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len().try_into().unwrap(), ::core::mem::transmute(pbarriers.as_ptr())) } pub unsafe fn ExecuteBundle(&self, pcommandlist: P0) where @@ -8202,7 +8202,7 @@ impl ID3D12GraphicsCommandList3 { (::windows_core::Interface::vtable(self).base__.base__.base__.ExecuteBundle)(::windows_core::Interface::as_raw(self), pcommandlist.into_param().abi()) } pub unsafe fn SetDescriptorHeaps(&self, ppdescriptorheaps: &[::core::option::Option]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.SetDescriptorHeaps)(::windows_core::Interface::as_raw(self), ppdescriptorheaps.len() as _, ::core::mem::transmute(ppdescriptorheaps.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.SetDescriptorHeaps)(::windows_core::Interface::as_raw(self), ppdescriptorheaps.len().try_into().unwrap(), ::core::mem::transmute(ppdescriptorheaps.as_ptr())) } pub unsafe fn SetComputeRootSignature(&self, prootsignature: P0) where @@ -8258,10 +8258,10 @@ impl ID3D12GraphicsCommandList3 { (::windows_core::Interface::vtable(self).base__.base__.base__.IASetIndexBuffer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pview.unwrap_or(::std::ptr::null()))) } pub unsafe fn IASetVertexBuffers(&self, startslot: u32, pviews: ::core::option::Option<&[D3D12_VERTEX_BUFFER_VIEW]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.IASetVertexBuffers)(::windows_core::Interface::as_raw(self), startslot, pviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.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()))) } pub unsafe fn SOSetTargets(&self, startslot: u32, pviews: ::core::option::Option<&[D3D12_STREAM_OUTPUT_BUFFER_VIEW]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.SOSetTargets)(::windows_core::Interface::as_raw(self), startslot, pviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.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()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -8274,12 +8274,12 @@ impl ID3D12GraphicsCommandList3 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn ClearDepthStencilView(&self, depthstencilview: D3D12_CPU_DESCRIPTOR_HANDLE, clearflags: D3D12_CLEAR_FLAGS, depth: f32, stencil: u8, prects: &[super::super::Foundation::RECT]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.ClearDepthStencilView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(depthstencilview), clearflags, depth, stencil, prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.ClearDepthStencilView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(depthstencilview), clearflags, depth, stencil, prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn ClearRenderTargetView(&self, rendertargetview: D3D12_CPU_DESCRIPTOR_HANDLE, colorrgba: &[f32; 4], prects: ::core::option::Option<&[super::super::Foundation::RECT]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.ClearRenderTargetView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rendertargetview), ::core::mem::transmute(colorrgba.as_ptr()), prects.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prects.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.ClearRenderTargetView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rendertargetview), ::core::mem::transmute(colorrgba.as_ptr()), 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()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -8287,7 +8287,7 @@ impl ID3D12GraphicsCommandList3 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.ClearUnorderedAccessViewUint)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.ClearUnorderedAccessViewUint)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -8295,7 +8295,7 @@ impl ID3D12GraphicsCommandList3 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.ClearUnorderedAccessViewFloat)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.ClearUnorderedAccessViewFloat)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -8503,12 +8503,12 @@ impl ID3D12GraphicsCommandList4 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.IASetPrimitiveTopology)(::windows_core::Interface::as_raw(self), primitivetopology) } pub unsafe fn RSSetViewports(&self, pviewports: &[D3D12_VIEWPORT]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.RSSetViewports)(::windows_core::Interface::as_raw(self), pviewports.len() as _, ::core::mem::transmute(pviewports.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.RSSetViewports)(::windows_core::Interface::as_raw(self), pviewports.len().try_into().unwrap(), ::core::mem::transmute(pviewports.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn RSSetScissorRects(&self, prects: &[super::super::Foundation::RECT]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.RSSetScissorRects)(::windows_core::Interface::as_raw(self), prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.RSSetScissorRects)(::windows_core::Interface::as_raw(self), prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } pub unsafe fn OMSetBlendFactor(&self, blendfactor: ::core::option::Option<&[f32; 4]>) { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.OMSetBlendFactor)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(blendfactor.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) @@ -8523,7 +8523,7 @@ impl ID3D12GraphicsCommandList4 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.SetPipelineState)(::windows_core::Interface::as_raw(self), ppipelinestate.into_param().abi()) } pub unsafe fn ResourceBarrier(&self, pbarriers: &[D3D12_RESOURCE_BARRIER]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len() as _, ::core::mem::transmute(pbarriers.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len().try_into().unwrap(), ::core::mem::transmute(pbarriers.as_ptr())) } pub unsafe fn ExecuteBundle(&self, pcommandlist: P0) where @@ -8532,7 +8532,7 @@ impl ID3D12GraphicsCommandList4 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.ExecuteBundle)(::windows_core::Interface::as_raw(self), pcommandlist.into_param().abi()) } pub unsafe fn SetDescriptorHeaps(&self, ppdescriptorheaps: &[::core::option::Option]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.SetDescriptorHeaps)(::windows_core::Interface::as_raw(self), ppdescriptorheaps.len() as _, ::core::mem::transmute(ppdescriptorheaps.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.SetDescriptorHeaps)(::windows_core::Interface::as_raw(self), ppdescriptorheaps.len().try_into().unwrap(), ::core::mem::transmute(ppdescriptorheaps.as_ptr())) } pub unsafe fn SetComputeRootSignature(&self, prootsignature: P0) where @@ -8588,10 +8588,10 @@ impl ID3D12GraphicsCommandList4 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.IASetIndexBuffer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pview.unwrap_or(::std::ptr::null()))) } pub unsafe fn IASetVertexBuffers(&self, startslot: u32, pviews: ::core::option::Option<&[D3D12_VERTEX_BUFFER_VIEW]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.IASetVertexBuffers)(::windows_core::Interface::as_raw(self), startslot, pviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.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()))) } pub unsafe fn SOSetTargets(&self, startslot: u32, pviews: ::core::option::Option<&[D3D12_STREAM_OUTPUT_BUFFER_VIEW]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.SOSetTargets)(::windows_core::Interface::as_raw(self), startslot, pviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.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()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -8604,12 +8604,12 @@ impl ID3D12GraphicsCommandList4 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn ClearDepthStencilView(&self, depthstencilview: D3D12_CPU_DESCRIPTOR_HANDLE, clearflags: D3D12_CLEAR_FLAGS, depth: f32, stencil: u8, prects: &[super::super::Foundation::RECT]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.ClearDepthStencilView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(depthstencilview), clearflags, depth, stencil, prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.ClearDepthStencilView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(depthstencilview), clearflags, depth, stencil, prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn ClearRenderTargetView(&self, rendertargetview: D3D12_CPU_DESCRIPTOR_HANDLE, colorrgba: &[f32; 4], prects: ::core::option::Option<&[super::super::Foundation::RECT]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.ClearRenderTargetView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rendertargetview), ::core::mem::transmute(colorrgba.as_ptr()), prects.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prects.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.ClearRenderTargetView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rendertargetview), ::core::mem::transmute(colorrgba.as_ptr()), 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()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -8617,7 +8617,7 @@ impl ID3D12GraphicsCommandList4 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.ClearUnorderedAccessViewUint)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.ClearUnorderedAccessViewUint)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -8625,7 +8625,7 @@ impl ID3D12GraphicsCommandList4 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.ClearUnorderedAccessViewFloat)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.ClearUnorderedAccessViewFloat)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -8721,7 +8721,7 @@ impl ID3D12GraphicsCommandList4 { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Dxgi_Common"))] pub unsafe fn BeginRenderPass(&self, prendertargets: ::core::option::Option<&[D3D12_RENDER_PASS_RENDER_TARGET_DESC]>, pdepthstencil: ::core::option::Option<*const D3D12_RENDER_PASS_DEPTH_STENCIL_DESC>, flags: D3D12_RENDER_PASS_FLAGS) { - (::windows_core::Interface::vtable(self).BeginRenderPass)(::windows_core::Interface::as_raw(self), prendertargets.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prendertargets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(pdepthstencil.unwrap_or(::std::ptr::null())), flags) + (::windows_core::Interface::vtable(self).BeginRenderPass)(::windows_core::Interface::as_raw(self), prendertargets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(prendertargets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(pdepthstencil.unwrap_or(::std::ptr::null())), flags) } pub unsafe fn EndRenderPass(&self) { (::windows_core::Interface::vtable(self).EndRenderPass)(::windows_core::Interface::as_raw(self)) @@ -8741,10 +8741,10 @@ impl ID3D12GraphicsCommandList4 { #[doc = "Required features: `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn BuildRaytracingAccelerationStructure(&self, pdesc: *const D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC, ppostbuildinfodescs: ::core::option::Option<&[D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC]>) { - (::windows_core::Interface::vtable(self).BuildRaytracingAccelerationStructure)(::windows_core::Interface::as_raw(self), pdesc, ppostbuildinfodescs.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppostbuildinfodescs.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).BuildRaytracingAccelerationStructure)(::windows_core::Interface::as_raw(self), pdesc, ppostbuildinfodescs.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(ppostbuildinfodescs.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } pub unsafe fn EmitRaytracingAccelerationStructurePostbuildInfo(&self, pdesc: *const D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC, psourceaccelerationstructuredata: &[u64]) { - (::windows_core::Interface::vtable(self).EmitRaytracingAccelerationStructurePostbuildInfo)(::windows_core::Interface::as_raw(self), pdesc, psourceaccelerationstructuredata.len() as _, ::core::mem::transmute(psourceaccelerationstructuredata.as_ptr())) + (::windows_core::Interface::vtable(self).EmitRaytracingAccelerationStructurePostbuildInfo)(::windows_core::Interface::as_raw(self), pdesc, psourceaccelerationstructuredata.len().try_into().unwrap(), ::core::mem::transmute(psourceaccelerationstructuredata.as_ptr())) } pub unsafe fn CopyRaytracingAccelerationStructure(&self, destaccelerationstructuredata: u64, sourceaccelerationstructuredata: u64, mode: D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE) { (::windows_core::Interface::vtable(self).CopyRaytracingAccelerationStructure)(::windows_core::Interface::as_raw(self), destaccelerationstructuredata, sourceaccelerationstructuredata, mode) @@ -8887,12 +8887,12 @@ impl ID3D12GraphicsCommandList5 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.IASetPrimitiveTopology)(::windows_core::Interface::as_raw(self), primitivetopology) } pub unsafe fn RSSetViewports(&self, pviewports: &[D3D12_VIEWPORT]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.RSSetViewports)(::windows_core::Interface::as_raw(self), pviewports.len() as _, ::core::mem::transmute(pviewports.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.RSSetViewports)(::windows_core::Interface::as_raw(self), pviewports.len().try_into().unwrap(), ::core::mem::transmute(pviewports.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn RSSetScissorRects(&self, prects: &[super::super::Foundation::RECT]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.RSSetScissorRects)(::windows_core::Interface::as_raw(self), prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.RSSetScissorRects)(::windows_core::Interface::as_raw(self), prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } pub unsafe fn OMSetBlendFactor(&self, blendfactor: ::core::option::Option<&[f32; 4]>) { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.OMSetBlendFactor)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(blendfactor.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) @@ -8907,7 +8907,7 @@ impl ID3D12GraphicsCommandList5 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.SetPipelineState)(::windows_core::Interface::as_raw(self), ppipelinestate.into_param().abi()) } pub unsafe fn ResourceBarrier(&self, pbarriers: &[D3D12_RESOURCE_BARRIER]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len() as _, ::core::mem::transmute(pbarriers.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len().try_into().unwrap(), ::core::mem::transmute(pbarriers.as_ptr())) } pub unsafe fn ExecuteBundle(&self, pcommandlist: P0) where @@ -8916,7 +8916,7 @@ impl ID3D12GraphicsCommandList5 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.ExecuteBundle)(::windows_core::Interface::as_raw(self), pcommandlist.into_param().abi()) } pub unsafe fn SetDescriptorHeaps(&self, ppdescriptorheaps: &[::core::option::Option]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.SetDescriptorHeaps)(::windows_core::Interface::as_raw(self), ppdescriptorheaps.len() as _, ::core::mem::transmute(ppdescriptorheaps.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.SetDescriptorHeaps)(::windows_core::Interface::as_raw(self), ppdescriptorheaps.len().try_into().unwrap(), ::core::mem::transmute(ppdescriptorheaps.as_ptr())) } pub unsafe fn SetComputeRootSignature(&self, prootsignature: P0) where @@ -8972,10 +8972,10 @@ impl ID3D12GraphicsCommandList5 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.IASetIndexBuffer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pview.unwrap_or(::std::ptr::null()))) } pub unsafe fn IASetVertexBuffers(&self, startslot: u32, pviews: ::core::option::Option<&[D3D12_VERTEX_BUFFER_VIEW]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.IASetVertexBuffers)(::windows_core::Interface::as_raw(self), startslot, pviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.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()))) } pub unsafe fn SOSetTargets(&self, startslot: u32, pviews: ::core::option::Option<&[D3D12_STREAM_OUTPUT_BUFFER_VIEW]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.SOSetTargets)(::windows_core::Interface::as_raw(self), startslot, pviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.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()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -8988,12 +8988,12 @@ impl ID3D12GraphicsCommandList5 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn ClearDepthStencilView(&self, depthstencilview: D3D12_CPU_DESCRIPTOR_HANDLE, clearflags: D3D12_CLEAR_FLAGS, depth: f32, stencil: u8, prects: &[super::super::Foundation::RECT]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.ClearDepthStencilView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(depthstencilview), clearflags, depth, stencil, prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.ClearDepthStencilView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(depthstencilview), clearflags, depth, stencil, prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn ClearRenderTargetView(&self, rendertargetview: D3D12_CPU_DESCRIPTOR_HANDLE, colorrgba: &[f32; 4], prects: ::core::option::Option<&[super::super::Foundation::RECT]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.ClearRenderTargetView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rendertargetview), ::core::mem::transmute(colorrgba.as_ptr()), prects.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prects.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.ClearRenderTargetView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rendertargetview), ::core::mem::transmute(colorrgba.as_ptr()), 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()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -9001,7 +9001,7 @@ impl ID3D12GraphicsCommandList5 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.ClearUnorderedAccessViewUint)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.ClearUnorderedAccessViewUint)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -9009,7 +9009,7 @@ impl ID3D12GraphicsCommandList5 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.ClearUnorderedAccessViewFloat)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.ClearUnorderedAccessViewFloat)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -9105,7 +9105,7 @@ impl ID3D12GraphicsCommandList5 { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Dxgi_Common"))] pub unsafe fn BeginRenderPass(&self, prendertargets: ::core::option::Option<&[D3D12_RENDER_PASS_RENDER_TARGET_DESC]>, pdepthstencil: ::core::option::Option<*const D3D12_RENDER_PASS_DEPTH_STENCIL_DESC>, flags: D3D12_RENDER_PASS_FLAGS) { - (::windows_core::Interface::vtable(self).base__.BeginRenderPass)(::windows_core::Interface::as_raw(self), prendertargets.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prendertargets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(pdepthstencil.unwrap_or(::std::ptr::null())), flags) + (::windows_core::Interface::vtable(self).base__.BeginRenderPass)(::windows_core::Interface::as_raw(self), prendertargets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(prendertargets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(pdepthstencil.unwrap_or(::std::ptr::null())), flags) } pub unsafe fn EndRenderPass(&self) { (::windows_core::Interface::vtable(self).base__.EndRenderPass)(::windows_core::Interface::as_raw(self)) @@ -9125,10 +9125,10 @@ impl ID3D12GraphicsCommandList5 { #[doc = "Required features: `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn BuildRaytracingAccelerationStructure(&self, pdesc: *const D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC, ppostbuildinfodescs: ::core::option::Option<&[D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC]>) { - (::windows_core::Interface::vtable(self).base__.BuildRaytracingAccelerationStructure)(::windows_core::Interface::as_raw(self), pdesc, ppostbuildinfodescs.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppostbuildinfodescs.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.BuildRaytracingAccelerationStructure)(::windows_core::Interface::as_raw(self), pdesc, ppostbuildinfodescs.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(ppostbuildinfodescs.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } pub unsafe fn EmitRaytracingAccelerationStructurePostbuildInfo(&self, pdesc: *const D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC, psourceaccelerationstructuredata: &[u64]) { - (::windows_core::Interface::vtable(self).base__.EmitRaytracingAccelerationStructurePostbuildInfo)(::windows_core::Interface::as_raw(self), pdesc, psourceaccelerationstructuredata.len() as _, ::core::mem::transmute(psourceaccelerationstructuredata.as_ptr())) + (::windows_core::Interface::vtable(self).base__.EmitRaytracingAccelerationStructurePostbuildInfo)(::windows_core::Interface::as_raw(self), pdesc, psourceaccelerationstructuredata.len().try_into().unwrap(), ::core::mem::transmute(psourceaccelerationstructuredata.as_ptr())) } pub unsafe fn CopyRaytracingAccelerationStructure(&self, destaccelerationstructuredata: u64, sourceaccelerationstructuredata: u64, mode: D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE) { (::windows_core::Interface::vtable(self).base__.CopyRaytracingAccelerationStructure)(::windows_core::Interface::as_raw(self), destaccelerationstructuredata, sourceaccelerationstructuredata, mode) @@ -9267,12 +9267,12 @@ impl ID3D12GraphicsCommandList6 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.IASetPrimitiveTopology)(::windows_core::Interface::as_raw(self), primitivetopology) } pub unsafe fn RSSetViewports(&self, pviewports: &[D3D12_VIEWPORT]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.RSSetViewports)(::windows_core::Interface::as_raw(self), pviewports.len() as _, ::core::mem::transmute(pviewports.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.RSSetViewports)(::windows_core::Interface::as_raw(self), pviewports.len().try_into().unwrap(), ::core::mem::transmute(pviewports.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn RSSetScissorRects(&self, prects: &[super::super::Foundation::RECT]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.RSSetScissorRects)(::windows_core::Interface::as_raw(self), prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.RSSetScissorRects)(::windows_core::Interface::as_raw(self), prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } pub unsafe fn OMSetBlendFactor(&self, blendfactor: ::core::option::Option<&[f32; 4]>) { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.OMSetBlendFactor)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(blendfactor.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) @@ -9287,7 +9287,7 @@ impl ID3D12GraphicsCommandList6 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.SetPipelineState)(::windows_core::Interface::as_raw(self), ppipelinestate.into_param().abi()) } pub unsafe fn ResourceBarrier(&self, pbarriers: &[D3D12_RESOURCE_BARRIER]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len() as _, ::core::mem::transmute(pbarriers.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len().try_into().unwrap(), ::core::mem::transmute(pbarriers.as_ptr())) } pub unsafe fn ExecuteBundle(&self, pcommandlist: P0) where @@ -9296,7 +9296,7 @@ impl ID3D12GraphicsCommandList6 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.ExecuteBundle)(::windows_core::Interface::as_raw(self), pcommandlist.into_param().abi()) } pub unsafe fn SetDescriptorHeaps(&self, ppdescriptorheaps: &[::core::option::Option]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.SetDescriptorHeaps)(::windows_core::Interface::as_raw(self), ppdescriptorheaps.len() as _, ::core::mem::transmute(ppdescriptorheaps.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.SetDescriptorHeaps)(::windows_core::Interface::as_raw(self), ppdescriptorheaps.len().try_into().unwrap(), ::core::mem::transmute(ppdescriptorheaps.as_ptr())) } pub unsafe fn SetComputeRootSignature(&self, prootsignature: P0) where @@ -9352,10 +9352,10 @@ impl ID3D12GraphicsCommandList6 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.IASetIndexBuffer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pview.unwrap_or(::std::ptr::null()))) } pub unsafe fn IASetVertexBuffers(&self, startslot: u32, pviews: ::core::option::Option<&[D3D12_VERTEX_BUFFER_VIEW]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.IASetVertexBuffers)(::windows_core::Interface::as_raw(self), startslot, pviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.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()))) } pub unsafe fn SOSetTargets(&self, startslot: u32, pviews: ::core::option::Option<&[D3D12_STREAM_OUTPUT_BUFFER_VIEW]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.SOSetTargets)(::windows_core::Interface::as_raw(self), startslot, pviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.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()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -9368,12 +9368,12 @@ impl ID3D12GraphicsCommandList6 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn ClearDepthStencilView(&self, depthstencilview: D3D12_CPU_DESCRIPTOR_HANDLE, clearflags: D3D12_CLEAR_FLAGS, depth: f32, stencil: u8, prects: &[super::super::Foundation::RECT]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.ClearDepthStencilView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(depthstencilview), clearflags, depth, stencil, prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.ClearDepthStencilView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(depthstencilview), clearflags, depth, stencil, prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn ClearRenderTargetView(&self, rendertargetview: D3D12_CPU_DESCRIPTOR_HANDLE, colorrgba: &[f32; 4], prects: ::core::option::Option<&[super::super::Foundation::RECT]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.ClearRenderTargetView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rendertargetview), ::core::mem::transmute(colorrgba.as_ptr()), prects.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prects.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.ClearRenderTargetView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rendertargetview), ::core::mem::transmute(colorrgba.as_ptr()), 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()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -9381,7 +9381,7 @@ impl ID3D12GraphicsCommandList6 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.ClearUnorderedAccessViewUint)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.ClearUnorderedAccessViewUint)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -9389,7 +9389,7 @@ impl ID3D12GraphicsCommandList6 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.ClearUnorderedAccessViewFloat)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.ClearUnorderedAccessViewFloat)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -9485,7 +9485,7 @@ impl ID3D12GraphicsCommandList6 { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Dxgi_Common"))] pub unsafe fn BeginRenderPass(&self, prendertargets: ::core::option::Option<&[D3D12_RENDER_PASS_RENDER_TARGET_DESC]>, pdepthstencil: ::core::option::Option<*const D3D12_RENDER_PASS_DEPTH_STENCIL_DESC>, flags: D3D12_RENDER_PASS_FLAGS) { - (::windows_core::Interface::vtable(self).base__.base__.BeginRenderPass)(::windows_core::Interface::as_raw(self), prendertargets.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prendertargets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(pdepthstencil.unwrap_or(::std::ptr::null())), flags) + (::windows_core::Interface::vtable(self).base__.base__.BeginRenderPass)(::windows_core::Interface::as_raw(self), prendertargets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(prendertargets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(pdepthstencil.unwrap_or(::std::ptr::null())), flags) } pub unsafe fn EndRenderPass(&self) { (::windows_core::Interface::vtable(self).base__.base__.EndRenderPass)(::windows_core::Interface::as_raw(self)) @@ -9505,10 +9505,10 @@ impl ID3D12GraphicsCommandList6 { #[doc = "Required features: `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn BuildRaytracingAccelerationStructure(&self, pdesc: *const D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC, ppostbuildinfodescs: ::core::option::Option<&[D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC]>) { - (::windows_core::Interface::vtable(self).base__.base__.BuildRaytracingAccelerationStructure)(::windows_core::Interface::as_raw(self), pdesc, ppostbuildinfodescs.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppostbuildinfodescs.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.BuildRaytracingAccelerationStructure)(::windows_core::Interface::as_raw(self), pdesc, ppostbuildinfodescs.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(ppostbuildinfodescs.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } pub unsafe fn EmitRaytracingAccelerationStructurePostbuildInfo(&self, pdesc: *const D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC, psourceaccelerationstructuredata: &[u64]) { - (::windows_core::Interface::vtable(self).base__.base__.EmitRaytracingAccelerationStructurePostbuildInfo)(::windows_core::Interface::as_raw(self), pdesc, psourceaccelerationstructuredata.len() as _, ::core::mem::transmute(psourceaccelerationstructuredata.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.EmitRaytracingAccelerationStructurePostbuildInfo)(::windows_core::Interface::as_raw(self), pdesc, psourceaccelerationstructuredata.len().try_into().unwrap(), ::core::mem::transmute(psourceaccelerationstructuredata.as_ptr())) } pub unsafe fn CopyRaytracingAccelerationStructure(&self, destaccelerationstructuredata: u64, sourceaccelerationstructuredata: u64, mode: D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE) { (::windows_core::Interface::vtable(self).base__.base__.CopyRaytracingAccelerationStructure)(::windows_core::Interface::as_raw(self), destaccelerationstructuredata, sourceaccelerationstructuredata, mode) @@ -9649,12 +9649,12 @@ impl ID3D12GraphicsCommandList7 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.IASetPrimitiveTopology)(::windows_core::Interface::as_raw(self), primitivetopology) } pub unsafe fn RSSetViewports(&self, pviewports: &[D3D12_VIEWPORT]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.RSSetViewports)(::windows_core::Interface::as_raw(self), pviewports.len() as _, ::core::mem::transmute(pviewports.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.RSSetViewports)(::windows_core::Interface::as_raw(self), pviewports.len().try_into().unwrap(), ::core::mem::transmute(pviewports.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn RSSetScissorRects(&self, prects: &[super::super::Foundation::RECT]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.RSSetScissorRects)(::windows_core::Interface::as_raw(self), prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.RSSetScissorRects)(::windows_core::Interface::as_raw(self), prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } pub unsafe fn OMSetBlendFactor(&self, blendfactor: ::core::option::Option<&[f32; 4]>) { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.OMSetBlendFactor)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(blendfactor.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) @@ -9669,7 +9669,7 @@ impl ID3D12GraphicsCommandList7 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.SetPipelineState)(::windows_core::Interface::as_raw(self), ppipelinestate.into_param().abi()) } pub unsafe fn ResourceBarrier(&self, pbarriers: &[D3D12_RESOURCE_BARRIER]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len() as _, ::core::mem::transmute(pbarriers.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len().try_into().unwrap(), ::core::mem::transmute(pbarriers.as_ptr())) } pub unsafe fn ExecuteBundle(&self, pcommandlist: P0) where @@ -9678,7 +9678,7 @@ impl ID3D12GraphicsCommandList7 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.ExecuteBundle)(::windows_core::Interface::as_raw(self), pcommandlist.into_param().abi()) } pub unsafe fn SetDescriptorHeaps(&self, ppdescriptorheaps: &[::core::option::Option]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.SetDescriptorHeaps)(::windows_core::Interface::as_raw(self), ppdescriptorheaps.len() as _, ::core::mem::transmute(ppdescriptorheaps.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.SetDescriptorHeaps)(::windows_core::Interface::as_raw(self), ppdescriptorheaps.len().try_into().unwrap(), ::core::mem::transmute(ppdescriptorheaps.as_ptr())) } pub unsafe fn SetComputeRootSignature(&self, prootsignature: P0) where @@ -9734,10 +9734,10 @@ impl ID3D12GraphicsCommandList7 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.IASetIndexBuffer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pview.unwrap_or(::std::ptr::null()))) } pub unsafe fn IASetVertexBuffers(&self, startslot: u32, pviews: ::core::option::Option<&[D3D12_VERTEX_BUFFER_VIEW]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.IASetVertexBuffers)(::windows_core::Interface::as_raw(self), startslot, pviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.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()))) } pub unsafe fn SOSetTargets(&self, startslot: u32, pviews: ::core::option::Option<&[D3D12_STREAM_OUTPUT_BUFFER_VIEW]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.SOSetTargets)(::windows_core::Interface::as_raw(self), startslot, pviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.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()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -9750,12 +9750,12 @@ impl ID3D12GraphicsCommandList7 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn ClearDepthStencilView(&self, depthstencilview: D3D12_CPU_DESCRIPTOR_HANDLE, clearflags: D3D12_CLEAR_FLAGS, depth: f32, stencil: u8, prects: &[super::super::Foundation::RECT]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.ClearDepthStencilView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(depthstencilview), clearflags, depth, stencil, prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.ClearDepthStencilView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(depthstencilview), clearflags, depth, stencil, prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn ClearRenderTargetView(&self, rendertargetview: D3D12_CPU_DESCRIPTOR_HANDLE, colorrgba: &[f32; 4], prects: ::core::option::Option<&[super::super::Foundation::RECT]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.ClearRenderTargetView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rendertargetview), ::core::mem::transmute(colorrgba.as_ptr()), prects.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prects.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.ClearRenderTargetView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rendertargetview), ::core::mem::transmute(colorrgba.as_ptr()), 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()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -9763,7 +9763,7 @@ impl ID3D12GraphicsCommandList7 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.ClearUnorderedAccessViewUint)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.ClearUnorderedAccessViewUint)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -9771,7 +9771,7 @@ impl ID3D12GraphicsCommandList7 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.ClearUnorderedAccessViewFloat)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.ClearUnorderedAccessViewFloat)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -9867,7 +9867,7 @@ impl ID3D12GraphicsCommandList7 { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Dxgi_Common"))] pub unsafe fn BeginRenderPass(&self, prendertargets: ::core::option::Option<&[D3D12_RENDER_PASS_RENDER_TARGET_DESC]>, pdepthstencil: ::core::option::Option<*const D3D12_RENDER_PASS_DEPTH_STENCIL_DESC>, flags: D3D12_RENDER_PASS_FLAGS) { - (::windows_core::Interface::vtable(self).base__.base__.base__.BeginRenderPass)(::windows_core::Interface::as_raw(self), prendertargets.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prendertargets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(pdepthstencil.unwrap_or(::std::ptr::null())), flags) + (::windows_core::Interface::vtable(self).base__.base__.base__.BeginRenderPass)(::windows_core::Interface::as_raw(self), prendertargets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(prendertargets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(pdepthstencil.unwrap_or(::std::ptr::null())), flags) } pub unsafe fn EndRenderPass(&self) { (::windows_core::Interface::vtable(self).base__.base__.base__.EndRenderPass)(::windows_core::Interface::as_raw(self)) @@ -9887,10 +9887,10 @@ impl ID3D12GraphicsCommandList7 { #[doc = "Required features: `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn BuildRaytracingAccelerationStructure(&self, pdesc: *const D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC, ppostbuildinfodescs: ::core::option::Option<&[D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.BuildRaytracingAccelerationStructure)(::windows_core::Interface::as_raw(self), pdesc, ppostbuildinfodescs.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppostbuildinfodescs.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.BuildRaytracingAccelerationStructure)(::windows_core::Interface::as_raw(self), pdesc, ppostbuildinfodescs.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(ppostbuildinfodescs.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } pub unsafe fn EmitRaytracingAccelerationStructurePostbuildInfo(&self, pdesc: *const D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC, psourceaccelerationstructuredata: &[u64]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.EmitRaytracingAccelerationStructurePostbuildInfo)(::windows_core::Interface::as_raw(self), pdesc, psourceaccelerationstructuredata.len() as _, ::core::mem::transmute(psourceaccelerationstructuredata.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.EmitRaytracingAccelerationStructurePostbuildInfo)(::windows_core::Interface::as_raw(self), pdesc, psourceaccelerationstructuredata.len().try_into().unwrap(), ::core::mem::transmute(psourceaccelerationstructuredata.as_ptr())) } pub unsafe fn CopyRaytracingAccelerationStructure(&self, destaccelerationstructuredata: u64, sourceaccelerationstructuredata: u64, mode: D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE) { (::windows_core::Interface::vtable(self).base__.base__.base__.CopyRaytracingAccelerationStructure)(::windows_core::Interface::as_raw(self), destaccelerationstructuredata, sourceaccelerationstructuredata, mode) @@ -9917,7 +9917,7 @@ impl ID3D12GraphicsCommandList7 { (::windows_core::Interface::vtable(self).base__.DispatchMesh)(::windows_core::Interface::as_raw(self), threadgroupcountx, threadgroupcounty, threadgroupcountz) } pub unsafe fn Barrier(&self, pbarriergroups: &[D3D12_BARRIER_GROUP]) { - (::windows_core::Interface::vtable(self).Barrier)(::windows_core::Interface::as_raw(self), pbarriergroups.len() as _, ::core::mem::transmute(pbarriergroups.as_ptr())) + (::windows_core::Interface::vtable(self).Barrier)(::windows_core::Interface::as_raw(self), pbarriergroups.len().try_into().unwrap(), ::core::mem::transmute(pbarriergroups.as_ptr())) } } ::windows_core::imp::interface_hierarchy!(ID3D12GraphicsCommandList7, ::windows_core::IUnknown, ID3D12Object, ID3D12DeviceChild, ID3D12CommandList, ID3D12GraphicsCommandList, ID3D12GraphicsCommandList1, ID3D12GraphicsCommandList2, ID3D12GraphicsCommandList3, ID3D12GraphicsCommandList4, ID3D12GraphicsCommandList5, ID3D12GraphicsCommandList6); @@ -10034,12 +10034,12 @@ impl ID3D12GraphicsCommandList8 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.IASetPrimitiveTopology)(::windows_core::Interface::as_raw(self), primitivetopology) } pub unsafe fn RSSetViewports(&self, pviewports: &[D3D12_VIEWPORT]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.RSSetViewports)(::windows_core::Interface::as_raw(self), pviewports.len() as _, ::core::mem::transmute(pviewports.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.RSSetViewports)(::windows_core::Interface::as_raw(self), pviewports.len().try_into().unwrap(), ::core::mem::transmute(pviewports.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn RSSetScissorRects(&self, prects: &[super::super::Foundation::RECT]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.RSSetScissorRects)(::windows_core::Interface::as_raw(self), prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.RSSetScissorRects)(::windows_core::Interface::as_raw(self), prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } pub unsafe fn OMSetBlendFactor(&self, blendfactor: ::core::option::Option<&[f32; 4]>) { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.OMSetBlendFactor)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(blendfactor.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) @@ -10054,7 +10054,7 @@ impl ID3D12GraphicsCommandList8 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.SetPipelineState)(::windows_core::Interface::as_raw(self), ppipelinestate.into_param().abi()) } pub unsafe fn ResourceBarrier(&self, pbarriers: &[D3D12_RESOURCE_BARRIER]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len() as _, ::core::mem::transmute(pbarriers.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len().try_into().unwrap(), ::core::mem::transmute(pbarriers.as_ptr())) } pub unsafe fn ExecuteBundle(&self, pcommandlist: P0) where @@ -10063,7 +10063,7 @@ impl ID3D12GraphicsCommandList8 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.ExecuteBundle)(::windows_core::Interface::as_raw(self), pcommandlist.into_param().abi()) } pub unsafe fn SetDescriptorHeaps(&self, ppdescriptorheaps: &[::core::option::Option]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.SetDescriptorHeaps)(::windows_core::Interface::as_raw(self), ppdescriptorheaps.len() as _, ::core::mem::transmute(ppdescriptorheaps.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.SetDescriptorHeaps)(::windows_core::Interface::as_raw(self), ppdescriptorheaps.len().try_into().unwrap(), ::core::mem::transmute(ppdescriptorheaps.as_ptr())) } pub unsafe fn SetComputeRootSignature(&self, prootsignature: P0) where @@ -10119,10 +10119,10 @@ impl ID3D12GraphicsCommandList8 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.IASetIndexBuffer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pview.unwrap_or(::std::ptr::null()))) } pub unsafe fn IASetVertexBuffers(&self, startslot: u32, pviews: ::core::option::Option<&[D3D12_VERTEX_BUFFER_VIEW]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.IASetVertexBuffers)(::windows_core::Interface::as_raw(self), startslot, pviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.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()))) } pub unsafe fn SOSetTargets(&self, startslot: u32, pviews: ::core::option::Option<&[D3D12_STREAM_OUTPUT_BUFFER_VIEW]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.SOSetTargets)(::windows_core::Interface::as_raw(self), startslot, pviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.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()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -10135,12 +10135,12 @@ impl ID3D12GraphicsCommandList8 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn ClearDepthStencilView(&self, depthstencilview: D3D12_CPU_DESCRIPTOR_HANDLE, clearflags: D3D12_CLEAR_FLAGS, depth: f32, stencil: u8, prects: &[super::super::Foundation::RECT]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.ClearDepthStencilView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(depthstencilview), clearflags, depth, stencil, prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.ClearDepthStencilView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(depthstencilview), clearflags, depth, stencil, prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn ClearRenderTargetView(&self, rendertargetview: D3D12_CPU_DESCRIPTOR_HANDLE, colorrgba: &[f32; 4], prects: ::core::option::Option<&[super::super::Foundation::RECT]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.ClearRenderTargetView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rendertargetview), ::core::mem::transmute(colorrgba.as_ptr()), prects.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prects.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.ClearRenderTargetView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rendertargetview), ::core::mem::transmute(colorrgba.as_ptr()), 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()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -10148,7 +10148,7 @@ impl ID3D12GraphicsCommandList8 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.ClearUnorderedAccessViewUint)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.ClearUnorderedAccessViewUint)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -10156,7 +10156,7 @@ impl ID3D12GraphicsCommandList8 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.ClearUnorderedAccessViewFloat)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.ClearUnorderedAccessViewFloat)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -10252,7 +10252,7 @@ impl ID3D12GraphicsCommandList8 { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Dxgi_Common"))] pub unsafe fn BeginRenderPass(&self, prendertargets: ::core::option::Option<&[D3D12_RENDER_PASS_RENDER_TARGET_DESC]>, pdepthstencil: ::core::option::Option<*const D3D12_RENDER_PASS_DEPTH_STENCIL_DESC>, flags: D3D12_RENDER_PASS_FLAGS) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.BeginRenderPass)(::windows_core::Interface::as_raw(self), prendertargets.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prendertargets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(pdepthstencil.unwrap_or(::std::ptr::null())), flags) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.BeginRenderPass)(::windows_core::Interface::as_raw(self), prendertargets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(prendertargets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(pdepthstencil.unwrap_or(::std::ptr::null())), flags) } pub unsafe fn EndRenderPass(&self) { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.EndRenderPass)(::windows_core::Interface::as_raw(self)) @@ -10272,10 +10272,10 @@ impl ID3D12GraphicsCommandList8 { #[doc = "Required features: `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn BuildRaytracingAccelerationStructure(&self, pdesc: *const D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC, ppostbuildinfodescs: ::core::option::Option<&[D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.BuildRaytracingAccelerationStructure)(::windows_core::Interface::as_raw(self), pdesc, ppostbuildinfodescs.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppostbuildinfodescs.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.BuildRaytracingAccelerationStructure)(::windows_core::Interface::as_raw(self), pdesc, ppostbuildinfodescs.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(ppostbuildinfodescs.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } pub unsafe fn EmitRaytracingAccelerationStructurePostbuildInfo(&self, pdesc: *const D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC, psourceaccelerationstructuredata: &[u64]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.EmitRaytracingAccelerationStructurePostbuildInfo)(::windows_core::Interface::as_raw(self), pdesc, psourceaccelerationstructuredata.len() as _, ::core::mem::transmute(psourceaccelerationstructuredata.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.EmitRaytracingAccelerationStructurePostbuildInfo)(::windows_core::Interface::as_raw(self), pdesc, psourceaccelerationstructuredata.len().try_into().unwrap(), ::core::mem::transmute(psourceaccelerationstructuredata.as_ptr())) } pub unsafe fn CopyRaytracingAccelerationStructure(&self, destaccelerationstructuredata: u64, sourceaccelerationstructuredata: u64, mode: D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE) { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CopyRaytracingAccelerationStructure)(::windows_core::Interface::as_raw(self), destaccelerationstructuredata, sourceaccelerationstructuredata, mode) @@ -10302,7 +10302,7 @@ impl ID3D12GraphicsCommandList8 { (::windows_core::Interface::vtable(self).base__.base__.DispatchMesh)(::windows_core::Interface::as_raw(self), threadgroupcountx, threadgroupcounty, threadgroupcountz) } pub unsafe fn Barrier(&self, pbarriergroups: &[D3D12_BARRIER_GROUP]) { - (::windows_core::Interface::vtable(self).base__.Barrier)(::windows_core::Interface::as_raw(self), pbarriergroups.len() as _, ::core::mem::transmute(pbarriergroups.as_ptr())) + (::windows_core::Interface::vtable(self).base__.Barrier)(::windows_core::Interface::as_raw(self), pbarriergroups.len().try_into().unwrap(), ::core::mem::transmute(pbarriergroups.as_ptr())) } pub unsafe fn OMSetFrontAndBackStencilRef(&self, frontstencilref: u32, backstencilref: u32) { (::windows_core::Interface::vtable(self).OMSetFrontAndBackStencilRef)(::windows_core::Interface::as_raw(self), frontstencilref, backstencilref) @@ -10422,12 +10422,12 @@ impl ID3D12GraphicsCommandList9 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.IASetPrimitiveTopology)(::windows_core::Interface::as_raw(self), primitivetopology) } pub unsafe fn RSSetViewports(&self, pviewports: &[D3D12_VIEWPORT]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.RSSetViewports)(::windows_core::Interface::as_raw(self), pviewports.len() as _, ::core::mem::transmute(pviewports.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.RSSetViewports)(::windows_core::Interface::as_raw(self), pviewports.len().try_into().unwrap(), ::core::mem::transmute(pviewports.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn RSSetScissorRects(&self, prects: &[super::super::Foundation::RECT]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.RSSetScissorRects)(::windows_core::Interface::as_raw(self), prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.RSSetScissorRects)(::windows_core::Interface::as_raw(self), prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } pub unsafe fn OMSetBlendFactor(&self, blendfactor: ::core::option::Option<&[f32; 4]>) { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.OMSetBlendFactor)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(blendfactor.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) @@ -10442,7 +10442,7 @@ impl ID3D12GraphicsCommandList9 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.SetPipelineState)(::windows_core::Interface::as_raw(self), ppipelinestate.into_param().abi()) } pub unsafe fn ResourceBarrier(&self, pbarriers: &[D3D12_RESOURCE_BARRIER]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len() as _, ::core::mem::transmute(pbarriers.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len().try_into().unwrap(), ::core::mem::transmute(pbarriers.as_ptr())) } pub unsafe fn ExecuteBundle(&self, pcommandlist: P0) where @@ -10451,7 +10451,7 @@ impl ID3D12GraphicsCommandList9 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.ExecuteBundle)(::windows_core::Interface::as_raw(self), pcommandlist.into_param().abi()) } pub unsafe fn SetDescriptorHeaps(&self, ppdescriptorheaps: &[::core::option::Option]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.SetDescriptorHeaps)(::windows_core::Interface::as_raw(self), ppdescriptorheaps.len() as _, ::core::mem::transmute(ppdescriptorheaps.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.SetDescriptorHeaps)(::windows_core::Interface::as_raw(self), ppdescriptorheaps.len().try_into().unwrap(), ::core::mem::transmute(ppdescriptorheaps.as_ptr())) } pub unsafe fn SetComputeRootSignature(&self, prootsignature: P0) where @@ -10507,10 +10507,10 @@ impl ID3D12GraphicsCommandList9 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.IASetIndexBuffer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pview.unwrap_or(::std::ptr::null()))) } pub unsafe fn IASetVertexBuffers(&self, startslot: u32, pviews: ::core::option::Option<&[D3D12_VERTEX_BUFFER_VIEW]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.IASetVertexBuffers)(::windows_core::Interface::as_raw(self), startslot, pviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.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()))) } pub unsafe fn SOSetTargets(&self, startslot: u32, pviews: ::core::option::Option<&[D3D12_STREAM_OUTPUT_BUFFER_VIEW]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.SOSetTargets)(::windows_core::Interface::as_raw(self), startslot, pviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.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()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -10523,12 +10523,12 @@ impl ID3D12GraphicsCommandList9 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn ClearDepthStencilView(&self, depthstencilview: D3D12_CPU_DESCRIPTOR_HANDLE, clearflags: D3D12_CLEAR_FLAGS, depth: f32, stencil: u8, prects: &[super::super::Foundation::RECT]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.ClearDepthStencilView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(depthstencilview), clearflags, depth, stencil, prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.ClearDepthStencilView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(depthstencilview), clearflags, depth, stencil, prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn ClearRenderTargetView(&self, rendertargetview: D3D12_CPU_DESCRIPTOR_HANDLE, colorrgba: &[f32; 4], prects: ::core::option::Option<&[super::super::Foundation::RECT]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.ClearRenderTargetView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rendertargetview), ::core::mem::transmute(colorrgba.as_ptr()), prects.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prects.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.ClearRenderTargetView)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rendertargetview), ::core::mem::transmute(colorrgba.as_ptr()), 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()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -10536,7 +10536,7 @@ impl ID3D12GraphicsCommandList9 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.ClearUnorderedAccessViewUint)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.ClearUnorderedAccessViewUint)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -10544,7 +10544,7 @@ impl ID3D12GraphicsCommandList9 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.ClearUnorderedAccessViewFloat)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len() as _, ::core::mem::transmute(prects.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.ClearUnorderedAccessViewFloat)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(viewgpuhandleincurrentheap), ::core::mem::transmute(viewcpuhandle), presource.into_param().abi(), ::core::mem::transmute(values.as_ptr()), prects.len().try_into().unwrap(), ::core::mem::transmute(prects.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -10640,7 +10640,7 @@ impl ID3D12GraphicsCommandList9 { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Dxgi_Common"))] pub unsafe fn BeginRenderPass(&self, prendertargets: ::core::option::Option<&[D3D12_RENDER_PASS_RENDER_TARGET_DESC]>, pdepthstencil: ::core::option::Option<*const D3D12_RENDER_PASS_DEPTH_STENCIL_DESC>, flags: D3D12_RENDER_PASS_FLAGS) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.BeginRenderPass)(::windows_core::Interface::as_raw(self), prendertargets.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prendertargets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(pdepthstencil.unwrap_or(::std::ptr::null())), flags) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.BeginRenderPass)(::windows_core::Interface::as_raw(self), prendertargets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(prendertargets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(pdepthstencil.unwrap_or(::std::ptr::null())), flags) } pub unsafe fn EndRenderPass(&self) { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.EndRenderPass)(::windows_core::Interface::as_raw(self)) @@ -10660,10 +10660,10 @@ impl ID3D12GraphicsCommandList9 { #[doc = "Required features: `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn BuildRaytracingAccelerationStructure(&self, pdesc: *const D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC, ppostbuildinfodescs: ::core::option::Option<&[D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC]>) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.BuildRaytracingAccelerationStructure)(::windows_core::Interface::as_raw(self), pdesc, ppostbuildinfodescs.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppostbuildinfodescs.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.BuildRaytracingAccelerationStructure)(::windows_core::Interface::as_raw(self), pdesc, ppostbuildinfodescs.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(ppostbuildinfodescs.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } pub unsafe fn EmitRaytracingAccelerationStructurePostbuildInfo(&self, pdesc: *const D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC, psourceaccelerationstructuredata: &[u64]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.EmitRaytracingAccelerationStructurePostbuildInfo)(::windows_core::Interface::as_raw(self), pdesc, psourceaccelerationstructuredata.len() as _, ::core::mem::transmute(psourceaccelerationstructuredata.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.EmitRaytracingAccelerationStructurePostbuildInfo)(::windows_core::Interface::as_raw(self), pdesc, psourceaccelerationstructuredata.len().try_into().unwrap(), ::core::mem::transmute(psourceaccelerationstructuredata.as_ptr())) } pub unsafe fn CopyRaytracingAccelerationStructure(&self, destaccelerationstructuredata: u64, sourceaccelerationstructuredata: u64, mode: D3D12_RAYTRACING_ACCELERATION_STRUCTURE_COPY_MODE) { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CopyRaytracingAccelerationStructure)(::windows_core::Interface::as_raw(self), destaccelerationstructuredata, sourceaccelerationstructuredata, mode) @@ -10690,7 +10690,7 @@ impl ID3D12GraphicsCommandList9 { (::windows_core::Interface::vtable(self).base__.base__.base__.DispatchMesh)(::windows_core::Interface::as_raw(self), threadgroupcountx, threadgroupcounty, threadgroupcountz) } pub unsafe fn Barrier(&self, pbarriergroups: &[D3D12_BARRIER_GROUP]) { - (::windows_core::Interface::vtable(self).base__.base__.Barrier)(::windows_core::Interface::as_raw(self), pbarriergroups.len() as _, ::core::mem::transmute(pbarriergroups.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.Barrier)(::windows_core::Interface::as_raw(self), pbarriergroups.len().try_into().unwrap(), ::core::mem::transmute(pbarriergroups.as_ptr())) } pub unsafe fn OMSetFrontAndBackStencilRef(&self, frontstencilref: u32, backstencilref: u32) { (::windows_core::Interface::vtable(self).base__.OMSetFrontAndBackStencilRef)(::windows_core::Interface::as_raw(self), frontstencilref, backstencilref) @@ -11517,7 +11517,7 @@ impl ID3D12PipelineLibrary { (::windows_core::Interface::vtable(self).GetSerializedSize)(::windows_core::Interface::as_raw(self)) } pub unsafe fn Serialize(&self, pdata: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Serialize)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdata.as_ptr()), pdata.len() as _).ok() + (::windows_core::Interface::vtable(self).Serialize)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(ID3D12PipelineLibrary, ::windows_core::IUnknown, ID3D12Object, ID3D12DeviceChild); @@ -11599,7 +11599,7 @@ impl ID3D12PipelineLibrary1 { (::windows_core::Interface::vtable(self).base__.GetSerializedSize)(::windows_core::Interface::as_raw(self)) } pub unsafe fn Serialize(&self, pdata: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.Serialize)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdata.as_ptr()), pdata.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.Serialize)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap()).ok() } pub unsafe fn LoadPipeline(&self, pname: P0, pdesc: *const D3D12_PIPELINE_STATE_STREAM_DESC) -> ::windows_core::Result where diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/DirectComposition/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/DirectComposition/mod.rs index 15c95363b1..967864bac4 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/DirectComposition/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/DirectComposition/mod.rs @@ -97,7 +97,7 @@ pub unsafe fn DCompositionGetTargetStatistics(frameid: u64, targetid: *const COM #[inline] pub unsafe fn DCompositionWaitForCompositorClock(handles: ::core::option::Option<&[super::super::Foundation::HANDLE]>, timeoutinms: u32) -> u32 { ::windows_targets::link!("dcomp.dll" "system" fn DCompositionWaitForCompositorClock(count : u32, handles : *const super::super::Foundation:: HANDLE, timeoutinms : u32) -> u32); - DCompositionWaitForCompositorClock(handles.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(handles.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), timeoutinms) + DCompositionWaitForCompositorClock(handles.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(handles.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), timeoutinms) } #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] @@ -535,11 +535,11 @@ pub struct IDCompositionDelegatedInkTrail(::windows_core::IUnknown); impl IDCompositionDelegatedInkTrail { pub unsafe fn AddTrailPoints(&self, inkpoints: &[DCompositionInkTrailPoint]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).AddTrailPoints)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(inkpoints.as_ptr()), inkpoints.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).AddTrailPoints)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(inkpoints.as_ptr()), inkpoints.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn AddTrailPointsWithPrediction(&self, inkpoints: &[DCompositionInkTrailPoint], predictedinkpoints: &[DCompositionInkTrailPoint]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).AddTrailPointsWithPrediction)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(inkpoints.as_ptr()), inkpoints.len() as _, ::core::mem::transmute(predictedinkpoints.as_ptr()), predictedinkpoints.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).AddTrailPointsWithPrediction)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(inkpoints.as_ptr()), inkpoints.len().try_into().unwrap(), ::core::mem::transmute(predictedinkpoints.as_ptr()), predictedinkpoints.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn RemoveTrailPoints(&self, generationid: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).RemoveTrailPoints)(::windows_core::Interface::as_raw(self), generationid).ok() @@ -629,7 +629,7 @@ impl IDCompositionDesktopDevice { } pub unsafe fn CreateTransformGroup(&self, transforms: &[::core::option::Option]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.CreateTransformGroup)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(transforms.as_ptr()), transforms.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateTransformGroup)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(transforms.as_ptr()), transforms.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn CreateTranslateTransform3D(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -649,7 +649,7 @@ impl IDCompositionDesktopDevice { } pub unsafe fn CreateTransform3DGroup(&self, transforms3d: &[::core::option::Option]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.CreateTransform3DGroup)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(transforms3d.as_ptr()), transforms3d.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateTransform3DGroup)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(transforms3d.as_ptr()), transforms3d.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn CreateEffectGroup(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -797,7 +797,7 @@ impl IDCompositionDevice { } pub unsafe fn CreateTransformGroup(&self, transforms: &[::core::option::Option]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateTransformGroup)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(transforms.as_ptr()), transforms.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateTransformGroup)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(transforms.as_ptr()), transforms.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn CreateTranslateTransform3D(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -817,7 +817,7 @@ impl IDCompositionDevice { } pub unsafe fn CreateTransform3DGroup(&self, transforms3d: &[::core::option::Option]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateTransform3DGroup)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(transforms3d.as_ptr()), transforms3d.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateTransform3DGroup)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(transforms3d.as_ptr()), transforms3d.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn CreateEffectGroup(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -955,7 +955,7 @@ impl IDCompositionDevice2 { } pub unsafe fn CreateTransformGroup(&self, transforms: &[::core::option::Option]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateTransformGroup)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(transforms.as_ptr()), transforms.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateTransformGroup)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(transforms.as_ptr()), transforms.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn CreateTranslateTransform3D(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -975,7 +975,7 @@ impl IDCompositionDevice2 { } pub unsafe fn CreateTransform3DGroup(&self, transforms3d: &[::core::option::Option]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateTransform3DGroup)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(transforms3d.as_ptr()), transforms3d.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateTransform3DGroup)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(transforms3d.as_ptr()), transforms3d.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn CreateEffectGroup(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1092,7 +1092,7 @@ impl IDCompositionDevice3 { } pub unsafe fn CreateTransformGroup(&self, transforms: &[::core::option::Option]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.CreateTransformGroup)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(transforms.as_ptr()), transforms.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateTransformGroup)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(transforms.as_ptr()), transforms.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn CreateTranslateTransform3D(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1112,7 +1112,7 @@ impl IDCompositionDevice3 { } pub unsafe fn CreateTransform3DGroup(&self, transforms3d: &[::core::option::Option]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.CreateTransform3DGroup)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(transforms3d.as_ptr()), transforms3d.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateTransform3DGroup)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(transforms3d.as_ptr()), transforms3d.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn CreateEffectGroup(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -2374,16 +2374,16 @@ impl IDCompositionTableTransferEffect { (::windows_core::Interface::vtable(self).base__.SetInput)(::windows_core::Interface::as_raw(self), index, input.into_param().abi(), flags).ok() } pub unsafe fn SetRedTable(&self, tablevalues: &[f32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetRedTable)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(tablevalues.as_ptr()), tablevalues.len() as _).ok() + (::windows_core::Interface::vtable(self).SetRedTable)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(tablevalues.as_ptr()), tablevalues.len().try_into().unwrap()).ok() } pub unsafe fn SetGreenTable(&self, tablevalues: &[f32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetGreenTable)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(tablevalues.as_ptr()), tablevalues.len() as _).ok() + (::windows_core::Interface::vtable(self).SetGreenTable)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(tablevalues.as_ptr()), tablevalues.len().try_into().unwrap()).ok() } pub unsafe fn SetBlueTable(&self, tablevalues: &[f32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetBlueTable)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(tablevalues.as_ptr()), tablevalues.len() as _).ok() + (::windows_core::Interface::vtable(self).SetBlueTable)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(tablevalues.as_ptr()), tablevalues.len().try_into().unwrap()).ok() } pub unsafe fn SetAlphaTable(&self, tablevalues: &[f32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetAlphaTable)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(tablevalues.as_ptr()), tablevalues.len() as _).ok() + (::windows_core::Interface::vtable(self).SetAlphaTable)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(tablevalues.as_ptr()), tablevalues.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2763,7 +2763,7 @@ impl IDCompositionVirtualSurface { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn Trim(&self, rectangles: ::core::option::Option<&[super::super::Foundation::RECT]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Trim)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rectangles.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), rectangles.as_deref().map_or(0, |slice| slice.len() as _)).ok() + (::windows_core::Interface::vtable(self).Trim)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rectangles.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), rectangles.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } } ::windows_core::imp::interface_hierarchy!(IDCompositionVirtualSurface, ::windows_core::IUnknown, IDCompositionSurface); 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 856093675c..53418b4787 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/DirectManipulation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/DirectManipulation/mod.rs @@ -150,13 +150,13 @@ impl IDirectManipulationContent { (::windows_core::Interface::vtable(self).SetTag)(::windows_core::Interface::as_raw(self), object.into_param().abi(), id).ok() } pub unsafe fn GetOutputTransform(&self, matrix: &mut [f32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetOutputTransform)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(matrix.as_ptr()), matrix.len() as _).ok() + (::windows_core::Interface::vtable(self).GetOutputTransform)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(matrix.as_ptr()), matrix.len().try_into().unwrap()).ok() } pub unsafe fn GetContentTransform(&self, matrix: &mut [f32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetContentTransform)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(matrix.as_ptr()), matrix.len() as _).ok() + (::windows_core::Interface::vtable(self).GetContentTransform)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(matrix.as_ptr()), matrix.len().try_into().unwrap()).ok() } pub unsafe fn SyncContentTransform(&self, matrix: &[f32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SyncContentTransform)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(matrix.as_ptr()), matrix.len() as _).ok() + (::windows_core::Interface::vtable(self).SyncContentTransform)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(matrix.as_ptr()), matrix.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(IDirectManipulationContent, ::windows_core::IUnknown); @@ -584,7 +584,7 @@ impl IDirectManipulationPrimaryContent { (::windows_core::Interface::vtable(self).SetSnapInterval)(::windows_core::Interface::as_raw(self), motion, interval, offset).ok() } pub unsafe fn SetSnapPoints(&self, motion: DIRECTMANIPULATION_MOTION_TYPES, points: ::core::option::Option<&[f32]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetSnapPoints)(::windows_core::Interface::as_raw(self), motion, ::core::mem::transmute(points.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), points.as_deref().map_or(0, |slice| slice.len() as _)).ok() + (::windows_core::Interface::vtable(self).SetSnapPoints)(::windows_core::Interface::as_raw(self), motion, ::core::mem::transmute(points.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), points.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } pub unsafe fn SetSnapType(&self, motion: DIRECTMANIPULATION_MOTION_TYPES, r#type: DIRECTMANIPULATION_SNAPPOINT_TYPE) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).SetSnapType)(::windows_core::Interface::as_raw(self), motion, r#type).ok() @@ -602,7 +602,7 @@ impl IDirectManipulationPrimaryContent { (::windows_core::Interface::vtable(self).SetVerticalAlignment)(::windows_core::Interface::as_raw(self), alignment).ok() } pub unsafe fn GetInertiaEndTransform(&self, matrix: &mut [f32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetInertiaEndTransform)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(matrix.as_ptr()), matrix.len() as _).ok() + (::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<()> { (::windows_core::Interface::vtable(self).GetCenterPoint)(::windows_core::Interface::as_raw(self), centerx, centery).ok() @@ -747,10 +747,10 @@ impl IDirectManipulationViewport { (::windows_core::Interface::vtable(self).ZoomToRect)(::windows_core::Interface::as_raw(self), left, top, right, bottom, animate.into_param().abi()).ok() } pub unsafe fn SetViewportTransform(&self, matrix: &[f32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetViewportTransform)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(matrix.as_ptr()), matrix.len() as _).ok() + (::windows_core::Interface::vtable(self).SetViewportTransform)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(matrix.as_ptr()), matrix.len().try_into().unwrap()).ok() } pub unsafe fn SyncDisplayTransform(&self, matrix: &[f32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SyncDisplayTransform)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(matrix.as_ptr()), matrix.len() as _).ok() + (::windows_core::Interface::vtable(self).SyncDisplayTransform)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(matrix.as_ptr()), matrix.len().try_into().unwrap()).ok() } pub unsafe fn GetPrimaryContent(&self) -> ::windows_core::Result where @@ -922,10 +922,10 @@ impl IDirectManipulationViewport2 { (::windows_core::Interface::vtable(self).base__.ZoomToRect)(::windows_core::Interface::as_raw(self), left, top, right, bottom, animate.into_param().abi()).ok() } pub unsafe fn SetViewportTransform(&self, matrix: &[f32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetViewportTransform)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(matrix.as_ptr()), matrix.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.SetViewportTransform)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(matrix.as_ptr()), matrix.len().try_into().unwrap()).ok() } pub unsafe fn SyncDisplayTransform(&self, matrix: &[f32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SyncDisplayTransform)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(matrix.as_ptr()), matrix.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.SyncDisplayTransform)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(matrix.as_ptr()), matrix.len().try_into().unwrap()).ok() } pub unsafe fn GetPrimaryContent(&self) -> ::windows_core::Result where diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/DirectWrite/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/DirectWrite/mod.rs index 9c212a4c32..c888ec83f9 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/DirectWrite/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/DirectWrite/mod.rs @@ -301,7 +301,7 @@ impl IDWriteFactory { } pub unsafe fn CreateFontFace(&self, fontfacetype: DWRITE_FONT_FACE_TYPE, fontfiles: &[::core::option::Option], faceindex: u32, fontfacesimulationflags: DWRITE_FONT_SIMULATIONS) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateFontFace)(::windows_core::Interface::as_raw(self), fontfacetype, fontfiles.len() as _, ::core::mem::transmute(fontfiles.as_ptr()), faceindex, fontfacesimulationflags, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateFontFace)(::windows_core::Interface::as_raw(self), fontfacetype, fontfiles.len().try_into().unwrap(), ::core::mem::transmute(fontfiles.as_ptr()), faceindex, fontfacesimulationflags, &mut result__).from_abi(result__) } pub unsafe fn CreateRenderingParams(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -354,7 +354,7 @@ impl IDWriteFactory { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateTextLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len() as _, textformat.into_param().abi(), maxwidth, maxheight, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateTextLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.into_param().abi(), maxwidth, maxheight, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -364,7 +364,7 @@ impl IDWriteFactory { P1: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateGdiCompatibleTextLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len() as _, textformat.into_param().abi(), layoutwidth, layoutheight, pixelsperdip, ::core::mem::transmute(transform.unwrap_or(::std::ptr::null())), usegdinatural.into_param().abi(), &mut result__).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.into_param().abi(), layoutwidth, layoutheight, pixelsperdip, ::core::mem::transmute(transform.unwrap_or(::std::ptr::null())), usegdinatural.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn CreateEllipsisTrimmingSign(&self, textformat: P0) -> ::windows_core::Result where @@ -496,7 +496,7 @@ impl IDWriteFactory1 { } pub unsafe fn CreateFontFace(&self, fontfacetype: DWRITE_FONT_FACE_TYPE, fontfiles: &[::core::option::Option], faceindex: u32, fontfacesimulationflags: DWRITE_FONT_SIMULATIONS) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.CreateFontFace)(::windows_core::Interface::as_raw(self), fontfacetype, fontfiles.len() as _, ::core::mem::transmute(fontfiles.as_ptr()), faceindex, fontfacesimulationflags, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateFontFace)(::windows_core::Interface::as_raw(self), fontfacetype, fontfiles.len().try_into().unwrap(), ::core::mem::transmute(fontfiles.as_ptr()), faceindex, fontfacesimulationflags, &mut result__).from_abi(result__) } pub unsafe fn CreateRenderingParams(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -549,7 +549,7 @@ impl IDWriteFactory1 { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.CreateTextLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len() as _, textformat.into_param().abi(), maxwidth, maxheight, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateTextLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.into_param().abi(), maxwidth, maxheight, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -559,7 +559,7 @@ impl IDWriteFactory1 { P1: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.CreateGdiCompatibleTextLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len() as _, textformat.into_param().abi(), layoutwidth, layoutheight, pixelsperdip, ::core::mem::transmute(transform.unwrap_or(::std::ptr::null())), usegdinatural.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateGdiCompatibleTextLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.into_param().abi(), layoutwidth, layoutheight, pixelsperdip, ::core::mem::transmute(transform.unwrap_or(::std::ptr::null())), usegdinatural.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn CreateEllipsisTrimmingSign(&self, textformat: P0) -> ::windows_core::Result where @@ -669,7 +669,7 @@ impl IDWriteFactory2 { } pub unsafe fn CreateFontFace(&self, fontfacetype: DWRITE_FONT_FACE_TYPE, fontfiles: &[::core::option::Option], faceindex: u32, fontfacesimulationflags: DWRITE_FONT_SIMULATIONS) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.CreateFontFace)(::windows_core::Interface::as_raw(self), fontfacetype, fontfiles.len() as _, ::core::mem::transmute(fontfiles.as_ptr()), faceindex, fontfacesimulationflags, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.CreateFontFace)(::windows_core::Interface::as_raw(self), fontfacetype, fontfiles.len().try_into().unwrap(), ::core::mem::transmute(fontfiles.as_ptr()), faceindex, fontfacesimulationflags, &mut result__).from_abi(result__) } pub unsafe fn CreateRenderingParams(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -722,7 +722,7 @@ impl IDWriteFactory2 { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.CreateTextLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len() as _, textformat.into_param().abi(), maxwidth, maxheight, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.CreateTextLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.into_param().abi(), maxwidth, maxheight, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -732,7 +732,7 @@ impl IDWriteFactory2 { P1: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.CreateGdiCompatibleTextLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len() as _, textformat.into_param().abi(), layoutwidth, layoutheight, pixelsperdip, ::core::mem::transmute(transform.unwrap_or(::std::ptr::null())), usegdinatural.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.CreateGdiCompatibleTextLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.into_param().abi(), layoutwidth, layoutheight, pixelsperdip, ::core::mem::transmute(transform.unwrap_or(::std::ptr::null())), usegdinatural.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn CreateEllipsisTrimmingSign(&self, textformat: P0) -> ::windows_core::Result where @@ -872,7 +872,7 @@ impl IDWriteFactory3 { } pub unsafe fn CreateFontFace(&self, fontfacetype: DWRITE_FONT_FACE_TYPE, fontfiles: &[::core::option::Option], faceindex: u32, fontfacesimulationflags: DWRITE_FONT_SIMULATIONS) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.CreateFontFace)(::windows_core::Interface::as_raw(self), fontfacetype, fontfiles.len() as _, ::core::mem::transmute(fontfiles.as_ptr()), faceindex, fontfacesimulationflags, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.CreateFontFace)(::windows_core::Interface::as_raw(self), fontfacetype, fontfiles.len().try_into().unwrap(), ::core::mem::transmute(fontfiles.as_ptr()), faceindex, fontfacesimulationflags, &mut result__).from_abi(result__) } pub unsafe fn CreateRenderingParams(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -925,7 +925,7 @@ impl IDWriteFactory3 { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.CreateTextLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len() as _, textformat.into_param().abi(), maxwidth, maxheight, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.CreateTextLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.into_param().abi(), maxwidth, maxheight, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -935,7 +935,7 @@ impl IDWriteFactory3 { P1: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.CreateGdiCompatibleTextLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len() as _, textformat.into_param().abi(), layoutwidth, layoutheight, pixelsperdip, ::core::mem::transmute(transform.unwrap_or(::std::ptr::null())), usegdinatural.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.CreateGdiCompatibleTextLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.into_param().abi(), layoutwidth, layoutheight, pixelsperdip, ::core::mem::transmute(transform.unwrap_or(::std::ptr::null())), usegdinatural.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn CreateEllipsisTrimmingSign(&self, textformat: P0) -> ::windows_core::Result where @@ -1136,7 +1136,7 @@ impl IDWriteFactory4 { } pub unsafe fn CreateFontFace(&self, fontfacetype: DWRITE_FONT_FACE_TYPE, fontfiles: &[::core::option::Option], faceindex: u32, fontfacesimulationflags: DWRITE_FONT_SIMULATIONS) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateFontFace)(::windows_core::Interface::as_raw(self), fontfacetype, fontfiles.len() as _, ::core::mem::transmute(fontfiles.as_ptr()), faceindex, fontfacesimulationflags, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateFontFace)(::windows_core::Interface::as_raw(self), fontfacetype, fontfiles.len().try_into().unwrap(), ::core::mem::transmute(fontfiles.as_ptr()), faceindex, fontfacesimulationflags, &mut result__).from_abi(result__) } pub unsafe fn CreateRenderingParams(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1189,7 +1189,7 @@ impl IDWriteFactory4 { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateTextLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len() as _, textformat.into_param().abi(), maxwidth, maxheight, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateTextLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.into_param().abi(), maxwidth, maxheight, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1199,7 +1199,7 @@ impl IDWriteFactory4 { P1: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateGdiCompatibleTextLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len() as _, textformat.into_param().abi(), layoutwidth, layoutheight, pixelsperdip, ::core::mem::transmute(transform.unwrap_or(::std::ptr::null())), usegdinatural.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateGdiCompatibleTextLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.into_param().abi(), layoutwidth, layoutheight, pixelsperdip, ::core::mem::transmute(transform.unwrap_or(::std::ptr::null())), usegdinatural.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn CreateEllipsisTrimmingSign(&self, textformat: P0) -> ::windows_core::Result where @@ -1412,7 +1412,7 @@ impl IDWriteFactory5 { } pub unsafe fn CreateFontFace(&self, fontfacetype: DWRITE_FONT_FACE_TYPE, fontfiles: &[::core::option::Option], faceindex: u32, fontfacesimulationflags: DWRITE_FONT_SIMULATIONS) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateFontFace)(::windows_core::Interface::as_raw(self), fontfacetype, fontfiles.len() as _, ::core::mem::transmute(fontfiles.as_ptr()), faceindex, fontfacesimulationflags, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateFontFace)(::windows_core::Interface::as_raw(self), fontfacetype, fontfiles.len().try_into().unwrap(), ::core::mem::transmute(fontfiles.as_ptr()), faceindex, fontfacesimulationflags, &mut result__).from_abi(result__) } pub unsafe fn CreateRenderingParams(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1465,7 +1465,7 @@ impl IDWriteFactory5 { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateTextLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len() as _, textformat.into_param().abi(), maxwidth, maxheight, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateTextLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.into_param().abi(), maxwidth, maxheight, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1475,7 +1475,7 @@ impl IDWriteFactory5 { P1: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateGdiCompatibleTextLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len() as _, textformat.into_param().abi(), layoutwidth, layoutheight, pixelsperdip, ::core::mem::transmute(transform.unwrap_or(::std::ptr::null())), usegdinatural.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateGdiCompatibleTextLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.into_param().abi(), layoutwidth, layoutheight, pixelsperdip, ::core::mem::transmute(transform.unwrap_or(::std::ptr::null())), usegdinatural.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn CreateEllipsisTrimmingSign(&self, textformat: P0) -> ::windows_core::Result where @@ -1704,7 +1704,7 @@ impl IDWriteFactory6 { } pub unsafe fn CreateFontFace(&self, fontfacetype: DWRITE_FONT_FACE_TYPE, fontfiles: &[::core::option::Option], faceindex: u32, fontfacesimulationflags: DWRITE_FONT_SIMULATIONS) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.CreateFontFace)(::windows_core::Interface::as_raw(self), fontfacetype, fontfiles.len() as _, ::core::mem::transmute(fontfiles.as_ptr()), faceindex, fontfacesimulationflags, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.CreateFontFace)(::windows_core::Interface::as_raw(self), fontfacetype, fontfiles.len().try_into().unwrap(), ::core::mem::transmute(fontfiles.as_ptr()), faceindex, fontfacesimulationflags, &mut result__).from_abi(result__) } pub unsafe fn CreateRenderingParams(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1757,7 +1757,7 @@ impl IDWriteFactory6 { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.CreateTextLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len() as _, textformat.into_param().abi(), maxwidth, maxheight, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.CreateTextLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.into_param().abi(), maxwidth, maxheight, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1767,7 +1767,7 @@ impl IDWriteFactory6 { P1: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.CreateGdiCompatibleTextLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len() as _, textformat.into_param().abi(), layoutwidth, layoutheight, pixelsperdip, ::core::mem::transmute(transform.unwrap_or(::std::ptr::null())), usegdinatural.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.CreateGdiCompatibleTextLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.into_param().abi(), layoutwidth, layoutheight, pixelsperdip, ::core::mem::transmute(transform.unwrap_or(::std::ptr::null())), usegdinatural.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn CreateEllipsisTrimmingSign(&self, textformat: P0) -> ::windows_core::Result where @@ -1932,7 +1932,7 @@ impl IDWriteFactory6 { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateFontFaceReference3)(::windows_core::Interface::as_raw(self), fontfile.into_param().abi(), faceindex, fontsimulations, ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateFontFaceReference3)(::windows_core::Interface::as_raw(self), fontfile.into_param().abi(), faceindex, fontsimulations, ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn CreateFontResource(&self, fontfile: P0, faceindex: u32) -> ::windows_core::Result where @@ -1977,7 +1977,7 @@ impl IDWriteFactory6 { P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateTextFormat2)(::windows_core::Interface::as_raw(self), fontfamilyname.into_param().abi(), fontcollection.into_param().abi(), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len() as _, fontsize, localename.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateTextFormat2)(::windows_core::Interface::as_raw(self), fontfamilyname.into_param().abi(), fontcollection.into_param().abi(), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len().try_into().unwrap(), fontsize, localename.into_param().abi(), &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IDWriteFactory6, ::windows_core::IUnknown, IDWriteFactory, IDWriteFactory1, IDWriteFactory2, IDWriteFactory3, IDWriteFactory4, IDWriteFactory5); @@ -2056,7 +2056,7 @@ impl IDWriteFactory7 { } pub unsafe fn CreateFontFace(&self, fontfacetype: DWRITE_FONT_FACE_TYPE, fontfiles: &[::core::option::Option], faceindex: u32, fontfacesimulationflags: DWRITE_FONT_SIMULATIONS) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.CreateFontFace)(::windows_core::Interface::as_raw(self), fontfacetype, fontfiles.len() as _, ::core::mem::transmute(fontfiles.as_ptr()), faceindex, fontfacesimulationflags, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.CreateFontFace)(::windows_core::Interface::as_raw(self), fontfacetype, fontfiles.len().try_into().unwrap(), ::core::mem::transmute(fontfiles.as_ptr()), faceindex, fontfacesimulationflags, &mut result__).from_abi(result__) } pub unsafe fn CreateRenderingParams(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -2109,7 +2109,7 @@ impl IDWriteFactory7 { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.CreateTextLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len() as _, textformat.into_param().abi(), maxwidth, maxheight, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.CreateTextLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.into_param().abi(), maxwidth, maxheight, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2119,7 +2119,7 @@ impl IDWriteFactory7 { P1: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.CreateGdiCompatibleTextLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len() as _, textformat.into_param().abi(), layoutwidth, layoutheight, pixelsperdip, ::core::mem::transmute(transform.unwrap_or(::std::ptr::null())), usegdinatural.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.CreateGdiCompatibleTextLayout)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.into_param().abi(), layoutwidth, layoutheight, pixelsperdip, ::core::mem::transmute(transform.unwrap_or(::std::ptr::null())), usegdinatural.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn CreateEllipsisTrimmingSign(&self, textformat: P0) -> ::windows_core::Result where @@ -2284,7 +2284,7 @@ impl IDWriteFactory7 { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.CreateFontFaceReference3)(::windows_core::Interface::as_raw(self), fontfile.into_param().abi(), faceindex, fontsimulations, ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateFontFaceReference3)(::windows_core::Interface::as_raw(self), fontfile.into_param().abi(), faceindex, fontsimulations, ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn CreateFontResource(&self, fontfile: P0, faceindex: u32) -> ::windows_core::Result where @@ -2329,7 +2329,7 @@ impl IDWriteFactory7 { P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.CreateTextFormat2)(::windows_core::Interface::as_raw(self), fontfamilyname.into_param().abi(), fontcollection.into_param().abi(), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len() as _, fontsize, localename.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateTextFormat2)(::windows_core::Interface::as_raw(self), fontfamilyname.into_param().abi(), fontcollection.into_param().abi(), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len().try_into().unwrap(), fontsize, localename.into_param().abi(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2512,7 +2512,7 @@ impl IDWriteFont1 { ::std::mem::transmute(result__) } pub unsafe fn GetUnicodeRanges(&self, unicoderanges: ::core::option::Option<&mut [DWRITE_UNICODE_RANGE]>, actualrangecount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetUnicodeRanges)(::windows_core::Interface::as_raw(self), unicoderanges.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(unicoderanges.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), actualrangecount).ok() + (::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).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2602,7 +2602,7 @@ impl IDWriteFont2 { ::std::mem::transmute(result__) } pub unsafe fn GetUnicodeRanges(&self, unicoderanges: ::core::option::Option<&mut [DWRITE_UNICODE_RANGE]>, actualrangecount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetUnicodeRanges)(::windows_core::Interface::as_raw(self), unicoderanges.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(unicoderanges.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), actualrangecount).ok() + (::windows_core::Interface::vtable(self).base__.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).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2691,7 +2691,7 @@ impl IDWriteFont3 { ::std::mem::transmute(result__) } pub unsafe fn GetUnicodeRanges(&self, unicoderanges: ::core::option::Option<&mut [DWRITE_UNICODE_RANGE]>, actualrangecount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetUnicodeRanges)(::windows_core::Interface::as_raw(self), unicoderanges.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(unicoderanges.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), actualrangecount).ok() + (::windows_core::Interface::vtable(self).base__.base__.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).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2895,7 +2895,7 @@ impl IDWriteFontCollection2 { P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).GetMatchingFonts)(::windows_core::Interface::as_raw(self), familyname.into_param().abi(), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).GetMatchingFonts)(::windows_core::Interface::as_raw(self), familyname.into_param().abi(), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn GetFontFamilyModel(&self) -> DWRITE_FONT_FAMILY_MODEL { (::windows_core::Interface::vtable(self).GetFontFamilyModel)(::windows_core::Interface::as_raw(self)) @@ -2966,7 +2966,7 @@ impl IDWriteFontCollection3 { P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.GetMatchingFonts)(::windows_core::Interface::as_raw(self), familyname.into_param().abi(), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.GetMatchingFonts)(::windows_core::Interface::as_raw(self), familyname.into_param().abi(), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn GetFontFamilyModel(&self) -> DWRITE_FONT_FAMILY_MODEL { (::windows_core::Interface::vtable(self).base__.GetFontFamilyModel)(::windows_core::Interface::as_raw(self)) @@ -3319,7 +3319,7 @@ impl IDWriteFontFace1 { ::std::mem::transmute(result__) } pub unsafe fn GetUnicodeRanges(&self, unicoderanges: ::core::option::Option<&mut [DWRITE_UNICODE_RANGE]>, actualrangecount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetUnicodeRanges)(::windows_core::Interface::as_raw(self), unicoderanges.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(unicoderanges.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), actualrangecount).ok() + (::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).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3510,7 +3510,7 @@ impl IDWriteFontFace2 { ::std::mem::transmute(result__) } pub unsafe fn GetUnicodeRanges(&self, unicoderanges: ::core::option::Option<&mut [DWRITE_UNICODE_RANGE]>, actualrangecount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetUnicodeRanges)(::windows_core::Interface::as_raw(self), unicoderanges.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(unicoderanges.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), actualrangecount).ok() + (::windows_core::Interface::vtable(self).base__.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).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3571,7 +3571,7 @@ impl IDWriteFontFace2 { (::windows_core::Interface::vtable(self).GetPaletteEntryCount)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetPaletteEntries(&self, colorpaletteindex: u32, firstentryindex: u32, paletteentries: &mut [DWRITE_COLOR_F]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPaletteEntries)(::windows_core::Interface::as_raw(self), colorpaletteindex, firstentryindex, paletteentries.len() as _, ::core::mem::transmute(paletteentries.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetPaletteEntries)(::windows_core::Interface::as_raw(self), colorpaletteindex, firstentryindex, paletteentries.len().try_into().unwrap(), ::core::mem::transmute(paletteentries.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3699,7 +3699,7 @@ impl IDWriteFontFace3 { ::std::mem::transmute(result__) } pub unsafe fn GetUnicodeRanges(&self, unicoderanges: ::core::option::Option<&mut [DWRITE_UNICODE_RANGE]>, actualrangecount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetUnicodeRanges)(::windows_core::Interface::as_raw(self), unicoderanges.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(unicoderanges.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), actualrangecount).ok() + (::windows_core::Interface::vtable(self).base__.base__.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).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3760,7 +3760,7 @@ impl IDWriteFontFace3 { (::windows_core::Interface::vtable(self).base__.GetPaletteEntryCount)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetPaletteEntries(&self, colorpaletteindex: u32, firstentryindex: u32, paletteentries: &mut [DWRITE_COLOR_F]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetPaletteEntries)(::windows_core::Interface::as_raw(self), colorpaletteindex, firstentryindex, paletteentries.len() as _, ::core::mem::transmute(paletteentries.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.GetPaletteEntries)(::windows_core::Interface::as_raw(self), colorpaletteindex, firstentryindex, paletteentries.len().try_into().unwrap(), ::core::mem::transmute(paletteentries.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3833,7 +3833,7 @@ impl IDWriteFontFace3 { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).AreCharactersLocal)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(characters.as_ptr()), characters.len() as _, enqueueifnotlocal.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).AreCharactersLocal)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(characters.as_ptr()), characters.len().try_into().unwrap(), enqueueifnotlocal.into_param().abi(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3842,7 +3842,7 @@ impl IDWriteFontFace3 { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).AreGlyphsLocal)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(glyphindices.as_ptr()), glyphindices.len() as _, enqueueifnotlocal.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).AreGlyphsLocal)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(glyphindices.as_ptr()), glyphindices.len().try_into().unwrap(), enqueueifnotlocal.into_param().abi(), &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IDWriteFontFace3, ::windows_core::IUnknown, IDWriteFontFace, IDWriteFontFace1, IDWriteFontFace2); @@ -3985,7 +3985,7 @@ impl IDWriteFontFace4 { ::std::mem::transmute(result__) } pub unsafe fn GetUnicodeRanges(&self, unicoderanges: ::core::option::Option<&mut [DWRITE_UNICODE_RANGE]>, actualrangecount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetUnicodeRanges)(::windows_core::Interface::as_raw(self), unicoderanges.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(unicoderanges.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), actualrangecount).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.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).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -4046,7 +4046,7 @@ impl IDWriteFontFace4 { (::windows_core::Interface::vtable(self).base__.base__.GetPaletteEntryCount)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetPaletteEntries(&self, colorpaletteindex: u32, firstentryindex: u32, paletteentries: &mut [DWRITE_COLOR_F]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetPaletteEntries)(::windows_core::Interface::as_raw(self), colorpaletteindex, firstentryindex, paletteentries.len() as _, ::core::mem::transmute(paletteentries.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetPaletteEntries)(::windows_core::Interface::as_raw(self), colorpaletteindex, firstentryindex, paletteentries.len().try_into().unwrap(), ::core::mem::transmute(paletteentries.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -4119,7 +4119,7 @@ impl IDWriteFontFace4 { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.AreCharactersLocal)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(characters.as_ptr()), characters.len() as _, enqueueifnotlocal.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.AreCharactersLocal)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(characters.as_ptr()), characters.len().try_into().unwrap(), enqueueifnotlocal.into_param().abi(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -4128,7 +4128,7 @@ impl IDWriteFontFace4 { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.AreGlyphsLocal)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(glyphindices.as_ptr()), glyphindices.len() as _, enqueueifnotlocal.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.AreGlyphsLocal)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(glyphindices.as_ptr()), glyphindices.len().try_into().unwrap(), enqueueifnotlocal.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn GetGlyphImageFormats(&self, glyphid: u16, pixelsperemfirst: u32, pixelsperemlast: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -4258,7 +4258,7 @@ impl IDWriteFontFace5 { ::std::mem::transmute(result__) } pub unsafe fn GetUnicodeRanges(&self, unicoderanges: ::core::option::Option<&mut [DWRITE_UNICODE_RANGE]>, actualrangecount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetUnicodeRanges)(::windows_core::Interface::as_raw(self), unicoderanges.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(unicoderanges.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), actualrangecount).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.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).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -4319,7 +4319,7 @@ impl IDWriteFontFace5 { (::windows_core::Interface::vtable(self).base__.base__.base__.GetPaletteEntryCount)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetPaletteEntries(&self, colorpaletteindex: u32, firstentryindex: u32, paletteentries: &mut [DWRITE_COLOR_F]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetPaletteEntries)(::windows_core::Interface::as_raw(self), colorpaletteindex, firstentryindex, paletteentries.len() as _, ::core::mem::transmute(paletteentries.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetPaletteEntries)(::windows_core::Interface::as_raw(self), colorpaletteindex, firstentryindex, paletteentries.len().try_into().unwrap(), ::core::mem::transmute(paletteentries.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -4392,7 +4392,7 @@ impl IDWriteFontFace5 { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.AreCharactersLocal)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(characters.as_ptr()), characters.len() as _, enqueueifnotlocal.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.AreCharactersLocal)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(characters.as_ptr()), characters.len().try_into().unwrap(), enqueueifnotlocal.into_param().abi(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -4401,7 +4401,7 @@ impl IDWriteFontFace5 { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.AreGlyphsLocal)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(glyphindices.as_ptr()), glyphindices.len() as _, enqueueifnotlocal.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.AreGlyphsLocal)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(glyphindices.as_ptr()), glyphindices.len().try_into().unwrap(), enqueueifnotlocal.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn GetGlyphImageFormats(&self, glyphid: u16, pixelsperemfirst: u32, pixelsperemlast: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -4422,7 +4422,7 @@ impl IDWriteFontFace5 { (::windows_core::Interface::vtable(self).GetFontAxisValueCount)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetFontAxisValues(&self, fontaxisvalues: &mut [DWRITE_FONT_AXIS_VALUE]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetFontAxisValues)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len() as _).ok() + (::windows_core::Interface::vtable(self).GetFontAxisValues)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -4558,7 +4558,7 @@ impl IDWriteFontFace6 { ::std::mem::transmute(result__) } pub unsafe fn GetUnicodeRanges(&self, unicoderanges: ::core::option::Option<&mut [DWRITE_UNICODE_RANGE]>, actualrangecount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetUnicodeRanges)(::windows_core::Interface::as_raw(self), unicoderanges.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(unicoderanges.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), actualrangecount).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.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).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -4619,7 +4619,7 @@ impl IDWriteFontFace6 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetPaletteEntryCount)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetPaletteEntries(&self, colorpaletteindex: u32, firstentryindex: u32, paletteentries: &mut [DWRITE_COLOR_F]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetPaletteEntries)(::windows_core::Interface::as_raw(self), colorpaletteindex, firstentryindex, paletteentries.len() as _, ::core::mem::transmute(paletteentries.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetPaletteEntries)(::windows_core::Interface::as_raw(self), colorpaletteindex, firstentryindex, paletteentries.len().try_into().unwrap(), ::core::mem::transmute(paletteentries.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -4692,7 +4692,7 @@ impl IDWriteFontFace6 { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.AreCharactersLocal)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(characters.as_ptr()), characters.len() as _, enqueueifnotlocal.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.AreCharactersLocal)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(characters.as_ptr()), characters.len().try_into().unwrap(), enqueueifnotlocal.into_param().abi(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -4701,7 +4701,7 @@ impl IDWriteFontFace6 { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.AreGlyphsLocal)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(glyphindices.as_ptr()), glyphindices.len() as _, enqueueifnotlocal.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.AreGlyphsLocal)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(glyphindices.as_ptr()), glyphindices.len().try_into().unwrap(), enqueueifnotlocal.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn GetGlyphImageFormats(&self, glyphid: u16, pixelsperemfirst: u32, pixelsperemlast: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -4722,7 +4722,7 @@ impl IDWriteFontFace6 { (::windows_core::Interface::vtable(self).base__.GetFontAxisValueCount)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetFontAxisValues(&self, fontaxisvalues: &mut [DWRITE_FONT_AXIS_VALUE]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetFontAxisValues)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.GetFontAxisValues)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -4815,10 +4815,10 @@ impl IDWriteFontFaceReference { (::windows_core::Interface::vtable(self).EnqueueFontDownloadRequest)(::windows_core::Interface::as_raw(self)).ok() } pub unsafe fn EnqueueCharacterDownloadRequest(&self, characters: &[u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).EnqueueCharacterDownloadRequest)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(characters.as_ptr()), characters.len() as _).ok() + (::windows_core::Interface::vtable(self).EnqueueCharacterDownloadRequest)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(characters.as_ptr()), characters.len().try_into().unwrap()).ok() } pub unsafe fn EnqueueGlyphDownloadRequest(&self, glyphindices: &[u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).EnqueueGlyphDownloadRequest)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(glyphindices.as_ptr()), glyphindices.len() as _).ok() + (::windows_core::Interface::vtable(self).EnqueueGlyphDownloadRequest)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(glyphindices.as_ptr()), glyphindices.len().try_into().unwrap()).ok() } pub unsafe fn EnqueueFileFragmentDownloadRequest(&self, fileoffset: u64, fragmentsize: u64) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).EnqueueFileFragmentDownloadRequest)(::windows_core::Interface::as_raw(self), fileoffset, fragmentsize).ok() @@ -4907,10 +4907,10 @@ impl IDWriteFontFaceReference1 { (::windows_core::Interface::vtable(self).base__.EnqueueFontDownloadRequest)(::windows_core::Interface::as_raw(self)).ok() } pub unsafe fn EnqueueCharacterDownloadRequest(&self, characters: &[u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.EnqueueCharacterDownloadRequest)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(characters.as_ptr()), characters.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.EnqueueCharacterDownloadRequest)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(characters.as_ptr()), characters.len().try_into().unwrap()).ok() } pub unsafe fn EnqueueGlyphDownloadRequest(&self, glyphindices: &[u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.EnqueueGlyphDownloadRequest)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(glyphindices.as_ptr()), glyphindices.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.EnqueueGlyphDownloadRequest)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(glyphindices.as_ptr()), glyphindices.len().try_into().unwrap()).ok() } pub unsafe fn EnqueueFileFragmentDownloadRequest(&self, fileoffset: u64, fragmentsize: u64) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.EnqueueFileFragmentDownloadRequest)(::windows_core::Interface::as_raw(self), fileoffset, fragmentsize).ok() @@ -4923,7 +4923,7 @@ impl IDWriteFontFaceReference1 { (::windows_core::Interface::vtable(self).GetFontAxisValueCount)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetFontAxisValues(&self, fontaxisvalues: &mut [DWRITE_FONT_AXIS_VALUE]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetFontAxisValues)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len() as _).ok() + (::windows_core::Interface::vtable(self).GetFontAxisValues)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(IDWriteFontFaceReference1, ::windows_core::IUnknown, IDWriteFontFaceReference); @@ -4989,7 +4989,7 @@ impl IDWriteFontFallback1 { P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).MapCharacters2)(::windows_core::Interface::as_raw(self), analysissource.into_param().abi(), textposition, textlength, basefontcollection.into_param().abi(), basefamilyname.into_param().abi(), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len() as _, mappedlength, scale, ::core::mem::transmute(mappedfontface)).ok() + (::windows_core::Interface::vtable(self).MapCharacters2)(::windows_core::Interface::as_raw(self), analysissource.into_param().abi(), textposition, textlength, basefontcollection.into_param().abi(), basefamilyname.into_param().abi(), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len().try_into().unwrap(), mappedlength, scale, ::core::mem::transmute(mappedfontface)).ok() } } ::windows_core::imp::interface_hierarchy!(IDWriteFontFallback1, ::windows_core::IUnknown, IDWriteFontFallback); @@ -5017,7 +5017,7 @@ impl IDWriteFontFallbackBuilder { P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).AddMapping)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ranges.as_ptr()), ranges.len() as _, ::core::mem::transmute(targetfamilynames.as_ptr()), targetfamilynames.len() as _, fontcollection.into_param().abi(), localename.into_param().abi(), basefamilyname.into_param().abi(), scale).ok() + (::windows_core::Interface::vtable(self).AddMapping)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ranges.as_ptr()), ranges.len().try_into().unwrap(), ::core::mem::transmute(targetfamilynames.as_ptr()), targetfamilynames.len().try_into().unwrap(), fontcollection.into_param().abi(), localename.into_param().abi(), basefamilyname.into_param().abi(), scale).ok() } pub unsafe fn AddMappings(&self, fontfallback: P0) -> ::windows_core::Result<()> where @@ -5188,7 +5188,7 @@ impl IDWriteFontFamily2 { } pub unsafe fn GetMatchingFonts2(&self, fontaxisvalues: &[DWRITE_FONT_AXIS_VALUE]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).GetMatchingFonts2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).GetMatchingFonts2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn GetFontSet(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -5481,10 +5481,10 @@ impl IDWriteFontResource { (::windows_core::Interface::vtable(self).GetFontAxisCount)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetDefaultFontAxisValues(&self, fontaxisvalues: &mut [DWRITE_FONT_AXIS_VALUE]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDefaultFontAxisValues)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len() as _).ok() + (::windows_core::Interface::vtable(self).GetDefaultFontAxisValues)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len().try_into().unwrap()).ok() } pub unsafe fn GetFontAxisRanges(&self, fontaxisranges: &mut [DWRITE_FONT_AXIS_RANGE]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetFontAxisRanges)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len() as _).ok() + (::windows_core::Interface::vtable(self).GetFontAxisRanges)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len().try_into().unwrap()).ok() } pub unsafe fn GetFontAxisAttributes(&self, axisindex: u32) -> DWRITE_FONT_AXIS_ATTRIBUTES { (::windows_core::Interface::vtable(self).GetFontAxisAttributes)(::windows_core::Interface::as_raw(self), axisindex) @@ -5506,11 +5506,11 @@ impl IDWriteFontResource { } pub unsafe fn CreateFontFace(&self, fontsimulations: DWRITE_FONT_SIMULATIONS, fontaxisvalues: &[DWRITE_FONT_AXIS_VALUE]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateFontFace)(::windows_core::Interface::as_raw(self), fontsimulations, ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateFontFace)(::windows_core::Interface::as_raw(self), fontsimulations, ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn CreateFontFaceReference(&self, fontsimulations: DWRITE_FONT_SIMULATIONS, fontaxisvalues: &[DWRITE_FONT_AXIS_VALUE]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateFontFaceReference)(::windows_core::Interface::as_raw(self), fontsimulations, ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateFontFaceReference)(::windows_core::Interface::as_raw(self), fontsimulations, ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len().try_into().unwrap(), &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IDWriteFontResource, ::windows_core::IUnknown); @@ -5598,7 +5598,7 @@ impl IDWriteFontSet { } pub unsafe fn GetMatchingFonts2(&self, properties: &[DWRITE_FONT_PROPERTY]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).GetMatchingFonts2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(properties.as_ptr()), properties.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).GetMatchingFonts2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(properties.as_ptr()), properties.len().try_into().unwrap(), &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IDWriteFontSet, ::windows_core::IUnknown); @@ -5690,11 +5690,11 @@ impl IDWriteFontSet1 { } pub unsafe fn GetMatchingFonts2(&self, properties: &[DWRITE_FONT_PROPERTY]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.GetMatchingFonts2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(properties.as_ptr()), properties.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.GetMatchingFonts2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(properties.as_ptr()), properties.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn GetMatchingFonts3(&self, fontproperty: ::core::option::Option<*const DWRITE_FONT_PROPERTY>, fontaxisvalues: &[DWRITE_FONT_AXIS_VALUE]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).GetMatchingFonts3)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontproperty.unwrap_or(::std::ptr::null())), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).GetMatchingFonts3)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontproperty.unwrap_or(::std::ptr::null())), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn GetFirstFontResources(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -5702,7 +5702,7 @@ impl IDWriteFontSet1 { } pub unsafe fn GetFilteredFonts(&self, indices: &[u32]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).GetFilteredFonts)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(indices.as_ptr()), indices.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).GetFilteredFonts)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(indices.as_ptr()), indices.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -5711,7 +5711,7 @@ impl IDWriteFontSet1 { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).GetFilteredFonts2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len() as _, selectanyrange.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).GetFilteredFonts2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len().try_into().unwrap(), selectanyrange.into_param().abi(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -5720,7 +5720,7 @@ impl IDWriteFontSet1 { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).GetFilteredFonts3)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len() as _), selectanyproperty.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).GetFilteredFonts3)(::windows_core::Interface::as_raw(self), ::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()), selectanyproperty.into_param().abi(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -5728,7 +5728,7 @@ impl IDWriteFontSet1 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).GetFilteredFontIndices)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len() as _, selectanyrange.into_param().abi(), ::core::mem::transmute(indices.as_ptr()), indices.len() as _, actualindexcount).ok() + (::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_param().abi(), ::core::mem::transmute(indices.as_ptr()), indices.len().try_into().unwrap(), actualindexcount).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -5736,13 +5736,13 @@ impl IDWriteFontSet1 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).GetFilteredFontIndices2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(properties.as_ptr()), properties.len() as _, selectanyproperty.into_param().abi(), ::core::mem::transmute(indices.as_ptr()), indices.len() as _, actualindexcount).ok() + (::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_param().abi(), ::core::mem::transmute(indices.as_ptr()), indices.len().try_into().unwrap(), actualindexcount).ok() } pub unsafe fn GetFontAxisRanges(&self, listindex: u32, fontaxisranges: &mut [DWRITE_FONT_AXIS_RANGE], actualfontaxisrangecount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetFontAxisRanges)(::windows_core::Interface::as_raw(self), listindex, ::core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len() as _, actualfontaxisrangecount).ok() + (::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).ok() } pub unsafe fn GetFontAxisRanges2(&self, fontaxisranges: &mut [DWRITE_FONT_AXIS_RANGE], actualfontaxisrangecount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetFontAxisRanges2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len() as _, actualfontaxisrangecount).ok() + (::windows_core::Interface::vtable(self).GetFontAxisRanges2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len().try_into().unwrap(), actualfontaxisrangecount).ok() } pub unsafe fn GetFontFaceReference2(&self, listindex: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -5855,11 +5855,11 @@ impl IDWriteFontSet2 { } pub unsafe fn GetMatchingFonts2(&self, properties: &[DWRITE_FONT_PROPERTY]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.GetMatchingFonts2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(properties.as_ptr()), properties.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.GetMatchingFonts2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(properties.as_ptr()), properties.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn GetMatchingFonts3(&self, fontproperty: ::core::option::Option<*const DWRITE_FONT_PROPERTY>, fontaxisvalues: &[DWRITE_FONT_AXIS_VALUE]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.GetMatchingFonts3)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontproperty.unwrap_or(::std::ptr::null())), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.GetMatchingFonts3)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontproperty.unwrap_or(::std::ptr::null())), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn GetFirstFontResources(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -5867,7 +5867,7 @@ impl IDWriteFontSet2 { } pub unsafe fn GetFilteredFonts(&self, indices: &[u32]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.GetFilteredFonts)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(indices.as_ptr()), indices.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.GetFilteredFonts)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(indices.as_ptr()), indices.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -5876,7 +5876,7 @@ impl IDWriteFontSet2 { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.GetFilteredFonts2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len() as _, selectanyrange.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.GetFilteredFonts2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len().try_into().unwrap(), selectanyrange.into_param().abi(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -5885,7 +5885,7 @@ impl IDWriteFontSet2 { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.GetFilteredFonts3)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len() as _), selectanyproperty.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.GetFilteredFonts3)(::windows_core::Interface::as_raw(self), ::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()), selectanyproperty.into_param().abi(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -5893,7 +5893,7 @@ impl IDWriteFontSet2 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.GetFilteredFontIndices)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len() as _, selectanyrange.into_param().abi(), ::core::mem::transmute(indices.as_ptr()), indices.len() as _, actualindexcount).ok() + (::windows_core::Interface::vtable(self).base__.GetFilteredFontIndices)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len().try_into().unwrap(), selectanyrange.into_param().abi(), ::core::mem::transmute(indices.as_ptr()), indices.len().try_into().unwrap(), actualindexcount).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -5901,13 +5901,13 @@ impl IDWriteFontSet2 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.GetFilteredFontIndices2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(properties.as_ptr()), properties.len() as _, selectanyproperty.into_param().abi(), ::core::mem::transmute(indices.as_ptr()), indices.len() as _, actualindexcount).ok() + (::windows_core::Interface::vtable(self).base__.GetFilteredFontIndices2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(properties.as_ptr()), properties.len().try_into().unwrap(), selectanyproperty.into_param().abi(), ::core::mem::transmute(indices.as_ptr()), indices.len().try_into().unwrap(), actualindexcount).ok() } pub unsafe fn GetFontAxisRanges(&self, listindex: u32, fontaxisranges: &mut [DWRITE_FONT_AXIS_RANGE], actualfontaxisrangecount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetFontAxisRanges)(::windows_core::Interface::as_raw(self), listindex, ::core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len() as _, actualfontaxisrangecount).ok() + (::windows_core::Interface::vtable(self).base__.GetFontAxisRanges)(::windows_core::Interface::as_raw(self), listindex, ::core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len().try_into().unwrap(), actualfontaxisrangecount).ok() } pub unsafe fn GetFontAxisRanges2(&self, fontaxisranges: &mut [DWRITE_FONT_AXIS_RANGE], actualfontaxisrangecount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetFontAxisRanges2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len() as _, actualfontaxisrangecount).ok() + (::windows_core::Interface::vtable(self).base__.GetFontAxisRanges2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len().try_into().unwrap(), actualfontaxisrangecount).ok() } pub unsafe fn GetFontFaceReference2(&self, listindex: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -6004,11 +6004,11 @@ impl IDWriteFontSet3 { } pub unsafe fn GetMatchingFonts2(&self, properties: &[DWRITE_FONT_PROPERTY]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.GetMatchingFonts2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(properties.as_ptr()), properties.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.GetMatchingFonts2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(properties.as_ptr()), properties.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn GetMatchingFonts3(&self, fontproperty: ::core::option::Option<*const DWRITE_FONT_PROPERTY>, fontaxisvalues: &[DWRITE_FONT_AXIS_VALUE]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.GetMatchingFonts3)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontproperty.unwrap_or(::std::ptr::null())), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.GetMatchingFonts3)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontproperty.unwrap_or(::std::ptr::null())), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn GetFirstFontResources(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -6016,7 +6016,7 @@ impl IDWriteFontSet3 { } pub unsafe fn GetFilteredFonts(&self, indices: &[u32]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.GetFilteredFonts)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(indices.as_ptr()), indices.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.GetFilteredFonts)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(indices.as_ptr()), indices.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -6025,7 +6025,7 @@ impl IDWriteFontSet3 { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.GetFilteredFonts2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len() as _, selectanyrange.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.GetFilteredFonts2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len().try_into().unwrap(), selectanyrange.into_param().abi(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -6034,7 +6034,7 @@ impl IDWriteFontSet3 { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.GetFilteredFonts3)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len() as _), selectanyproperty.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.GetFilteredFonts3)(::windows_core::Interface::as_raw(self), ::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()), selectanyproperty.into_param().abi(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -6042,7 +6042,7 @@ impl IDWriteFontSet3 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.GetFilteredFontIndices)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len() as _, selectanyrange.into_param().abi(), ::core::mem::transmute(indices.as_ptr()), indices.len() as _, actualindexcount).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetFilteredFontIndices)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len().try_into().unwrap(), selectanyrange.into_param().abi(), ::core::mem::transmute(indices.as_ptr()), indices.len().try_into().unwrap(), actualindexcount).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -6050,13 +6050,13 @@ impl IDWriteFontSet3 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.GetFilteredFontIndices2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(properties.as_ptr()), properties.len() as _, selectanyproperty.into_param().abi(), ::core::mem::transmute(indices.as_ptr()), indices.len() as _, actualindexcount).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetFilteredFontIndices2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(properties.as_ptr()), properties.len().try_into().unwrap(), selectanyproperty.into_param().abi(), ::core::mem::transmute(indices.as_ptr()), indices.len().try_into().unwrap(), actualindexcount).ok() } pub unsafe fn GetFontAxisRanges(&self, listindex: u32, fontaxisranges: &mut [DWRITE_FONT_AXIS_RANGE], actualfontaxisrangecount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetFontAxisRanges)(::windows_core::Interface::as_raw(self), listindex, ::core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len() as _, actualfontaxisrangecount).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetFontAxisRanges)(::windows_core::Interface::as_raw(self), listindex, ::core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len().try_into().unwrap(), actualfontaxisrangecount).ok() } pub unsafe fn GetFontAxisRanges2(&self, fontaxisranges: &mut [DWRITE_FONT_AXIS_RANGE], actualfontaxisrangecount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetFontAxisRanges2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len() as _, actualfontaxisrangecount).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetFontAxisRanges2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len().try_into().unwrap(), actualfontaxisrangecount).ok() } pub unsafe fn GetFontFaceReference2(&self, listindex: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -6085,7 +6085,7 @@ impl IDWriteFontSet3 { (::windows_core::Interface::vtable(self).GetFontSourceNameLength)(::windows_core::Interface::as_raw(self), listindex) } pub unsafe fn GetFontSourceName(&self, listindex: u32, stringbuffer: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetFontSourceName)(::windows_core::Interface::as_raw(self), listindex, ::core::mem::transmute(stringbuffer.as_ptr()), stringbuffer.len() as _).ok() + (::windows_core::Interface::vtable(self).GetFontSourceName)(::windows_core::Interface::as_raw(self), listindex, ::core::mem::transmute(stringbuffer.as_ptr()), stringbuffer.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(IDWriteFontSet3, ::windows_core::IUnknown, IDWriteFontSet, IDWriteFontSet1, IDWriteFontSet2); @@ -6161,11 +6161,11 @@ impl IDWriteFontSet4 { } pub unsafe fn GetMatchingFonts2(&self, properties: &[DWRITE_FONT_PROPERTY]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetMatchingFonts2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(properties.as_ptr()), properties.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetMatchingFonts2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(properties.as_ptr()), properties.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn GetMatchingFonts3(&self, fontproperty: ::core::option::Option<*const DWRITE_FONT_PROPERTY>, fontaxisvalues: &[DWRITE_FONT_AXIS_VALUE]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.GetMatchingFonts3)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontproperty.unwrap_or(::std::ptr::null())), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.GetMatchingFonts3)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontproperty.unwrap_or(::std::ptr::null())), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn GetFirstFontResources(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -6173,7 +6173,7 @@ impl IDWriteFontSet4 { } pub unsafe fn GetFilteredFonts(&self, indices: &[u32]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.GetFilteredFonts)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(indices.as_ptr()), indices.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.GetFilteredFonts)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(indices.as_ptr()), indices.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -6182,7 +6182,7 @@ impl IDWriteFontSet4 { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.GetFilteredFonts2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len() as _, selectanyrange.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.GetFilteredFonts2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len().try_into().unwrap(), selectanyrange.into_param().abi(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -6191,7 +6191,7 @@ impl IDWriteFontSet4 { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.GetFilteredFonts3)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len() as _), selectanyproperty.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.GetFilteredFonts3)(::windows_core::Interface::as_raw(self), ::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()), selectanyproperty.into_param().abi(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -6199,7 +6199,7 @@ impl IDWriteFontSet4 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetFilteredFontIndices)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len() as _, selectanyrange.into_param().abi(), ::core::mem::transmute(indices.as_ptr()), indices.len() as _, actualindexcount).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetFilteredFontIndices)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len().try_into().unwrap(), selectanyrange.into_param().abi(), ::core::mem::transmute(indices.as_ptr()), indices.len().try_into().unwrap(), actualindexcount).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -6207,13 +6207,13 @@ impl IDWriteFontSet4 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetFilteredFontIndices2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(properties.as_ptr()), properties.len() as _, selectanyproperty.into_param().abi(), ::core::mem::transmute(indices.as_ptr()), indices.len() as _, actualindexcount).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetFilteredFontIndices2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(properties.as_ptr()), properties.len().try_into().unwrap(), selectanyproperty.into_param().abi(), ::core::mem::transmute(indices.as_ptr()), indices.len().try_into().unwrap(), actualindexcount).ok() } pub unsafe fn GetFontAxisRanges(&self, listindex: u32, fontaxisranges: &mut [DWRITE_FONT_AXIS_RANGE], actualfontaxisrangecount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetFontAxisRanges)(::windows_core::Interface::as_raw(self), listindex, ::core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len() as _, actualfontaxisrangecount).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetFontAxisRanges)(::windows_core::Interface::as_raw(self), listindex, ::core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len().try_into().unwrap(), actualfontaxisrangecount).ok() } pub unsafe fn GetFontAxisRanges2(&self, fontaxisranges: &mut [DWRITE_FONT_AXIS_RANGE], actualfontaxisrangecount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetFontAxisRanges2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len() as _, actualfontaxisrangecount).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetFontAxisRanges2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len().try_into().unwrap(), actualfontaxisrangecount).ok() } pub unsafe fn GetFontFaceReference2(&self, listindex: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -6242,17 +6242,17 @@ impl IDWriteFontSet4 { (::windows_core::Interface::vtable(self).base__.GetFontSourceNameLength)(::windows_core::Interface::as_raw(self), listindex) } pub unsafe fn GetFontSourceName(&self, listindex: u32, stringbuffer: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetFontSourceName)(::windows_core::Interface::as_raw(self), listindex, ::core::mem::transmute(stringbuffer.as_ptr()), stringbuffer.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.GetFontSourceName)(::windows_core::Interface::as_raw(self), listindex, ::core::mem::transmute(stringbuffer.as_ptr()), stringbuffer.len().try_into().unwrap()).ok() } pub unsafe fn ConvertWeightStretchStyleToFontAxisValues(&self, inputaxisvalues: ::core::option::Option<&[DWRITE_FONT_AXIS_VALUE]>, fontweight: DWRITE_FONT_WEIGHT, fontstretch: DWRITE_FONT_STRETCH, fontstyle: DWRITE_FONT_STYLE, fontsize: f32, outputaxisvalues: &mut [DWRITE_FONT_AXIS_VALUE; 5]) -> u32 { - (::windows_core::Interface::vtable(self).ConvertWeightStretchStyleToFontAxisValues)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(inputaxisvalues.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), inputaxisvalues.as_deref().map_or(0, |slice| slice.len() as _), fontweight, fontstretch, fontstyle, fontsize, ::core::mem::transmute(outputaxisvalues.as_ptr())) + (::windows_core::Interface::vtable(self).ConvertWeightStretchStyleToFontAxisValues)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(inputaxisvalues.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), inputaxisvalues.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), fontweight, fontstretch, fontstyle, fontsize, ::core::mem::transmute(outputaxisvalues.as_ptr())) } pub unsafe fn GetMatchingFonts4(&self, familyname: P0, fontaxisvalues: &[DWRITE_FONT_AXIS_VALUE], allowedsimulations: DWRITE_FONT_SIMULATIONS) -> ::windows_core::Result where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).GetMatchingFonts4)(::windows_core::Interface::as_raw(self), familyname.into_param().abi(), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len() as _, allowedsimulations, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).GetMatchingFonts4)(::windows_core::Interface::as_raw(self), familyname.into_param().abi(), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len().try_into().unwrap(), allowedsimulations, &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IDWriteFontSet4, ::windows_core::IUnknown, IDWriteFontSet, IDWriteFontSet1, IDWriteFontSet2, IDWriteFontSet3); @@ -6279,7 +6279,7 @@ impl IDWriteFontSetBuilder { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).AddFontFaceReference)(::windows_core::Interface::as_raw(self), fontfacereference.into_param().abi(), ::core::mem::transmute(properties.as_ptr()), properties.len() as _).ok() + (::windows_core::Interface::vtable(self).AddFontFaceReference)(::windows_core::Interface::as_raw(self), fontfacereference.into_param().abi(), ::core::mem::transmute(properties.as_ptr()), properties.len().try_into().unwrap()).ok() } pub unsafe fn AddFontFaceReference2(&self, fontfacereference: P0) -> ::windows_core::Result<()> where @@ -6324,7 +6324,7 @@ impl IDWriteFontSetBuilder1 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.AddFontFaceReference)(::windows_core::Interface::as_raw(self), fontfacereference.into_param().abi(), ::core::mem::transmute(properties.as_ptr()), properties.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.AddFontFaceReference)(::windows_core::Interface::as_raw(self), fontfacereference.into_param().abi(), ::core::mem::transmute(properties.as_ptr()), properties.len().try_into().unwrap()).ok() } pub unsafe fn AddFontFaceReference2(&self, fontfacereference: P0) -> ::windows_core::Result<()> where @@ -6372,7 +6372,7 @@ impl IDWriteFontSetBuilder2 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.AddFontFaceReference)(::windows_core::Interface::as_raw(self), fontfacereference.into_param().abi(), ::core::mem::transmute(properties.as_ptr()), properties.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.AddFontFaceReference)(::windows_core::Interface::as_raw(self), fontfacereference.into_param().abi(), ::core::mem::transmute(properties.as_ptr()), properties.len().try_into().unwrap()).ok() } pub unsafe fn AddFontFaceReference2(&self, fontfacereference: P0) -> ::windows_core::Result<()> where @@ -6400,7 +6400,7 @@ impl IDWriteFontSetBuilder2 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).AddFont)(::windows_core::Interface::as_raw(self), fontfile.into_param().abi(), fontfaceindex, fontsimulations, ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len() as _, ::core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len() as _, ::core::mem::transmute(properties.as_ptr()), properties.len() as _).ok() + (::windows_core::Interface::vtable(self).AddFont)(::windows_core::Interface::as_raw(self), fontfile.into_param().abi(), fontfaceindex, fontsimulations, ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len().try_into().unwrap(), ::core::mem::transmute(fontaxisranges.as_ptr()), fontaxisranges.len().try_into().unwrap(), ::core::mem::transmute(properties.as_ptr()), properties.len().try_into().unwrap()).ok() } pub unsafe fn AddFontFile2(&self, filepath: P0) -> ::windows_core::Result<()> where @@ -6626,7 +6626,7 @@ impl IDWriteGlyphRunAnalysis { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn CreateAlphaTexture(&self, texturetype: DWRITE_TEXTURE_TYPE, texturebounds: *const super::super::Foundation::RECT, alphavalues: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).CreateAlphaTexture)(::windows_core::Interface::as_raw(self), texturetype, texturebounds, ::core::mem::transmute(alphavalues.as_ptr()), alphavalues.len() as _).ok() + (::windows_core::Interface::vtable(self).CreateAlphaTexture)(::windows_core::Interface::as_raw(self), texturetype, texturebounds, ::core::mem::transmute(alphavalues.as_ptr()), alphavalues.len().try_into().unwrap()).ok() } pub unsafe fn GetAlphaBlendParams(&self, renderingparams: P0, blendgamma: *mut f32, blendenhancedcontrast: *mut f32, blendcleartypelevel: *mut f32) -> ::windows_core::Result<()> where @@ -6760,7 +6760,7 @@ impl IDWriteLocalFontFileLoader { (::windows_core::Interface::vtable(self).GetFilePathLengthFromKey)(::windows_core::Interface::as_raw(self), fontfilereferencekey, fontfilereferencekeysize, &mut result__).from_abi(result__) } pub unsafe fn GetFilePathFromKey(&self, fontfilereferencekey: *const ::core::ffi::c_void, fontfilereferencekeysize: u32, filepath: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetFilePathFromKey)(::windows_core::Interface::as_raw(self), fontfilereferencekey, fontfilereferencekeysize, ::core::mem::transmute(filepath.as_ptr()), filepath.len() as _).ok() + (::windows_core::Interface::vtable(self).GetFilePathFromKey)(::windows_core::Interface::as_raw(self), fontfilereferencekey, fontfilereferencekeysize, ::core::mem::transmute(filepath.as_ptr()), filepath.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -6809,14 +6809,14 @@ impl IDWriteLocalizedStrings { (::windows_core::Interface::vtable(self).GetLocaleNameLength)(::windows_core::Interface::as_raw(self), index, &mut result__).from_abi(result__) } pub unsafe fn GetLocaleName(&self, index: u32, localename: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLocaleName)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(localename.as_ptr()), localename.len() as _).ok() + (::windows_core::Interface::vtable(self).GetLocaleName)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(localename.as_ptr()), localename.len().try_into().unwrap()).ok() } pub unsafe fn GetStringLength(&self, index: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).GetStringLength)(::windows_core::Interface::as_raw(self), index, &mut result__).from_abi(result__) } pub unsafe fn GetString(&self, index: u32, stringbuffer: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetString)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(stringbuffer.as_ptr()), stringbuffer.len() as _).ok() + (::windows_core::Interface::vtable(self).GetString)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(stringbuffer.as_ptr()), stringbuffer.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(IDWriteLocalizedStrings, ::windows_core::IUnknown); @@ -6973,7 +6973,7 @@ impl IDWriteRemoteFontFileStream { } pub unsafe fn BeginDownload(&self, downloadoperationid: *const ::windows_core::GUID, filefragments: &[DWRITE_FILE_FRAGMENT]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).BeginDownload)(::windows_core::Interface::as_raw(self), downloadoperationid, ::core::mem::transmute(filefragments.as_ptr()), filefragments.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).BeginDownload)(::windows_core::Interface::as_raw(self), downloadoperationid, ::core::mem::transmute(filefragments.as_ptr()), filefragments.len().try_into().unwrap(), &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IDWriteRemoteFontFileStream, ::windows_core::IUnknown, IDWriteFontFileStream); @@ -7171,14 +7171,14 @@ impl IDWriteStringList { (::windows_core::Interface::vtable(self).GetLocaleNameLength)(::windows_core::Interface::as_raw(self), listindex, &mut result__).from_abi(result__) } pub unsafe fn GetLocaleName(&self, listindex: u32, localename: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLocaleName)(::windows_core::Interface::as_raw(self), listindex, ::core::mem::transmute(localename.as_ptr()), localename.len() as _).ok() + (::windows_core::Interface::vtable(self).GetLocaleName)(::windows_core::Interface::as_raw(self), listindex, ::core::mem::transmute(localename.as_ptr()), localename.len().try_into().unwrap()).ok() } pub unsafe fn GetStringLength(&self, listindex: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).GetStringLength)(::windows_core::Interface::as_raw(self), listindex, &mut result__).from_abi(result__) } pub unsafe fn GetString(&self, listindex: u32, stringbuffer: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetString)(::windows_core::Interface::as_raw(self), listindex, ::core::mem::transmute(stringbuffer.as_ptr()), stringbuffer.len() as _).ok() + (::windows_core::Interface::vtable(self).GetString)(::windows_core::Interface::as_raw(self), listindex, ::core::mem::transmute(stringbuffer.as_ptr()), stringbuffer.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(IDWriteStringList, ::windows_core::IUnknown); @@ -7208,7 +7208,7 @@ impl IDWriteTextAnalysisSink { (::windows_core::Interface::vtable(self).SetScriptAnalysis)(::windows_core::Interface::as_raw(self), textposition, textlength, scriptanalysis).ok() } pub unsafe fn SetLineBreakpoints(&self, textposition: u32, linebreakpoints: &[DWRITE_LINE_BREAKPOINT]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetLineBreakpoints)(::windows_core::Interface::as_raw(self), textposition, linebreakpoints.len() as _, ::core::mem::transmute(linebreakpoints.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetLineBreakpoints)(::windows_core::Interface::as_raw(self), textposition, linebreakpoints.len().try_into().unwrap(), ::core::mem::transmute(linebreakpoints.as_ptr())).ok() } pub unsafe fn SetBidiLevel(&self, textposition: u32, textlength: u32, explicitlevel: u8, resolvedlevel: u8) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).SetBidiLevel)(::windows_core::Interface::as_raw(self), textposition, textlength, explicitlevel, resolvedlevel).ok() @@ -7246,7 +7246,7 @@ impl IDWriteTextAnalysisSink1 { (::windows_core::Interface::vtable(self).base__.SetScriptAnalysis)(::windows_core::Interface::as_raw(self), textposition, textlength, scriptanalysis).ok() } pub unsafe fn SetLineBreakpoints(&self, textposition: u32, linebreakpoints: &[DWRITE_LINE_BREAKPOINT]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetLineBreakpoints)(::windows_core::Interface::as_raw(self), textposition, linebreakpoints.len() as _, ::core::mem::transmute(linebreakpoints.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.SetLineBreakpoints)(::windows_core::Interface::as_raw(self), textposition, linebreakpoints.len().try_into().unwrap(), ::core::mem::transmute(linebreakpoints.as_ptr())).ok() } pub unsafe fn SetBidiLevel(&self, textposition: u32, textlength: u32, explicitlevel: u8, resolvedlevel: u8) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.SetBidiLevel)(::windows_core::Interface::as_raw(self), textposition, textlength, explicitlevel, resolvedlevel).ok() @@ -7645,7 +7645,7 @@ impl IDWriteTextAnalyzer1 { .ok() } 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<()> { - (::windows_core::Interface::vtable(self).ApplyCharacterSpacing)(::windows_core::Interface::as_raw(self), leadingspacing, trailingspacing, minimumadvancewidth, clustermap.len() as _, glyphcount, ::core::mem::transmute(clustermap.as_ptr()), glyphadvances, glyphoffsets, glyphproperties, modifiedglyphadvances, modifiedglyphoffsets).ok() + (::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, modifiedglyphoffsets).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -7869,7 +7869,7 @@ impl IDWriteTextAnalyzer2 { .ok() } 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<()> { - (::windows_core::Interface::vtable(self).base__.ApplyCharacterSpacing)(::windows_core::Interface::as_raw(self), leadingspacing, trailingspacing, minimumadvancewidth, clustermap.len() as _, glyphcount, ::core::mem::transmute(clustermap.as_ptr()), glyphadvances, glyphoffsets, glyphproperties, modifiedglyphadvances, modifiedglyphoffsets).ok() + (::windows_core::Interface::vtable(self).base__.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, modifiedglyphoffsets).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -7958,7 +7958,7 @@ impl IDWriteTextAnalyzer2 { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).GetTypographicFeatures)(::windows_core::Interface::as_raw(self), fontface.into_param().abi(), ::core::mem::transmute(scriptanalysis), localename.into_param().abi(), tags.len() as _, actualtagcount, ::core::mem::transmute(tags.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetTypographicFeatures)(::windows_core::Interface::as_raw(self), fontface.into_param().abi(), ::core::mem::transmute(scriptanalysis), localename.into_param().abi(), tags.len().try_into().unwrap(), actualtagcount, ::core::mem::transmute(tags.as_ptr())).ok() } pub unsafe fn CheckTypographicFeature(&self, fontface: P0, scriptanalysis: DWRITE_SCRIPT_ANALYSIS, localename: P1, featuretag: DWRITE_FONT_FEATURE_TAG, glyphcount: u32, glyphindices: *const u16, featureapplies: *mut u8) -> ::windows_core::Result<()> where @@ -8051,7 +8051,7 @@ impl IDWriteTextFormat { (::windows_core::Interface::vtable(self).GetFontFamilyNameLength)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetFontFamilyName(&self, fontfamilyname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetFontFamilyName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontfamilyname.as_ptr()), fontfamilyname.len() as _).ok() + (::windows_core::Interface::vtable(self).GetFontFamilyName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontfamilyname.as_ptr()), fontfamilyname.len().try_into().unwrap()).ok() } pub unsafe fn GetFontWeight(&self) -> DWRITE_FONT_WEIGHT { (::windows_core::Interface::vtable(self).GetFontWeight)(::windows_core::Interface::as_raw(self)) @@ -8069,7 +8069,7 @@ impl IDWriteTextFormat { (::windows_core::Interface::vtable(self).GetLocaleNameLength)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetLocaleName(&self, localename: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLocaleName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(localename.as_ptr()), localename.len() as _).ok() + (::windows_core::Interface::vtable(self).GetLocaleName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(localename.as_ptr()), localename.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(IDWriteTextFormat, ::windows_core::IUnknown); @@ -8174,7 +8174,7 @@ impl IDWriteTextFormat1 { (::windows_core::Interface::vtable(self).base__.GetFontFamilyNameLength)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetFontFamilyName(&self, fontfamilyname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetFontFamilyName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontfamilyname.as_ptr()), fontfamilyname.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.GetFontFamilyName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontfamilyname.as_ptr()), fontfamilyname.len().try_into().unwrap()).ok() } pub unsafe fn GetFontWeight(&self) -> DWRITE_FONT_WEIGHT { (::windows_core::Interface::vtable(self).base__.GetFontWeight)(::windows_core::Interface::as_raw(self)) @@ -8192,7 +8192,7 @@ impl IDWriteTextFormat1 { (::windows_core::Interface::vtable(self).base__.GetLocaleNameLength)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetLocaleName(&self, localename: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetLocaleName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(localename.as_ptr()), localename.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.GetLocaleName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(localename.as_ptr()), localename.len().try_into().unwrap()).ok() } pub unsafe fn SetVerticalGlyphOrientation(&self, glyphorientation: DWRITE_VERTICAL_GLYPH_ORIENTATION) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).SetVerticalGlyphOrientation)(::windows_core::Interface::as_raw(self), glyphorientation).ok() @@ -8321,7 +8321,7 @@ impl IDWriteTextFormat2 { (::windows_core::Interface::vtable(self).base__.base__.GetFontFamilyNameLength)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetFontFamilyName(&self, fontfamilyname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetFontFamilyName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontfamilyname.as_ptr()), fontfamilyname.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetFontFamilyName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontfamilyname.as_ptr()), fontfamilyname.len().try_into().unwrap()).ok() } pub unsafe fn GetFontWeight(&self) -> DWRITE_FONT_WEIGHT { (::windows_core::Interface::vtable(self).base__.base__.GetFontWeight)(::windows_core::Interface::as_raw(self)) @@ -8339,7 +8339,7 @@ impl IDWriteTextFormat2 { (::windows_core::Interface::vtable(self).base__.base__.GetLocaleNameLength)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetLocaleName(&self, localename: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetLocaleName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(localename.as_ptr()), localename.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetLocaleName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(localename.as_ptr()), localename.len().try_into().unwrap()).ok() } pub unsafe fn SetVerticalGlyphOrientation(&self, glyphorientation: DWRITE_VERTICAL_GLYPH_ORIENTATION) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.SetVerticalGlyphOrientation)(::windows_core::Interface::as_raw(self), glyphorientation).ok() @@ -8462,7 +8462,7 @@ impl IDWriteTextFormat3 { (::windows_core::Interface::vtable(self).base__.base__.base__.GetFontFamilyNameLength)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetFontFamilyName(&self, fontfamilyname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetFontFamilyName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontfamilyname.as_ptr()), fontfamilyname.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetFontFamilyName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontfamilyname.as_ptr()), fontfamilyname.len().try_into().unwrap()).ok() } pub unsafe fn GetFontWeight(&self) -> DWRITE_FONT_WEIGHT { (::windows_core::Interface::vtable(self).base__.base__.base__.GetFontWeight)(::windows_core::Interface::as_raw(self)) @@ -8480,7 +8480,7 @@ impl IDWriteTextFormat3 { (::windows_core::Interface::vtable(self).base__.base__.base__.GetLocaleNameLength)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetLocaleName(&self, localename: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetLocaleName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(localename.as_ptr()), localename.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetLocaleName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(localename.as_ptr()), localename.len().try_into().unwrap()).ok() } pub unsafe fn SetVerticalGlyphOrientation(&self, glyphorientation: DWRITE_VERTICAL_GLYPH_ORIENTATION) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.SetVerticalGlyphOrientation)(::windows_core::Interface::as_raw(self), glyphorientation).ok() @@ -8524,13 +8524,13 @@ impl IDWriteTextFormat3 { (::windows_core::Interface::vtable(self).base__.GetLineSpacing2)(::windows_core::Interface::as_raw(self), linespacingoptions).ok() } pub unsafe fn SetFontAxisValues(&self, fontaxisvalues: &[DWRITE_FONT_AXIS_VALUE]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetFontAxisValues)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len() as _).ok() + (::windows_core::Interface::vtable(self).SetFontAxisValues)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len().try_into().unwrap()).ok() } pub unsafe fn GetFontAxisValueCount(&self) -> u32 { (::windows_core::Interface::vtable(self).GetFontAxisValueCount)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetFontAxisValues(&self, fontaxisvalues: &mut [DWRITE_FONT_AXIS_VALUE]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetFontAxisValues)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len() as _).ok() + (::windows_core::Interface::vtable(self).GetFontAxisValues)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len().try_into().unwrap()).ok() } pub unsafe fn GetAutomaticFontAxes(&self) -> DWRITE_AUTOMATIC_FONT_AXES { (::windows_core::Interface::vtable(self).GetAutomaticFontAxes)(::windows_core::Interface::as_raw(self)) @@ -8621,7 +8621,7 @@ impl IDWriteTextLayout { (::windows_core::Interface::vtable(self).base__.GetFontFamilyNameLength)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetFontFamilyName(&self, fontfamilyname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetFontFamilyName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontfamilyname.as_ptr()), fontfamilyname.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.GetFontFamilyName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontfamilyname.as_ptr()), fontfamilyname.len().try_into().unwrap()).ok() } pub unsafe fn GetFontWeight(&self) -> DWRITE_FONT_WEIGHT { (::windows_core::Interface::vtable(self).base__.GetFontWeight)(::windows_core::Interface::as_raw(self)) @@ -8639,7 +8639,7 @@ impl IDWriteTextLayout { (::windows_core::Interface::vtable(self).base__.GetLocaleNameLength)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetLocaleName(&self, localename: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetLocaleName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(localename.as_ptr()), localename.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.GetLocaleName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(localename.as_ptr()), localename.len().try_into().unwrap()).ok() } pub unsafe fn SetMaxWidth(&self, maxwidth: f32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).SetMaxWidth)(::windows_core::Interface::as_raw(self), maxwidth).ok() @@ -8724,7 +8724,7 @@ impl IDWriteTextLayout { (::windows_core::Interface::vtable(self).GetFontFamilyNameLength2)(::windows_core::Interface::as_raw(self), currentposition, namelength, ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetFontFamilyName2(&self, currentposition: u32, fontfamilyname: &mut [u16], textrange: ::core::option::Option<*mut DWRITE_TEXT_RANGE>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetFontFamilyName2)(::windows_core::Interface::as_raw(self), currentposition, ::core::mem::transmute(fontfamilyname.as_ptr()), fontfamilyname.len() as _, ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetFontFamilyName2)(::windows_core::Interface::as_raw(self), currentposition, ::core::mem::transmute(fontfamilyname.as_ptr()), fontfamilyname.len().try_into().unwrap(), ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetFontWeight2(&self, currentposition: u32, fontweight: *mut DWRITE_FONT_WEIGHT, textrange: ::core::option::Option<*mut DWRITE_TEXT_RANGE>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetFontWeight2)(::windows_core::Interface::as_raw(self), currentposition, fontweight, ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() @@ -8761,7 +8761,7 @@ impl IDWriteTextLayout { (::windows_core::Interface::vtable(self).GetLocaleNameLength2)(::windows_core::Interface::as_raw(self), currentposition, namelength, ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetLocaleName2(&self, currentposition: u32, localename: &mut [u16], textrange: ::core::option::Option<*mut DWRITE_TEXT_RANGE>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLocaleName2)(::windows_core::Interface::as_raw(self), currentposition, ::core::mem::transmute(localename.as_ptr()), localename.len() as _, ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetLocaleName2)(::windows_core::Interface::as_raw(self), currentposition, ::core::mem::transmute(localename.as_ptr()), localename.len().try_into().unwrap(), ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Draw(&self, clientdrawingcontext: ::core::option::Option<*const ::core::ffi::c_void>, renderer: P0, originx: f32, originy: f32) -> ::windows_core::Result<()> where @@ -8772,7 +8772,7 @@ impl IDWriteTextLayout { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetLineMetrics(&self, linemetrics: ::core::option::Option<&mut [DWRITE_LINE_METRICS]>, actuallinecount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLineMetrics)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(linemetrics.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), linemetrics.as_deref().map_or(0, |slice| slice.len() as _), actuallinecount).ok() + (::windows_core::Interface::vtable(self).GetLineMetrics)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(linemetrics.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), linemetrics.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), actuallinecount).ok() } pub unsafe fn GetMetrics(&self, textmetrics: *mut DWRITE_TEXT_METRICS) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetMetrics)(::windows_core::Interface::as_raw(self), textmetrics).ok() @@ -8782,7 +8782,7 @@ impl IDWriteTextLayout { (::windows_core::Interface::vtable(self).GetOverhangMetrics)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetClusterMetrics(&self, clustermetrics: ::core::option::Option<&mut [DWRITE_CLUSTER_METRICS]>, actualclustercount: *mut u32) -> ::windows_core::Result<()> { - (::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() as _), actualclustercount).ok() + (::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).ok() } pub unsafe fn DetermineMinWidth(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -8804,7 +8804,7 @@ impl IDWriteTextLayout { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn HitTestTextRange(&self, textposition: u32, textlength: u32, originx: f32, originy: f32, hittestmetrics: ::core::option::Option<&mut [DWRITE_HIT_TEST_METRICS]>, actualhittestmetricscount: *mut u32) -> ::windows_core::Result<()> { - (::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() as _), actualhittestmetricscount).ok() + (::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).ok() } } ::windows_core::imp::interface_hierarchy!(IDWriteTextLayout, ::windows_core::IUnknown, IDWriteTextFormat); @@ -8947,7 +8947,7 @@ impl IDWriteTextLayout1 { (::windows_core::Interface::vtable(self).base__.base__.GetFontFamilyNameLength)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetFontFamilyName(&self, fontfamilyname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetFontFamilyName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontfamilyname.as_ptr()), fontfamilyname.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetFontFamilyName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontfamilyname.as_ptr()), fontfamilyname.len().try_into().unwrap()).ok() } pub unsafe fn GetFontWeight(&self) -> DWRITE_FONT_WEIGHT { (::windows_core::Interface::vtable(self).base__.base__.GetFontWeight)(::windows_core::Interface::as_raw(self)) @@ -8965,7 +8965,7 @@ impl IDWriteTextLayout1 { (::windows_core::Interface::vtable(self).base__.base__.GetLocaleNameLength)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetLocaleName(&self, localename: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetLocaleName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(localename.as_ptr()), localename.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetLocaleName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(localename.as_ptr()), localename.len().try_into().unwrap()).ok() } pub unsafe fn SetMaxWidth(&self, maxwidth: f32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.SetMaxWidth)(::windows_core::Interface::as_raw(self), maxwidth).ok() @@ -9050,7 +9050,7 @@ impl IDWriteTextLayout1 { (::windows_core::Interface::vtable(self).base__.GetFontFamilyNameLength2)(::windows_core::Interface::as_raw(self), currentposition, namelength, ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetFontFamilyName2(&self, currentposition: u32, fontfamilyname: &mut [u16], textrange: ::core::option::Option<*mut DWRITE_TEXT_RANGE>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetFontFamilyName2)(::windows_core::Interface::as_raw(self), currentposition, ::core::mem::transmute(fontfamilyname.as_ptr()), fontfamilyname.len() as _, ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetFontFamilyName2)(::windows_core::Interface::as_raw(self), currentposition, ::core::mem::transmute(fontfamilyname.as_ptr()), fontfamilyname.len().try_into().unwrap(), ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetFontWeight2(&self, currentposition: u32, fontweight: *mut DWRITE_FONT_WEIGHT, textrange: ::core::option::Option<*mut DWRITE_TEXT_RANGE>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetFontWeight2)(::windows_core::Interface::as_raw(self), currentposition, fontweight, ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() @@ -9087,7 +9087,7 @@ impl IDWriteTextLayout1 { (::windows_core::Interface::vtable(self).base__.GetLocaleNameLength2)(::windows_core::Interface::as_raw(self), currentposition, namelength, ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetLocaleName2(&self, currentposition: u32, localename: &mut [u16], textrange: ::core::option::Option<*mut DWRITE_TEXT_RANGE>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetLocaleName2)(::windows_core::Interface::as_raw(self), currentposition, ::core::mem::transmute(localename.as_ptr()), localename.len() as _, ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetLocaleName2)(::windows_core::Interface::as_raw(self), currentposition, ::core::mem::transmute(localename.as_ptr()), localename.len().try_into().unwrap(), ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Draw(&self, clientdrawingcontext: ::core::option::Option<*const ::core::ffi::c_void>, renderer: P0, originx: f32, originy: f32) -> ::windows_core::Result<()> where @@ -9098,7 +9098,7 @@ impl IDWriteTextLayout1 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetLineMetrics(&self, linemetrics: ::core::option::Option<&mut [DWRITE_LINE_METRICS]>, actuallinecount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.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() as _), actuallinecount).ok() + (::windows_core::Interface::vtable(self).base__.GetLineMetrics)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(linemetrics.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), linemetrics.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), actuallinecount).ok() } pub unsafe fn GetMetrics(&self, textmetrics: *mut DWRITE_TEXT_METRICS) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetMetrics)(::windows_core::Interface::as_raw(self), textmetrics).ok() @@ -9108,7 +9108,7 @@ impl IDWriteTextLayout1 { (::windows_core::Interface::vtable(self).base__.GetOverhangMetrics)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetClusterMetrics(&self, clustermetrics: ::core::option::Option<&mut [DWRITE_CLUSTER_METRICS]>, actualclustercount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.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() as _), actualclustercount).ok() + (::windows_core::Interface::vtable(self).base__.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).ok() } pub unsafe fn DetermineMinWidth(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -9130,7 +9130,7 @@ impl IDWriteTextLayout1 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn HitTestTextRange(&self, textposition: u32, textlength: u32, originx: f32, originy: f32, hittestmetrics: ::core::option::Option<&mut [DWRITE_HIT_TEST_METRICS]>, actualhittestmetricscount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.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() as _), actualhittestmetricscount).ok() + (::windows_core::Interface::vtable(self).base__.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).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -9239,7 +9239,7 @@ impl IDWriteTextLayout2 { (::windows_core::Interface::vtable(self).base__.base__.base__.GetFontFamilyNameLength)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetFontFamilyName(&self, fontfamilyname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetFontFamilyName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontfamilyname.as_ptr()), fontfamilyname.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetFontFamilyName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontfamilyname.as_ptr()), fontfamilyname.len().try_into().unwrap()).ok() } pub unsafe fn GetFontWeight(&self) -> DWRITE_FONT_WEIGHT { (::windows_core::Interface::vtable(self).base__.base__.base__.GetFontWeight)(::windows_core::Interface::as_raw(self)) @@ -9257,7 +9257,7 @@ impl IDWriteTextLayout2 { (::windows_core::Interface::vtable(self).base__.base__.base__.GetLocaleNameLength)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetLocaleName(&self, localename: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetLocaleName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(localename.as_ptr()), localename.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetLocaleName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(localename.as_ptr()), localename.len().try_into().unwrap()).ok() } pub unsafe fn SetMaxWidth(&self, maxwidth: f32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.SetMaxWidth)(::windows_core::Interface::as_raw(self), maxwidth).ok() @@ -9342,7 +9342,7 @@ impl IDWriteTextLayout2 { (::windows_core::Interface::vtable(self).base__.base__.GetFontFamilyNameLength2)(::windows_core::Interface::as_raw(self), currentposition, namelength, ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetFontFamilyName2(&self, currentposition: u32, fontfamilyname: &mut [u16], textrange: ::core::option::Option<*mut DWRITE_TEXT_RANGE>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetFontFamilyName2)(::windows_core::Interface::as_raw(self), currentposition, ::core::mem::transmute(fontfamilyname.as_ptr()), fontfamilyname.len() as _, ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetFontFamilyName2)(::windows_core::Interface::as_raw(self), currentposition, ::core::mem::transmute(fontfamilyname.as_ptr()), fontfamilyname.len().try_into().unwrap(), ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetFontWeight2(&self, currentposition: u32, fontweight: *mut DWRITE_FONT_WEIGHT, textrange: ::core::option::Option<*mut DWRITE_TEXT_RANGE>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.GetFontWeight2)(::windows_core::Interface::as_raw(self), currentposition, fontweight, ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() @@ -9379,7 +9379,7 @@ impl IDWriteTextLayout2 { (::windows_core::Interface::vtable(self).base__.base__.GetLocaleNameLength2)(::windows_core::Interface::as_raw(self), currentposition, namelength, ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetLocaleName2(&self, currentposition: u32, localename: &mut [u16], textrange: ::core::option::Option<*mut DWRITE_TEXT_RANGE>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetLocaleName2)(::windows_core::Interface::as_raw(self), currentposition, ::core::mem::transmute(localename.as_ptr()), localename.len() as _, ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetLocaleName2)(::windows_core::Interface::as_raw(self), currentposition, ::core::mem::transmute(localename.as_ptr()), localename.len().try_into().unwrap(), ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Draw(&self, clientdrawingcontext: ::core::option::Option<*const ::core::ffi::c_void>, renderer: P0, originx: f32, originy: f32) -> ::windows_core::Result<()> where @@ -9390,7 +9390,7 @@ impl IDWriteTextLayout2 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetLineMetrics(&self, linemetrics: ::core::option::Option<&mut [DWRITE_LINE_METRICS]>, actuallinecount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.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() as _), actuallinecount).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetLineMetrics)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(linemetrics.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), linemetrics.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), actuallinecount).ok() } pub unsafe fn GetMetrics(&self, textmetrics: *mut DWRITE_TEXT_METRICS) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.GetMetrics)(::windows_core::Interface::as_raw(self), textmetrics).ok() @@ -9400,7 +9400,7 @@ impl IDWriteTextLayout2 { (::windows_core::Interface::vtable(self).base__.base__.GetOverhangMetrics)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetClusterMetrics(&self, clustermetrics: ::core::option::Option<&mut [DWRITE_CLUSTER_METRICS]>, actualclustercount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.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() as _), actualclustercount).ok() + (::windows_core::Interface::vtable(self).base__.base__.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).ok() } pub unsafe fn DetermineMinWidth(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -9422,7 +9422,7 @@ impl IDWriteTextLayout2 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn HitTestTextRange(&self, textposition: u32, textlength: u32, originx: f32, originy: f32, hittestmetrics: ::core::option::Option<&mut [DWRITE_HIT_TEST_METRICS]>, actualhittestmetricscount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.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() as _), actualhittestmetricscount).ok() + (::windows_core::Interface::vtable(self).base__.base__.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).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -9574,7 +9574,7 @@ impl IDWriteTextLayout3 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetFontFamilyNameLength)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetFontFamilyName(&self, fontfamilyname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetFontFamilyName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontfamilyname.as_ptr()), fontfamilyname.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetFontFamilyName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontfamilyname.as_ptr()), fontfamilyname.len().try_into().unwrap()).ok() } pub unsafe fn GetFontWeight(&self) -> DWRITE_FONT_WEIGHT { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetFontWeight)(::windows_core::Interface::as_raw(self)) @@ -9592,7 +9592,7 @@ impl IDWriteTextLayout3 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetLocaleNameLength)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetLocaleName(&self, localename: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetLocaleName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(localename.as_ptr()), localename.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetLocaleName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(localename.as_ptr()), localename.len().try_into().unwrap()).ok() } pub unsafe fn SetMaxWidth(&self, maxwidth: f32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.SetMaxWidth)(::windows_core::Interface::as_raw(self), maxwidth).ok() @@ -9677,7 +9677,7 @@ impl IDWriteTextLayout3 { (::windows_core::Interface::vtable(self).base__.base__.base__.GetFontFamilyNameLength2)(::windows_core::Interface::as_raw(self), currentposition, namelength, ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetFontFamilyName2(&self, currentposition: u32, fontfamilyname: &mut [u16], textrange: ::core::option::Option<*mut DWRITE_TEXT_RANGE>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetFontFamilyName2)(::windows_core::Interface::as_raw(self), currentposition, ::core::mem::transmute(fontfamilyname.as_ptr()), fontfamilyname.len() as _, ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetFontFamilyName2)(::windows_core::Interface::as_raw(self), currentposition, ::core::mem::transmute(fontfamilyname.as_ptr()), fontfamilyname.len().try_into().unwrap(), ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetFontWeight2(&self, currentposition: u32, fontweight: *mut DWRITE_FONT_WEIGHT, textrange: ::core::option::Option<*mut DWRITE_TEXT_RANGE>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.GetFontWeight2)(::windows_core::Interface::as_raw(self), currentposition, fontweight, ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() @@ -9714,7 +9714,7 @@ impl IDWriteTextLayout3 { (::windows_core::Interface::vtable(self).base__.base__.base__.GetLocaleNameLength2)(::windows_core::Interface::as_raw(self), currentposition, namelength, ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetLocaleName2(&self, currentposition: u32, localename: &mut [u16], textrange: ::core::option::Option<*mut DWRITE_TEXT_RANGE>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetLocaleName2)(::windows_core::Interface::as_raw(self), currentposition, ::core::mem::transmute(localename.as_ptr()), localename.len() as _, ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetLocaleName2)(::windows_core::Interface::as_raw(self), currentposition, ::core::mem::transmute(localename.as_ptr()), localename.len().try_into().unwrap(), ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Draw(&self, clientdrawingcontext: ::core::option::Option<*const ::core::ffi::c_void>, renderer: P0, originx: f32, originy: f32) -> ::windows_core::Result<()> where @@ -9725,7 +9725,7 @@ impl IDWriteTextLayout3 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetLineMetrics(&self, linemetrics: ::core::option::Option<&mut [DWRITE_LINE_METRICS]>, actuallinecount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.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() as _), actuallinecount).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetLineMetrics)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(linemetrics.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), linemetrics.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), actuallinecount).ok() } pub unsafe fn GetMetrics(&self, textmetrics: *mut DWRITE_TEXT_METRICS) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.GetMetrics)(::windows_core::Interface::as_raw(self), textmetrics).ok() @@ -9735,7 +9735,7 @@ impl IDWriteTextLayout3 { (::windows_core::Interface::vtable(self).base__.base__.base__.GetOverhangMetrics)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetClusterMetrics(&self, clustermetrics: ::core::option::Option<&mut [DWRITE_CLUSTER_METRICS]>, actualclustercount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.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() as _), actualclustercount).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.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).ok() } pub unsafe fn DetermineMinWidth(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -9757,7 +9757,7 @@ impl IDWriteTextLayout3 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn HitTestTextRange(&self, textposition: u32, textlength: u32, originx: f32, originy: f32, hittestmetrics: ::core::option::Option<&mut [DWRITE_HIT_TEST_METRICS]>, actualhittestmetricscount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.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() as _), actualhittestmetricscount).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.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).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -9828,7 +9828,7 @@ impl IDWriteTextLayout3 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetLineMetrics2(&self, linemetrics: ::core::option::Option<&mut [DWRITE_LINE_METRICS1]>, actuallinecount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLineMetrics2)(::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() as _), actuallinecount).ok() + (::windows_core::Interface::vtable(self).GetLineMetrics2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(linemetrics.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), linemetrics.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), actuallinecount).ok() } } ::windows_core::imp::interface_hierarchy!(IDWriteTextLayout3, ::windows_core::IUnknown, IDWriteTextFormat, IDWriteTextLayout, IDWriteTextLayout1, IDWriteTextLayout2); @@ -9915,7 +9915,7 @@ impl IDWriteTextLayout4 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetFontFamilyNameLength)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetFontFamilyName(&self, fontfamilyname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetFontFamilyName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontfamilyname.as_ptr()), fontfamilyname.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetFontFamilyName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontfamilyname.as_ptr()), fontfamilyname.len().try_into().unwrap()).ok() } pub unsafe fn GetFontWeight(&self) -> DWRITE_FONT_WEIGHT { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetFontWeight)(::windows_core::Interface::as_raw(self)) @@ -9933,7 +9933,7 @@ impl IDWriteTextLayout4 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetLocaleNameLength)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetLocaleName(&self, localename: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetLocaleName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(localename.as_ptr()), localename.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetLocaleName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(localename.as_ptr()), localename.len().try_into().unwrap()).ok() } pub unsafe fn SetMaxWidth(&self, maxwidth: f32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.SetMaxWidth)(::windows_core::Interface::as_raw(self), maxwidth).ok() @@ -10018,7 +10018,7 @@ impl IDWriteTextLayout4 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetFontFamilyNameLength2)(::windows_core::Interface::as_raw(self), currentposition, namelength, ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetFontFamilyName2(&self, currentposition: u32, fontfamilyname: &mut [u16], textrange: ::core::option::Option<*mut DWRITE_TEXT_RANGE>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetFontFamilyName2)(::windows_core::Interface::as_raw(self), currentposition, ::core::mem::transmute(fontfamilyname.as_ptr()), fontfamilyname.len() as _, ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetFontFamilyName2)(::windows_core::Interface::as_raw(self), currentposition, ::core::mem::transmute(fontfamilyname.as_ptr()), fontfamilyname.len().try_into().unwrap(), ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetFontWeight2(&self, currentposition: u32, fontweight: *mut DWRITE_FONT_WEIGHT, textrange: ::core::option::Option<*mut DWRITE_TEXT_RANGE>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetFontWeight2)(::windows_core::Interface::as_raw(self), currentposition, fontweight, ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() @@ -10055,7 +10055,7 @@ impl IDWriteTextLayout4 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetLocaleNameLength2)(::windows_core::Interface::as_raw(self), currentposition, namelength, ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetLocaleName2(&self, currentposition: u32, localename: &mut [u16], textrange: ::core::option::Option<*mut DWRITE_TEXT_RANGE>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetLocaleName2)(::windows_core::Interface::as_raw(self), currentposition, ::core::mem::transmute(localename.as_ptr()), localename.len() as _, ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetLocaleName2)(::windows_core::Interface::as_raw(self), currentposition, ::core::mem::transmute(localename.as_ptr()), localename.len().try_into().unwrap(), ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Draw(&self, clientdrawingcontext: ::core::option::Option<*const ::core::ffi::c_void>, renderer: P0, originx: f32, originy: f32) -> ::windows_core::Result<()> where @@ -10066,7 +10066,7 @@ impl IDWriteTextLayout4 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetLineMetrics(&self, linemetrics: ::core::option::Option<&mut [DWRITE_LINE_METRICS]>, actuallinecount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.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() as _), actuallinecount).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetLineMetrics)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(linemetrics.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), linemetrics.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), actuallinecount).ok() } pub unsafe fn GetMetrics(&self, textmetrics: *mut DWRITE_TEXT_METRICS) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetMetrics)(::windows_core::Interface::as_raw(self), textmetrics).ok() @@ -10076,7 +10076,7 @@ impl IDWriteTextLayout4 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetOverhangMetrics)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetClusterMetrics(&self, clustermetrics: ::core::option::Option<&mut [DWRITE_CLUSTER_METRICS]>, actualclustercount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.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() as _), actualclustercount).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.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).ok() } pub unsafe fn DetermineMinWidth(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -10098,7 +10098,7 @@ impl IDWriteTextLayout4 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn HitTestTextRange(&self, textposition: u32, textlength: u32, originx: f32, originy: f32, hittestmetrics: ::core::option::Option<&mut [DWRITE_HIT_TEST_METRICS]>, actualhittestmetricscount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.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() as _), actualhittestmetricscount).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.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).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -10169,16 +10169,16 @@ impl IDWriteTextLayout4 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetLineMetrics2(&self, linemetrics: ::core::option::Option<&mut [DWRITE_LINE_METRICS1]>, actuallinecount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetLineMetrics2)(::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() as _), actuallinecount).ok() + (::windows_core::Interface::vtable(self).base__.GetLineMetrics2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(linemetrics.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), linemetrics.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), actuallinecount).ok() } pub unsafe fn SetFontAxisValues(&self, fontaxisvalues: &[DWRITE_FONT_AXIS_VALUE], textrange: DWRITE_TEXT_RANGE) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetFontAxisValues)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len() as _, ::core::mem::transmute(textrange)).ok() + (::windows_core::Interface::vtable(self).SetFontAxisValues)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len().try_into().unwrap(), ::core::mem::transmute(textrange)).ok() } pub unsafe fn GetFontAxisValueCount(&self, currentposition: u32) -> u32 { (::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: ::core::option::Option<*mut DWRITE_TEXT_RANGE>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetFontAxisValues)(::windows_core::Interface::as_raw(self), currentposition, ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len() as _, ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetFontAxisValues)(::windows_core::Interface::as_raw(self), currentposition, ::core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len().try_into().unwrap(), ::core::mem::transmute(textrange.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAutomaticFontAxes(&self) -> DWRITE_AUTOMATIC_FONT_AXES { (::windows_core::Interface::vtable(self).GetAutomaticFontAxes)(::windows_core::Interface::as_raw(self)) 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 1d62ec990b..4843545083 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Dxgi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Dxgi/mod.rs @@ -601,7 +601,7 @@ impl IDXGIDevice { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Dxgi_Common"))] pub unsafe fn CreateSurface(&self, pdesc: *const DXGI_SURFACE_DESC, usage: DXGI_USAGE, psharedresource: ::core::option::Option<*const DXGI_SHARED_RESOURCE>, ppsurface: &mut [::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).CreateSurface)(::windows_core::Interface::as_raw(self), pdesc, ppsurface.len() as _, usage, ::core::mem::transmute(psharedresource.unwrap_or(::std::ptr::null())), ::core::mem::transmute(ppsurface.as_ptr())).ok() + (::windows_core::Interface::vtable(self).CreateSurface)(::windows_core::Interface::as_raw(self), pdesc, ppsurface.len().try_into().unwrap(), usage, ::core::mem::transmute(psharedresource.unwrap_or(::std::ptr::null())), ::core::mem::transmute(ppsurface.as_ptr())).ok() } pub unsafe fn QueryResourceResidency(&self, ppresources: *const ::core::option::Option<::windows_core::IUnknown>, presidencystatus: *mut DXGI_RESIDENCY, numresources: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).QueryResourceResidency)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppresources), presidencystatus, numresources).ok() @@ -666,7 +666,7 @@ impl IDXGIDevice1 { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Dxgi_Common"))] pub unsafe fn CreateSurface(&self, pdesc: *const DXGI_SURFACE_DESC, usage: DXGI_USAGE, psharedresource: ::core::option::Option<*const DXGI_SHARED_RESOURCE>, ppsurface: &mut [::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.CreateSurface)(::windows_core::Interface::as_raw(self), pdesc, ppsurface.len() as _, usage, ::core::mem::transmute(psharedresource.unwrap_or(::std::ptr::null())), ::core::mem::transmute(ppsurface.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.CreateSurface)(::windows_core::Interface::as_raw(self), pdesc, ppsurface.len().try_into().unwrap(), usage, ::core::mem::transmute(psharedresource.unwrap_or(::std::ptr::null())), ::core::mem::transmute(ppsurface.as_ptr())).ok() } pub unsafe fn QueryResourceResidency(&self, ppresources: *const ::core::option::Option<::windows_core::IUnknown>, presidencystatus: *mut DXGI_RESIDENCY, numresources: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.QueryResourceResidency)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppresources), presidencystatus, numresources).ok() @@ -732,7 +732,7 @@ impl IDXGIDevice2 { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Dxgi_Common"))] pub unsafe fn CreateSurface(&self, pdesc: *const DXGI_SURFACE_DESC, usage: DXGI_USAGE, psharedresource: ::core::option::Option<*const DXGI_SHARED_RESOURCE>, ppsurface: &mut [::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.CreateSurface)(::windows_core::Interface::as_raw(self), pdesc, ppsurface.len() as _, usage, ::core::mem::transmute(psharedresource.unwrap_or(::std::ptr::null())), ::core::mem::transmute(ppsurface.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.CreateSurface)(::windows_core::Interface::as_raw(self), pdesc, ppsurface.len().try_into().unwrap(), usage, ::core::mem::transmute(psharedresource.unwrap_or(::std::ptr::null())), ::core::mem::transmute(ppsurface.as_ptr())).ok() } pub unsafe fn QueryResourceResidency(&self, ppresources: *const ::core::option::Option<::windows_core::IUnknown>, presidencystatus: *mut DXGI_RESIDENCY, numresources: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.QueryResourceResidency)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppresources), presidencystatus, numresources).ok() @@ -752,7 +752,7 @@ impl IDXGIDevice2 { (::windows_core::Interface::vtable(self).base__.GetMaximumFrameLatency)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn OfferResources(&self, ppresources: &[::core::option::Option], priority: DXGI_OFFER_RESOURCE_PRIORITY) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).OfferResources)(::windows_core::Interface::as_raw(self), ppresources.len() as _, ::core::mem::transmute(ppresources.as_ptr()), priority).ok() + (::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() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -821,7 +821,7 @@ impl IDXGIDevice3 { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Dxgi_Common"))] pub unsafe fn CreateSurface(&self, pdesc: *const DXGI_SURFACE_DESC, usage: DXGI_USAGE, psharedresource: ::core::option::Option<*const DXGI_SHARED_RESOURCE>, ppsurface: &mut [::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.CreateSurface)(::windows_core::Interface::as_raw(self), pdesc, ppsurface.len() as _, usage, ::core::mem::transmute(psharedresource.unwrap_or(::std::ptr::null())), ::core::mem::transmute(ppsurface.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.CreateSurface)(::windows_core::Interface::as_raw(self), pdesc, ppsurface.len().try_into().unwrap(), usage, ::core::mem::transmute(psharedresource.unwrap_or(::std::ptr::null())), ::core::mem::transmute(ppsurface.as_ptr())).ok() } pub unsafe fn QueryResourceResidency(&self, ppresources: *const ::core::option::Option<::windows_core::IUnknown>, presidencystatus: *mut DXGI_RESIDENCY, numresources: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.QueryResourceResidency)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppresources), presidencystatus, numresources).ok() @@ -841,7 +841,7 @@ impl IDXGIDevice3 { (::windows_core::Interface::vtable(self).base__.base__.GetMaximumFrameLatency)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn OfferResources(&self, ppresources: &[::core::option::Option], priority: DXGI_OFFER_RESOURCE_PRIORITY) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.OfferResources)(::windows_core::Interface::as_raw(self), ppresources.len() as _, ::core::mem::transmute(ppresources.as_ptr()), priority).ok() + (::windows_core::Interface::vtable(self).base__.OfferResources)(::windows_core::Interface::as_raw(self), ppresources.len().try_into().unwrap(), ::core::mem::transmute(ppresources.as_ptr()), priority).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -905,7 +905,7 @@ impl IDXGIDevice4 { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Dxgi_Common"))] pub unsafe fn CreateSurface(&self, pdesc: *const DXGI_SURFACE_DESC, usage: DXGI_USAGE, psharedresource: ::core::option::Option<*const DXGI_SHARED_RESOURCE>, ppsurface: &mut [::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateSurface)(::windows_core::Interface::as_raw(self), pdesc, ppsurface.len() as _, usage, ::core::mem::transmute(psharedresource.unwrap_or(::std::ptr::null())), ::core::mem::transmute(ppsurface.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateSurface)(::windows_core::Interface::as_raw(self), pdesc, ppsurface.len().try_into().unwrap(), usage, ::core::mem::transmute(psharedresource.unwrap_or(::std::ptr::null())), ::core::mem::transmute(ppsurface.as_ptr())).ok() } pub unsafe fn QueryResourceResidency(&self, ppresources: *const ::core::option::Option<::windows_core::IUnknown>, presidencystatus: *mut DXGI_RESIDENCY, numresources: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.QueryResourceResidency)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppresources), presidencystatus, numresources).ok() @@ -925,7 +925,7 @@ impl IDXGIDevice4 { (::windows_core::Interface::vtable(self).base__.base__.base__.GetMaximumFrameLatency)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn OfferResources(&self, ppresources: &[::core::option::Option], priority: DXGI_OFFER_RESOURCE_PRIORITY) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.OfferResources)(::windows_core::Interface::as_raw(self), ppresources.len() as _, ::core::mem::transmute(ppresources.as_ptr()), priority).ok() + (::windows_core::Interface::vtable(self).base__.base__.OfferResources)(::windows_core::Interface::as_raw(self), ppresources.len().try_into().unwrap(), ::core::mem::transmute(ppresources.as_ptr()), priority).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -944,7 +944,7 @@ impl IDXGIDevice4 { (::windows_core::Interface::vtable(self).base__.Trim)(::windows_core::Interface::as_raw(self)) } pub unsafe fn OfferResources1(&self, ppresources: &[::core::option::Option], priority: DXGI_OFFER_RESOURCE_PRIORITY, flags: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).OfferResources1)(::windows_core::Interface::as_raw(self), ppresources.len() as _, ::core::mem::transmute(ppresources.as_ptr()), priority, flags).ok() + (::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).ok() } pub unsafe fn ReclaimResources1(&self, numresources: u32, ppresources: *const ::core::option::Option, presults: *mut DXGI_RECLAIM_RESOURCE_RESULTS) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).ReclaimResources1)(::windows_core::Interface::as_raw(self), numresources, ::core::mem::transmute(ppresources), presults).ok() @@ -3632,7 +3632,7 @@ impl IDXGIOutput5 { P0: ::windows_core::IntoParam<::windows_core::IUnknown>, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).DuplicateOutput1)(::windows_core::Interface::as_raw(self), pdevice.into_param().abi(), flags, psupportedformats.len() as _, ::core::mem::transmute(psupportedformats.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).DuplicateOutput1)(::windows_core::Interface::as_raw(self), pdevice.into_param().abi(), flags, psupportedformats.len().try_into().unwrap(), ::core::mem::transmute(psupportedformats.as_ptr()), &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IDXGIOutput5, ::windows_core::IUnknown, IDXGIObject, IDXGIOutput, IDXGIOutput1, IDXGIOutput2, IDXGIOutput3, IDXGIOutput4); @@ -3795,7 +3795,7 @@ impl IDXGIOutput6 { P0: ::windows_core::IntoParam<::windows_core::IUnknown>, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.DuplicateOutput1)(::windows_core::Interface::as_raw(self), pdevice.into_param().abi(), flags, psupportedformats.len() as _, ::core::mem::transmute(psupportedformats.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.DuplicateOutput1)(::windows_core::Interface::as_raw(self), pdevice.into_param().abi(), flags, psupportedformats.len().try_into().unwrap(), ::core::mem::transmute(psupportedformats.as_ptr()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Dxgi_Common\"`, `\"Win32_Graphics_Gdi\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Gdi"))] @@ -5160,7 +5160,7 @@ impl IDXGISwapChain4 { (::windows_core::Interface::vtable(self).base__.ResizeBuffers1)(::windows_core::Interface::as_raw(self), buffercount, width, height, format, swapchainflags, pcreationnodemask, ::core::mem::transmute(pppresentqueue)).ok() } pub unsafe fn SetHDRMetaData(&self, r#type: DXGI_HDR_METADATA_TYPE, pmetadata: ::core::option::Option<&[u8]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetHDRMetaData)(::windows_core::Interface::as_raw(self), r#type, pmetadata.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pmetadata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + (::windows_core::Interface::vtable(self).SetHDRMetaData)(::windows_core::Interface::as_raw(self), r#type, pmetadata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pmetadata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() } } ::windows_core::imp::interface_hierarchy!(IDXGISwapChain4, ::windows_core::IUnknown, IDXGIObject, IDXGIDeviceSubObject, IDXGISwapChain, IDXGISwapChain1, IDXGISwapChain2, IDXGISwapChain3); 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 ad36049ca4..6a2edab266 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Gdi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Gdi/mod.rs @@ -76,7 +76,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn AnimatePalette(hpal : HPALETTE, istartindex : u32, centries : u32, ppe : *const PALETTEENTRY) -> super::super::Foundation:: BOOL); - AnimatePalette(hpal.into_param().abi(), istartindex, ppe.len() as _, ::core::mem::transmute(ppe.as_ptr())) + AnimatePalette(hpal.into_param().abi(), istartindex, ppe.len().try_into().unwrap(), ::core::mem::transmute(ppe.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -551,14 +551,14 @@ pub unsafe fn CreatePenIndirect(plpen: *const LOGPEN) -> HPEN { #[inline] pub unsafe fn CreatePolyPolygonRgn(pptl: *const super::super::Foundation::POINT, pc: &[i32], imode: CREATE_POLYGON_RGN_MODE) -> HRGN { ::windows_targets::link!("gdi32.dll" "system" fn CreatePolyPolygonRgn(pptl : *const super::super::Foundation:: POINT, pc : *const i32, cpoly : i32, imode : CREATE_POLYGON_RGN_MODE) -> HRGN); - CreatePolyPolygonRgn(pptl, ::core::mem::transmute(pc.as_ptr()), pc.len() as _, imode) + CreatePolyPolygonRgn(pptl, ::core::mem::transmute(pc.as_ptr()), pc.len().try_into().unwrap(), imode) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CreatePolygonRgn(pptl: &[super::super::Foundation::POINT], imode: CREATE_POLYGON_RGN_MODE) -> HRGN { ::windows_targets::link!("gdi32.dll" "system" fn CreatePolygonRgn(pptl : *const super::super::Foundation:: POINT, cpoint : i32, imode : CREATE_POLYGON_RGN_MODE) -> HRGN); - CreatePolygonRgn(::core::mem::transmute(pptl.as_ptr()), pptl.len() as _, imode) + CreatePolygonRgn(::core::mem::transmute(pptl.as_ptr()), pptl.len().try_into().unwrap(), imode) } #[inline] pub unsafe fn CreateRectRgn(x1: i32, y1: i32, x2: i32, y2: i32) -> HRGN { @@ -619,7 +619,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn DPtoLP(hdc : HDC, lppt : *mut super::super::Foundation:: POINT, c : i32) -> super::super::Foundation:: BOOL); - DPtoLP(hdc.into_param().abi(), ::core::mem::transmute(lppt.as_ptr()), lppt.len() as _) + DPtoLP(hdc.into_param().abi(), ::core::mem::transmute(lppt.as_ptr()), lppt.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -698,7 +698,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn DrawEscape(hdc : HDC, iescape : i32, cjin : i32, lpin : ::windows_core::PCSTR) -> i32); - DrawEscape(hdc.into_param().abi(), iescape, lpin.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpin.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + DrawEscape(hdc.into_param().abi(), iescape, lpin.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpin.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -754,7 +754,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn DrawTextA(hdc : HDC, lpchtext : ::windows_core::PCSTR, cchtext : i32, lprc : *mut super::super::Foundation:: RECT, format : DRAW_TEXT_FORMAT) -> i32); - DrawTextA(hdc.into_param().abi(), ::core::mem::transmute(lpchtext.as_ptr()), lpchtext.len() as _, lprc, format) + DrawTextA(hdc.into_param().abi(), ::core::mem::transmute(lpchtext.as_ptr()), lpchtext.len().try_into().unwrap(), lprc, format) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -764,7 +764,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn DrawTextExA(hdc : HDC, lpchtext : ::windows_core::PSTR, cchtext : i32, lprc : *mut super::super::Foundation:: RECT, format : DRAW_TEXT_FORMAT, lpdtp : *const DRAWTEXTPARAMS) -> i32); - DrawTextExA(hdc.into_param().abi(), ::core::mem::transmute(lpchtext.as_ptr()), lpchtext.len() as _, lprc, format, ::core::mem::transmute(lpdtp.unwrap_or(::std::ptr::null()))) + DrawTextExA(hdc.into_param().abi(), ::core::mem::transmute(lpchtext.as_ptr()), lpchtext.len().try_into().unwrap(), lprc, format, ::core::mem::transmute(lpdtp.unwrap_or(::std::ptr::null()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -774,7 +774,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn DrawTextExW(hdc : HDC, lpchtext : ::windows_core::PWSTR, cchtext : i32, lprc : *mut super::super::Foundation:: RECT, format : DRAW_TEXT_FORMAT, lpdtp : *const DRAWTEXTPARAMS) -> i32); - DrawTextExW(hdc.into_param().abi(), ::core::mem::transmute(lpchtext.as_ptr()), lpchtext.len() as _, lprc, format, ::core::mem::transmute(lpdtp.unwrap_or(::std::ptr::null()))) + DrawTextExW(hdc.into_param().abi(), ::core::mem::transmute(lpchtext.as_ptr()), lpchtext.len().try_into().unwrap(), lprc, format, ::core::mem::transmute(lpdtp.unwrap_or(::std::ptr::null()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -784,7 +784,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn DrawTextW(hdc : HDC, lpchtext : ::windows_core::PCWSTR, cchtext : i32, lprc : *mut super::super::Foundation:: RECT, format : DRAW_TEXT_FORMAT) -> i32); - DrawTextW(hdc.into_param().abi(), ::core::mem::transmute(lpchtext.as_ptr()), lpchtext.len() as _, lprc, format) + DrawTextW(hdc.into_param().abi(), ::core::mem::transmute(lpchtext.as_ptr()), lpchtext.len().try_into().unwrap(), lprc, format) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1033,7 +1033,7 @@ where #[inline] pub unsafe fn ExtCreatePen(ipenstyle: PEN_STYLE, cwidth: u32, plbrush: *const LOGBRUSH, pstyle: ::core::option::Option<&[u32]>) -> HPEN { ::windows_targets::link!("gdi32.dll" "system" fn ExtCreatePen(ipenstyle : u32, cwidth : u32, plbrush : *const LOGBRUSH, cstyle : u32, pstyle : *const u32) -> HPEN); - ExtCreatePen(ipenstyle.0 as _, cwidth, plbrush, pstyle.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pstyle.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + ExtCreatePen(ipenstyle.0 as _, cwidth, plbrush, pstyle.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pstyle.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1190,7 +1190,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn GdiComment(hdc : HDC, nsize : u32, lpdata : *const u8) -> super::super::Foundation:: BOOL); - GdiComment(hdc.into_param().abi(), lpdata.len() as _, ::core::mem::transmute(lpdata.as_ptr())) + GdiComment(hdc.into_param().abi(), lpdata.len().try_into().unwrap(), ::core::mem::transmute(lpdata.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1212,7 +1212,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn GdiGradientFill(hdc : HDC, pvertex : *const TRIVERTEX, nvertex : u32, pmesh : *const ::core::ffi::c_void, ncount : u32, ulmode : GRADIENT_FILL) -> super::super::Foundation:: BOOL); - GdiGradientFill(hdc.into_param().abi(), ::core::mem::transmute(pvertex.as_ptr()), pvertex.len() as _, pmesh, ncount, ulmode) + GdiGradientFill(hdc.into_param().abi(), ::core::mem::transmute(pvertex.as_ptr()), pvertex.len().try_into().unwrap(), pmesh, ncount, ulmode) } #[inline] pub unsafe fn GdiSetBatchLimit(dw: u32) -> u32 { @@ -1430,7 +1430,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn GetCharacterPlacementA(hdc : HDC, lpstring : ::windows_core::PCSTR, ncount : i32, nmexextent : i32, lpresults : *mut GCP_RESULTSA, dwflags : GET_CHARACTER_PLACEMENT_FLAGS) -> u32); - GetCharacterPlacementA(hdc.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _, nmexextent, lpresults, dwflags) + GetCharacterPlacementA(hdc.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), nmexextent, lpresults, dwflags) } #[inline] pub unsafe fn GetCharacterPlacementW(hdc: P0, lpstring: &[u16], nmexextent: i32, lpresults: *mut GCP_RESULTSW, dwflags: GET_CHARACTER_PLACEMENT_FLAGS) -> u32 @@ -1438,7 +1438,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn GetCharacterPlacementW(hdc : HDC, lpstring : ::windows_core::PCWSTR, ncount : i32, nmexextent : i32, lpresults : *mut GCP_RESULTSW, dwflags : GET_CHARACTER_PLACEMENT_FLAGS) -> u32); - GetCharacterPlacementW(hdc.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _, nmexextent, lpresults, dwflags) + GetCharacterPlacementW(hdc.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), nmexextent, lpresults, dwflags) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1544,7 +1544,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn GetDIBColorTable(hdc : HDC, istart : u32, centries : u32, prgbq : *mut RGBQUAD) -> u32); - GetDIBColorTable(hdc.into_param().abi(), istart, prgbq.len() as _, ::core::mem::transmute(prgbq.as_ptr())) + GetDIBColorTable(hdc.into_param().abi(), istart, prgbq.len().try_into().unwrap(), ::core::mem::transmute(prgbq.as_ptr())) } #[inline] pub unsafe fn GetDIBits(hdc: P0, hbm: P1, start: u32, clines: u32, lpvbits: ::core::option::Option<*mut ::core::ffi::c_void>, lpbmi: *mut BITMAPINFO, usage: DIB_USAGE) -> i32 @@ -1577,7 +1577,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn GetEnhMetaFileBits(hemf : HENHMETAFILE, nsize : u32, lpdata : *mut u8) -> u32); - GetEnhMetaFileBits(hemf.into_param().abi(), lpdata.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + GetEnhMetaFileBits(hemf.into_param().abi(), lpdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] pub unsafe fn GetEnhMetaFileDescriptionA(hemf: P0, lpdescription: ::core::option::Option<&mut [u8]>) -> u32 @@ -1585,7 +1585,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn GetEnhMetaFileDescriptionA(hemf : HENHMETAFILE, cchbuffer : u32, lpdescription : ::windows_core::PSTR) -> u32); - GetEnhMetaFileDescriptionA(hemf.into_param().abi(), lpdescription.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpdescription.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + GetEnhMetaFileDescriptionA(hemf.into_param().abi(), lpdescription.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpdescription.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] pub unsafe fn GetEnhMetaFileDescriptionW(hemf: P0, lpdescription: ::core::option::Option<&mut [u16]>) -> u32 @@ -1593,7 +1593,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn GetEnhMetaFileDescriptionW(hemf : HENHMETAFILE, cchbuffer : u32, lpdescription : ::windows_core::PWSTR) -> u32); - GetEnhMetaFileDescriptionW(hemf.into_param().abi(), lpdescription.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpdescription.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + GetEnhMetaFileDescriptionW(hemf.into_param().abi(), lpdescription.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpdescription.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1611,7 +1611,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn GetEnhMetaFilePaletteEntries(hemf : HENHMETAFILE, nnumentries : u32, lppaletteentries : *mut PALETTEENTRY) -> u32); - GetEnhMetaFilePaletteEntries(hemf.into_param().abi(), lppaletteentries.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lppaletteentries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + GetEnhMetaFilePaletteEntries(hemf.into_param().abi(), lppaletteentries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lppaletteentries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] pub unsafe fn GetEnhMetaFileW(lpname: P0) -> HENHMETAFILE @@ -1697,7 +1697,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn GetKerningPairsA(hdc : HDC, npairs : u32, lpkernpair : *mut KERNINGPAIR) -> u32); - GetKerningPairsA(hdc.into_param().abi(), lpkernpair.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpkernpair.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + GetKerningPairsA(hdc.into_param().abi(), lpkernpair.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpkernpair.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] pub unsafe fn GetKerningPairsW(hdc: P0, lpkernpair: ::core::option::Option<&mut [KERNINGPAIR]>) -> u32 @@ -1705,7 +1705,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn GetKerningPairsW(hdc : HDC, npairs : u32, lpkernpair : *mut KERNINGPAIR) -> u32); - GetKerningPairsW(hdc.into_param().abi(), lpkernpair.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpkernpair.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + GetKerningPairsW(hdc.into_param().abi(), lpkernpair.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpkernpair.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] pub unsafe fn GetLayout(hdc: P0) -> u32 @@ -1858,7 +1858,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn GetPaletteEntries(hpal : HPALETTE, istart : u32, centries : u32, ppalentries : *mut PALETTEENTRY) -> u32); - GetPaletteEntries(hpal.into_param().abi(), istart, ppalentries.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppalentries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + GetPaletteEntries(hpal.into_param().abi(), istart, ppalentries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(ppalentries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1961,7 +1961,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn GetSystemPaletteEntries(hdc : HDC, istart : u32, centries : u32, ppalentries : *mut PALETTEENTRY) -> u32); - GetSystemPaletteEntries(hdc.into_param().abi(), istart, ppalentries.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppalentries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + GetSystemPaletteEntries(hdc.into_param().abi(), istart, ppalentries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(ppalentries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] pub unsafe fn GetSystemPaletteUse(hdc: P0) -> u32 @@ -1977,7 +1977,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetTabbedTextExtentA(hdc : HDC, lpstring : ::windows_core::PCSTR, chcount : i32, ntabpositions : i32, lpntabstoppositions : *const i32) -> u32); - GetTabbedTextExtentA(hdc.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _, lpntabstoppositions.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpntabstoppositions.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + GetTabbedTextExtentA(hdc.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), lpntabstoppositions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpntabstoppositions.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] pub unsafe fn GetTabbedTextExtentW(hdc: P0, lpstring: &[u16], lpntabstoppositions: ::core::option::Option<&[i32]>) -> u32 @@ -1985,7 +1985,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetTabbedTextExtentW(hdc : HDC, lpstring : ::windows_core::PCWSTR, chcount : i32, ntabpositions : i32, lpntabstoppositions : *const i32) -> u32); - GetTabbedTextExtentW(hdc.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _, lpntabstoppositions.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpntabstoppositions.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + GetTabbedTextExtentW(hdc.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), lpntabstoppositions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpntabstoppositions.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] pub unsafe fn GetTextAlign(hdc: P0) -> TEXT_ALIGN_OPTIONS @@ -2053,7 +2053,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn GetTextExtentPoint32A(hdc : HDC, lpstring : ::windows_core::PCSTR, c : i32, psizl : *mut super::super::Foundation:: SIZE) -> super::super::Foundation:: BOOL); - GetTextExtentPoint32A(hdc.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _, psizl) + GetTextExtentPoint32A(hdc.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), psizl) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2063,7 +2063,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn GetTextExtentPoint32W(hdc : HDC, lpstring : ::windows_core::PCWSTR, c : i32, psizl : *mut super::super::Foundation:: SIZE) -> super::super::Foundation:: BOOL); - GetTextExtentPoint32W(hdc.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _, psizl) + GetTextExtentPoint32W(hdc.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), psizl) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2073,7 +2073,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn GetTextExtentPointA(hdc : HDC, lpstring : ::windows_core::PCSTR, c : i32, lpsz : *mut super::super::Foundation:: SIZE) -> super::super::Foundation:: BOOL); - GetTextExtentPointA(hdc.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _, lpsz) + GetTextExtentPointA(hdc.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), lpsz) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2083,7 +2083,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn GetTextExtentPointI(hdc : HDC, pgiin : *const u16, cgi : i32, psize : *mut super::super::Foundation:: SIZE) -> super::super::Foundation:: BOOL); - GetTextExtentPointI(hdc.into_param().abi(), ::core::mem::transmute(pgiin.as_ptr()), pgiin.len() as _, psize) + GetTextExtentPointI(hdc.into_param().abi(), ::core::mem::transmute(pgiin.as_ptr()), pgiin.len().try_into().unwrap(), psize) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2093,7 +2093,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn GetTextExtentPointW(hdc : HDC, lpstring : ::windows_core::PCWSTR, c : i32, lpsz : *mut super::super::Foundation:: SIZE) -> super::super::Foundation:: BOOL); - GetTextExtentPointW(hdc.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _, lpsz) + GetTextExtentPointW(hdc.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), lpsz) } #[inline] pub unsafe fn GetTextFaceA(hdc: P0, lpname: ::core::option::Option<&mut [u8]>) -> i32 @@ -2101,7 +2101,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn GetTextFaceA(hdc : HDC, c : i32, lpname : ::windows_core::PSTR) -> i32); - GetTextFaceA(hdc.into_param().abi(), lpname.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + GetTextFaceA(hdc.into_param().abi(), lpname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] pub unsafe fn GetTextFaceW(hdc: P0, lpname: ::core::option::Option<&mut [u16]>) -> i32 @@ -2109,7 +2109,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn GetTextFaceW(hdc : HDC, c : i32, lpname : ::windows_core::PWSTR) -> i32); - GetTextFaceW(hdc.into_param().abi(), lpname.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + GetTextFaceW(hdc.into_param().abi(), lpname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2181,7 +2181,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn GetWinMetaFileBits(hemf : HENHMETAFILE, cbdata16 : u32, pdata16 : *mut u8, imapmode : i32, hdcref : HDC) -> u32); - GetWinMetaFileBits(hemf.into_param().abi(), pdata16.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pdata16.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), imapmode, hdcref.into_param().abi()) + GetWinMetaFileBits(hemf.into_param().abi(), pdata16.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pdata16.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), imapmode, hdcref.into_param().abi()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2252,7 +2252,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("msimg32.dll" "system" fn GradientFill(hdc : HDC, pvertex : *const TRIVERTEX, nvertex : u32, pmesh : *const ::core::ffi::c_void, nmesh : u32, ulmode : GRADIENT_FILL) -> super::super::Foundation:: BOOL); - GradientFill(hdc.into_param().abi(), ::core::mem::transmute(pvertex.as_ptr()), pvertex.len() as _, pmesh, nmesh, ulmode) + GradientFill(hdc.into_param().abi(), ::core::mem::transmute(pvertex.as_ptr()), pvertex.len().try_into().unwrap(), pmesh, nmesh, ulmode) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2359,7 +2359,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn LPtoDP(hdc : HDC, lppt : *mut super::super::Foundation:: POINT, c : i32) -> super::super::Foundation:: BOOL); - LPtoDP(hdc.into_param().abi(), ::core::mem::transmute(lppt.as_ptr()), lppt.len() as _) + LPtoDP(hdc.into_param().abi(), ::core::mem::transmute(lppt.as_ptr()), lppt.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2422,7 +2422,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn MapWindowPoints(hwndfrom : super::super::Foundation:: HWND, hwndto : super::super::Foundation:: HWND, lppoints : *mut super::super::Foundation:: POINT, cpoints : u32) -> i32); - MapWindowPoints(hwndfrom.into_param().abi(), hwndto.into_param().abi(), ::core::mem::transmute(lppoints.as_ptr()), lppoints.len() as _) + MapWindowPoints(hwndfrom.into_param().abi(), hwndto.into_param().abi(), ::core::mem::transmute(lppoints.as_ptr()), lppoints.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2596,7 +2596,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn PlayEnhMetaFileRecord(hdc : HDC, pht : *const HANDLETABLE, pmr : *const ENHMETARECORD, cht : u32) -> super::super::Foundation:: BOOL); - PlayEnhMetaFileRecord(hdc.into_param().abi(), ::core::mem::transmute(pht.as_ptr()), pmr, pht.len() as _) + PlayEnhMetaFileRecord(hdc.into_param().abi(), ::core::mem::transmute(pht.as_ptr()), pmr, pht.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2617,7 +2617,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn PlayMetaFileRecord(hdc : HDC, lphandletable : *const HANDLETABLE, lpmr : *const METARECORD, noobjs : u32) -> super::super::Foundation:: BOOL); - PlayMetaFileRecord(hdc.into_param().abi(), ::core::mem::transmute(lphandletable.as_ptr()), lpmr, lphandletable.len() as _) + PlayMetaFileRecord(hdc.into_param().abi(), ::core::mem::transmute(lphandletable.as_ptr()), lpmr, lphandletable.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2639,7 +2639,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn PolyBezier(hdc : HDC, apt : *const super::super::Foundation:: POINT, cpt : u32) -> super::super::Foundation:: BOOL); - PolyBezier(hdc.into_param().abi(), ::core::mem::transmute(apt.as_ptr()), apt.len() as _) + PolyBezier(hdc.into_param().abi(), ::core::mem::transmute(apt.as_ptr()), apt.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2649,7 +2649,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn PolyBezierTo(hdc : HDC, apt : *const super::super::Foundation:: POINT, cpt : u32) -> super::super::Foundation:: BOOL); - PolyBezierTo(hdc.into_param().abi(), ::core::mem::transmute(apt.as_ptr()), apt.len() as _) + PolyBezierTo(hdc.into_param().abi(), ::core::mem::transmute(apt.as_ptr()), apt.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2669,7 +2669,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn PolyPolygon(hdc : HDC, apt : *const super::super::Foundation:: POINT, asz : *const i32, csz : i32) -> super::super::Foundation:: BOOL); - PolyPolygon(hdc.into_param().abi(), apt, ::core::mem::transmute(asz.as_ptr()), asz.len() as _) + PolyPolygon(hdc.into_param().abi(), apt, ::core::mem::transmute(asz.as_ptr()), asz.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2679,7 +2679,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn PolyPolyline(hdc : HDC, apt : *const super::super::Foundation:: POINT, asz : *const u32, csz : u32) -> super::super::Foundation:: BOOL); - PolyPolyline(hdc.into_param().abi(), apt, ::core::mem::transmute(asz.as_ptr()), asz.len() as _) + PolyPolyline(hdc.into_param().abi(), apt, ::core::mem::transmute(asz.as_ptr()), asz.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2689,7 +2689,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn PolyTextOutA(hdc : HDC, ppt : *const POLYTEXTA, nstrings : i32) -> super::super::Foundation:: BOOL); - PolyTextOutA(hdc.into_param().abi(), ::core::mem::transmute(ppt.as_ptr()), ppt.len() as _) + PolyTextOutA(hdc.into_param().abi(), ::core::mem::transmute(ppt.as_ptr()), ppt.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2699,7 +2699,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn PolyTextOutW(hdc : HDC, ppt : *const POLYTEXTW, nstrings : i32) -> super::super::Foundation:: BOOL); - PolyTextOutW(hdc.into_param().abi(), ::core::mem::transmute(ppt.as_ptr()), ppt.len() as _) + PolyTextOutW(hdc.into_param().abi(), ::core::mem::transmute(ppt.as_ptr()), ppt.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2709,7 +2709,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn Polygon(hdc : HDC, apt : *const super::super::Foundation:: POINT, cpt : i32) -> super::super::Foundation:: BOOL); - Polygon(hdc.into_param().abi(), ::core::mem::transmute(apt.as_ptr()), apt.len() as _) + Polygon(hdc.into_param().abi(), ::core::mem::transmute(apt.as_ptr()), apt.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2719,7 +2719,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn Polyline(hdc : HDC, apt : *const super::super::Foundation:: POINT, cpt : i32) -> super::super::Foundation:: BOOL); - Polyline(hdc.into_param().abi(), ::core::mem::transmute(apt.as_ptr()), apt.len() as _) + Polyline(hdc.into_param().abi(), ::core::mem::transmute(apt.as_ptr()), apt.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2729,7 +2729,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn PolylineTo(hdc : HDC, apt : *const super::super::Foundation:: POINT, cpt : u32) -> super::super::Foundation:: BOOL); - PolylineTo(hdc.into_param().abi(), ::core::mem::transmute(apt.as_ptr()), apt.len() as _) + PolylineTo(hdc.into_param().abi(), ::core::mem::transmute(apt.as_ptr()), apt.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3099,7 +3099,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn SetDIBColorTable(hdc : HDC, istart : u32, centries : u32, prgbq : *const RGBQUAD) -> u32); - SetDIBColorTable(hdc.into_param().abi(), istart, prgbq.len() as _, ::core::mem::transmute(prgbq.as_ptr())) + SetDIBColorTable(hdc.into_param().abi(), istart, prgbq.len().try_into().unwrap(), ::core::mem::transmute(prgbq.as_ptr())) } #[inline] pub unsafe fn SetDIBits(hdc: P0, hbm: P1, start: u32, clines: u32, lpbits: *const ::core::ffi::c_void, lpbmi: *const BITMAPINFO, coloruse: DIB_USAGE) -> i32 @@ -3121,7 +3121,7 @@ where #[inline] pub unsafe fn SetEnhMetaFileBits(pb: &[u8]) -> HENHMETAFILE { ::windows_targets::link!("gdi32.dll" "system" fn SetEnhMetaFileBits(nsize : u32, pb : *const u8) -> HENHMETAFILE); - SetEnhMetaFileBits(pb.len() as _, ::core::mem::transmute(pb.as_ptr())) + SetEnhMetaFileBits(pb.len().try_into().unwrap(), ::core::mem::transmute(pb.as_ptr())) } #[inline] pub unsafe fn SetGraphicsMode(hdc: P0, imode: GRAPHICS_MODE) -> i32 @@ -3158,7 +3158,7 @@ where #[inline] pub unsafe fn SetMetaFileBitsEx(lpdata: &[u8]) -> HMETAFILE { ::windows_targets::link!("gdi32.dll" "system" fn SetMetaFileBitsEx(cbbuffer : u32, lpdata : *const u8) -> HMETAFILE); - SetMetaFileBitsEx(lpdata.len() as _, ::core::mem::transmute(lpdata.as_ptr())) + SetMetaFileBitsEx(lpdata.len().try_into().unwrap(), ::core::mem::transmute(lpdata.as_ptr())) } #[inline] pub unsafe fn SetMetaRgn(hdc: P0) -> GDI_REGION_TYPE @@ -3184,7 +3184,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn SetPaletteEntries(hpal : HPALETTE, istart : u32, centries : u32, ppalentries : *const PALETTEENTRY) -> u32); - SetPaletteEntries(hpal.into_param().abi(), istart, ppalentries.len() as _, ::core::mem::transmute(ppalentries.as_ptr())) + SetPaletteEntries(hpal.into_param().abi(), istart, ppalentries.len().try_into().unwrap(), ::core::mem::transmute(ppalentries.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3422,7 +3422,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("t2embed.dll" "system" fn TTCharToUnicode(hdc : HDC, puccharcodes : *const u8, ulcharcodesize : u32, pusshortcodes : *mut u16, ulshortcodesize : u32, ulflags : u32) -> i32); - TTCharToUnicode(hdc.into_param().abi(), ::core::mem::transmute(puccharcodes.as_ptr()), puccharcodes.len() as _, ::core::mem::transmute(pusshortcodes.as_ptr()), pusshortcodes.len() as _, ulflags) + TTCharToUnicode(hdc.into_param().abi(), ::core::mem::transmute(puccharcodes.as_ptr()), puccharcodes.len().try_into().unwrap(), ::core::mem::transmute(pusshortcodes.as_ptr()), pusshortcodes.len().try_into().unwrap(), ulflags) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3440,7 +3440,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("t2embed.dll" "system" fn TTEmbedFont(hdc : HDC, ulflags : TTEMBED_FLAGS, ulcharset : EMBED_FONT_CHARSET, pulprivstatus : *mut EMBEDDED_FONT_PRIV_STATUS, pulstatus : *mut u32, lpfnwritetostream : WRITEEMBEDPROC, lpvwritestream : *const ::core::ffi::c_void, puscharcodeset : *const u16, uscharcodecount : u16, uslanguage : u16, pttembedinfo : *const TTEMBEDINFO) -> i32); - TTEmbedFont(hdc.into_param().abi(), ulflags, ulcharset, pulprivstatus, pulstatus, lpfnwritetostream, lpvwritestream, ::core::mem::transmute(puscharcodeset.as_ptr()), puscharcodeset.len() as _, uslanguage, ::core::mem::transmute(pttembedinfo.unwrap_or(::std::ptr::null()))) + TTEmbedFont(hdc.into_param().abi(), ulflags, ulcharset, pulprivstatus, pulstatus, lpfnwritetostream, lpvwritestream, ::core::mem::transmute(puscharcodeset.as_ptr()), puscharcodeset.len().try_into().unwrap(), uslanguage, ::core::mem::transmute(pttembedinfo.unwrap_or(::std::ptr::null()))) } #[inline] pub unsafe fn TTEmbedFontEx(hdc: P0, ulflags: TTEMBED_FLAGS, ulcharset: EMBED_FONT_CHARSET, pulprivstatus: *mut EMBEDDED_FONT_PRIV_STATUS, pulstatus: *mut u32, lpfnwritetostream: WRITEEMBEDPROC, lpvwritestream: *const ::core::ffi::c_void, pulcharcodeset: &[u32], uslanguage: u16, pttembedinfo: ::core::option::Option<*const TTEMBEDINFO>) -> i32 @@ -3448,7 +3448,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("t2embed.dll" "system" fn TTEmbedFontEx(hdc : HDC, ulflags : TTEMBED_FLAGS, ulcharset : EMBED_FONT_CHARSET, pulprivstatus : *mut EMBEDDED_FONT_PRIV_STATUS, pulstatus : *mut u32, lpfnwritetostream : WRITEEMBEDPROC, lpvwritestream : *const ::core::ffi::c_void, pulcharcodeset : *const u32, uscharcodecount : u16, uslanguage : u16, pttembedinfo : *const TTEMBEDINFO) -> i32); - TTEmbedFontEx(hdc.into_param().abi(), ulflags, ulcharset, pulprivstatus, pulstatus, lpfnwritetostream, lpvwritestream, ::core::mem::transmute(pulcharcodeset.as_ptr()), pulcharcodeset.len() as _, uslanguage, ::core::mem::transmute(pttembedinfo.unwrap_or(::std::ptr::null()))) + TTEmbedFontEx(hdc.into_param().abi(), ulflags, ulcharset, pulprivstatus, pulstatus, lpfnwritetostream, lpvwritestream, ::core::mem::transmute(pulcharcodeset.as_ptr()), pulcharcodeset.len().try_into().unwrap(), uslanguage, ::core::mem::transmute(pttembedinfo.unwrap_or(::std::ptr::null()))) } #[inline] pub unsafe fn TTEmbedFontFromFileA(hdc: P0, szfontfilename: P1, usttcindex: u16, ulflags: TTEMBED_FLAGS, ulcharset: EMBED_FONT_CHARSET, pulprivstatus: *mut EMBEDDED_FONT_PRIV_STATUS, pulstatus: *mut u32, lpfnwritetostream: WRITEEMBEDPROC, lpvwritestream: *const ::core::ffi::c_void, puscharcodeset: &[u16], uslanguage: u16, pttembedinfo: ::core::option::Option<*const TTEMBEDINFO>) -> i32 @@ -3457,7 +3457,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("t2embed.dll" "system" fn TTEmbedFontFromFileA(hdc : HDC, szfontfilename : ::windows_core::PCSTR, usttcindex : u16, ulflags : TTEMBED_FLAGS, ulcharset : EMBED_FONT_CHARSET, pulprivstatus : *mut EMBEDDED_FONT_PRIV_STATUS, pulstatus : *mut u32, lpfnwritetostream : WRITEEMBEDPROC, lpvwritestream : *const ::core::ffi::c_void, puscharcodeset : *const u16, uscharcodecount : u16, uslanguage : u16, pttembedinfo : *const TTEMBEDINFO) -> i32); - TTEmbedFontFromFileA(hdc.into_param().abi(), szfontfilename.into_param().abi(), usttcindex, ulflags, ulcharset, pulprivstatus, pulstatus, lpfnwritetostream, lpvwritestream, ::core::mem::transmute(puscharcodeset.as_ptr()), puscharcodeset.len() as _, uslanguage, ::core::mem::transmute(pttembedinfo.unwrap_or(::std::ptr::null()))) + TTEmbedFontFromFileA(hdc.into_param().abi(), szfontfilename.into_param().abi(), usttcindex, ulflags, ulcharset, pulprivstatus, pulstatus, lpfnwritetostream, lpvwritestream, ::core::mem::transmute(puscharcodeset.as_ptr()), puscharcodeset.len().try_into().unwrap(), uslanguage, ::core::mem::transmute(pttembedinfo.unwrap_or(::std::ptr::null()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3488,7 +3488,7 @@ where #[inline] pub unsafe fn TTGetNewFontName(phfontreference: *const super::super::Foundation::HANDLE, wzwinfamilyname: &mut [u16], szmacfamilyname: &mut [u8]) -> i32 { ::windows_targets::link!("t2embed.dll" "system" fn TTGetNewFontName(phfontreference : *const super::super::Foundation:: HANDLE, wzwinfamilyname : ::windows_core::PWSTR, cchmaxwinname : i32, szmacfamilyname : ::windows_core::PSTR, cchmaxmacname : i32) -> i32); - TTGetNewFontName(phfontreference, ::core::mem::transmute(wzwinfamilyname.as_ptr()), wzwinfamilyname.len() as _, ::core::mem::transmute(szmacfamilyname.as_ptr()), szmacfamilyname.len() as _) + TTGetNewFontName(phfontreference, ::core::mem::transmute(wzwinfamilyname.as_ptr()), wzwinfamilyname.len().try_into().unwrap(), ::core::mem::transmute(szmacfamilyname.as_ptr()), szmacfamilyname.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3543,7 +3543,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn TabbedTextOutA(hdc : HDC, x : i32, y : i32, lpstring : ::windows_core::PCSTR, chcount : i32, ntabpositions : i32, lpntabstoppositions : *const i32, ntaborigin : i32) -> i32); - TabbedTextOutA(hdc.into_param().abi(), x, y, ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _, lpntabstoppositions.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpntabstoppositions.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ntaborigin) + TabbedTextOutA(hdc.into_param().abi(), x, y, ::core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), lpntabstoppositions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpntabstoppositions.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ntaborigin) } #[inline] pub unsafe fn TabbedTextOutW(hdc: P0, x: i32, y: i32, lpstring: &[u16], lpntabstoppositions: ::core::option::Option<&[i32]>, ntaborigin: i32) -> i32 @@ -3551,7 +3551,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn TabbedTextOutW(hdc : HDC, x : i32, y : i32, lpstring : ::windows_core::PCWSTR, chcount : i32, ntabpositions : i32, lpntabstoppositions : *const i32, ntaborigin : i32) -> i32); - TabbedTextOutW(hdc.into_param().abi(), x, y, ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _, lpntabstoppositions.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpntabstoppositions.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ntaborigin) + TabbedTextOutW(hdc.into_param().abi(), x, y, ::core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), lpntabstoppositions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpntabstoppositions.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ntaborigin) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3561,7 +3561,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn TextOutA(hdc : HDC, x : i32, y : i32, lpstring : ::windows_core::PCSTR, c : i32) -> super::super::Foundation:: BOOL); - TextOutA(hdc.into_param().abi(), x, y, ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _) + TextOutA(hdc.into_param().abi(), x, y, ::core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3571,7 +3571,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn TextOutW(hdc : HDC, x : i32, y : i32, lpstring : ::windows_core::PCWSTR, c : i32) -> super::super::Foundation:: BOOL); - TextOutW(hdc.into_param().abi(), x, y, ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _) + TextOutW(hdc.into_param().abi(), x, y, ::core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 de771eb29f..633bb78791 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/GdiPlus/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/GdiPlus/mod.rs @@ -1181,7 +1181,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdiplus.dll" "system" fn GdipEmfToWmfBits(hemf : super::Gdi:: HENHMETAFILE, cbdata16 : u32, pdata16 : *mut u8, imapmode : i32, eflags : i32) -> u32); - GdipEmfToWmfBits(hemf.into_param().abi(), pdata16.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pdata16.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), imapmode, eflags) + GdipEmfToWmfBits(hemf.into_param().abi(), pdata16.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pdata16.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), imapmode, eflags) } #[inline] pub unsafe fn GdipEndContainer(graphics: *mut GpGraphics, state: u32) -> Status { @@ -1520,7 +1520,7 @@ pub unsafe fn GdipGetFontCollectionFamilyCount(fontcollection: *mut GpFontCollec #[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); - GdipGetFontCollectionFamilyList(fontcollection, gpfamilies.len() as _, ::core::mem::transmute(gpfamilies.as_ptr()), numfound) + GdipGetFontCollectionFamilyList(fontcollection, gpfamilies.len().try_into().unwrap(), ::core::mem::transmute(gpfamilies.as_ptr()), numfound) } #[inline] pub unsafe fn GdipGetFontHeight(font: *const GpFont, graphics: *const GpGraphics, height: *mut f32) -> Status { @@ -1947,7 +1947,7 @@ pub unsafe fn GdipGetPathPointsI(param0: *mut GpPath, points: *mut Point, count: #[inline] pub unsafe fn GdipGetPathTypes(path: *const GpPath, types: &mut [u8]) -> Status { ::windows_targets::link!("gdiplus.dll" "system" fn GdipGetPathTypes(path : *const GpPath, types : *mut u8, count : i32) -> Status); - GdipGetPathTypes(path, ::core::mem::transmute(types.as_ptr()), types.len() as _) + GdipGetPathTypes(path, ::core::mem::transmute(types.as_ptr()), types.len().try_into().unwrap()) } #[inline] pub unsafe fn GdipGetPathWorldBounds(path: *mut GpPath, bounds: *mut RectF, matrix: *const Matrix, pen: *const GpPen) -> Status { @@ -2107,7 +2107,7 @@ pub unsafe fn GdipGetRegionBoundsI(region: *mut GpRegion, graphics: *mut GpGraph #[inline] pub unsafe fn GdipGetRegionData(region: *mut GpRegion, buffer: &mut [u8], sizefilled: ::core::option::Option<*mut u32>) -> Status { ::windows_targets::link!("gdiplus.dll" "system" fn GdipGetRegionData(region : *mut GpRegion, buffer : *mut u8, buffersize : u32, sizefilled : *mut u32) -> Status); - GdipGetRegionData(region, ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, ::core::mem::transmute(sizefilled.unwrap_or(::std::ptr::null_mut()))) + GdipGetRegionData(region, ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ::core::mem::transmute(sizefilled.unwrap_or(::std::ptr::null_mut()))) } #[inline] pub unsafe fn GdipGetRegionDataSize(region: *mut GpRegion, buffersize: *mut u32) -> Status { diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Imaging/D2D/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Imaging/D2D/mod.rs index 122ac02808..eb38fee583 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Imaging/D2D/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Imaging/D2D/mod.rs @@ -146,7 +146,7 @@ impl IWICImagingFactory2 { } pub unsafe fn CreateBitmapFromMemory(&self, uiwidth: u32, uiheight: u32, pixelformat: *const ::windows_core::GUID, cbstride: u32, pbbuffer: &[u8]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.CreateBitmapFromMemory)(::windows_core::Interface::as_raw(self), uiwidth, uiheight, pixelformat, cbstride, pbbuffer.len() as _, ::core::mem::transmute(pbbuffer.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateBitmapFromMemory)(::windows_core::Interface::as_raw(self), uiwidth, uiheight, pixelformat, cbstride, pbbuffer.len().try_into().unwrap(), ::core::mem::transmute(pbbuffer.as_ptr()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Graphics_Gdi\"`"] #[cfg(feature = "Win32_Graphics_Gdi")] 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 b899d99ef8..4b296048f1 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Imaging/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Imaging/mod.rs @@ -44,7 +44,7 @@ where #[inline] pub unsafe fn WICMapGuidToShortName(guid: *const ::windows_core::GUID, wzname: ::core::option::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); - WICMapGuidToShortName(guid, wzname.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(wzname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pcchactual).ok() + 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).ok() } #[inline] pub unsafe fn WICMapSchemaToName(guidmetadataformat: *const ::windows_core::GUID, pwzschema: P0, wzname: ::core::option::Option<&mut [u16]>, pcchactual: *mut u32) -> ::windows_core::Result<()> @@ -52,7 +52,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::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); - WICMapSchemaToName(guidmetadataformat, pwzschema.into_param().abi(), wzname.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(wzname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pcchactual).ok() + WICMapSchemaToName(guidmetadataformat, pwzschema.into_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).ok() } #[inline] pub unsafe fn WICMapShortNameToGuid(wzname: P0) -> ::windows_core::Result<::windows_core::GUID> @@ -106,7 +106,7 @@ impl IWICBitmap { (::windows_core::Interface::vtable(self).base__.CopyPalette)(::windows_core::Interface::as_raw(self), pipalette.into_param().abi()).ok() } pub unsafe fn CopyPixels(&self, prc: *const WICRect, cbstride: u32, pbbuffer: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.CopyPixels)(::windows_core::Interface::as_raw(self), prc, cbstride, pbbuffer.len() as _, ::core::mem::transmute(pbbuffer.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.CopyPixels)(::windows_core::Interface::as_raw(self), prc, cbstride, pbbuffer.len().try_into().unwrap(), ::core::mem::transmute(pbbuffer.as_ptr())).ok() } pub unsafe fn Lock(&self, prclock: *const WICRect, flags: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -158,7 +158,7 @@ impl IWICBitmapClipper { (::windows_core::Interface::vtable(self).base__.CopyPalette)(::windows_core::Interface::as_raw(self), pipalette.into_param().abi()).ok() } pub unsafe fn CopyPixels(&self, prc: *const WICRect, cbstride: u32, pbbuffer: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.CopyPixels)(::windows_core::Interface::as_raw(self), prc, cbstride, pbbuffer.len() as _, ::core::mem::transmute(pbbuffer.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.CopyPixels)(::windows_core::Interface::as_raw(self), prc, cbstride, pbbuffer.len().try_into().unwrap(), ::core::mem::transmute(pbbuffer.as_ptr())).ok() } pub unsafe fn Initialize(&self, pisource: P0, prc: *const WICRect) -> ::windows_core::Result<()> where @@ -197,42 +197,42 @@ impl IWICBitmapCodecInfo { (::windows_core::Interface::vtable(self).base__.GetSigningStatus)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetAuthor(&self, wzauthor: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetAuthor)(::windows_core::Interface::as_raw(self), wzauthor.len() as _, ::core::mem::transmute(wzauthor.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.GetAuthor)(::windows_core::Interface::as_raw(self), wzauthor.len().try_into().unwrap(), ::core::mem::transmute(wzauthor.as_ptr()), pcchactual).ok() } pub unsafe fn GetVendorGUID(&self) -> ::windows_core::Result<::windows_core::GUID> { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).base__.GetVendorGUID)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetVersion(&self, wzversion: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetVersion)(::windows_core::Interface::as_raw(self), wzversion.len() as _, ::core::mem::transmute(wzversion.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.GetVersion)(::windows_core::Interface::as_raw(self), wzversion.len().try_into().unwrap(), ::core::mem::transmute(wzversion.as_ptr()), pcchactual).ok() } pub unsafe fn GetSpecVersion(&self, wzspecversion: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetSpecVersion)(::windows_core::Interface::as_raw(self), wzspecversion.len() as _, ::core::mem::transmute(wzspecversion.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.GetSpecVersion)(::windows_core::Interface::as_raw(self), wzspecversion.len().try_into().unwrap(), ::core::mem::transmute(wzspecversion.as_ptr()), pcchactual).ok() } pub unsafe fn GetFriendlyName(&self, wzfriendlyname: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetFriendlyName)(::windows_core::Interface::as_raw(self), wzfriendlyname.len() as _, ::core::mem::transmute(wzfriendlyname.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.GetFriendlyName)(::windows_core::Interface::as_raw(self), wzfriendlyname.len().try_into().unwrap(), ::core::mem::transmute(wzfriendlyname.as_ptr()), pcchactual).ok() } pub unsafe fn GetContainerFormat(&self) -> ::windows_core::Result<::windows_core::GUID> { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).GetContainerFormat)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetPixelFormats(&self, pguidpixelformats: &mut [::windows_core::GUID], pcactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPixelFormats)(::windows_core::Interface::as_raw(self), pguidpixelformats.len() as _, ::core::mem::transmute(pguidpixelformats.as_ptr()), pcactual).ok() + (::windows_core::Interface::vtable(self).GetPixelFormats)(::windows_core::Interface::as_raw(self), pguidpixelformats.len().try_into().unwrap(), ::core::mem::transmute(pguidpixelformats.as_ptr()), pcactual).ok() } pub unsafe fn GetColorManagementVersion(&self, wzcolormanagementversion: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetColorManagementVersion)(::windows_core::Interface::as_raw(self), wzcolormanagementversion.len() as _, ::core::mem::transmute(wzcolormanagementversion.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).GetColorManagementVersion)(::windows_core::Interface::as_raw(self), wzcolormanagementversion.len().try_into().unwrap(), ::core::mem::transmute(wzcolormanagementversion.as_ptr()), pcchactual).ok() } pub unsafe fn GetDeviceManufacturer(&self, wzdevicemanufacturer: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDeviceManufacturer)(::windows_core::Interface::as_raw(self), wzdevicemanufacturer.len() as _, ::core::mem::transmute(wzdevicemanufacturer.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).GetDeviceManufacturer)(::windows_core::Interface::as_raw(self), wzdevicemanufacturer.len().try_into().unwrap(), ::core::mem::transmute(wzdevicemanufacturer.as_ptr()), pcchactual).ok() } pub unsafe fn GetDeviceModels(&self, wzdevicemodels: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDeviceModels)(::windows_core::Interface::as_raw(self), wzdevicemodels.len() as _, ::core::mem::transmute(wzdevicemodels.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).GetDeviceModels)(::windows_core::Interface::as_raw(self), wzdevicemodels.len().try_into().unwrap(), ::core::mem::transmute(wzdevicemodels.as_ptr()), pcchactual).ok() } pub unsafe fn GetMimeTypes(&self, wzmimetypes: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetMimeTypes)(::windows_core::Interface::as_raw(self), wzmimetypes.len() as _, ::core::mem::transmute(wzmimetypes.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).GetMimeTypes)(::windows_core::Interface::as_raw(self), wzmimetypes.len().try_into().unwrap(), ::core::mem::transmute(wzmimetypes.as_ptr()), pcchactual).ok() } pub unsafe fn GetFileExtensions(&self, wzfileextensions: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetFileExtensions)(::windows_core::Interface::as_raw(self), wzfileextensions.len() as _, ::core::mem::transmute(wzfileextensions.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).GetFileExtensions)(::windows_core::Interface::as_raw(self), wzfileextensions.len().try_into().unwrap(), ::core::mem::transmute(wzfileextensions.as_ptr()), pcchactual).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -372,7 +372,7 @@ impl IWICBitmapDecoder { (::windows_core::Interface::vtable(self).GetPreview)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetColorContexts(&self, ppicolorcontexts: &mut [::core::option::Option], pcactualcount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetColorContexts)(::windows_core::Interface::as_raw(self), ppicolorcontexts.len() as _, ::core::mem::transmute(ppicolorcontexts.as_ptr()), pcactualcount).ok() + (::windows_core::Interface::vtable(self).GetColorContexts)(::windows_core::Interface::as_raw(self), ppicolorcontexts.len().try_into().unwrap(), ::core::mem::transmute(ppicolorcontexts.as_ptr()), pcactualcount).ok() } pub unsafe fn GetThumbnail(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -433,42 +433,42 @@ impl IWICBitmapDecoderInfo { (::windows_core::Interface::vtable(self).base__.base__.GetSigningStatus)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetAuthor(&self, wzauthor: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetAuthor)(::windows_core::Interface::as_raw(self), wzauthor.len() as _, ::core::mem::transmute(wzauthor.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetAuthor)(::windows_core::Interface::as_raw(self), wzauthor.len().try_into().unwrap(), ::core::mem::transmute(wzauthor.as_ptr()), pcchactual).ok() } pub unsafe fn GetVendorGUID(&self) -> ::windows_core::Result<::windows_core::GUID> { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).base__.base__.GetVendorGUID)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetVersion(&self, wzversion: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetVersion)(::windows_core::Interface::as_raw(self), wzversion.len() as _, ::core::mem::transmute(wzversion.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetVersion)(::windows_core::Interface::as_raw(self), wzversion.len().try_into().unwrap(), ::core::mem::transmute(wzversion.as_ptr()), pcchactual).ok() } pub unsafe fn GetSpecVersion(&self, wzspecversion: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetSpecVersion)(::windows_core::Interface::as_raw(self), wzspecversion.len() as _, ::core::mem::transmute(wzspecversion.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetSpecVersion)(::windows_core::Interface::as_raw(self), wzspecversion.len().try_into().unwrap(), ::core::mem::transmute(wzspecversion.as_ptr()), pcchactual).ok() } pub unsafe fn GetFriendlyName(&self, wzfriendlyname: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetFriendlyName)(::windows_core::Interface::as_raw(self), wzfriendlyname.len() as _, ::core::mem::transmute(wzfriendlyname.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetFriendlyName)(::windows_core::Interface::as_raw(self), wzfriendlyname.len().try_into().unwrap(), ::core::mem::transmute(wzfriendlyname.as_ptr()), pcchactual).ok() } pub unsafe fn GetContainerFormat(&self) -> ::windows_core::Result<::windows_core::GUID> { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).base__.GetContainerFormat)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetPixelFormats(&self, pguidpixelformats: &mut [::windows_core::GUID], pcactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetPixelFormats)(::windows_core::Interface::as_raw(self), pguidpixelformats.len() as _, ::core::mem::transmute(pguidpixelformats.as_ptr()), pcactual).ok() + (::windows_core::Interface::vtable(self).base__.GetPixelFormats)(::windows_core::Interface::as_raw(self), pguidpixelformats.len().try_into().unwrap(), ::core::mem::transmute(pguidpixelformats.as_ptr()), pcactual).ok() } pub unsafe fn GetColorManagementVersion(&self, wzcolormanagementversion: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetColorManagementVersion)(::windows_core::Interface::as_raw(self), wzcolormanagementversion.len() as _, ::core::mem::transmute(wzcolormanagementversion.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.GetColorManagementVersion)(::windows_core::Interface::as_raw(self), wzcolormanagementversion.len().try_into().unwrap(), ::core::mem::transmute(wzcolormanagementversion.as_ptr()), pcchactual).ok() } pub unsafe fn GetDeviceManufacturer(&self, wzdevicemanufacturer: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetDeviceManufacturer)(::windows_core::Interface::as_raw(self), wzdevicemanufacturer.len() as _, ::core::mem::transmute(wzdevicemanufacturer.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.GetDeviceManufacturer)(::windows_core::Interface::as_raw(self), wzdevicemanufacturer.len().try_into().unwrap(), ::core::mem::transmute(wzdevicemanufacturer.as_ptr()), pcchactual).ok() } pub unsafe fn GetDeviceModels(&self, wzdevicemodels: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetDeviceModels)(::windows_core::Interface::as_raw(self), wzdevicemodels.len() as _, ::core::mem::transmute(wzdevicemodels.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.GetDeviceModels)(::windows_core::Interface::as_raw(self), wzdevicemodels.len().try_into().unwrap(), ::core::mem::transmute(wzdevicemodels.as_ptr()), pcchactual).ok() } pub unsafe fn GetMimeTypes(&self, wzmimetypes: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetMimeTypes)(::windows_core::Interface::as_raw(self), wzmimetypes.len() as _, ::core::mem::transmute(wzmimetypes.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.GetMimeTypes)(::windows_core::Interface::as_raw(self), wzmimetypes.len().try_into().unwrap(), ::core::mem::transmute(wzmimetypes.as_ptr()), pcchactual).ok() } pub unsafe fn GetFileExtensions(&self, wzfileextensions: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetFileExtensions)(::windows_core::Interface::as_raw(self), wzfileextensions.len() as _, ::core::mem::transmute(wzfileextensions.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.GetFileExtensions)(::windows_core::Interface::as_raw(self), wzfileextensions.len().try_into().unwrap(), ::core::mem::transmute(wzfileextensions.as_ptr()), pcchactual).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -564,7 +564,7 @@ impl IWICBitmapEncoder { (::windows_core::Interface::vtable(self).GetEncoderInfo)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn SetColorContexts(&self, ppicolorcontext: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetColorContexts)(::windows_core::Interface::as_raw(self), ppicolorcontext.len() as _, ::core::mem::transmute(ppicolorcontext.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetColorContexts)(::windows_core::Interface::as_raw(self), ppicolorcontext.len().try_into().unwrap(), ::core::mem::transmute(ppicolorcontext.as_ptr())).ok() } pub unsafe fn SetPalette(&self, pipalette: P0) -> ::windows_core::Result<()> where @@ -642,42 +642,42 @@ impl IWICBitmapEncoderInfo { (::windows_core::Interface::vtable(self).base__.base__.GetSigningStatus)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetAuthor(&self, wzauthor: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetAuthor)(::windows_core::Interface::as_raw(self), wzauthor.len() as _, ::core::mem::transmute(wzauthor.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetAuthor)(::windows_core::Interface::as_raw(self), wzauthor.len().try_into().unwrap(), ::core::mem::transmute(wzauthor.as_ptr()), pcchactual).ok() } pub unsafe fn GetVendorGUID(&self) -> ::windows_core::Result<::windows_core::GUID> { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).base__.base__.GetVendorGUID)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetVersion(&self, wzversion: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetVersion)(::windows_core::Interface::as_raw(self), wzversion.len() as _, ::core::mem::transmute(wzversion.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetVersion)(::windows_core::Interface::as_raw(self), wzversion.len().try_into().unwrap(), ::core::mem::transmute(wzversion.as_ptr()), pcchactual).ok() } pub unsafe fn GetSpecVersion(&self, wzspecversion: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetSpecVersion)(::windows_core::Interface::as_raw(self), wzspecversion.len() as _, ::core::mem::transmute(wzspecversion.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetSpecVersion)(::windows_core::Interface::as_raw(self), wzspecversion.len().try_into().unwrap(), ::core::mem::transmute(wzspecversion.as_ptr()), pcchactual).ok() } pub unsafe fn GetFriendlyName(&self, wzfriendlyname: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetFriendlyName)(::windows_core::Interface::as_raw(self), wzfriendlyname.len() as _, ::core::mem::transmute(wzfriendlyname.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetFriendlyName)(::windows_core::Interface::as_raw(self), wzfriendlyname.len().try_into().unwrap(), ::core::mem::transmute(wzfriendlyname.as_ptr()), pcchactual).ok() } pub unsafe fn GetContainerFormat(&self) -> ::windows_core::Result<::windows_core::GUID> { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).base__.GetContainerFormat)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetPixelFormats(&self, pguidpixelformats: &mut [::windows_core::GUID], pcactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetPixelFormats)(::windows_core::Interface::as_raw(self), pguidpixelformats.len() as _, ::core::mem::transmute(pguidpixelformats.as_ptr()), pcactual).ok() + (::windows_core::Interface::vtable(self).base__.GetPixelFormats)(::windows_core::Interface::as_raw(self), pguidpixelformats.len().try_into().unwrap(), ::core::mem::transmute(pguidpixelformats.as_ptr()), pcactual).ok() } pub unsafe fn GetColorManagementVersion(&self, wzcolormanagementversion: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetColorManagementVersion)(::windows_core::Interface::as_raw(self), wzcolormanagementversion.len() as _, ::core::mem::transmute(wzcolormanagementversion.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.GetColorManagementVersion)(::windows_core::Interface::as_raw(self), wzcolormanagementversion.len().try_into().unwrap(), ::core::mem::transmute(wzcolormanagementversion.as_ptr()), pcchactual).ok() } pub unsafe fn GetDeviceManufacturer(&self, wzdevicemanufacturer: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetDeviceManufacturer)(::windows_core::Interface::as_raw(self), wzdevicemanufacturer.len() as _, ::core::mem::transmute(wzdevicemanufacturer.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.GetDeviceManufacturer)(::windows_core::Interface::as_raw(self), wzdevicemanufacturer.len().try_into().unwrap(), ::core::mem::transmute(wzdevicemanufacturer.as_ptr()), pcchactual).ok() } pub unsafe fn GetDeviceModels(&self, wzdevicemodels: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetDeviceModels)(::windows_core::Interface::as_raw(self), wzdevicemodels.len() as _, ::core::mem::transmute(wzdevicemodels.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.GetDeviceModels)(::windows_core::Interface::as_raw(self), wzdevicemodels.len().try_into().unwrap(), ::core::mem::transmute(wzdevicemodels.as_ptr()), pcchactual).ok() } pub unsafe fn GetMimeTypes(&self, wzmimetypes: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetMimeTypes)(::windows_core::Interface::as_raw(self), wzmimetypes.len() as _, ::core::mem::transmute(wzmimetypes.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.GetMimeTypes)(::windows_core::Interface::as_raw(self), wzmimetypes.len().try_into().unwrap(), ::core::mem::transmute(wzmimetypes.as_ptr()), pcchactual).ok() } pub unsafe fn GetFileExtensions(&self, wzfileextensions: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetFileExtensions)(::windows_core::Interface::as_raw(self), wzfileextensions.len() as _, ::core::mem::transmute(wzfileextensions.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.GetFileExtensions)(::windows_core::Interface::as_raw(self), wzfileextensions.len().try_into().unwrap(), ::core::mem::transmute(wzfileextensions.as_ptr()), pcchactual).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -751,7 +751,7 @@ impl IWICBitmapFlipRotator { (::windows_core::Interface::vtable(self).base__.CopyPalette)(::windows_core::Interface::as_raw(self), pipalette.into_param().abi()).ok() } pub unsafe fn CopyPixels(&self, prc: *const WICRect, cbstride: u32, pbbuffer: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.CopyPixels)(::windows_core::Interface::as_raw(self), prc, cbstride, pbbuffer.len() as _, ::core::mem::transmute(pbbuffer.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.CopyPixels)(::windows_core::Interface::as_raw(self), prc, cbstride, pbbuffer.len().try_into().unwrap(), ::core::mem::transmute(pbbuffer.as_ptr())).ok() } pub unsafe fn Initialize(&self, pisource: P0, options: WICBitmapTransformOptions) -> ::windows_core::Result<()> where @@ -794,14 +794,14 @@ impl IWICBitmapFrameDecode { (::windows_core::Interface::vtable(self).base__.CopyPalette)(::windows_core::Interface::as_raw(self), pipalette.into_param().abi()).ok() } pub unsafe fn CopyPixels(&self, prc: *const WICRect, cbstride: u32, pbbuffer: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.CopyPixels)(::windows_core::Interface::as_raw(self), prc, cbstride, pbbuffer.len() as _, ::core::mem::transmute(pbbuffer.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.CopyPixels)(::windows_core::Interface::as_raw(self), prc, cbstride, pbbuffer.len().try_into().unwrap(), ::core::mem::transmute(pbbuffer.as_ptr())).ok() } pub unsafe fn GetMetadataQueryReader(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).GetMetadataQueryReader)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetColorContexts(&self, ppicolorcontexts: &mut [::core::option::Option], pcactualcount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetColorContexts)(::windows_core::Interface::as_raw(self), ppicolorcontexts.len() as _, ::core::mem::transmute(ppicolorcontexts.as_ptr()), pcactualcount).ok() + (::windows_core::Interface::vtable(self).GetColorContexts)(::windows_core::Interface::as_raw(self), ppicolorcontexts.len().try_into().unwrap(), ::core::mem::transmute(ppicolorcontexts.as_ptr()), pcactualcount).ok() } pub unsafe fn GetThumbnail(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -845,7 +845,7 @@ impl IWICBitmapFrameEncode { (::windows_core::Interface::vtable(self).SetPixelFormat)(::windows_core::Interface::as_raw(self), ppixelformat).ok() } pub unsafe fn SetColorContexts(&self, ppicolorcontext: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetColorContexts)(::windows_core::Interface::as_raw(self), ppicolorcontext.len() as _, ::core::mem::transmute(ppicolorcontext.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetColorContexts)(::windows_core::Interface::as_raw(self), ppicolorcontext.len().try_into().unwrap(), ::core::mem::transmute(ppicolorcontext.as_ptr())).ok() } pub unsafe fn SetPalette(&self, pipalette: P0) -> ::windows_core::Result<()> where @@ -860,7 +860,7 @@ impl IWICBitmapFrameEncode { (::windows_core::Interface::vtable(self).SetThumbnail)(::windows_core::Interface::as_raw(self), pithumbnail.into_param().abi()).ok() } pub unsafe fn WritePixels(&self, linecount: u32, cbstride: u32, pbpixels: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).WritePixels)(::windows_core::Interface::as_raw(self), linecount, cbstride, pbpixels.len() as _, ::core::mem::transmute(pbpixels.as_ptr())).ok() + (::windows_core::Interface::vtable(self).WritePixels)(::windows_core::Interface::as_raw(self), linecount, cbstride, pbpixels.len().try_into().unwrap(), ::core::mem::transmute(pbpixels.as_ptr())).ok() } pub unsafe fn WriteSource(&self, pibitmapsource: P0, prc: *const WICRect) -> ::windows_core::Result<()> where @@ -958,7 +958,7 @@ impl IWICBitmapScaler { (::windows_core::Interface::vtable(self).base__.CopyPalette)(::windows_core::Interface::as_raw(self), pipalette.into_param().abi()).ok() } pub unsafe fn CopyPixels(&self, prc: *const WICRect, cbstride: u32, pbbuffer: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.CopyPixels)(::windows_core::Interface::as_raw(self), prc, cbstride, pbbuffer.len() as _, ::core::mem::transmute(pbbuffer.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.CopyPixels)(::windows_core::Interface::as_raw(self), prc, cbstride, pbbuffer.len().try_into().unwrap(), ::core::mem::transmute(pbbuffer.as_ptr())).ok() } pub unsafe fn Initialize(&self, pisource: P0, uiwidth: u32, uiheight: u32, mode: WICBitmapInterpolationMode) -> ::windows_core::Result<()> where @@ -1001,7 +1001,7 @@ impl IWICBitmapSource { (::windows_core::Interface::vtable(self).CopyPalette)(::windows_core::Interface::as_raw(self), pipalette.into_param().abi()).ok() } pub unsafe fn CopyPixels(&self, prc: *const WICRect, cbstride: u32, pbbuffer: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).CopyPixels)(::windows_core::Interface::as_raw(self), prc, cbstride, pbbuffer.len() as _, ::core::mem::transmute(pbbuffer.as_ptr())).ok() + (::windows_core::Interface::vtable(self).CopyPixels)(::windows_core::Interface::as_raw(self), prc, cbstride, pbbuffer.len().try_into().unwrap(), ::core::mem::transmute(pbbuffer.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IWICBitmapSource, ::windows_core::IUnknown); @@ -1026,7 +1026,7 @@ pub struct IWICBitmapSource_Vtbl { pub struct IWICBitmapSourceTransform(::windows_core::IUnknown); impl IWICBitmapSourceTransform { pub unsafe fn CopyPixels(&self, prc: *const WICRect, uiwidth: u32, uiheight: u32, pguiddstformat: *const ::windows_core::GUID, dsttransform: WICBitmapTransformOptions, nstride: u32, pbbuffer: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).CopyPixels)(::windows_core::Interface::as_raw(self), prc, uiwidth, uiheight, pguiddstformat, dsttransform, nstride, pbbuffer.len() as _, ::core::mem::transmute(pbbuffer.as_ptr())).ok() + (::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<()> { (::windows_core::Interface::vtable(self).GetClosestSize)(::windows_core::Interface::as_raw(self), puiwidth, puiheight).ok() @@ -1071,7 +1071,7 @@ impl IWICColorContext { (::windows_core::Interface::vtable(self).InitializeFromFilename)(::windows_core::Interface::as_raw(self), wzfilename.into_param().abi()).ok() } pub unsafe fn InitializeFromMemory(&self, pbbuffer: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).InitializeFromMemory)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbbuffer.as_ptr()), pbbuffer.len() as _).ok() + (::windows_core::Interface::vtable(self).InitializeFromMemory)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbbuffer.as_ptr()), pbbuffer.len().try_into().unwrap()).ok() } pub unsafe fn InitializeFromExifColorSpace(&self, value: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).InitializeFromExifColorSpace)(::windows_core::Interface::as_raw(self), value).ok() @@ -1081,7 +1081,7 @@ impl IWICColorContext { (::windows_core::Interface::vtable(self).GetType)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetProfileBytes(&self, pbbuffer: &mut [u8], pcbactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetProfileBytes)(::windows_core::Interface::as_raw(self), pbbuffer.len() as _, ::core::mem::transmute(pbbuffer.as_ptr()), pcbactual).ok() + (::windows_core::Interface::vtable(self).GetProfileBytes)(::windows_core::Interface::as_raw(self), pbbuffer.len().try_into().unwrap(), ::core::mem::transmute(pbbuffer.as_ptr()), pcbactual).ok() } pub unsafe fn GetExifColorSpace(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1127,7 +1127,7 @@ impl IWICColorTransform { (::windows_core::Interface::vtable(self).base__.CopyPalette)(::windows_core::Interface::as_raw(self), pipalette.into_param().abi()).ok() } pub unsafe fn CopyPixels(&self, prc: *const WICRect, cbstride: u32, pbbuffer: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.CopyPixels)(::windows_core::Interface::as_raw(self), prc, cbstride, pbbuffer.len() as _, ::core::mem::transmute(pbbuffer.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.CopyPixels)(::windows_core::Interface::as_raw(self), prc, cbstride, pbbuffer.len().try_into().unwrap(), ::core::mem::transmute(pbbuffer.as_ptr())).ok() } pub unsafe fn Initialize(&self, pibitmapsource: P0, picontextsource: P1, picontextdest: P2, pixelfmtdest: *const ::windows_core::GUID) -> ::windows_core::Result<()> where @@ -1243,7 +1243,7 @@ impl IWICComponentFactory { } pub unsafe fn CreateBitmapFromMemory(&self, uiwidth: u32, uiheight: u32, pixelformat: *const ::windows_core::GUID, cbstride: u32, pbbuffer: &[u8]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.CreateBitmapFromMemory)(::windows_core::Interface::as_raw(self), uiwidth, uiheight, pixelformat, cbstride, pbbuffer.len() as _, ::core::mem::transmute(pbbuffer.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateBitmapFromMemory)(::windows_core::Interface::as_raw(self), uiwidth, uiheight, pixelformat, cbstride, pbbuffer.len().try_into().unwrap(), ::core::mem::transmute(pbbuffer.as_ptr()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Graphics_Gdi\"`"] #[cfg(feature = "Win32_Graphics_Gdi")] @@ -1342,7 +1342,7 @@ impl IWICComponentFactory { #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn CreateEncoderPropertyBag(&self, ppropoptions: &[super::super::System::Com::StructuredStorage::PROPBAG2]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateEncoderPropertyBag)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppropoptions.as_ptr()), ppropoptions.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateEncoderPropertyBag)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppropoptions.as_ptr()), ppropoptions.len().try_into().unwrap(), &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IWICComponentFactory, ::windows_core::IUnknown, IWICImagingFactory); @@ -1390,20 +1390,20 @@ impl IWICComponentInfo { (::windows_core::Interface::vtable(self).GetSigningStatus)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetAuthor(&self, wzauthor: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetAuthor)(::windows_core::Interface::as_raw(self), wzauthor.len() as _, ::core::mem::transmute(wzauthor.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).GetAuthor)(::windows_core::Interface::as_raw(self), wzauthor.len().try_into().unwrap(), ::core::mem::transmute(wzauthor.as_ptr()), pcchactual).ok() } pub unsafe fn GetVendorGUID(&self) -> ::windows_core::Result<::windows_core::GUID> { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).GetVendorGUID)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetVersion(&self, wzversion: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetVersion)(::windows_core::Interface::as_raw(self), wzversion.len() as _, ::core::mem::transmute(wzversion.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).GetVersion)(::windows_core::Interface::as_raw(self), wzversion.len().try_into().unwrap(), ::core::mem::transmute(wzversion.as_ptr()), pcchactual).ok() } pub unsafe fn GetSpecVersion(&self, wzspecversion: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSpecVersion)(::windows_core::Interface::as_raw(self), wzspecversion.len() as _, ::core::mem::transmute(wzspecversion.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).GetSpecVersion)(::windows_core::Interface::as_raw(self), wzspecversion.len().try_into().unwrap(), ::core::mem::transmute(wzspecversion.as_ptr()), pcchactual).ok() } pub unsafe fn GetFriendlyName(&self, wzfriendlyname: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetFriendlyName)(::windows_core::Interface::as_raw(self), wzfriendlyname.len() as _, ::core::mem::transmute(wzfriendlyname.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).GetFriendlyName)(::windows_core::Interface::as_raw(self), wzfriendlyname.len().try_into().unwrap(), ::core::mem::transmute(wzfriendlyname.as_ptr()), pcchactual).ok() } } ::windows_core::imp::interface_hierarchy!(IWICComponentInfo, ::windows_core::IUnknown); @@ -1510,7 +1510,7 @@ impl IWICDdsFrameDecode { (::windows_core::Interface::vtable(self).GetFormatInfo)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn CopyBlocks(&self, prcboundsinblocks: *const WICRect, cbstride: u32, pbbuffer: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).CopyBlocks)(::windows_core::Interface::as_raw(self), prcboundsinblocks, cbstride, pbbuffer.len() as _, ::core::mem::transmute(pbbuffer.as_ptr())).ok() + (::windows_core::Interface::vtable(self).CopyBlocks)(::windows_core::Interface::as_raw(self), prcboundsinblocks, cbstride, pbbuffer.len().try_into().unwrap(), ::core::mem::transmute(pbbuffer.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IWICDdsFrameDecode, ::windows_core::IUnknown); @@ -1552,14 +1552,14 @@ impl IWICDevelopRaw { (::windows_core::Interface::vtable(self).base__.base__.CopyPalette)(::windows_core::Interface::as_raw(self), pipalette.into_param().abi()).ok() } pub unsafe fn CopyPixels(&self, prc: *const WICRect, cbstride: u32, pbbuffer: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.CopyPixels)(::windows_core::Interface::as_raw(self), prc, cbstride, pbbuffer.len() as _, ::core::mem::transmute(pbbuffer.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.CopyPixels)(::windows_core::Interface::as_raw(self), prc, cbstride, pbbuffer.len().try_into().unwrap(), ::core::mem::transmute(pbbuffer.as_ptr())).ok() } pub unsafe fn GetMetadataQueryReader(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).base__.GetMetadataQueryReader)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetColorContexts(&self, ppicolorcontexts: &mut [::core::option::Option], pcactualcount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetColorContexts)(::windows_core::Interface::as_raw(self), ppicolorcontexts.len() as _, ::core::mem::transmute(ppicolorcontexts.as_ptr()), pcactualcount).ok() + (::windows_core::Interface::vtable(self).base__.GetColorContexts)(::windows_core::Interface::as_raw(self), ppicolorcontexts.len().try_into().unwrap(), ::core::mem::transmute(ppicolorcontexts.as_ptr()), pcactualcount).ok() } pub unsafe fn GetThumbnail(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1836,7 +1836,7 @@ impl IWICFormatConverter { (::windows_core::Interface::vtable(self).base__.CopyPalette)(::windows_core::Interface::as_raw(self), pipalette.into_param().abi()).ok() } pub unsafe fn CopyPixels(&self, prc: *const WICRect, cbstride: u32, pbbuffer: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.CopyPixels)(::windows_core::Interface::as_raw(self), prc, cbstride, pbbuffer.len() as _, ::core::mem::transmute(pbbuffer.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.CopyPixels)(::windows_core::Interface::as_raw(self), prc, cbstride, pbbuffer.len().try_into().unwrap(), ::core::mem::transmute(pbbuffer.as_ptr())).ok() } pub unsafe fn Initialize(&self, pisource: P0, dstformat: *const ::windows_core::GUID, dither: WICBitmapDitherType, pipalette: P1, alphathresholdpercent: f64, palettetranslate: WICBitmapPaletteType) -> ::windows_core::Result<()> where @@ -1886,23 +1886,23 @@ impl IWICFormatConverterInfo { (::windows_core::Interface::vtable(self).base__.GetSigningStatus)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetAuthor(&self, wzauthor: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetAuthor)(::windows_core::Interface::as_raw(self), wzauthor.len() as _, ::core::mem::transmute(wzauthor.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.GetAuthor)(::windows_core::Interface::as_raw(self), wzauthor.len().try_into().unwrap(), ::core::mem::transmute(wzauthor.as_ptr()), pcchactual).ok() } pub unsafe fn GetVendorGUID(&self) -> ::windows_core::Result<::windows_core::GUID> { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).base__.GetVendorGUID)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetVersion(&self, wzversion: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetVersion)(::windows_core::Interface::as_raw(self), wzversion.len() as _, ::core::mem::transmute(wzversion.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.GetVersion)(::windows_core::Interface::as_raw(self), wzversion.len().try_into().unwrap(), ::core::mem::transmute(wzversion.as_ptr()), pcchactual).ok() } pub unsafe fn GetSpecVersion(&self, wzspecversion: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetSpecVersion)(::windows_core::Interface::as_raw(self), wzspecversion.len() as _, ::core::mem::transmute(wzspecversion.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.GetSpecVersion)(::windows_core::Interface::as_raw(self), wzspecversion.len().try_into().unwrap(), ::core::mem::transmute(wzspecversion.as_ptr()), pcchactual).ok() } pub unsafe fn GetFriendlyName(&self, wzfriendlyname: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetFriendlyName)(::windows_core::Interface::as_raw(self), wzfriendlyname.len() as _, ::core::mem::transmute(wzfriendlyname.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.GetFriendlyName)(::windows_core::Interface::as_raw(self), wzfriendlyname.len().try_into().unwrap(), ::core::mem::transmute(wzfriendlyname.as_ptr()), pcchactual).ok() } pub unsafe fn GetPixelFormats(&self, ppixelformatguids: &mut [::windows_core::GUID], pcactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPixelFormats)(::windows_core::Interface::as_raw(self), ppixelformatguids.len() as _, ::core::mem::transmute(ppixelformatguids.as_ptr()), pcactual).ok() + (::windows_core::Interface::vtable(self).GetPixelFormats)(::windows_core::Interface::as_raw(self), ppixelformatguids.len().try_into().unwrap(), ::core::mem::transmute(ppixelformatguids.as_ptr()), pcactual).ok() } pub unsafe fn CreateInstance(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -2015,7 +2015,7 @@ impl IWICImagingFactory { } pub unsafe fn CreateBitmapFromMemory(&self, uiwidth: u32, uiheight: u32, pixelformat: *const ::windows_core::GUID, cbstride: u32, pbbuffer: &[u8]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateBitmapFromMemory)(::windows_core::Interface::as_raw(self), uiwidth, uiheight, pixelformat, cbstride, pbbuffer.len() as _, ::core::mem::transmute(pbbuffer.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateBitmapFromMemory)(::windows_core::Interface::as_raw(self), uiwidth, uiheight, pixelformat, cbstride, pbbuffer.len().try_into().unwrap(), ::core::mem::transmute(pbbuffer.as_ptr()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Graphics_Gdi\"`"] #[cfg(feature = "Win32_Graphics_Gdi")] @@ -2161,10 +2161,10 @@ impl IWICJpegFrameDecode { (::windows_core::Interface::vtable(self).GetScanHeader)(::windows_core::Interface::as_raw(self), scanindex, pscanheader).ok() } pub unsafe fn CopyScan(&self, scanindex: u32, scanoffset: u32, pbscandata: &mut [u8], pcbscandataactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).CopyScan)(::windows_core::Interface::as_raw(self), scanindex, scanoffset, pbscandata.len() as _, ::core::mem::transmute(pbscandata.as_ptr()), pcbscandataactual).ok() + (::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).ok() } pub unsafe fn CopyMinimalStream(&self, streamoffset: u32, pbstreamdata: &mut [u8], pcbstreamdataactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).CopyMinimalStream)(::windows_core::Interface::as_raw(self), streamoffset, pbstreamdata.len() as _, ::core::mem::transmute(pbstreamdata.as_ptr()), pcbstreamdataactual).ok() + (::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).ok() } } ::windows_core::imp::interface_hierarchy!(IWICJpegFrameDecode, ::windows_core::IUnknown); @@ -2221,7 +2221,7 @@ impl IWICJpegFrameEncode { (::windows_core::Interface::vtable(self).GetQuantizationTable)(::windows_core::Interface::as_raw(self), scanindex, tableindex, pquantizationtable).ok() } pub unsafe fn WriteScan(&self, pbscandata: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).WriteScan)(::windows_core::Interface::as_raw(self), pbscandata.len() as _, ::core::mem::transmute(pbscandata.as_ptr())).ok() + (::windows_core::Interface::vtable(self).WriteScan)(::windows_core::Interface::as_raw(self), pbscandata.len().try_into().unwrap(), ::core::mem::transmute(pbscandata.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IWICJpegFrameEncode, ::windows_core::IUnknown); @@ -2373,33 +2373,33 @@ impl IWICMetadataHandlerInfo { (::windows_core::Interface::vtable(self).base__.GetSigningStatus)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetAuthor(&self, wzauthor: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetAuthor)(::windows_core::Interface::as_raw(self), wzauthor.len() as _, ::core::mem::transmute(wzauthor.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.GetAuthor)(::windows_core::Interface::as_raw(self), wzauthor.len().try_into().unwrap(), ::core::mem::transmute(wzauthor.as_ptr()), pcchactual).ok() } pub unsafe fn GetVendorGUID(&self) -> ::windows_core::Result<::windows_core::GUID> { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).base__.GetVendorGUID)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetVersion(&self, wzversion: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetVersion)(::windows_core::Interface::as_raw(self), wzversion.len() as _, ::core::mem::transmute(wzversion.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.GetVersion)(::windows_core::Interface::as_raw(self), wzversion.len().try_into().unwrap(), ::core::mem::transmute(wzversion.as_ptr()), pcchactual).ok() } pub unsafe fn GetSpecVersion(&self, wzspecversion: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetSpecVersion)(::windows_core::Interface::as_raw(self), wzspecversion.len() as _, ::core::mem::transmute(wzspecversion.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.GetSpecVersion)(::windows_core::Interface::as_raw(self), wzspecversion.len().try_into().unwrap(), ::core::mem::transmute(wzspecversion.as_ptr()), pcchactual).ok() } pub unsafe fn GetFriendlyName(&self, wzfriendlyname: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetFriendlyName)(::windows_core::Interface::as_raw(self), wzfriendlyname.len() as _, ::core::mem::transmute(wzfriendlyname.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.GetFriendlyName)(::windows_core::Interface::as_raw(self), wzfriendlyname.len().try_into().unwrap(), ::core::mem::transmute(wzfriendlyname.as_ptr()), pcchactual).ok() } pub unsafe fn GetMetadataFormat(&self) -> ::windows_core::Result<::windows_core::GUID> { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).GetMetadataFormat)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetContainerFormats(&self, pguidcontainerformats: &mut [::windows_core::GUID], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetContainerFormats)(::windows_core::Interface::as_raw(self), pguidcontainerformats.len() as _, ::core::mem::transmute(pguidcontainerformats.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).GetContainerFormats)(::windows_core::Interface::as_raw(self), pguidcontainerformats.len().try_into().unwrap(), ::core::mem::transmute(pguidcontainerformats.as_ptr()), pcchactual).ok() } pub unsafe fn GetDeviceManufacturer(&self, wzdevicemanufacturer: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDeviceManufacturer)(::windows_core::Interface::as_raw(self), wzdevicemanufacturer.len() as _, ::core::mem::transmute(wzdevicemanufacturer.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).GetDeviceManufacturer)(::windows_core::Interface::as_raw(self), wzdevicemanufacturer.len().try_into().unwrap(), ::core::mem::transmute(wzdevicemanufacturer.as_ptr()), pcchactual).ok() } pub unsafe fn GetDeviceModels(&self, wzdevicemodels: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDeviceModels)(::windows_core::Interface::as_raw(self), wzdevicemodels.len() as _, ::core::mem::transmute(wzdevicemodels.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).GetDeviceModels)(::windows_core::Interface::as_raw(self), wzdevicemodels.len().try_into().unwrap(), ::core::mem::transmute(wzdevicemodels.as_ptr()), pcchactual).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2457,7 +2457,7 @@ impl IWICMetadataQueryReader { (::windows_core::Interface::vtable(self).GetContainerFormat)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetLocation(&self, wznamespace: &mut [u16], pcchactuallength: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLocation)(::windows_core::Interface::as_raw(self), wznamespace.len() as _, ::core::mem::transmute(wznamespace.as_ptr()), pcchactuallength).ok() + (::windows_core::Interface::vtable(self).GetLocation)(::windows_core::Interface::as_raw(self), wznamespace.len().try_into().unwrap(), ::core::mem::transmute(wznamespace.as_ptr()), pcchactuallength).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] @@ -2505,7 +2505,7 @@ impl IWICMetadataQueryWriter { (::windows_core::Interface::vtable(self).base__.GetContainerFormat)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetLocation(&self, wznamespace: &mut [u16], pcchactuallength: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetLocation)(::windows_core::Interface::as_raw(self), wznamespace.len() as _, ::core::mem::transmute(wznamespace.as_ptr()), pcchactuallength).ok() + (::windows_core::Interface::vtable(self).base__.GetLocation)(::windows_core::Interface::as_raw(self), wznamespace.len().try_into().unwrap(), ::core::mem::transmute(wznamespace.as_ptr()), pcchactuallength).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] @@ -2625,33 +2625,33 @@ impl IWICMetadataReaderInfo { (::windows_core::Interface::vtable(self).base__.base__.GetSigningStatus)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetAuthor(&self, wzauthor: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetAuthor)(::windows_core::Interface::as_raw(self), wzauthor.len() as _, ::core::mem::transmute(wzauthor.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetAuthor)(::windows_core::Interface::as_raw(self), wzauthor.len().try_into().unwrap(), ::core::mem::transmute(wzauthor.as_ptr()), pcchactual).ok() } pub unsafe fn GetVendorGUID(&self) -> ::windows_core::Result<::windows_core::GUID> { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).base__.base__.GetVendorGUID)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetVersion(&self, wzversion: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetVersion)(::windows_core::Interface::as_raw(self), wzversion.len() as _, ::core::mem::transmute(wzversion.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetVersion)(::windows_core::Interface::as_raw(self), wzversion.len().try_into().unwrap(), ::core::mem::transmute(wzversion.as_ptr()), pcchactual).ok() } pub unsafe fn GetSpecVersion(&self, wzspecversion: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetSpecVersion)(::windows_core::Interface::as_raw(self), wzspecversion.len() as _, ::core::mem::transmute(wzspecversion.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetSpecVersion)(::windows_core::Interface::as_raw(self), wzspecversion.len().try_into().unwrap(), ::core::mem::transmute(wzspecversion.as_ptr()), pcchactual).ok() } pub unsafe fn GetFriendlyName(&self, wzfriendlyname: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetFriendlyName)(::windows_core::Interface::as_raw(self), wzfriendlyname.len() as _, ::core::mem::transmute(wzfriendlyname.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetFriendlyName)(::windows_core::Interface::as_raw(self), wzfriendlyname.len().try_into().unwrap(), ::core::mem::transmute(wzfriendlyname.as_ptr()), pcchactual).ok() } pub unsafe fn GetMetadataFormat(&self) -> ::windows_core::Result<::windows_core::GUID> { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).base__.GetMetadataFormat)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetContainerFormats(&self, pguidcontainerformats: &mut [::windows_core::GUID], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetContainerFormats)(::windows_core::Interface::as_raw(self), pguidcontainerformats.len() as _, ::core::mem::transmute(pguidcontainerformats.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.GetContainerFormats)(::windows_core::Interface::as_raw(self), pguidcontainerformats.len().try_into().unwrap(), ::core::mem::transmute(pguidcontainerformats.as_ptr()), pcchactual).ok() } pub unsafe fn GetDeviceManufacturer(&self, wzdevicemanufacturer: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetDeviceManufacturer)(::windows_core::Interface::as_raw(self), wzdevicemanufacturer.len() as _, ::core::mem::transmute(wzdevicemanufacturer.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.GetDeviceManufacturer)(::windows_core::Interface::as_raw(self), wzdevicemanufacturer.len().try_into().unwrap(), ::core::mem::transmute(wzdevicemanufacturer.as_ptr()), pcchactual).ok() } pub unsafe fn GetDeviceModels(&self, wzdevicemodels: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetDeviceModels)(::windows_core::Interface::as_raw(self), wzdevicemodels.len() as _, ::core::mem::transmute(wzdevicemodels.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.GetDeviceModels)(::windows_core::Interface::as_raw(self), wzdevicemodels.len().try_into().unwrap(), ::core::mem::transmute(wzdevicemodels.as_ptr()), pcchactual).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2797,33 +2797,33 @@ impl IWICMetadataWriterInfo { (::windows_core::Interface::vtable(self).base__.base__.GetSigningStatus)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetAuthor(&self, wzauthor: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetAuthor)(::windows_core::Interface::as_raw(self), wzauthor.len() as _, ::core::mem::transmute(wzauthor.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetAuthor)(::windows_core::Interface::as_raw(self), wzauthor.len().try_into().unwrap(), ::core::mem::transmute(wzauthor.as_ptr()), pcchactual).ok() } pub unsafe fn GetVendorGUID(&self) -> ::windows_core::Result<::windows_core::GUID> { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).base__.base__.GetVendorGUID)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetVersion(&self, wzversion: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetVersion)(::windows_core::Interface::as_raw(self), wzversion.len() as _, ::core::mem::transmute(wzversion.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetVersion)(::windows_core::Interface::as_raw(self), wzversion.len().try_into().unwrap(), ::core::mem::transmute(wzversion.as_ptr()), pcchactual).ok() } pub unsafe fn GetSpecVersion(&self, wzspecversion: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetSpecVersion)(::windows_core::Interface::as_raw(self), wzspecversion.len() as _, ::core::mem::transmute(wzspecversion.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetSpecVersion)(::windows_core::Interface::as_raw(self), wzspecversion.len().try_into().unwrap(), ::core::mem::transmute(wzspecversion.as_ptr()), pcchactual).ok() } pub unsafe fn GetFriendlyName(&self, wzfriendlyname: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetFriendlyName)(::windows_core::Interface::as_raw(self), wzfriendlyname.len() as _, ::core::mem::transmute(wzfriendlyname.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetFriendlyName)(::windows_core::Interface::as_raw(self), wzfriendlyname.len().try_into().unwrap(), ::core::mem::transmute(wzfriendlyname.as_ptr()), pcchactual).ok() } pub unsafe fn GetMetadataFormat(&self) -> ::windows_core::Result<::windows_core::GUID> { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).base__.GetMetadataFormat)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetContainerFormats(&self, pguidcontainerformats: &mut [::windows_core::GUID], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetContainerFormats)(::windows_core::Interface::as_raw(self), pguidcontainerformats.len() as _, ::core::mem::transmute(pguidcontainerformats.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.GetContainerFormats)(::windows_core::Interface::as_raw(self), pguidcontainerformats.len().try_into().unwrap(), ::core::mem::transmute(pguidcontainerformats.as_ptr()), pcchactual).ok() } pub unsafe fn GetDeviceManufacturer(&self, wzdevicemanufacturer: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetDeviceManufacturer)(::windows_core::Interface::as_raw(self), wzdevicemanufacturer.len() as _, ::core::mem::transmute(wzdevicemanufacturer.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.GetDeviceManufacturer)(::windows_core::Interface::as_raw(self), wzdevicemanufacturer.len().try_into().unwrap(), ::core::mem::transmute(wzdevicemanufacturer.as_ptr()), pcchactual).ok() } pub unsafe fn GetDeviceModels(&self, wzdevicemodels: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetDeviceModels)(::windows_core::Interface::as_raw(self), wzdevicemodels.len() as _, ::core::mem::transmute(wzdevicemodels.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.GetDeviceModels)(::windows_core::Interface::as_raw(self), wzdevicemodels.len().try_into().unwrap(), ::core::mem::transmute(wzdevicemodels.as_ptr()), pcchactual).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2878,7 +2878,7 @@ impl IWICPalette { (::windows_core::Interface::vtable(self).InitializePredefined)(::windows_core::Interface::as_raw(self), epalettetype, faddtransparentcolor.into_param().abi()).ok() } pub unsafe fn InitializeCustom(&self, pcolors: &[u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).InitializeCustom)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pcolors.as_ptr()), pcolors.len() as _).ok() + (::windows_core::Interface::vtable(self).InitializeCustom)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pcolors.as_ptr()), pcolors.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2904,7 +2904,7 @@ impl IWICPalette { (::windows_core::Interface::vtable(self).GetColorCount)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetColors(&self, pcolors: &mut [u32], pcactualcolors: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetColors)(::windows_core::Interface::as_raw(self), pcolors.len() as _, ::core::mem::transmute(pcolors.as_ptr()), pcactualcolors).ok() + (::windows_core::Interface::vtable(self).GetColors)(::windows_core::Interface::as_raw(self), pcolors.len().try_into().unwrap(), ::core::mem::transmute(pcolors.as_ptr()), pcactualcolors).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3062,20 +3062,20 @@ impl IWICPixelFormatInfo { (::windows_core::Interface::vtable(self).base__.GetSigningStatus)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetAuthor(&self, wzauthor: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetAuthor)(::windows_core::Interface::as_raw(self), wzauthor.len() as _, ::core::mem::transmute(wzauthor.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.GetAuthor)(::windows_core::Interface::as_raw(self), wzauthor.len().try_into().unwrap(), ::core::mem::transmute(wzauthor.as_ptr()), pcchactual).ok() } pub unsafe fn GetVendorGUID(&self) -> ::windows_core::Result<::windows_core::GUID> { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).base__.GetVendorGUID)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetVersion(&self, wzversion: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetVersion)(::windows_core::Interface::as_raw(self), wzversion.len() as _, ::core::mem::transmute(wzversion.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.GetVersion)(::windows_core::Interface::as_raw(self), wzversion.len().try_into().unwrap(), ::core::mem::transmute(wzversion.as_ptr()), pcchactual).ok() } pub unsafe fn GetSpecVersion(&self, wzspecversion: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetSpecVersion)(::windows_core::Interface::as_raw(self), wzspecversion.len() as _, ::core::mem::transmute(wzspecversion.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.GetSpecVersion)(::windows_core::Interface::as_raw(self), wzspecversion.len().try_into().unwrap(), ::core::mem::transmute(wzspecversion.as_ptr()), pcchactual).ok() } pub unsafe fn GetFriendlyName(&self, wzfriendlyname: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetFriendlyName)(::windows_core::Interface::as_raw(self), wzfriendlyname.len() as _, ::core::mem::transmute(wzfriendlyname.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.GetFriendlyName)(::windows_core::Interface::as_raw(self), wzfriendlyname.len().try_into().unwrap(), ::core::mem::transmute(wzfriendlyname.as_ptr()), pcchactual).ok() } pub unsafe fn GetFormatGUID(&self) -> ::windows_core::Result<::windows_core::GUID> { let mut result__ = ::std::mem::zeroed(); @@ -3094,7 +3094,7 @@ impl IWICPixelFormatInfo { (::windows_core::Interface::vtable(self).GetChannelCount)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetChannelMask(&self, uichannelindex: u32, pbmaskbuffer: &mut [u8], pcbactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetChannelMask)(::windows_core::Interface::as_raw(self), uichannelindex, pbmaskbuffer.len() as _, ::core::mem::transmute(pbmaskbuffer.as_ptr()), pcbactual).ok() + (::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).ok() } } ::windows_core::imp::interface_hierarchy!(IWICPixelFormatInfo, ::windows_core::IUnknown, IWICComponentInfo); @@ -3131,20 +3131,20 @@ impl IWICPixelFormatInfo2 { (::windows_core::Interface::vtable(self).base__.base__.GetSigningStatus)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetAuthor(&self, wzauthor: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetAuthor)(::windows_core::Interface::as_raw(self), wzauthor.len() as _, ::core::mem::transmute(wzauthor.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetAuthor)(::windows_core::Interface::as_raw(self), wzauthor.len().try_into().unwrap(), ::core::mem::transmute(wzauthor.as_ptr()), pcchactual).ok() } pub unsafe fn GetVendorGUID(&self) -> ::windows_core::Result<::windows_core::GUID> { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).base__.base__.GetVendorGUID)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetVersion(&self, wzversion: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetVersion)(::windows_core::Interface::as_raw(self), wzversion.len() as _, ::core::mem::transmute(wzversion.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetVersion)(::windows_core::Interface::as_raw(self), wzversion.len().try_into().unwrap(), ::core::mem::transmute(wzversion.as_ptr()), pcchactual).ok() } pub unsafe fn GetSpecVersion(&self, wzspecversion: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetSpecVersion)(::windows_core::Interface::as_raw(self), wzspecversion.len() as _, ::core::mem::transmute(wzspecversion.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetSpecVersion)(::windows_core::Interface::as_raw(self), wzspecversion.len().try_into().unwrap(), ::core::mem::transmute(wzspecversion.as_ptr()), pcchactual).ok() } pub unsafe fn GetFriendlyName(&self, wzfriendlyname: &mut [u16], pcchactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetFriendlyName)(::windows_core::Interface::as_raw(self), wzfriendlyname.len() as _, ::core::mem::transmute(wzfriendlyname.as_ptr()), pcchactual).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetFriendlyName)(::windows_core::Interface::as_raw(self), wzfriendlyname.len().try_into().unwrap(), ::core::mem::transmute(wzfriendlyname.as_ptr()), pcchactual).ok() } pub unsafe fn GetFormatGUID(&self) -> ::windows_core::Result<::windows_core::GUID> { let mut result__ = ::std::mem::zeroed(); @@ -3163,7 +3163,7 @@ impl IWICPixelFormatInfo2 { (::windows_core::Interface::vtable(self).base__.GetChannelCount)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetChannelMask(&self, uichannelindex: u32, pbmaskbuffer: &mut [u8], pcbactual: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetChannelMask)(::windows_core::Interface::as_raw(self), uichannelindex, pbmaskbuffer.len() as _, ::core::mem::transmute(pbmaskbuffer.as_ptr()), pcbactual).ok() + (::windows_core::Interface::vtable(self).base__.GetChannelMask)(::windows_core::Interface::as_raw(self), uichannelindex, pbmaskbuffer.len().try_into().unwrap(), ::core::mem::transmute(pbmaskbuffer.as_ptr()), pcbactual).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3198,10 +3198,10 @@ pub struct IWICPixelFormatInfo2_Vtbl { pub struct IWICPlanarBitmapFrameEncode(::windows_core::IUnknown); impl IWICPlanarBitmapFrameEncode { pub unsafe fn WritePixels(&self, linecount: u32, pplanes: &[WICBitmapPlane]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).WritePixels)(::windows_core::Interface::as_raw(self), linecount, ::core::mem::transmute(pplanes.as_ptr()), pplanes.len() as _).ok() + (::windows_core::Interface::vtable(self).WritePixels)(::windows_core::Interface::as_raw(self), linecount, ::core::mem::transmute(pplanes.as_ptr()), pplanes.len().try_into().unwrap()).ok() } pub unsafe fn WriteSource(&self, ppplanes: &[::core::option::Option], prcsource: *const WICRect) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).WriteSource)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppplanes.as_ptr()), ppplanes.len() as _, prcsource).ok() + (::windows_core::Interface::vtable(self).WriteSource)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppplanes.as_ptr()), ppplanes.len().try_into().unwrap(), prcsource).ok() } } ::windows_core::imp::interface_hierarchy!(IWICPlanarBitmapFrameEncode, ::windows_core::IUnknown); @@ -3228,7 +3228,7 @@ impl IWICPlanarBitmapSourceTransform { (::windows_core::Interface::vtable(self).DoesSupportTransform)(::windows_core::Interface::as_raw(self), puiwidth, puiheight, dsttransform, dstplanaroptions, pguiddstformats, pplanedescriptions, cplanes, pfissupported).ok() } pub unsafe fn CopyPixels(&self, prcsource: *const WICRect, uiwidth: u32, uiheight: u32, dsttransform: WICBitmapTransformOptions, dstplanaroptions: WICPlanarOptions, pdstplanes: &[WICBitmapPlane]) -> ::windows_core::Result<()> { - (::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() as _).ok() + (::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() } } ::windows_core::imp::interface_hierarchy!(IWICPlanarBitmapSourceTransform, ::windows_core::IUnknown); @@ -3269,19 +3269,19 @@ impl IWICPlanarFormatConverter { (::windows_core::Interface::vtable(self).base__.CopyPalette)(::windows_core::Interface::as_raw(self), pipalette.into_param().abi()).ok() } pub unsafe fn CopyPixels(&self, prc: *const WICRect, cbstride: u32, pbbuffer: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.CopyPixels)(::windows_core::Interface::as_raw(self), prc, cbstride, pbbuffer.len() as _, ::core::mem::transmute(pbbuffer.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.CopyPixels)(::windows_core::Interface::as_raw(self), prc, cbstride, pbbuffer.len().try_into().unwrap(), ::core::mem::transmute(pbbuffer.as_ptr())).ok() } pub unsafe fn Initialize(&self, ppplanes: &[::core::option::Option], dstformat: *const ::windows_core::GUID, dither: WICBitmapDitherType, pipalette: P0, alphathresholdpercent: f64, palettetranslate: WICBitmapPaletteType) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).Initialize)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppplanes.as_ptr()), ppplanes.len() as _, dstformat, dither, pipalette.into_param().abi(), alphathresholdpercent, palettetranslate).ok() + (::windows_core::Interface::vtable(self).Initialize)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppplanes.as_ptr()), ppplanes.len().try_into().unwrap(), dstformat, dither, pipalette.into_param().abi(), alphathresholdpercent, palettetranslate).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn CanConvert(&self, psrcpixelformats: &[::windows_core::GUID], dstpixelformat: *const ::windows_core::GUID) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CanConvert)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(psrcpixelformats.as_ptr()), psrcpixelformats.len() as _, dstpixelformat, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CanConvert)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(psrcpixelformats.as_ptr()), psrcpixelformats.len().try_into().unwrap(), dstpixelformat, &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IWICPlanarFormatConverter, ::windows_core::IUnknown, IWICBitmapSource); @@ -3434,7 +3434,7 @@ impl IWICStream { (::windows_core::Interface::vtable(self).InitializeFromFilename)(::windows_core::Interface::as_raw(self), wzfilename.into_param().abi(), dwdesiredaccess).ok() } pub unsafe fn InitializeFromMemory(&self, pbbuffer: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).InitializeFromMemory)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbbuffer.as_ptr()), pbbuffer.len() as _).ok() + (::windows_core::Interface::vtable(self).InitializeFromMemory)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbbuffer.as_ptr()), pbbuffer.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] 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 198c0e60ad..273ed79e08 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Printing/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Printing/mod.rs @@ -39,7 +39,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winspool.drv" "system" fn AddJobA(hprinter : super::super::Foundation:: HANDLE, level : u32, pdata : *mut u8, cbbuf : u32, pcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - AddJobA(hprinter.into_param().abi(), 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() as _), pcbneeded) + AddJobA(hprinter.into_param().abi(), 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) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -49,7 +49,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winspool.drv" "system" fn AddJobW(hprinter : super::super::Foundation:: HANDLE, level : u32, pdata : *mut u8, cbbuf : u32, pcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - AddJobW(hprinter.into_param().abi(), 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() as _), pcbneeded) + AddJobW(hprinter.into_param().abi(), 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) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -804,7 +804,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winspool.drv" "system" fn EnumFormsA(hprinter : super::super::Foundation:: HANDLE, level : u32, pform : *mut u8, cbbuf : u32, pcbneeded : *mut u32, pcreturned : *mut u32) -> super::super::Foundation:: BOOL); - EnumFormsA(hprinter.into_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() as _), pcbneeded, pcreturned) + EnumFormsA(hprinter.into_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, pcreturned) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -814,7 +814,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winspool.drv" "system" fn EnumFormsW(hprinter : super::super::Foundation:: HANDLE, level : u32, pform : *mut u8, cbbuf : u32, pcbneeded : *mut u32, pcreturned : *mut u32) -> super::super::Foundation:: BOOL); - EnumFormsW(hprinter.into_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() as _), pcbneeded, pcreturned) + EnumFormsW(hprinter.into_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, pcreturned) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -834,7 +834,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winspool.drv" "system" fn EnumJobsA(hprinter : super::super::Foundation:: HANDLE, firstjob : u32, nojobs : u32, level : u32, pjob : *mut u8, cbbuf : u32, pcbneeded : *mut u32, pcreturned : *mut u32) -> super::super::Foundation:: BOOL); - EnumJobsA(hprinter.into_param().abi(), firstjob, nojobs, level, ::core::mem::transmute(pjob.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pjob.as_deref().map_or(0, |slice| slice.len() as _), pcbneeded, pcreturned).ok() + EnumJobsA(hprinter.into_param().abi(), firstjob, nojobs, level, ::core::mem::transmute(pjob.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pjob.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded, pcreturned).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -844,7 +844,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winspool.drv" "system" fn EnumJobsW(hprinter : super::super::Foundation:: HANDLE, firstjob : u32, nojobs : u32, level : u32, pjob : *mut u8, cbbuf : u32, pcbneeded : *mut u32, pcreturned : *mut u32) -> super::super::Foundation:: BOOL); - EnumJobsW(hprinter.into_param().abi(), firstjob, nojobs, level, ::core::mem::transmute(pjob.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pjob.as_deref().map_or(0, |slice| slice.len() as _), pcbneeded, pcreturned).ok() + EnumJobsW(hprinter.into_param().abi(), firstjob, nojobs, level, ::core::mem::transmute(pjob.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pjob.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded, pcreturned).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -854,7 +854,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::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); - EnumMonitorsA(pname.into_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() as _), pcbneeded, pcreturned) + EnumMonitorsA(pname.into_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, pcreturned) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -864,7 +864,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::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); - EnumMonitorsW(pname.into_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() as _), pcbneeded, pcreturned) + EnumMonitorsW(pname.into_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, pcreturned) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -874,7 +874,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::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); - EnumPortsA(pname.into_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() as _), pcbneeded, pcreturned) + EnumPortsA(pname.into_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, pcreturned) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -884,7 +884,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::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); - EnumPortsW(pname.into_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() as _), pcbneeded, pcreturned) + EnumPortsW(pname.into_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, pcreturned) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -895,7 +895,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::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); - EnumPrintProcessorDatatypesA(pname.into_param().abi(), pprintprocessorname.into_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() as _), pcbneeded, pcreturned) + EnumPrintProcessorDatatypesA(pname.into_param().abi(), pprintprocessorname.into_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, pcreturned) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -906,7 +906,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::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); - EnumPrintProcessorDatatypesW(pname.into_param().abi(), pprintprocessorname.into_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() as _), pcbneeded, pcreturned) + EnumPrintProcessorDatatypesW(pname.into_param().abi(), pprintprocessorname.into_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, pcreturned) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -917,7 +917,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::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); - EnumPrintProcessorsA(pname.into_param().abi(), penvironment.into_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() as _), pcbneeded, pcreturned) + EnumPrintProcessorsA(pname.into_param().abi(), penvironment.into_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, pcreturned) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -928,7 +928,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::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); - EnumPrintProcessorsW(pname.into_param().abi(), penvironment.into_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() as _), pcbneeded, pcreturned) + EnumPrintProcessorsW(pname.into_param().abi(), penvironment.into_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, pcreturned) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -938,7 +938,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winspool.drv" "system" fn EnumPrinterDataA(hprinter : super::super::Foundation:: HANDLE, dwindex : u32, pvaluename : ::windows_core::PSTR, cbvaluename : u32, pcbvaluename : *mut u32, ptype : *mut u32, pdata : *mut u8, cbdata : u32, pcbdata : *mut u32) -> u32); - EnumPrinterDataA(hprinter.into_param().abi(), dwindex, ::core::mem::transmute(pvaluename.as_ptr()), pvaluename.len() as _, pcbvaluename, ::core::mem::transmute(ptype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut()))) + EnumPrinterDataA(hprinter.into_param().abi(), dwindex, ::core::mem::transmute(pvaluename.as_ptr()), pvaluename.len().try_into().unwrap(), pcbvaluename, ::core::mem::transmute(ptype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -949,7 +949,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("winspool.drv" "system" fn EnumPrinterDataExA(hprinter : super::super::Foundation:: HANDLE, pkeyname : ::windows_core::PCSTR, penumvalues : *mut u8, cbenumvalues : u32, pcbenumvalues : *mut u32, pnenumvalues : *mut u32) -> u32); - EnumPrinterDataExA(hprinter.into_param().abi(), pkeyname.into_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() as _), pcbenumvalues, pnenumvalues) + EnumPrinterDataExA(hprinter.into_param().abi(), pkeyname.into_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, pnenumvalues) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -960,7 +960,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winspool.drv" "system" fn EnumPrinterDataExW(hprinter : super::super::Foundation:: HANDLE, pkeyname : ::windows_core::PCWSTR, penumvalues : *mut u8, cbenumvalues : u32, pcbenumvalues : *mut u32, pnenumvalues : *mut u32) -> u32); - EnumPrinterDataExW(hprinter.into_param().abi(), pkeyname.into_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() as _), pcbenumvalues, pnenumvalues) + EnumPrinterDataExW(hprinter.into_param().abi(), pkeyname.into_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, pnenumvalues) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -970,7 +970,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winspool.drv" "system" fn EnumPrinterDataW(hprinter : super::super::Foundation:: HANDLE, dwindex : u32, pvaluename : ::windows_core::PWSTR, cbvaluename : u32, pcbvaluename : *mut u32, ptype : *mut u32, pdata : *mut u8, cbdata : u32, pcbdata : *mut u32) -> u32); - EnumPrinterDataW(hprinter.into_param().abi(), dwindex, ::core::mem::transmute(pvaluename), cbvaluename, pcbvaluename, ::core::mem::transmute(ptype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut()))) + EnumPrinterDataW(hprinter.into_param().abi(), dwindex, ::core::mem::transmute(pvaluename), cbvaluename, pcbvaluename, ::core::mem::transmute(ptype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -981,7 +981,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("winspool.drv" "system" fn EnumPrinterDriversA(pname : ::windows_core::PCSTR, penvironment : ::windows_core::PCSTR, level : u32, pdriverinfo : *mut u8, cbbuf : u32, pcbneeded : *mut u32, pcreturned : *mut u32) -> super::super::Foundation:: BOOL); - EnumPrinterDriversA(pname.into_param().abi(), penvironment.into_param().abi(), level, ::core::mem::transmute(pdriverinfo.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdriverinfo.as_deref().map_or(0, |slice| slice.len() as _), pcbneeded, pcreturned).ok() + EnumPrinterDriversA(pname.into_param().abi(), penvironment.into_param().abi(), level, ::core::mem::transmute(pdriverinfo.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdriverinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded, pcreturned).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -992,7 +992,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winspool.drv" "system" fn EnumPrinterDriversW(pname : ::windows_core::PCWSTR, penvironment : ::windows_core::PCWSTR, level : u32, pdriverinfo : *mut u8, cbbuf : u32, pcbneeded : *mut u32, pcreturned : *mut u32) -> super::super::Foundation:: BOOL); - EnumPrinterDriversW(pname.into_param().abi(), penvironment.into_param().abi(), level, ::core::mem::transmute(pdriverinfo.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdriverinfo.as_deref().map_or(0, |slice| slice.len() as _), pcbneeded, pcreturned).ok() + EnumPrinterDriversW(pname.into_param().abi(), penvironment.into_param().abi(), level, ::core::mem::transmute(pdriverinfo.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdriverinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded, pcreturned).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1003,7 +1003,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("winspool.drv" "system" fn EnumPrinterKeyA(hprinter : super::super::Foundation:: HANDLE, pkeyname : ::windows_core::PCSTR, psubkey : ::windows_core::PSTR, cbsubkey : u32, pcbsubkey : *mut u32) -> u32); - EnumPrinterKeyA(hprinter.into_param().abi(), pkeyname.into_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() as _), pcbsubkey) + EnumPrinterKeyA(hprinter.into_param().abi(), pkeyname.into_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) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1024,7 +1024,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("winspool.drv" "system" fn EnumPrintersA(flags : u32, name : ::windows_core::PCSTR, level : u32, pprinterenum : *mut u8, cbbuf : u32, pcbneeded : *mut u32, pcreturned : *mut u32) -> super::super::Foundation:: BOOL); - EnumPrintersA(flags, name.into_param().abi(), level, ::core::mem::transmute(pprinterenum.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pprinterenum.as_deref().map_or(0, |slice| slice.len() as _), pcbneeded, pcreturned).ok() + EnumPrintersA(flags, name.into_param().abi(), level, ::core::mem::transmute(pprinterenum.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pprinterenum.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded, pcreturned).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1034,7 +1034,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winspool.drv" "system" fn EnumPrintersW(flags : u32, name : ::windows_core::PCWSTR, level : u32, pprinterenum : *mut u8, cbbuf : u32, pcbneeded : *mut u32, pcreturned : *mut u32) -> super::super::Foundation:: BOOL); - EnumPrintersW(flags, name.into_param().abi(), level, ::core::mem::transmute(pprinterenum.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pprinterenum.as_deref().map_or(0, |slice| slice.len() as _), pcbneeded, pcreturned).ok() + EnumPrintersW(flags, name.into_param().abi(), level, ::core::mem::transmute(pprinterenum.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pprinterenum.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded, pcreturned).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] @@ -1093,7 +1093,7 @@ where #[inline] pub unsafe fn FreePrintNamedPropertyArray(ppproperties: ::core::option::Option<&mut [*mut PrintNamedProperty]>) { ::windows_targets::link!("winspool.drv" "system" fn FreePrintNamedPropertyArray(cproperties : u32, ppproperties : *mut *mut PrintNamedProperty) -> ()); - FreePrintNamedPropertyArray(ppproperties.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppproperties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + FreePrintNamedPropertyArray(ppproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(ppproperties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] pub unsafe fn FreePrintPropertyValue(pvalue: *mut PrintPropertyValue) { @@ -1258,7 +1258,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("winspool.drv" "system" fn GetCorePrinterDriversA(pszserver : ::windows_core::PCSTR, pszenvironment : ::windows_core::PCSTR, pszzcoredriverdependencies : ::windows_core::PCSTR, ccoreprinterdrivers : u32, pcoreprinterdrivers : *mut CORE_PRINTER_DRIVERA) -> ::windows_core::HRESULT); - GetCorePrinterDriversA(pszserver.into_param().abi(), pszenvironment.into_param().abi(), pszzcoredriverdependencies.into_param().abi(), pcoreprinterdrivers.len() as _, ::core::mem::transmute(pcoreprinterdrivers.as_ptr())).ok() + GetCorePrinterDriversA(pszserver.into_param().abi(), pszenvironment.into_param().abi(), pszzcoredriverdependencies.into_param().abi(), pcoreprinterdrivers.len().try_into().unwrap(), ::core::mem::transmute(pcoreprinterdrivers.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1270,7 +1270,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winspool.drv" "system" fn GetCorePrinterDriversW(pszserver : ::windows_core::PCWSTR, pszenvironment : ::windows_core::PCWSTR, pszzcoredriverdependencies : ::windows_core::PCWSTR, ccoreprinterdrivers : u32, pcoreprinterdrivers : *mut CORE_PRINTER_DRIVERW) -> ::windows_core::HRESULT); - GetCorePrinterDriversW(pszserver.into_param().abi(), pszenvironment.into_param().abi(), pszzcoredriverdependencies.into_param().abi(), pcoreprinterdrivers.len() as _, ::core::mem::transmute(pcoreprinterdrivers.as_ptr())).ok() + GetCorePrinterDriversW(pszserver.into_param().abi(), pszenvironment.into_param().abi(), pszzcoredriverdependencies.into_param().abi(), pcoreprinterdrivers.len().try_into().unwrap(), ::core::mem::transmute(pcoreprinterdrivers.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1295,7 +1295,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("winspool.drv" "system" fn GetFormA(hprinter : super::super::Foundation:: HANDLE, pformname : ::windows_core::PCSTR, level : u32, pform : *mut u8, cbbuf : u32, pcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - GetFormA(hprinter.into_param().abi(), pformname.into_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() as _), pcbneeded) + GetFormA(hprinter.into_param().abi(), pformname.into_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) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1306,7 +1306,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winspool.drv" "system" fn GetFormW(hprinter : super::super::Foundation:: HANDLE, pformname : ::windows_core::PCWSTR, level : u32, pform : *mut u8, cbbuf : u32, pcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - GetFormW(hprinter.into_param().abi(), pformname.into_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() as _), pcbneeded) + GetFormW(hprinter.into_param().abi(), pformname.into_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) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1316,7 +1316,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winspool.drv" "system" fn GetJobA(hprinter : super::super::Foundation:: HANDLE, jobid : u32, level : u32, pjob : *mut u8, cbbuf : u32, pcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - GetJobA(hprinter.into_param().abi(), 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() as _), pcbneeded) + GetJobA(hprinter.into_param().abi(), 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) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] @@ -1336,7 +1336,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("spoolss.dll" "system" fn GetJobAttributesEx(pprintername : ::windows_core::PCWSTR, pdevmode : *const super::Gdi:: DEVMODEW, dwlevel : u32, pattributeinfo : *mut u8, nsize : u32, dwflags : u32) -> super::super::Foundation:: BOOL); - GetJobAttributesEx(pprintername.into_param().abi(), pdevmode, dwlevel, ::core::mem::transmute(pattributeinfo.as_ptr()), pattributeinfo.len() as _, dwflags) + GetJobAttributesEx(pprintername.into_param().abi(), pdevmode, dwlevel, ::core::mem::transmute(pattributeinfo.as_ptr()), pattributeinfo.len().try_into().unwrap(), dwflags) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1357,7 +1357,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winspool.drv" "system" fn GetJobW(hprinter : super::super::Foundation:: HANDLE, jobid : u32, level : u32, pjob : *mut u8, cbbuf : u32, pcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - GetJobW(hprinter.into_param().abi(), 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() as _), pcbneeded) + GetJobW(hprinter.into_param().abi(), 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) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1386,7 +1386,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::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); - GetPrintProcessorDirectoryA(pname.into_param().abi(), penvironment.into_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() as _), pcbneeded) + GetPrintProcessorDirectoryA(pname.into_param().abi(), penvironment.into_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) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1397,7 +1397,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::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); - GetPrintProcessorDirectoryW(pname.into_param().abi(), penvironment.into_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() as _), pcbneeded) + GetPrintProcessorDirectoryW(pname.into_param().abi(), penvironment.into_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) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1407,7 +1407,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winspool.drv" "system" fn GetPrinterA(hprinter : super::super::Foundation:: HANDLE, level : u32, pprinter : *mut u8, cbbuf : u32, pcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - GetPrinterA(hprinter.into_param().abi(), level, ::core::mem::transmute(pprinter.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pprinter.as_deref().map_or(0, |slice| slice.len() as _), pcbneeded).ok() + GetPrinterA(hprinter.into_param().abi(), level, ::core::mem::transmute(pprinter.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pprinter.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1418,7 +1418,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("winspool.drv" "system" fn GetPrinterDataA(hprinter : super::super::Foundation:: HANDLE, pvaluename : ::windows_core::PCSTR, ptype : *mut u32, pdata : *mut u8, nsize : u32, pcbneeded : *mut u32) -> u32); - GetPrinterDataA(hprinter.into_param().abi(), pvaluename.into_param().abi(), ::core::mem::transmute(ptype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len() as _), pcbneeded) + GetPrinterDataA(hprinter.into_param().abi(), pvaluename.into_param().abi(), ::core::mem::transmute(ptype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1430,7 +1430,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("winspool.drv" "system" fn GetPrinterDataExA(hprinter : super::super::Foundation:: HANDLE, pkeyname : ::windows_core::PCSTR, pvaluename : ::windows_core::PCSTR, ptype : *mut u32, pdata : *mut u8, nsize : u32, pcbneeded : *mut u32) -> u32); - GetPrinterDataExA(hprinter.into_param().abi(), pkeyname.into_param().abi(), pvaluename.into_param().abi(), ::core::mem::transmute(ptype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len() as _), pcbneeded) + GetPrinterDataExA(hprinter.into_param().abi(), pkeyname.into_param().abi(), pvaluename.into_param().abi(), ::core::mem::transmute(ptype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1442,7 +1442,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winspool.drv" "system" fn GetPrinterDataExW(hprinter : super::super::Foundation:: HANDLE, pkeyname : ::windows_core::PCWSTR, pvaluename : ::windows_core::PCWSTR, ptype : *mut u32, pdata : *mut u8, nsize : u32, pcbneeded : *mut u32) -> u32); - GetPrinterDataExW(hprinter.into_param().abi(), pkeyname.into_param().abi(), pvaluename.into_param().abi(), ::core::mem::transmute(ptype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len() as _), pcbneeded) + GetPrinterDataExW(hprinter.into_param().abi(), pkeyname.into_param().abi(), pvaluename.into_param().abi(), ::core::mem::transmute(ptype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1453,7 +1453,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winspool.drv" "system" fn GetPrinterDataW(hprinter : super::super::Foundation:: HANDLE, pvaluename : ::windows_core::PCWSTR, ptype : *mut u32, pdata : *mut u8, nsize : u32, pcbneeded : *mut u32) -> u32); - GetPrinterDataW(hprinter.into_param().abi(), pvaluename.into_param().abi(), ::core::mem::transmute(ptype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len() as _), pcbneeded) + GetPrinterDataW(hprinter.into_param().abi(), pvaluename.into_param().abi(), ::core::mem::transmute(ptype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1465,7 +1465,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("winspool.drv" "system" fn GetPrinterDriver2A(hwnd : super::super::Foundation:: HWND, hprinter : super::super::Foundation:: HANDLE, penvironment : ::windows_core::PCSTR, level : u32, pdriverinfo : *mut u8, cbbuf : u32, pcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - GetPrinterDriver2A(hwnd.into_param().abi(), hprinter.into_param().abi(), penvironment.into_param().abi(), level, ::core::mem::transmute(pdriverinfo.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdriverinfo.as_deref().map_or(0, |slice| slice.len() as _), pcbneeded) + GetPrinterDriver2A(hwnd.into_param().abi(), hprinter.into_param().abi(), penvironment.into_param().abi(), level, ::core::mem::transmute(pdriverinfo.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdriverinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1477,7 +1477,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winspool.drv" "system" fn GetPrinterDriver2W(hwnd : super::super::Foundation:: HWND, hprinter : super::super::Foundation:: HANDLE, penvironment : ::windows_core::PCWSTR, level : u32, pdriverinfo : *mut u8, cbbuf : u32, pcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - GetPrinterDriver2W(hwnd.into_param().abi(), hprinter.into_param().abi(), penvironment.into_param().abi(), level, ::core::mem::transmute(pdriverinfo.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdriverinfo.as_deref().map_or(0, |slice| slice.len() as _), pcbneeded) + GetPrinterDriver2W(hwnd.into_param().abi(), hprinter.into_param().abi(), penvironment.into_param().abi(), level, ::core::mem::transmute(pdriverinfo.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdriverinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1488,7 +1488,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("winspool.drv" "system" fn GetPrinterDriverA(hprinter : super::super::Foundation:: HANDLE, penvironment : ::windows_core::PCSTR, level : u32, pdriverinfo : *mut u8, cbbuf : u32, pcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - GetPrinterDriverA(hprinter.into_param().abi(), penvironment.into_param().abi(), level, ::core::mem::transmute(pdriverinfo.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdriverinfo.as_deref().map_or(0, |slice| slice.len() as _), pcbneeded) + GetPrinterDriverA(hprinter.into_param().abi(), penvironment.into_param().abi(), level, ::core::mem::transmute(pdriverinfo.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdriverinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1499,7 +1499,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::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); - GetPrinterDriverDirectoryA(pname.into_param().abi(), penvironment.into_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() as _), pcbneeded) + GetPrinterDriverDirectoryA(pname.into_param().abi(), penvironment.into_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) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1510,7 +1510,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::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); - GetPrinterDriverDirectoryW(pname.into_param().abi(), penvironment.into_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() as _), pcbneeded) + GetPrinterDriverDirectoryW(pname.into_param().abi(), penvironment.into_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) } #[inline] pub unsafe fn GetPrinterDriverPackagePathA(pszserver: P0, pszenvironment: P1, pszlanguage: P2, pszpackageid: P3, pszdriverpackagecab: ::core::option::Option<&mut [u8]>, pcchrequiredsize: *mut u32) -> ::windows_core::Result<()> @@ -1521,7 +1521,7 @@ where P3: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::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); - GetPrinterDriverPackagePathA(pszserver.into_param().abi(), pszenvironment.into_param().abi(), pszlanguage.into_param().abi(), pszpackageid.into_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() as _), pcchrequiredsize).ok() + GetPrinterDriverPackagePathA(pszserver.into_param().abi(), pszenvironment.into_param().abi(), pszlanguage.into_param().abi(), pszpackageid.into_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).ok() } #[inline] pub unsafe fn GetPrinterDriverPackagePathW(pszserver: P0, pszenvironment: P1, pszlanguage: P2, pszpackageid: P3, pszdriverpackagecab: ::core::option::Option<&mut [u16]>, pcchrequiredsize: *mut u32) -> ::windows_core::Result<()> @@ -1532,7 +1532,7 @@ where P3: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::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); - GetPrinterDriverPackagePathW(pszserver.into_param().abi(), pszenvironment.into_param().abi(), pszlanguage.into_param().abi(), pszpackageid.into_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() as _), pcchrequiredsize).ok() + GetPrinterDriverPackagePathW(pszserver.into_param().abi(), pszenvironment.into_param().abi(), pszlanguage.into_param().abi(), pszpackageid.into_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).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1543,7 +1543,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winspool.drv" "system" fn GetPrinterDriverW(hprinter : super::super::Foundation:: HANDLE, penvironment : ::windows_core::PCWSTR, level : u32, pdriverinfo : *mut u8, cbbuf : u32, pcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - GetPrinterDriverW(hprinter.into_param().abi(), penvironment.into_param().abi(), level, ::core::mem::transmute(pdriverinfo.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdriverinfo.as_deref().map_or(0, |slice| slice.len() as _), pcbneeded) + GetPrinterDriverW(hprinter.into_param().abi(), penvironment.into_param().abi(), level, ::core::mem::transmute(pdriverinfo.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdriverinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1553,7 +1553,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winspool.drv" "system" fn GetPrinterW(hprinter : super::super::Foundation:: HANDLE, level : u32, pprinter : *mut u8, cbbuf : u32, pcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - GetPrinterW(hprinter.into_param().abi(), level, ::core::mem::transmute(pprinter.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pprinter.as_deref().map_or(0, |slice| slice.len() as _), pcbneeded).ok() + GetPrinterW(hprinter.into_param().abi(), level, ::core::mem::transmute(pprinter.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pprinter.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1670,7 +1670,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winspool.drv" "system" fn PlayGdiScriptOnPrinterIC(hprinteric : super::super::Foundation:: HANDLE, pin : *const u8, cin : u32, pout : *mut u8, cout : u32, ul : u32) -> super::super::Foundation:: BOOL); - PlayGdiScriptOnPrinterIC(hprinteric.into_param().abi(), ::core::mem::transmute(pin.as_ptr()), pin.len() as _, ::core::mem::transmute(pout.as_ptr()), pout.len() as _, ul) + PlayGdiScriptOnPrinterIC(hprinteric.into_param().abi(), ::core::mem::transmute(pin.as_ptr()), pin.len().try_into().unwrap(), ::core::mem::transmute(pout.as_ptr()), pout.len().try_into().unwrap(), ul) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1988,7 +1988,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("winspool.drv" "system" fn SetPrinterDataA(hprinter : super::super::Foundation:: HANDLE, pvaluename : ::windows_core::PCSTR, r#type : u32, pdata : *const u8, cbdata : u32) -> u32); - SetPrinterDataA(hprinter.into_param().abi(), pvaluename.into_param().abi(), r#type, ::core::mem::transmute(pdata.as_ptr()), pdata.len() as _) + SetPrinterDataA(hprinter.into_param().abi(), pvaluename.into_param().abi(), r#type, ::core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2000,7 +2000,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("winspool.drv" "system" fn SetPrinterDataExA(hprinter : super::super::Foundation:: HANDLE, pkeyname : ::windows_core::PCSTR, pvaluename : ::windows_core::PCSTR, r#type : u32, pdata : *const u8, cbdata : u32) -> u32); - SetPrinterDataExA(hprinter.into_param().abi(), pkeyname.into_param().abi(), pvaluename.into_param().abi(), r#type, ::core::mem::transmute(pdata.as_ptr()), pdata.len() as _) + SetPrinterDataExA(hprinter.into_param().abi(), pkeyname.into_param().abi(), pvaluename.into_param().abi(), r#type, ::core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2012,7 +2012,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winspool.drv" "system" fn SetPrinterDataExW(hprinter : super::super::Foundation:: HANDLE, pkeyname : ::windows_core::PCWSTR, pvaluename : ::windows_core::PCWSTR, r#type : u32, pdata : *const u8, cbdata : u32) -> u32); - SetPrinterDataExW(hprinter.into_param().abi(), pkeyname.into_param().abi(), pvaluename.into_param().abi(), r#type, ::core::mem::transmute(pdata.as_ptr()), pdata.len() as _) + SetPrinterDataExW(hprinter.into_param().abi(), pkeyname.into_param().abi(), pvaluename.into_param().abi(), r#type, ::core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2023,7 +2023,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winspool.drv" "system" fn SetPrinterDataW(hprinter : super::super::Foundation:: HANDLE, pvaluename : ::windows_core::PCWSTR, r#type : u32, pdata : *const u8, cbdata : u32) -> u32); - SetPrinterDataW(hprinter.into_param().abi(), pvaluename.into_param().abi(), r#type, ::core::mem::transmute(pdata.as_ptr()), pdata.len() as _) + SetPrinterDataW(hprinter.into_param().abi(), pvaluename.into_param().abi(), r#type, ::core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2217,7 +2217,16 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winspool.drv" "system" fn XcvDataW(hxcv : super::super::Foundation:: HANDLE, pszdataname : ::windows_core::PCWSTR, pinputdata : *const u8, cbinputdata : u32, poutputdata : *mut u8, cboutputdata : u32, pcboutputneeded : *mut u32, pdwstatus : *mut u32) -> super::super::Foundation:: BOOL); - XcvDataW(hxcv.into_param().abi(), pszdataname.into_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() as _), ::core::mem::transmute(poutputdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), poutputdata.as_deref().map_or(0, |slice| slice.len() as _), pcboutputneeded, ::core::mem::transmute(pdwstatus.unwrap_or(::std::ptr::null_mut()))) + XcvDataW( + hxcv.into_param().abi(), + pszdataname.into_param().abi(), + ::core::mem::transmute(pinputdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), + pinputdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), + ::core::mem::transmute(poutputdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), + poutputdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), + pcboutputneeded, + ::core::mem::transmute(pdwstatus.unwrap_or(::std::ptr::null_mut())), + ) } #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] @@ -3892,13 +3901,13 @@ impl IPrintCoreUI2 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetOptions(&self, poemuiobj: *const OEMUIOBJ, dwflags: u32, pmszfeaturesrequested: ::core::option::Option<&[u8]>, pmszfeatureoptionbuf: ::core::option::Option<&mut [u8]>, pcbneeded: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetOptions)(::windows_core::Interface::as_raw(self), poemuiobj, dwflags, ::core::mem::transmute(pmszfeaturesrequested.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pmszfeaturesrequested.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pmszfeatureoptionbuf.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pmszfeatureoptionbuf.as_deref().map_or(0, |slice| slice.len() as _), pcbneeded).ok() + (::windows_core::Interface::vtable(self).GetOptions)(::windows_core::Interface::as_raw(self), poemuiobj, dwflags, ::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()), pcbneeded).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetOptions(&self, poemuiobj: *const OEMUIOBJ, dwflags: u32, pmszfeatureoptionbuf: &[u8]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).SetOptions)(::windows_core::Interface::as_raw(self), poemuiobj, dwflags, ::core::mem::transmute(pmszfeatureoptionbuf.as_ptr()), pmszfeatureoptionbuf.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).SetOptions)(::windows_core::Interface::as_raw(self), poemuiobj, dwflags, ::core::mem::transmute(pmszfeatureoptionbuf.as_ptr()), pmszfeatureoptionbuf.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3906,7 +3915,7 @@ impl IPrintCoreUI2 { where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { - (::windows_core::Interface::vtable(self).EnumConstrainedOptions)(::windows_core::Interface::as_raw(self), poemuiobj, dwflags, pszfeaturekeyword.into_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() as _), pcbneeded).ok() + (::windows_core::Interface::vtable(self).EnumConstrainedOptions)(::windows_core::Interface::as_raw(self), poemuiobj, dwflags, pszfeaturekeyword.into_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).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3915,7 +3924,7 @@ impl IPrintCoreUI2 { P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { - (::windows_core::Interface::vtable(self).WhyConstrained)(::windows_core::Interface::as_raw(self), poemuiobj, dwflags, pszfeaturekeyword.into_param().abi(), pszoptionkeyword.into_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() as _), pcbneeded).ok() + (::windows_core::Interface::vtable(self).WhyConstrained)(::windows_core::Interface::as_raw(self), poemuiobj, dwflags, pszfeaturekeyword.into_param().abi(), pszoptionkeyword.into_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).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3923,7 +3932,7 @@ impl IPrintCoreUI2 { where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { - (::windows_core::Interface::vtable(self).GetGlobalAttribute)(::windows_core::Interface::as_raw(self), poemuiobj, dwflags, pszattribute.into_param().abi(), 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() as _), pcbneeded).ok() + (::windows_core::Interface::vtable(self).GetGlobalAttribute)(::windows_core::Interface::as_raw(self), poemuiobj, dwflags, pszattribute.into_param().abi(), 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()), pcbneeded).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3932,7 +3941,7 @@ impl IPrintCoreUI2 { P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { - (::windows_core::Interface::vtable(self).GetFeatureAttribute)(::windows_core::Interface::as_raw(self), poemuiobj, dwflags, pszfeaturekeyword.into_param().abi(), pszattribute.into_param().abi(), 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() as _), pcbneeded).ok() + (::windows_core::Interface::vtable(self).GetFeatureAttribute)(::windows_core::Interface::as_raw(self), poemuiobj, dwflags, pszfeaturekeyword.into_param().abi(), pszattribute.into_param().abi(), 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()), pcbneeded).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3942,12 +3951,12 @@ impl IPrintCoreUI2 { P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { - (::windows_core::Interface::vtable(self).GetOptionAttribute)(::windows_core::Interface::as_raw(self), poemuiobj, dwflags, pszfeaturekeyword.into_param().abi(), pszoptionkeyword.into_param().abi(), pszattribute.into_param().abi(), 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() as _), pcbneeded).ok() + (::windows_core::Interface::vtable(self).GetOptionAttribute)(::windows_core::Interface::as_raw(self), poemuiobj, dwflags, pszfeaturekeyword.into_param().abi(), pszoptionkeyword.into_param().abi(), pszattribute.into_param().abi(), 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()), pcbneeded).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn EnumFeatures(&self, poemuiobj: *const OEMUIOBJ, dwflags: u32, pmszfeaturelist: ::core::option::Option<&mut [u8]>, pcbneeded: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).EnumFeatures)(::windows_core::Interface::as_raw(self), poemuiobj, dwflags, ::core::mem::transmute(pmszfeaturelist.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pmszfeaturelist.as_deref().map_or(0, |slice| slice.len() as _), pcbneeded).ok() + (::windows_core::Interface::vtable(self).EnumFeatures)(::windows_core::Interface::as_raw(self), poemuiobj, dwflags, ::core::mem::transmute(pmszfeaturelist.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pmszfeaturelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3955,7 +3964,7 @@ impl IPrintCoreUI2 { where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { - (::windows_core::Interface::vtable(self).EnumOptions)(::windows_core::Interface::as_raw(self), poemuiobj, dwflags, pszfeaturekeyword.into_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() as _), pcbneeded).ok() + (::windows_core::Interface::vtable(self).EnumOptions)(::windows_core::Interface::as_raw(self), poemuiobj, dwflags, pszfeaturekeyword.into_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).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3963,7 +3972,7 @@ impl IPrintCoreUI2 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).QuerySimulationSupport)(::windows_core::Interface::as_raw(self), hprinter.into_param().abi(), 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() as _), pcbneeded).ok() + (::windows_core::Interface::vtable(self).QuerySimulationSupport)(::windows_core::Interface::as_raw(self), hprinter.into_param().abi(), 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).ok() } } ::windows_core::imp::interface_hierarchy!(IPrintCoreUI2, ::windows_core::IUnknown, IPrintOemDriverUI); @@ -6539,7 +6548,7 @@ impl IPrinterPropertyBag { where P0: ::windows_core::IntoParam<::windows_core::BSTR>, { - (::windows_core::Interface::vtable(self).SetBytes)(::windows_core::Interface::as_raw(self), bstrname.into_param().abi(), pvalue.len() as _, ::core::mem::transmute(pvalue.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetBytes)(::windows_core::Interface::as_raw(self), bstrname.into_param().abi(), pvalue.len().try_into().unwrap(), ::core::mem::transmute(pvalue.as_ptr())).ok() } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] 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 e16695f704..b8d5cb767a 100644 --- a/crates/libs/windows/src/Windows/Win32/Management/MobileDeviceManagementRegistration/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Management/MobileDeviceManagementRegistration/mod.rs @@ -41,14 +41,14 @@ pub unsafe fn GetDeviceRegistrationInfo(deviceinformationclass: REGISTRATION_INF #[inline] pub unsafe fn GetManagementAppHyperlink(pszhyperlink: &mut [u16]) -> ::windows_core::Result<()> { ::windows_targets::link!("mdmregistration.dll" "system" fn GetManagementAppHyperlink(cchhyperlink : u32, pszhyperlink : ::windows_core::PWSTR) -> ::windows_core::HRESULT); - GetManagementAppHyperlink(pszhyperlink.len() as _, ::core::mem::transmute(pszhyperlink.as_ptr())).ok() + GetManagementAppHyperlink(pszhyperlink.len().try_into().unwrap(), ::core::mem::transmute(pszhyperlink.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn IsDeviceRegisteredWithManagement(pfisdeviceregisteredwithmanagement: *mut super::super::Foundation::BOOL, pszupn: ::core::option::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); - IsDeviceRegisteredWithManagement(pfisdeviceregisteredwithmanagement, pszupn.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pszupn.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + IsDeviceRegisteredWithManagement(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() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -69,7 +69,7 @@ pub unsafe fn IsMdmUxWithoutAadAllowed() -> ::windows_core::Result ::windows_core::Result<()> { ::windows_targets::link!("mdmregistration.dll" "system" fn RegisterDeviceDualEnrollMmpcUsingAADDeviceCredentials(cchenrollmentid : u32, pszenrollmentid : ::windows_core::PWSTR) -> ::windows_core::HRESULT); - RegisterDeviceDualEnrollMmpcUsingAADDeviceCredentials(pszenrollmentid.len() as _, ::core::mem::transmute(pszenrollmentid.as_ptr())).ok() + RegisterDeviceDualEnrollMmpcUsingAADDeviceCredentials(pszenrollmentid.len().try_into().unwrap(), ::core::mem::transmute(pszenrollmentid.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 1caf381dbf..8d38da02bd 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 @@ -19,7 +19,7 @@ pub struct IApoAcousticEchoCancellation_Vtbl { pub struct IApoAuxiliaryInputConfiguration(::windows_core::IUnknown); impl IApoAuxiliaryInputConfiguration { pub unsafe fn AddAuxiliaryInput(&self, dwinputid: u32, pbydata: &[u8], pinputconnection: *const APO_CONNECTION_DESCRIPTOR) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).AddAuxiliaryInput)(::windows_core::Interface::as_raw(self), dwinputid, pbydata.len() as _, ::core::mem::transmute(pbydata.as_ptr()), pinputconnection).ok() + (::windows_core::Interface::vtable(self).AddAuxiliaryInput)(::windows_core::Interface::as_raw(self), dwinputid, pbydata.len().try_into().unwrap(), ::core::mem::transmute(pbydata.as_ptr()), pinputconnection).ok() } pub unsafe fn RemoveAuxiliaryInput(&self, dwinputid: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).RemoveAuxiliaryInput)(::windows_core::Interface::as_raw(self), dwinputid).ok() @@ -151,7 +151,7 @@ impl IAudioProcessingObject { (::windows_core::Interface::vtable(self).GetRegistrationProperties)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn Initialize(&self, pbydata: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Initialize)(::windows_core::Interface::as_raw(self), pbydata.len() as _, ::core::mem::transmute(pbydata.as_ptr())).ok() + (::windows_core::Interface::vtable(self).Initialize)(::windows_core::Interface::as_raw(self), pbydata.len().try_into().unwrap(), ::core::mem::transmute(pbydata.as_ptr())).ok() } pub unsafe fn IsInputFormatSupported(&self, poppositeformat: P0, prequestedinputformat: P1) -> ::windows_core::Result where @@ -198,7 +198,7 @@ pub struct IAudioProcessingObject_Vtbl { pub struct IAudioProcessingObjectConfiguration(::windows_core::IUnknown); impl IAudioProcessingObjectConfiguration { pub unsafe fn LockForProcess(&self, ppinputconnections: &[*const APO_CONNECTION_DESCRIPTOR], ppoutputconnections: &[*const APO_CONNECTION_DESCRIPTOR]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).LockForProcess)(::windows_core::Interface::as_raw(self), ppinputconnections.len() as _, ::core::mem::transmute(ppinputconnections.as_ptr()), ppoutputconnections.len() as _, ::core::mem::transmute(ppoutputconnections.as_ptr())).ok() + (::windows_core::Interface::vtable(self).LockForProcess)(::windows_core::Interface::as_raw(self), ppinputconnections.len().try_into().unwrap(), ::core::mem::transmute(ppinputconnections.as_ptr()), ppoutputconnections.len().try_into().unwrap(), ::core::mem::transmute(ppoutputconnections.as_ptr())).ok() } pub unsafe fn UnlockForProcess(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).UnlockForProcess)(::windows_core::Interface::as_raw(self)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Media/Audio/DirectSound/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/Audio/DirectSound/mod.rs index f9d82701d7..782e065dc1 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 @@ -592,7 +592,7 @@ impl IDirectSoundBuffer8 { (::windows_core::Interface::vtable(self).SetFX)(::windows_core::Interface::as_raw(self), dweffectscount, ::core::mem::transmute(pdsfxdesc.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pdwresultcodes.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn AcquireResources(&self, dwflags: u32, pdwresultcodes: &mut [u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).AcquireResources)(::windows_core::Interface::as_raw(self), dwflags, pdwresultcodes.len() as _, ::core::mem::transmute(pdwresultcodes.as_ptr())).ok() + (::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<()> { (::windows_core::Interface::vtable(self).GetObjectInPath)(::windows_core::Interface::as_raw(self), rguidobject, dwindex, rguidinterface, ppobject).ok() @@ -744,7 +744,7 @@ impl IDirectSoundCaptureBuffer8 { (::windows_core::Interface::vtable(self).GetObjectInPath)(::windows_core::Interface::as_raw(self), rguidobject, dwindex, rguidinterface, ppobject).ok() } pub unsafe fn GetFXStatus(&self, pdwfxstatus: &mut [u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetFXStatus)(::windows_core::Interface::as_raw(self), pdwfxstatus.len() as _, ::core::mem::transmute(pdwfxstatus.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetFXStatus)(::windows_core::Interface::as_raw(self), pdwfxstatus.len().try_into().unwrap(), ::core::mem::transmute(pdwfxstatus.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IDirectSoundCaptureBuffer8, ::windows_core::IUnknown, IDirectSoundCaptureBuffer); @@ -1128,7 +1128,7 @@ impl IDirectSoundNotify { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetNotificationPositions(&self, pcpositionnotifies: &[DSBPOSITIONNOTIFY]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetNotificationPositions)(::windows_core::Interface::as_raw(self), pcpositionnotifies.len() as _, ::core::mem::transmute(pcpositionnotifies.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetNotificationPositions)(::windows_core::Interface::as_raw(self), pcpositionnotifies.len().try_into().unwrap(), ::core::mem::transmute(pcpositionnotifies.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IDirectSoundNotify, ::windows_core::IUnknown); 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 0c98fdced2..3f762ee1e7 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 @@ -431,7 +431,7 @@ impl IAudioMeterInformation { (::windows_core::Interface::vtable(self).GetMeteringChannelCount)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetChannelsPeakValues(&self, afpeakvalues: &mut [f32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetChannelsPeakValues)(::windows_core::Interface::as_raw(self), afpeakvalues.len() as _, ::core::mem::transmute(afpeakvalues.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetChannelsPeakValues)(::windows_core::Interface::as_raw(self), afpeakvalues.len().try_into().unwrap(), ::core::mem::transmute(afpeakvalues.as_ptr())).ok() } pub unsafe fn QueryHardwareSupport(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); 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 75e361997c..5364a0de1e 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 @@ -47,7 +47,7 @@ impl IXAPO { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)) } pub unsafe fn LockForProcess(&self, pinputlockedparameters: ::core::option::Option<&[XAPO_LOCKFORPROCESS_PARAMETERS]>, poutputlockedparameters: ::core::option::Option<&[XAPO_LOCKFORPROCESS_PARAMETERS]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).LockForProcess)(::windows_core::Interface::as_raw(self), pinputlockedparameters.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pinputlockedparameters.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), poutputlockedparameters.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(poutputlockedparameters.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + (::windows_core::Interface::vtable(self).LockForProcess)(::windows_core::Interface::as_raw(self), pinputlockedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pinputlockedparameters.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), poutputlockedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(poutputlockedparameters.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() } pub unsafe fn UnlockForProcess(&self) { (::windows_core::Interface::vtable(self).UnlockForProcess)(::windows_core::Interface::as_raw(self)) @@ -58,7 +58,7 @@ impl IXAPO { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).Process)(::windows_core::Interface::as_raw(self), pinputprocessparameters.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pinputprocessparameters.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), poutputprocessparameters.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(poutputprocessparameters.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), isenabled.into_param().abi()) + (::windows_core::Interface::vtable(self).Process)(::windows_core::Interface::as_raw(self), pinputprocessparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pinputprocessparameters.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), poutputprocessparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(poutputprocessparameters.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), isenabled.into_param().abi()) } pub unsafe fn CalcInputFrames(&self, outputframecount: u32) -> u32 { (::windows_core::Interface::vtable(self).CalcInputFrames)(::windows_core::Interface::as_raw(self), outputframecount) @@ -355,10 +355,10 @@ impl IXAudio2MasteringVoice { ::std::mem::transmute(result__) } pub unsafe fn SetChannelVolumes(&self, pvolumes: &[f32], operationset: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetChannelVolumes)(::windows_core::Interface::as_raw(self), pvolumes.len() as _, ::core::mem::transmute(pvolumes.as_ptr()), operationset).ok() + (::windows_core::Interface::vtable(self).base__.SetChannelVolumes)(::windows_core::Interface::as_raw(self), pvolumes.len().try_into().unwrap(), ::core::mem::transmute(pvolumes.as_ptr()), operationset).ok() } pub unsafe fn GetChannelVolumes(&self, pvolumes: &mut [f32]) { - (::windows_core::Interface::vtable(self).base__.GetChannelVolumes)(::windows_core::Interface::as_raw(self), pvolumes.len() as _, ::core::mem::transmute(pvolumes.as_ptr())) + (::windows_core::Interface::vtable(self).base__.GetChannelVolumes)(::windows_core::Interface::as_raw(self), pvolumes.len().try_into().unwrap(), ::core::mem::transmute(pvolumes.as_ptr())) } pub unsafe fn SetOutputMatrix(&self, pdestinationvoice: P0, sourcechannels: u32, destinationchannels: u32, plevelmatrix: *const f32, operationset: u32) -> ::windows_core::Result<()> where @@ -459,10 +459,10 @@ impl IXAudio2SourceVoice { ::std::mem::transmute(result__) } pub unsafe fn SetChannelVolumes(&self, pvolumes: &[f32], operationset: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetChannelVolumes)(::windows_core::Interface::as_raw(self), pvolumes.len() as _, ::core::mem::transmute(pvolumes.as_ptr()), operationset).ok() + (::windows_core::Interface::vtable(self).base__.SetChannelVolumes)(::windows_core::Interface::as_raw(self), pvolumes.len().try_into().unwrap(), ::core::mem::transmute(pvolumes.as_ptr()), operationset).ok() } pub unsafe fn GetChannelVolumes(&self, pvolumes: &mut [f32]) { - (::windows_core::Interface::vtable(self).base__.GetChannelVolumes)(::windows_core::Interface::as_raw(self), pvolumes.len() as _, ::core::mem::transmute(pvolumes.as_ptr())) + (::windows_core::Interface::vtable(self).base__.GetChannelVolumes)(::windows_core::Interface::as_raw(self), pvolumes.len().try_into().unwrap(), ::core::mem::transmute(pvolumes.as_ptr())) } pub unsafe fn SetOutputMatrix(&self, pdestinationvoice: P0, sourcechannels: u32, destinationchannels: u32, plevelmatrix: *const f32, operationset: u32) -> ::windows_core::Result<()> where @@ -600,10 +600,10 @@ impl IXAudio2SubmixVoice { ::std::mem::transmute(result__) } pub unsafe fn SetChannelVolumes(&self, pvolumes: &[f32], operationset: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetChannelVolumes)(::windows_core::Interface::as_raw(self), pvolumes.len() as _, ::core::mem::transmute(pvolumes.as_ptr()), operationset).ok() + (::windows_core::Interface::vtable(self).base__.SetChannelVolumes)(::windows_core::Interface::as_raw(self), pvolumes.len().try_into().unwrap(), ::core::mem::transmute(pvolumes.as_ptr()), operationset).ok() } pub unsafe fn GetChannelVolumes(&self, pvolumes: &mut [f32]) { - (::windows_core::Interface::vtable(self).base__.GetChannelVolumes)(::windows_core::Interface::as_raw(self), pvolumes.len() as _, ::core::mem::transmute(pvolumes.as_ptr())) + (::windows_core::Interface::vtable(self).base__.GetChannelVolumes)(::windows_core::Interface::as_raw(self), pvolumes.len().try_into().unwrap(), ::core::mem::transmute(pvolumes.as_ptr())) } pub unsafe fn SetOutputMatrix(&self, pdestinationvoice: P0, sourcechannels: u32, destinationchannels: u32, plevelmatrix: *const f32, operationset: u32) -> ::windows_core::Result<()> where @@ -699,10 +699,10 @@ impl IXAudio2Voice { ::std::mem::transmute(result__) } pub unsafe fn SetChannelVolumes(&self, pvolumes: &[f32], operationset: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetChannelVolumes)(::windows_core::Interface::as_raw(self), pvolumes.len() as _, ::core::mem::transmute(pvolumes.as_ptr()), operationset).ok() + (::windows_core::Interface::vtable(self).SetChannelVolumes)(::windows_core::Interface::as_raw(self), pvolumes.len().try_into().unwrap(), ::core::mem::transmute(pvolumes.as_ptr()), operationset).ok() } pub unsafe fn GetChannelVolumes(&self, pvolumes: &mut [f32]) { - (::windows_core::Interface::vtable(self).GetChannelVolumes)(::windows_core::Interface::as_raw(self), pvolumes.len() as _, ::core::mem::transmute(pvolumes.as_ptr())) + (::windows_core::Interface::vtable(self).GetChannelVolumes)(::windows_core::Interface::as_raw(self), pvolumes.len().try_into().unwrap(), ::core::mem::transmute(pvolumes.as_ptr())) } pub unsafe fn SetOutputMatrix(&self, pdestinationvoice: P0, sourcechannels: u32, destinationchannels: u32, plevelmatrix: *const f32, operationset: u32) -> ::windows_core::Result<()> where 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 5a95d700fb..226c6d77d2 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/Audio/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/Audio/mod.rs @@ -548,12 +548,12 @@ pub unsafe fn midiInGetDevCapsW(udeviceid: usize, pmic: *mut MIDIINCAPSW, cbmic: #[inline] pub unsafe fn midiInGetErrorTextA(mmrerror: u32, psztext: &mut [u8]) -> u32 { ::windows_targets::link!("winmm.dll" "system" fn midiInGetErrorTextA(mmrerror : u32, psztext : ::windows_core::PSTR, cchtext : u32) -> u32); - midiInGetErrorTextA(mmrerror, ::core::mem::transmute(psztext.as_ptr()), psztext.len() as _) + midiInGetErrorTextA(mmrerror, ::core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap()) } #[inline] pub unsafe fn midiInGetErrorTextW(mmrerror: u32, psztext: &mut [u16]) -> u32 { ::windows_targets::link!("winmm.dll" "system" fn midiInGetErrorTextW(mmrerror : u32, psztext : ::windows_core::PWSTR, cchtext : u32) -> u32); - midiInGetErrorTextW(mmrerror, ::core::mem::transmute(psztext.as_ptr()), psztext.len() as _) + midiInGetErrorTextW(mmrerror, ::core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap()) } #[inline] pub unsafe fn midiInGetID(hmi: P0, pudeviceid: *mut u32) -> u32 @@ -658,12 +658,12 @@ pub unsafe fn midiOutGetDevCapsW(udeviceid: usize, pmoc: *mut MIDIOUTCAPSW, cbmo #[inline] pub unsafe fn midiOutGetErrorTextA(mmrerror: u32, psztext: &mut [u8]) -> u32 { ::windows_targets::link!("winmm.dll" "system" fn midiOutGetErrorTextA(mmrerror : u32, psztext : ::windows_core::PSTR, cchtext : u32) -> u32); - midiOutGetErrorTextA(mmrerror, ::core::mem::transmute(psztext.as_ptr()), psztext.len() as _) + midiOutGetErrorTextA(mmrerror, ::core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap()) } #[inline] pub unsafe fn midiOutGetErrorTextW(mmrerror: u32, psztext: &mut [u16]) -> u32 { ::windows_targets::link!("winmm.dll" "system" fn midiOutGetErrorTextW(mmrerror : u32, psztext : ::windows_core::PWSTR, cchtext : u32) -> u32); - midiOutGetErrorTextW(mmrerror, ::core::mem::transmute(psztext.as_ptr()), psztext.len() as _) + midiOutGetErrorTextW(mmrerror, ::core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap()) } #[inline] pub unsafe fn midiOutGetID(hmo: P0, pudeviceid: *mut u32) -> u32 @@ -758,7 +758,7 @@ where #[inline] pub unsafe fn midiStreamOpen(phms: *mut HMIDISTRM, pudeviceid: &mut [u32], dwcallback: usize, dwinstance: usize, fdwopen: u32) -> u32 { ::windows_targets::link!("winmm.dll" "system" fn midiStreamOpen(phms : *mut HMIDISTRM, pudeviceid : *mut u32, cmidi : u32, dwcallback : usize, dwinstance : usize, fdwopen : u32) -> u32); - midiStreamOpen(phms, ::core::mem::transmute(pudeviceid.as_ptr()), pudeviceid.len() as _, dwcallback, dwinstance, fdwopen) + midiStreamOpen(phms, ::core::mem::transmute(pudeviceid.as_ptr()), pudeviceid.len().try_into().unwrap(), dwcallback, dwinstance, fdwopen) } #[inline] pub unsafe fn midiStreamOut(hms: P0, pmh: *mut MIDIHDR, cbmh: u32) -> u32 @@ -963,12 +963,12 @@ pub unsafe fn waveInGetDevCapsW(udeviceid: usize, pwic: *mut WAVEINCAPSW, cbwic: #[inline] pub unsafe fn waveInGetErrorTextA(mmrerror: u32, psztext: &mut [u8]) -> u32 { ::windows_targets::link!("winmm.dll" "system" fn waveInGetErrorTextA(mmrerror : u32, psztext : ::windows_core::PSTR, cchtext : u32) -> u32); - waveInGetErrorTextA(mmrerror, ::core::mem::transmute(psztext.as_ptr()), psztext.len() as _) + waveInGetErrorTextA(mmrerror, ::core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap()) } #[inline] pub unsafe fn waveInGetErrorTextW(mmrerror: u32, psztext: &mut [u16]) -> u32 { ::windows_targets::link!("winmm.dll" "system" fn waveInGetErrorTextW(mmrerror : u32, psztext : ::windows_core::PWSTR, cchtext : u32) -> u32); - waveInGetErrorTextW(mmrerror, ::core::mem::transmute(psztext.as_ptr()), psztext.len() as _) + waveInGetErrorTextW(mmrerror, ::core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap()) } #[inline] pub unsafe fn waveInGetID(hwi: P0, pudeviceid: *const u32) -> u32 @@ -1073,12 +1073,12 @@ pub unsafe fn waveOutGetDevCapsW(udeviceid: usize, pwoc: *mut WAVEOUTCAPSW, cbwo #[inline] pub unsafe fn waveOutGetErrorTextA(mmrerror: u32, psztext: &mut [u8]) -> u32 { ::windows_targets::link!("winmm.dll" "system" fn waveOutGetErrorTextA(mmrerror : u32, psztext : ::windows_core::PSTR, cchtext : u32) -> u32); - waveOutGetErrorTextA(mmrerror, ::core::mem::transmute(psztext.as_ptr()), psztext.len() as _) + waveOutGetErrorTextA(mmrerror, ::core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap()) } #[inline] pub unsafe fn waveOutGetErrorTextW(mmrerror: u32, psztext: &mut [u16]) -> u32 { ::windows_targets::link!("winmm.dll" "system" fn waveOutGetErrorTextW(mmrerror : u32, psztext : ::windows_core::PWSTR, cchtext : u32) -> u32); - waveOutGetErrorTextW(mmrerror, ::core::mem::transmute(psztext.as_ptr()), psztext.len() as _) + waveOutGetErrorTextW(mmrerror, ::core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap()) } #[inline] pub unsafe fn waveOutGetID(hwo: P0, pudeviceid: *mut u32) -> u32 @@ -1284,7 +1284,7 @@ pub struct IActivateAudioInterfaceCompletionHandler_Vtbl { pub struct IAudioAmbisonicsControl(::windows_core::IUnknown); impl IAudioAmbisonicsControl { pub unsafe fn SetData(&self, pambisonicsparams: &[AMBISONICS_PARAMS]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetData)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pambisonicsparams.as_ptr()), pambisonicsparams.len() as _).ok() + (::windows_core::Interface::vtable(self).SetData)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pambisonicsparams.as_ptr()), pambisonicsparams.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1387,7 +1387,7 @@ impl IAudioBass { (::windows_core::Interface::vtable(self).base__.SetLevelUniform)(::windows_core::Interface::as_raw(self), fleveldb, ::core::mem::transmute(pguideventcontext.unwrap_or(::std::ptr::null()))).ok() } pub unsafe fn SetLevelAllChannels(&self, alevelsdb: &[f32], pguideventcontext: ::core::option::Option<*const ::windows_core::GUID>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetLevelAllChannels)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(alevelsdb.as_ptr()), alevelsdb.len() as _, ::core::mem::transmute(pguideventcontext.unwrap_or(::std::ptr::null()))).ok() + (::windows_core::Interface::vtable(self).base__.SetLevelAllChannels)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(alevelsdb.as_ptr()), alevelsdb.len().try_into().unwrap(), ::core::mem::transmute(pguideventcontext.unwrap_or(::std::ptr::null()))).ok() } } ::windows_core::imp::interface_hierarchy!(IAudioBass, ::windows_core::IUnknown, IPerChannelDbLevel); @@ -2006,7 +2006,7 @@ impl IAudioMidrange { (::windows_core::Interface::vtable(self).base__.SetLevelUniform)(::windows_core::Interface::as_raw(self), fleveldb, ::core::mem::transmute(pguideventcontext.unwrap_or(::std::ptr::null()))).ok() } pub unsafe fn SetLevelAllChannels(&self, alevelsdb: &[f32], pguideventcontext: ::core::option::Option<*const ::windows_core::GUID>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetLevelAllChannels)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(alevelsdb.as_ptr()), alevelsdb.len() as _, ::core::mem::transmute(pguideventcontext.unwrap_or(::std::ptr::null()))).ok() + (::windows_core::Interface::vtable(self).base__.SetLevelAllChannels)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(alevelsdb.as_ptr()), alevelsdb.len().try_into().unwrap(), ::core::mem::transmute(pguideventcontext.unwrap_or(::std::ptr::null()))).ok() } } ::windows_core::imp::interface_hierarchy!(IAudioMidrange, ::windows_core::IUnknown, IPerChannelDbLevel); @@ -2351,7 +2351,7 @@ impl IAudioSessionEvents { (::windows_core::Interface::vtable(self).OnSimpleVolumeChanged)(::windows_core::Interface::as_raw(self), newvolume, newmute.into_param().abi(), eventcontext).ok() } pub unsafe fn OnChannelVolumeChanged(&self, newchannelvolumearray: &[f32], changedchannel: u32, eventcontext: *const ::windows_core::GUID) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).OnChannelVolumeChanged)(::windows_core::Interface::as_raw(self), newchannelvolumearray.len() as _, ::core::mem::transmute(newchannelvolumearray.as_ptr()), changedchannel, eventcontext).ok() + (::windows_core::Interface::vtable(self).OnChannelVolumeChanged)(::windows_core::Interface::as_raw(self), newchannelvolumearray.len().try_into().unwrap(), ::core::mem::transmute(newchannelvolumearray.as_ptr()), changedchannel, eventcontext).ok() } pub unsafe fn OnGroupingParamChanged(&self, newgroupingparam: *const ::windows_core::GUID, eventcontext: *const ::windows_core::GUID) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).OnGroupingParamChanged)(::windows_core::Interface::as_raw(self), newgroupingparam, eventcontext).ok() @@ -2541,10 +2541,10 @@ impl IAudioStreamVolume { (::windows_core::Interface::vtable(self).GetChannelVolume)(::windows_core::Interface::as_raw(self), dwindex, &mut result__).from_abi(result__) } pub unsafe fn SetAllVolumes(&self, pfvolumes: &[f32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetAllVolumes)(::windows_core::Interface::as_raw(self), pfvolumes.len() as _, ::core::mem::transmute(pfvolumes.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetAllVolumes)(::windows_core::Interface::as_raw(self), pfvolumes.len().try_into().unwrap(), ::core::mem::transmute(pfvolumes.as_ptr())).ok() } pub unsafe fn GetAllVolumes(&self, pfvolumes: &mut [f32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetAllVolumes)(::windows_core::Interface::as_raw(self), pfvolumes.len() as _, ::core::mem::transmute(pfvolumes.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetAllVolumes)(::windows_core::Interface::as_raw(self), pfvolumes.len().try_into().unwrap(), ::core::mem::transmute(pfvolumes.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IAudioStreamVolume, ::windows_core::IUnknown); @@ -2681,7 +2681,7 @@ impl IAudioTreble { (::windows_core::Interface::vtable(self).base__.SetLevelUniform)(::windows_core::Interface::as_raw(self), fleveldb, ::core::mem::transmute(pguideventcontext.unwrap_or(::std::ptr::null()))).ok() } pub unsafe fn SetLevelAllChannels(&self, alevelsdb: &[f32], pguideventcontext: ::core::option::Option<*const ::windows_core::GUID>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetLevelAllChannels)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(alevelsdb.as_ptr()), alevelsdb.len() as _, ::core::mem::transmute(pguideventcontext.unwrap_or(::std::ptr::null()))).ok() + (::windows_core::Interface::vtable(self).base__.SetLevelAllChannels)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(alevelsdb.as_ptr()), alevelsdb.len().try_into().unwrap(), ::core::mem::transmute(pguideventcontext.unwrap_or(::std::ptr::null()))).ok() } } ::windows_core::imp::interface_hierarchy!(IAudioTreble, ::windows_core::IUnknown, IPerChannelDbLevel); @@ -2778,7 +2778,7 @@ impl IAudioVolumeLevel { (::windows_core::Interface::vtable(self).base__.SetLevelUniform)(::windows_core::Interface::as_raw(self), fleveldb, ::core::mem::transmute(pguideventcontext.unwrap_or(::std::ptr::null()))).ok() } pub unsafe fn SetLevelAllChannels(&self, alevelsdb: &[f32], pguideventcontext: ::core::option::Option<*const ::windows_core::GUID>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetLevelAllChannels)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(alevelsdb.as_ptr()), alevelsdb.len() as _, ::core::mem::transmute(pguideventcontext.unwrap_or(::std::ptr::null()))).ok() + (::windows_core::Interface::vtable(self).base__.SetLevelAllChannels)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(alevelsdb.as_ptr()), alevelsdb.len().try_into().unwrap(), ::core::mem::transmute(pguideventcontext.unwrap_or(::std::ptr::null()))).ok() } } ::windows_core::imp::interface_hierarchy!(IAudioVolumeLevel, ::windows_core::IUnknown, IPerChannelDbLevel); @@ -2809,10 +2809,10 @@ impl IChannelAudioVolume { (::windows_core::Interface::vtable(self).GetChannelVolume)(::windows_core::Interface::as_raw(self), dwindex, &mut result__).from_abi(result__) } pub unsafe fn SetAllVolumes(&self, pfvolumes: &[f32], eventcontext: *const ::windows_core::GUID) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetAllVolumes)(::windows_core::Interface::as_raw(self), pfvolumes.len() as _, ::core::mem::transmute(pfvolumes.as_ptr()), eventcontext).ok() + (::windows_core::Interface::vtable(self).SetAllVolumes)(::windows_core::Interface::as_raw(self), pfvolumes.len().try_into().unwrap(), ::core::mem::transmute(pfvolumes.as_ptr()), eventcontext).ok() } pub unsafe fn GetAllVolumes(&self, pfvolumes: &mut [f32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetAllVolumes)(::windows_core::Interface::as_raw(self), pfvolumes.len() as _, ::core::mem::transmute(pfvolumes.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetAllVolumes)(::windows_core::Interface::as_raw(self), pfvolumes.len().try_into().unwrap(), ::core::mem::transmute(pfvolumes.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IChannelAudioVolume, ::windows_core::IUnknown); @@ -3450,7 +3450,7 @@ impl IPerChannelDbLevel { (::windows_core::Interface::vtable(self).SetLevelUniform)(::windows_core::Interface::as_raw(self), fleveldb, ::core::mem::transmute(pguideventcontext.unwrap_or(::std::ptr::null()))).ok() } pub unsafe fn SetLevelAllChannels(&self, alevelsdb: &[f32], pguideventcontext: ::core::option::Option<*const ::windows_core::GUID>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetLevelAllChannels)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(alevelsdb.as_ptr()), alevelsdb.len() as _, ::core::mem::transmute(pguideventcontext.unwrap_or(::std::ptr::null()))).ok() + (::windows_core::Interface::vtable(self).SetLevelAllChannels)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(alevelsdb.as_ptr()), alevelsdb.len().try_into().unwrap(), ::core::mem::transmute(pguideventcontext.unwrap_or(::std::ptr::null()))).ok() } } ::windows_core::imp::interface_hierarchy!(IPerChannelDbLevel, ::windows_core::IUnknown); @@ -3786,10 +3786,10 @@ pub struct ISpatialAudioMetadataItems_Vtbl { pub struct ISpatialAudioMetadataItemsBuffer(::windows_core::IUnknown); impl ISpatialAudioMetadataItemsBuffer { pub unsafe fn AttachToBuffer(&self, buffer: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).AttachToBuffer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _).ok() + (::windows_core::Interface::vtable(self).AttachToBuffer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()).ok() } pub unsafe fn AttachToPopulatedBuffer(&self, buffer: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).AttachToPopulatedBuffer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _).ok() + (::windows_core::Interface::vtable(self).AttachToPopulatedBuffer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()).ok() } pub unsafe fn DetachBuffer(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).DetachBuffer)(::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 ffc0a3f541..b8f35e114f 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/DeviceManager/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/DeviceManager/mod.rs @@ -3,7 +3,7 @@ pub struct 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<()> { - (::windows_core::Interface::vtable(self).SACAuth)(::windows_core::Interface::as_raw(self), dwprotocolid, dwpass, ::core::mem::transmute(pbdatain.as_ptr()), pbdatain.len() as _, ppbdataout, pdwdataoutlen).ok() + (::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, pdwdataoutlen).ok() } pub unsafe fn SACGetProtocols(&self, ppdwprotocols: *mut *mut u32, pdwprotocolcount: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).SACGetProtocols)(::windows_core::Interface::as_raw(self), ppdwprotocols, pdwprotocolcount).ok() @@ -28,10 +28,10 @@ pub struct IComponentAuthenticate_Vtbl { pub struct IMDSPDevice(::windows_core::IUnknown); impl IMDSPDevice { pub unsafe fn GetName(&self, pwszname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len() as _).ok() + (::windows_core::Interface::vtable(self).GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len().try_into().unwrap()).ok() } pub unsafe fn GetManufacturer(&self, pwszname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetManufacturer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len() as _).ok() + (::windows_core::Interface::vtable(self).GetManufacturer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len().try_into().unwrap()).ok() } pub unsafe fn GetVersion(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -99,10 +99,10 @@ pub struct IMDSPDevice_Vtbl { pub struct IMDSPDevice2(::windows_core::IUnknown); impl IMDSPDevice2 { pub unsafe fn GetName(&self, pwszname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len().try_into().unwrap()).ok() } pub unsafe fn GetManufacturer(&self, pwszname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetManufacturer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.GetManufacturer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len().try_into().unwrap()).ok() } pub unsafe fn GetVersion(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -156,7 +156,7 @@ impl IMDSPDevice2 { (::windows_core::Interface::vtable(self).GetSpecifyPropertyPages)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppspecifyproppages), pppunknowns, pcunks).ok() } pub unsafe fn GetCanonicalName(&self, pwszpnpname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetCanonicalName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszpnpname.as_ptr()), pwszpnpname.len() as _).ok() + (::windows_core::Interface::vtable(self).GetCanonicalName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszpnpname.as_ptr()), pwszpnpname.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(IMDSPDevice2, ::windows_core::IUnknown, IMDSPDevice); @@ -186,10 +186,10 @@ pub struct IMDSPDevice2_Vtbl { pub struct IMDSPDevice3(::windows_core::IUnknown); impl IMDSPDevice3 { pub unsafe fn GetName(&self, pwszname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len().try_into().unwrap()).ok() } pub unsafe fn GetManufacturer(&self, pwszname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetManufacturer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetManufacturer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len().try_into().unwrap()).ok() } pub unsafe fn GetVersion(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -243,7 +243,7 @@ impl IMDSPDevice3 { (::windows_core::Interface::vtable(self).base__.GetSpecifyPropertyPages)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppspecifyproppages), pppunknowns, pcunks).ok() } pub unsafe fn GetCanonicalName(&self, pwszpnpname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetCanonicalName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszpnpname.as_ptr()), pwszpnpname.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.GetCanonicalName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszpnpname.as_ptr()), pwszpnpname.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] @@ -269,7 +269,7 @@ impl IMDSPDevice3 { (::windows_core::Interface::vtable(self).GetFormatCapability)(::windows_core::Interface::as_raw(self), format, &mut result__).from_abi(result__) } pub unsafe fn DeviceIoControl(&self, dwiocontrolcode: u32, lpinbuffer: &[u8], lpoutbuffer: *mut u8, pnoutbuffersize: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).DeviceIoControl)(::windows_core::Interface::as_raw(self), dwiocontrolcode, ::core::mem::transmute(lpinbuffer.as_ptr()), lpinbuffer.len() as _, lpoutbuffer, pnoutbuffersize).ok() + (::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, pnoutbuffersize).ok() } pub unsafe fn FindStorage(&self, findscope: WMDM_FIND_SCOPE, pwszuniqueid: P0) -> ::windows_core::Result where @@ -395,7 +395,7 @@ pub struct IMDSPDirectTransfer_Vtbl { pub struct IMDSPEnumDevice(::windows_core::IUnknown); impl IMDSPEnumDevice { pub unsafe fn Next(&self, ppdevice: &mut [::core::option::Option], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppdevice.len() as _, ::core::mem::transmute(ppdevice.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppdevice.len().try_into().unwrap(), ::core::mem::transmute(ppdevice.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -430,7 +430,7 @@ pub struct IMDSPEnumDevice_Vtbl { pub struct IMDSPEnumStorage(::windows_core::IUnknown); impl IMDSPEnumStorage { pub unsafe fn Next(&self, ppstorage: &mut [::core::option::Option], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppstorage.len() as _, ::core::mem::transmute(ppstorage.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppstorage.len().try_into().unwrap(), ::core::mem::transmute(ppstorage.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -670,7 +670,7 @@ impl IMDSPStorage { (::windows_core::Interface::vtable(self).GetAttributes)(::windows_core::Interface::as_raw(self), pdwattributes, ::core::mem::transmute(pformat.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetName(&self, pwszname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len() as _).ok() + (::windows_core::Interface::vtable(self).GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len().try_into().unwrap()).ok() } pub unsafe fn GetDate(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -749,7 +749,7 @@ impl IMDSPStorage2 { (::windows_core::Interface::vtable(self).base__.GetAttributes)(::windows_core::Interface::as_raw(self), pdwattributes, ::core::mem::transmute(pformat.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetName(&self, pwszname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len().try_into().unwrap()).ok() } pub unsafe fn GetDate(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -848,7 +848,7 @@ impl IMDSPStorage3 { (::windows_core::Interface::vtable(self).base__.base__.GetAttributes)(::windows_core::Interface::as_raw(self), pdwattributes, ::core::mem::transmute(pformat.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetName(&self, pwszname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len().try_into().unwrap()).ok() } pub unsafe fn GetDate(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -948,7 +948,7 @@ impl IMDSPStorage4 { (::windows_core::Interface::vtable(self).base__.base__.base__.GetAttributes)(::windows_core::Interface::as_raw(self), pdwattributes, ::core::mem::transmute(pformat.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetName(&self, pwszname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len().try_into().unwrap()).ok() } pub unsafe fn GetDate(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1015,7 +1015,7 @@ impl IMDSPStorage4 { (::windows_core::Interface::vtable(self).base__.SetMetadata)(::windows_core::Interface::as_raw(self), pmetadata.into_param().abi()).ok() } pub unsafe fn SetReferences(&self, ppispstorage: ::core::option::Option<&[::core::option::Option]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetReferences)(::windows_core::Interface::as_raw(self), ppispstorage.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppispstorage.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + (::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 ::core::option::Option) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetReferences)(::windows_core::Interface::as_raw(self), pdwrefs, pppispstorage).ok() @@ -1032,7 +1032,7 @@ impl IMDSPStorage4 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).GetSpecifiedMetadata)(::windows_core::Interface::as_raw(self), ppwszpropnames.len() as _, ::core::mem::transmute(ppwszpropnames.as_ptr()), pmetadata.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).GetSpecifiedMetadata)(::windows_core::Interface::as_raw(self), ppwszpropnames.len().try_into().unwrap(), ::core::mem::transmute(ppwszpropnames.as_ptr()), pmetadata.into_param().abi()).ok() } pub unsafe fn FindStorage(&self, findscope: WMDM_FIND_SCOPE, pwszuniqueid: P0) -> ::windows_core::Result where @@ -1271,7 +1271,7 @@ pub struct ISCPSecureAuthenticate2_Vtbl { pub struct ISCPSecureExchange(::windows_core::IUnknown); impl ISCPSecureExchange { pub unsafe fn TransferContainerData(&self, pdata: &[u8], pfureadyflags: *mut u32, abmac: &mut [u8; 8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).TransferContainerData)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdata.as_ptr()), pdata.len() as _, pfureadyflags, ::core::mem::transmute(abmac.as_ptr())).ok() + (::windows_core::Interface::vtable(self).TransferContainerData)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap(), pfureadyflags, ::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<()> { (::windows_core::Interface::vtable(self).ObjectData)(::windows_core::Interface::as_raw(self), pdata, pdwsize, ::core::mem::transmute(abmac.as_ptr())).ok() @@ -1300,7 +1300,7 @@ pub struct ISCPSecureExchange_Vtbl { pub struct ISCPSecureExchange2(::windows_core::IUnknown); impl ISCPSecureExchange2 { pub unsafe fn TransferContainerData(&self, pdata: &[u8], pfureadyflags: *mut u32, abmac: &mut [u8; 8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.TransferContainerData)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdata.as_ptr()), pdata.len() as _, pfureadyflags, ::core::mem::transmute(abmac.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.TransferContainerData)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap(), pfureadyflags, ::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<()> { (::windows_core::Interface::vtable(self).base__.ObjectData)(::windows_core::Interface::as_raw(self), pdata, pdwsize, ::core::mem::transmute(abmac.as_ptr())).ok() @@ -1312,7 +1312,7 @@ impl ISCPSecureExchange2 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).TransferContainerData2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdata.as_ptr()), pdata.len() as _, pprogresscallback.into_param().abi(), pfureadyflags, ::core::mem::transmute(abmac.as_ptr())).ok() + (::windows_core::Interface::vtable(self).TransferContainerData2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap(), pprogresscallback.into_param().abi(), pfureadyflags, ::core::mem::transmute(abmac.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(ISCPSecureExchange2, ::windows_core::IUnknown, ISCPSecureExchange); @@ -1333,7 +1333,7 @@ pub struct ISCPSecureExchange2_Vtbl { pub struct ISCPSecureExchange3(::windows_core::IUnknown); impl ISCPSecureExchange3 { pub unsafe fn TransferContainerData(&self, pdata: &[u8], pfureadyflags: *mut u32, abmac: &mut [u8; 8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.TransferContainerData)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdata.as_ptr()), pdata.len() as _, pfureadyflags, ::core::mem::transmute(abmac.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.TransferContainerData)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap(), pfureadyflags, ::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<()> { (::windows_core::Interface::vtable(self).base__.base__.ObjectData)(::windows_core::Interface::as_raw(self), pdata, pdwsize, ::core::mem::transmute(abmac.as_ptr())).ok() @@ -1345,7 +1345,7 @@ impl ISCPSecureExchange3 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.TransferContainerData2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdata.as_ptr()), pdata.len() as _, pprogresscallback.into_param().abi(), pfureadyflags, ::core::mem::transmute(abmac.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.TransferContainerData2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap(), pprogresscallback.into_param().abi(), pfureadyflags, ::core::mem::transmute(abmac.as_ptr())).ok() } pub unsafe fn TransferContainerDataOnClearChannel(&self, pdevice: P0, pdata: &[u8], pprogresscallback: P1) -> ::windows_core::Result where @@ -1353,7 +1353,7 @@ impl ISCPSecureExchange3 { P1: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).TransferContainerDataOnClearChannel)(::windows_core::Interface::as_raw(self), pdevice.into_param().abi(), ::core::mem::transmute(pdata.as_ptr()), pdata.len() as _, pprogresscallback.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).TransferContainerDataOnClearChannel)(::windows_core::Interface::as_raw(self), pdevice.into_param().abi(), ::core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap(), pprogresscallback.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn GetObjectDataOnClearChannel(&self, pdevice: P0, pdata: *mut u8, pdwsize: *mut u32) -> ::windows_core::Result<()> where @@ -1394,19 +1394,19 @@ impl ISCPSecureQuery { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).ExamineData)(::windows_core::Interface::as_raw(self), fuflags, pwszextension.into_param().abi(), ::core::mem::transmute(pdata.as_ptr()), pdata.len() as _, ::core::mem::transmute(abmac.as_ptr())).ok() + (::windows_core::Interface::vtable(self).ExamineData)(::windows_core::Interface::as_raw(self), fuflags, pwszextension.into_param().abi(), ::core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap(), ::core::mem::transmute(abmac.as_ptr())).ok() } pub unsafe fn MakeDecision(&self, fuflags: u32, pdata: &[u8], dwappsec: u32, pbspsessionkey: &[u8], pstorageglobals: P0, ppexchange: *mut ::core::option::Option, abmac: &mut [u8; 8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).MakeDecision)(::windows_core::Interface::as_raw(self), fuflags, ::core::mem::transmute(pdata.as_ptr()), pdata.len() as _, dwappsec, ::core::mem::transmute(pbspsessionkey.as_ptr()), pbspsessionkey.len() as _, pstorageglobals.into_param().abi(), ::core::mem::transmute(ppexchange), ::core::mem::transmute(abmac.as_ptr())).ok() + (::windows_core::Interface::vtable(self).MakeDecision)(::windows_core::Interface::as_raw(self), fuflags, ::core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap(), dwappsec, ::core::mem::transmute(pbspsessionkey.as_ptr()), pbspsessionkey.len().try_into().unwrap(), pstorageglobals.into_param().abi(), ::core::mem::transmute(ppexchange), ::core::mem::transmute(abmac.as_ptr())).ok() } pub unsafe fn GetRights(&self, pdata: &[u8], pbspsessionkey: &[u8], pstgglobals: P0, pprights: *mut *mut WMDMRIGHTS, pnrightscount: *mut u32, abmac: &mut [u8; 8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).GetRights)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdata.as_ptr()), pdata.len() as _, ::core::mem::transmute(pbspsessionkey.as_ptr()), pbspsessionkey.len() as _, pstgglobals.into_param().abi(), pprights, pnrightscount, ::core::mem::transmute(abmac.as_ptr())).ok() + (::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.into_param().abi(), pprights, pnrightscount, ::core::mem::transmute(abmac.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(ISCPSecureQuery, ::windows_core::IUnknown); @@ -1436,19 +1436,19 @@ impl ISCPSecureQuery2 { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).base__.ExamineData)(::windows_core::Interface::as_raw(self), fuflags, pwszextension.into_param().abi(), ::core::mem::transmute(pdata.as_ptr()), pdata.len() as _, ::core::mem::transmute(abmac.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.ExamineData)(::windows_core::Interface::as_raw(self), fuflags, pwszextension.into_param().abi(), ::core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap(), ::core::mem::transmute(abmac.as_ptr())).ok() } pub unsafe fn MakeDecision(&self, fuflags: u32, pdata: &[u8], dwappsec: u32, pbspsessionkey: &[u8], pstorageglobals: P0, ppexchange: *mut ::core::option::Option, abmac: &mut [u8; 8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.MakeDecision)(::windows_core::Interface::as_raw(self), fuflags, ::core::mem::transmute(pdata.as_ptr()), pdata.len() as _, dwappsec, ::core::mem::transmute(pbspsessionkey.as_ptr()), pbspsessionkey.len() as _, pstorageglobals.into_param().abi(), ::core::mem::transmute(ppexchange), ::core::mem::transmute(abmac.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.MakeDecision)(::windows_core::Interface::as_raw(self), fuflags, ::core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap(), dwappsec, ::core::mem::transmute(pbspsessionkey.as_ptr()), pbspsessionkey.len().try_into().unwrap(), pstorageglobals.into_param().abi(), ::core::mem::transmute(ppexchange), ::core::mem::transmute(abmac.as_ptr())).ok() } pub unsafe fn GetRights(&self, pdata: &[u8], pbspsessionkey: &[u8], pstgglobals: P0, pprights: *mut *mut WMDMRIGHTS, pnrightscount: *mut u32, abmac: &mut [u8; 8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.GetRights)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdata.as_ptr()), pdata.len() as _, ::core::mem::transmute(pbspsessionkey.as_ptr()), pbspsessionkey.len() as _, pstgglobals.into_param().abi(), pprights, pnrightscount, ::core::mem::transmute(abmac.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.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.into_param().abi(), pprights, pnrightscount, ::core::mem::transmute(abmac.as_ptr())).ok() } pub unsafe fn MakeDecision2(&self, fuflags: u32, pdata: &[u8], dwappsec: u32, pbspsessionkey: &[u8], pstorageglobals: P0, pappcertapp: &[u8], pappcertsp: &[u8], pszrevocationurl: *mut ::windows_core::PWSTR, pdwrevocationurllen: *mut u32, pdwrevocationbitflag: *mut u32, pqwfilesize: ::core::option::Option<*mut u64>, punknown: P1, ppexchange: *mut ::core::option::Option, abmac: &mut [u8; 8]) -> ::windows_core::Result<()> where @@ -1459,15 +1459,15 @@ impl ISCPSecureQuery2 { ::windows_core::Interface::as_raw(self), fuflags, ::core::mem::transmute(pdata.as_ptr()), - pdata.len() as _, + pdata.len().try_into().unwrap(), dwappsec, ::core::mem::transmute(pbspsessionkey.as_ptr()), - pbspsessionkey.len() as _, + pbspsessionkey.len().try_into().unwrap(), pstorageglobals.into_param().abi(), ::core::mem::transmute(pappcertapp.as_ptr()), - pappcertapp.len() as _, + pappcertapp.len().try_into().unwrap(), ::core::mem::transmute(pappcertsp.as_ptr()), - pappcertsp.len() as _, + pappcertsp.len().try_into().unwrap(), pszrevocationurl, pdwrevocationurllen, pdwrevocationbitflag, @@ -1503,19 +1503,19 @@ impl ISCPSecureQuery3 { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).base__.base__.ExamineData)(::windows_core::Interface::as_raw(self), fuflags, pwszextension.into_param().abi(), ::core::mem::transmute(pdata.as_ptr()), pdata.len() as _, ::core::mem::transmute(abmac.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.ExamineData)(::windows_core::Interface::as_raw(self), fuflags, pwszextension.into_param().abi(), ::core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap(), ::core::mem::transmute(abmac.as_ptr())).ok() } pub unsafe fn MakeDecision(&self, fuflags: u32, pdata: &[u8], dwappsec: u32, pbspsessionkey: &[u8], pstorageglobals: P0, ppexchange: *mut ::core::option::Option, abmac: &mut [u8; 8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.MakeDecision)(::windows_core::Interface::as_raw(self), fuflags, ::core::mem::transmute(pdata.as_ptr()), pdata.len() as _, dwappsec, ::core::mem::transmute(pbspsessionkey.as_ptr()), pbspsessionkey.len() as _, pstorageglobals.into_param().abi(), ::core::mem::transmute(ppexchange), ::core::mem::transmute(abmac.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.MakeDecision)(::windows_core::Interface::as_raw(self), fuflags, ::core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap(), dwappsec, ::core::mem::transmute(pbspsessionkey.as_ptr()), pbspsessionkey.len().try_into().unwrap(), pstorageglobals.into_param().abi(), ::core::mem::transmute(ppexchange), ::core::mem::transmute(abmac.as_ptr())).ok() } pub unsafe fn GetRights(&self, pdata: &[u8], pbspsessionkey: &[u8], pstgglobals: P0, pprights: *mut *mut WMDMRIGHTS, pnrightscount: *mut u32, abmac: &mut [u8; 8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.GetRights)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdata.as_ptr()), pdata.len() as _, ::core::mem::transmute(pbspsessionkey.as_ptr()), pbspsessionkey.len() as _, pstgglobals.into_param().abi(), pprights, pnrightscount, ::core::mem::transmute(abmac.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.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.into_param().abi(), pprights, pnrightscount, ::core::mem::transmute(abmac.as_ptr())).ok() } pub unsafe fn MakeDecision2(&self, fuflags: u32, pdata: &[u8], dwappsec: u32, pbspsessionkey: &[u8], pstorageglobals: P0, pappcertapp: &[u8], pappcertsp: &[u8], pszrevocationurl: *mut ::windows_core::PWSTR, pdwrevocationurllen: *mut u32, pdwrevocationbitflag: *mut u32, pqwfilesize: ::core::option::Option<*mut u64>, punknown: P1, ppexchange: *mut ::core::option::Option, abmac: &mut [u8; 8]) -> ::windows_core::Result<()> where @@ -1526,15 +1526,15 @@ impl ISCPSecureQuery3 { ::windows_core::Interface::as_raw(self), fuflags, ::core::mem::transmute(pdata.as_ptr()), - pdata.len() as _, + pdata.len().try_into().unwrap(), dwappsec, ::core::mem::transmute(pbspsessionkey.as_ptr()), - pbspsessionkey.len() as _, + pbspsessionkey.len().try_into().unwrap(), pstorageglobals.into_param().abi(), ::core::mem::transmute(pappcertapp.as_ptr()), - pappcertapp.len() as _, + pappcertapp.len().try_into().unwrap(), ::core::mem::transmute(pappcertsp.as_ptr()), - pappcertsp.len() as _, + pappcertsp.len().try_into().unwrap(), pszrevocationurl, pdwrevocationurllen, pdwrevocationbitflag, @@ -1550,7 +1550,7 @@ impl ISCPSecureQuery3 { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).GetRightsOnClearChannel)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdata.as_ptr()), pdata.len() as _, ::core::mem::transmute(pbspsessionkey.as_ptr()), pbspsessionkey.len() as _, pstgglobals.into_param().abi(), pprogresscallback.into_param().abi(), pprights, pnrightscount).ok() + (::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.into_param().abi(), pprogresscallback.into_param().abi(), pprights, pnrightscount).ok() } pub unsafe fn MakeDecisionOnClearChannel(&self, fuflags: u32, pdata: &[u8], dwappsec: u32, pbspsessionkey: &[u8], pstorageglobals: P0, pprogresscallback: P1, pappcertapp: &[u8], pappcertsp: &[u8], pszrevocationurl: *mut ::windows_core::PWSTR, pdwrevocationurllen: *mut u32, pdwrevocationbitflag: *mut u32, pqwfilesize: ::core::option::Option<*mut u64>, punknown: P2, ppexchange: *mut ::core::option::Option) -> ::windows_core::Result<()> where @@ -1562,16 +1562,16 @@ impl ISCPSecureQuery3 { ::windows_core::Interface::as_raw(self), fuflags, ::core::mem::transmute(pdata.as_ptr()), - pdata.len() as _, + pdata.len().try_into().unwrap(), dwappsec, ::core::mem::transmute(pbspsessionkey.as_ptr()), - pbspsessionkey.len() as _, + pbspsessionkey.len().try_into().unwrap(), pstorageglobals.into_param().abi(), pprogresscallback.into_param().abi(), ::core::mem::transmute(pappcertapp.as_ptr()), - pappcertapp.len() as _, + pappcertapp.len().try_into().unwrap(), ::core::mem::transmute(pappcertsp.as_ptr()), - pappcertsp.len() as _, + pappcertsp.len().try_into().unwrap(), pszrevocationurl, pdwrevocationurllen, pdwrevocationbitflag, @@ -1604,10 +1604,10 @@ impl ISCPSession { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).BeginSession)(::windows_core::Interface::as_raw(self), pidevice.into_param().abi(), ::core::mem::transmute(pctx.as_ptr()), pctx.len() as _).ok() + (::windows_core::Interface::vtable(self).BeginSession)(::windows_core::Interface::as_raw(self), pidevice.into_param().abi(), ::core::mem::transmute(pctx.as_ptr()), pctx.len().try_into().unwrap()).ok() } pub unsafe fn EndSession(&self, pctx: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).EndSession)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pctx.as_ptr()), pctx.len() as _).ok() + (::windows_core::Interface::vtable(self).EndSession)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pctx.as_ptr()), pctx.len().try_into().unwrap()).ok() } pub unsafe fn GetSecureQuery(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1634,10 +1634,10 @@ pub struct ISCPSession_Vtbl { pub struct IWMDMDevice(::windows_core::IUnknown); impl IWMDMDevice { pub unsafe fn GetName(&self, pwszname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len() as _).ok() + (::windows_core::Interface::vtable(self).GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len().try_into().unwrap()).ok() } pub unsafe fn GetManufacturer(&self, pwszname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetManufacturer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len() as _).ok() + (::windows_core::Interface::vtable(self).GetManufacturer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len().try_into().unwrap()).ok() } pub unsafe fn GetVersion(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1705,10 +1705,10 @@ pub struct IWMDMDevice_Vtbl { pub struct IWMDMDevice2(::windows_core::IUnknown); impl IWMDMDevice2 { pub unsafe fn GetName(&self, pwszname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len().try_into().unwrap()).ok() } pub unsafe fn GetManufacturer(&self, pwszname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetManufacturer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.GetManufacturer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len().try_into().unwrap()).ok() } pub unsafe fn GetVersion(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1762,7 +1762,7 @@ impl IWMDMDevice2 { (::windows_core::Interface::vtable(self).GetSpecifyPropertyPages)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppspecifyproppages), pppunknowns, pcunks).ok() } pub unsafe fn GetCanonicalName(&self, pwszpnpname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetCanonicalName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszpnpname.as_ptr()), pwszpnpname.len() as _).ok() + (::windows_core::Interface::vtable(self).GetCanonicalName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszpnpname.as_ptr()), pwszpnpname.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(IWMDMDevice2, ::windows_core::IUnknown, IWMDMDevice); @@ -1792,10 +1792,10 @@ pub struct IWMDMDevice2_Vtbl { pub struct IWMDMDevice3(::windows_core::IUnknown); impl IWMDMDevice3 { pub unsafe fn GetName(&self, pwszname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len().try_into().unwrap()).ok() } pub unsafe fn GetManufacturer(&self, pwszname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetManufacturer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetManufacturer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len().try_into().unwrap()).ok() } pub unsafe fn GetVersion(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1849,7 +1849,7 @@ impl IWMDMDevice3 { (::windows_core::Interface::vtable(self).base__.GetSpecifyPropertyPages)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppspecifyproppages), pppunknowns, pcunks).ok() } pub unsafe fn GetCanonicalName(&self, pwszpnpname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetCanonicalName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszpnpname.as_ptr()), pwszpnpname.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.GetCanonicalName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszpnpname.as_ptr()), pwszpnpname.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] @@ -1875,7 +1875,7 @@ impl IWMDMDevice3 { (::windows_core::Interface::vtable(self).GetFormatCapability)(::windows_core::Interface::as_raw(self), format, &mut result__).from_abi(result__) } pub unsafe fn DeviceIoControl(&self, dwiocontrolcode: u32, lpinbuffer: &[u8], lpoutbuffer: *mut u8, pnoutbuffersize: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).DeviceIoControl)(::windows_core::Interface::as_raw(self), dwiocontrolcode, ::core::mem::transmute(lpinbuffer.as_ptr()), lpinbuffer.len() as _, lpoutbuffer, pnoutbuffersize).ok() + (::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, pnoutbuffersize).ok() } pub unsafe fn FindStorage(&self, findscope: WMDM_FIND_SCOPE, pwszuniqueid: P0) -> ::windows_core::Result where @@ -1972,10 +1972,10 @@ pub struct IWMDMDeviceControl_Vtbl { pub struct IWMDMDeviceSession(::windows_core::IUnknown); impl IWMDMDeviceSession { pub unsafe fn BeginSession(&self, r#type: WMDM_SESSION_TYPE, pctx: ::core::option::Option<&[u8]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).BeginSession)(::windows_core::Interface::as_raw(self), r#type, ::core::mem::transmute(pctx.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pctx.as_deref().map_or(0, |slice| slice.len() as _)).ok() + (::windows_core::Interface::vtable(self).BeginSession)(::windows_core::Interface::as_raw(self), r#type, ::core::mem::transmute(pctx.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pctx.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } pub unsafe fn EndSession(&self, r#type: WMDM_SESSION_TYPE, pctx: ::core::option::Option<&[u8]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).EndSession)(::windows_core::Interface::as_raw(self), r#type, ::core::mem::transmute(pctx.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pctx.as_deref().map_or(0, |slice| slice.len() as _)).ok() + (::windows_core::Interface::vtable(self).EndSession)(::windows_core::Interface::as_raw(self), r#type, ::core::mem::transmute(pctx.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pctx.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } } ::windows_core::imp::interface_hierarchy!(IWMDMDeviceSession, ::windows_core::IUnknown); @@ -1997,7 +1997,7 @@ pub struct IWMDMDeviceSession_Vtbl { pub struct IWMDMEnumDevice(::windows_core::IUnknown); impl IWMDMEnumDevice { pub unsafe fn Next(&self, ppdevice: &mut [::core::option::Option], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppdevice.len() as _, ::core::mem::transmute(ppdevice.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppdevice.len().try_into().unwrap(), ::core::mem::transmute(ppdevice.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -2032,7 +2032,7 @@ pub struct IWMDMEnumDevice_Vtbl { pub struct IWMDMEnumStorage(::windows_core::IUnknown); impl IWMDMEnumStorage { pub unsafe fn Next(&self, ppstorage: &mut [::core::option::Option], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppstorage.len() as _, ::core::mem::transmute(ppstorage.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppstorage.len().try_into().unwrap(), ::core::mem::transmute(ppstorage.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -2148,7 +2148,7 @@ impl IWMDMMetaData { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).AddItem)(::windows_core::Interface::as_raw(self), r#type, pwsztagname.into_param().abi(), ::core::mem::transmute(pvalue.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pvalue.as_deref().map_or(0, |slice| slice.len() as _)).ok() + (::windows_core::Interface::vtable(self).AddItem)(::windows_core::Interface::as_raw(self), r#type, pwsztagname.into_param().abi(), ::core::mem::transmute(pvalue.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pvalue.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } pub unsafe fn QueryByName(&self, pwsztagname: P0, ptype: *mut WMDM_TAG_DATATYPE, pvalue: *mut *mut u8, pcblength: *mut u32) -> ::windows_core::Result<()> where @@ -2265,10 +2265,10 @@ impl IWMDMOperation { (::windows_core::Interface::vtable(self).BeginWrite)(::windows_core::Interface::as_raw(self)).ok() } pub unsafe fn GetObjectName(&self, pwszname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetObjectName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len() as _).ok() + (::windows_core::Interface::vtable(self).GetObjectName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len().try_into().unwrap()).ok() } pub unsafe fn SetObjectName(&self, pwszname: &[u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetObjectName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len() as _).ok() + (::windows_core::Interface::vtable(self).SetObjectName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Media_Audio\"`"] #[cfg(feature = "Win32_Media_Audio")] @@ -2335,10 +2335,10 @@ impl IWMDMOperation2 { (::windows_core::Interface::vtable(self).base__.BeginWrite)(::windows_core::Interface::as_raw(self)).ok() } pub unsafe fn GetObjectName(&self, pwszname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetObjectName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.GetObjectName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len().try_into().unwrap()).ok() } pub unsafe fn SetObjectName(&self, pwszname: &[u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetObjectName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.SetObjectName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Media_Audio\"`"] #[cfg(feature = "Win32_Media_Audio")] @@ -2407,10 +2407,10 @@ impl IWMDMOperation3 { (::windows_core::Interface::vtable(self).base__.BeginWrite)(::windows_core::Interface::as_raw(self)).ok() } pub unsafe fn GetObjectName(&self, pwszname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetObjectName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.GetObjectName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len().try_into().unwrap()).ok() } pub unsafe fn SetObjectName(&self, pwszname: &[u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetObjectName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.SetObjectName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Media_Audio\"`"] #[cfg(feature = "Win32_Media_Audio")] @@ -2594,7 +2594,7 @@ impl IWMDMStorage { (::windows_core::Interface::vtable(self).GetAttributes)(::windows_core::Interface::as_raw(self), pdwattributes, ::core::mem::transmute(pformat.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetName(&self, pwszname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len() as _).ok() + (::windows_core::Interface::vtable(self).GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len().try_into().unwrap()).ok() } pub unsafe fn GetDate(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -2660,7 +2660,7 @@ impl IWMDMStorage2 { (::windows_core::Interface::vtable(self).base__.GetAttributes)(::windows_core::Interface::as_raw(self), pdwattributes, ::core::mem::transmute(pformat.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetName(&self, pwszname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len().try_into().unwrap()).ok() } pub unsafe fn GetDate(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -2737,7 +2737,7 @@ impl IWMDMStorage3 { (::windows_core::Interface::vtable(self).base__.base__.GetAttributes)(::windows_core::Interface::as_raw(self), pdwattributes, ::core::mem::transmute(pformat.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetName(&self, pwszname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len().try_into().unwrap()).ok() } pub unsafe fn GetDate(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -2788,7 +2788,7 @@ impl IWMDMStorage3 { (::windows_core::Interface::vtable(self).CreateEmptyMetadataObject)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn SetEnumPreference(&self, pmode: *mut WMDM_STORAGE_ENUM_MODE, pviews: ::core::option::Option<&[WMDMMetadataView]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetEnumPreference)(::windows_core::Interface::as_raw(self), pmode, pviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + (::windows_core::Interface::vtable(self).SetEnumPreference)(::windows_core::Interface::as_raw(self), 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() } } ::windows_core::imp::interface_hierarchy!(IWMDMStorage3, ::windows_core::IUnknown, IWMDMStorage, IWMDMStorage2); @@ -2826,7 +2826,7 @@ impl IWMDMStorage4 { (::windows_core::Interface::vtable(self).base__.base__.base__.GetAttributes)(::windows_core::Interface::as_raw(self), pdwattributes, ::core::mem::transmute(pformat.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetName(&self, pwszname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszname.as_ptr()), pwszname.len().try_into().unwrap()).ok() } pub unsafe fn GetDate(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -2877,10 +2877,10 @@ impl IWMDMStorage4 { (::windows_core::Interface::vtable(self).base__.CreateEmptyMetadataObject)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn SetEnumPreference(&self, pmode: *mut WMDM_STORAGE_ENUM_MODE, pviews: ::core::option::Option<&[WMDMMetadataView]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetEnumPreference)(::windows_core::Interface::as_raw(self), pmode, pviews.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pviews.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + (::windows_core::Interface::vtable(self).base__.SetEnumPreference)(::windows_core::Interface::as_raw(self), 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() } pub unsafe fn SetReferences(&self, ppiwmdmstorage: ::core::option::Option<&[::core::option::Option]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetReferences)(::windows_core::Interface::as_raw(self), ppiwmdmstorage.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppiwmdmstorage.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + (::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 ::core::option::Option) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetReferences)(::windows_core::Interface::as_raw(self), pdwrefs, pppiwmdmstorage).ok() @@ -2893,7 +2893,7 @@ impl IWMDMStorage4 { } pub unsafe fn GetSpecifiedMetadata(&self, ppwszpropnames: &[::windows_core::PCWSTR]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).GetSpecifiedMetadata)(::windows_core::Interface::as_raw(self), ppwszpropnames.len() as _, ::core::mem::transmute(ppwszpropnames.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).GetSpecifiedMetadata)(::windows_core::Interface::as_raw(self), ppwszpropnames.len().try_into().unwrap(), ::core::mem::transmute(ppwszpropnames.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn FindStorage(&self, findscope: WMDM_FIND_SCOPE, pwszuniqueid: P0) -> ::windows_core::Result where 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 82bce51209..f1c08edc7f 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 @@ -7629,7 +7629,7 @@ impl IESEventFactory { P2: ::windows_core::IntoParam<::windows_core::IUnknown>, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateESEvent)(::windows_core::Interface::as_raw(self), pserviceprovider.into_param().abi(), dweventid, ::core::mem::transmute(guideventtype), peventdata.len() as _, ::core::mem::transmute(peventdata.as_ptr()), bstrbaseurl.into_param().abi(), pinitcontext.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateESEvent)(::windows_core::Interface::as_raw(self), pserviceprovider.into_param().abi(), dweventid, ::core::mem::transmute(guideventtype), peventdata.len().try_into().unwrap(), ::core::mem::transmute(peventdata.as_ptr()), bstrbaseurl.into_param().abi(), pinitcontext.into_param().abi(), &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IESEventFactory, ::windows_core::IUnknown); @@ -8241,7 +8241,7 @@ impl IEnumComponentTypes { #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, rgelt: &mut [::core::option::Option], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -8280,7 +8280,7 @@ impl IEnumComponents { #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, rgelt: &mut [::core::option::Option], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -8390,7 +8390,7 @@ pub struct IEnumMSVidGraphSegment_Vtbl { pub struct IEnumStreamBufferRecordingAttrib(::windows_core::IUnknown); impl IEnumStreamBufferRecordingAttrib { pub unsafe fn Next(&self, pstreambufferattribute: &mut [STREAMBUFFER_ATTRIBUTE], pcreceived: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), pstreambufferattribute.len() as _, ::core::mem::transmute(pstreambufferattribute.as_ptr()), pcreceived).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), pstreambufferattribute.len().try_into().unwrap(), ::core::mem::transmute(pstreambufferattribute.as_ptr()), pcreceived).ok() } pub unsafe fn Skip(&self, crecords: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), crecords).ok() @@ -8465,7 +8465,7 @@ impl IEnumTuningSpaces { #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, rgelt: &mut [::core::option::Option], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -19981,7 +19981,7 @@ pub struct IPBDASiParser_Vtbl { pub struct IPBDA_EIT(::windows_core::IUnknown); impl IPBDA_EIT { pub unsafe fn Initialize(&self, pbuffer: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Initialize)(::windows_core::Interface::as_raw(self), pbuffer.len() as _, ::core::mem::transmute(pbuffer.as_ptr())).ok() + (::windows_core::Interface::vtable(self).Initialize)(::windows_core::Interface::as_raw(self), pbuffer.len().try_into().unwrap(), ::core::mem::transmute(pbuffer.as_ptr())).ok() } pub unsafe fn GetTableId(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -20051,7 +20051,7 @@ pub struct IPBDA_EIT_Vtbl { pub struct IPBDA_Services(::windows_core::IUnknown); impl IPBDA_Services { pub unsafe fn Initialize(&self, pbuffer: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Initialize)(::windows_core::Interface::as_raw(self), pbuffer.len() as _, ::core::mem::transmute(pbuffer.as_ptr())).ok() + (::windows_core::Interface::vtable(self).Initialize)(::windows_core::Interface::as_raw(self), pbuffer.len().try_into().unwrap(), ::core::mem::transmute(pbuffer.as_ptr())).ok() } pub unsafe fn GetCountOfRecords(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -20446,7 +20446,7 @@ pub struct ISBE2Crossbar_Vtbl { pub struct ISBE2EnumStream(::windows_core::IUnknown); impl ISBE2EnumStream { pub unsafe fn Next(&self, pstreamdesc: &mut [SBE2_STREAM_DESC], pcreceived: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), pstreamdesc.len() as _, ::core::mem::transmute(pstreamdesc.as_ptr()), pcreceived).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), pstreamdesc.len().try_into().unwrap(), ::core::mem::transmute(pstreamdesc.as_ptr()), pcreceived).ok() } pub unsafe fn Skip(&self, crecords: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), crecords).ok() @@ -21715,7 +21715,7 @@ impl IStreamBufferRecordingAttribute { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).SetAttribute)(::windows_core::Interface::as_raw(self), ulreserved, pszattributename.into_param().abi(), streambufferattributetype, ::core::mem::transmute(pbattribute.as_ptr()), pbattribute.len() as _).ok() + (::windows_core::Interface::vtable(self).SetAttribute)(::windows_core::Interface::as_raw(self), ulreserved, pszattributename.into_param().abi(), streambufferattributetype, ::core::mem::transmute(pbattribute.as_ptr()), pbattribute.len().try_into().unwrap()).ok() } pub unsafe fn GetAttributeCount(&self, ulreserved: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Win32/Media/DirectShow/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/DirectShow/mod.rs index 5e60bfb536..55b9056c47 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/DirectShow/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/DirectShow/mod.rs @@ -7,12 +7,12 @@ pub mod Xml; #[inline] pub unsafe fn AMGetErrorTextA(hr: ::windows_core::HRESULT, pbuffer: &mut [u8]) -> u32 { ::windows_targets::link!("quartz.dll" "system" fn AMGetErrorTextA(hr : ::windows_core::HRESULT, pbuffer : ::windows_core::PSTR, maxlen : u32) -> u32); - AMGetErrorTextA(hr, ::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len() as _) + AMGetErrorTextA(hr, ::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap()) } #[inline] pub unsafe fn AMGetErrorTextW(hr: ::windows_core::HRESULT, pbuffer: &mut [u16]) -> u32 { ::windows_targets::link!("quartz.dll" "system" fn AMGetErrorTextW(hr : ::windows_core::HRESULT, pbuffer : ::windows_core::PWSTR, maxlen : u32) -> u32); - AMGetErrorTextW(hr, ::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len() as _) + AMGetErrorTextW(hr, ::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap()) } #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] @@ -1613,7 +1613,7 @@ impl IAMMediaTypeSample { (::windows_core::Interface::vtable(self).base__.CompletionStatus)(::windows_core::Interface::as_raw(self), dwflags, dwmilliseconds).ok() } pub unsafe fn SetPointer(&self, pbuffer: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetPointer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len() as _).ok() + (::windows_core::Interface::vtable(self).SetPointer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap()).ok() } pub unsafe fn GetPointer(&self) -> ::windows_core::Result<*mut u8> { let mut result__ = ::std::mem::zeroed(); @@ -3403,7 +3403,7 @@ impl IAMVideoAccelerator { (::windows_core::Interface::vtable(self).ReleaseBuffer)(::windows_core::Interface::as_raw(self), dwtypeindex, dwbufferindex).ok() } pub unsafe fn Execute(&self, dwfunction: u32, lpprivateinputdata: *const ::core::ffi::c_void, cbprivateinputdata: u32, lpprivateoutputdat: *const ::core::ffi::c_void, cbprivateoutputdata: u32, pamvabufferinfo: &[AMVABUFFERINFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Execute)(::windows_core::Interface::as_raw(self), dwfunction, lpprivateinputdata, cbprivateinputdata, lpprivateoutputdat, cbprivateoutputdata, pamvabufferinfo.len() as _, ::core::mem::transmute(pamvabufferinfo.as_ptr())).ok() + (::windows_core::Interface::vtable(self).Execute)(::windows_core::Interface::as_raw(self), dwfunction, lpprivateinputdata, cbprivateinputdata, lpprivateoutputdat, cbprivateoutputdata, pamvabufferinfo.len().try_into().unwrap(), ::core::mem::transmute(pamvabufferinfo.as_ptr())).ok() } pub unsafe fn QueryRenderStatus(&self, dwtypeindex: u32, dwbufferindex: u32, dwflags: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).QueryRenderStatus)(::windows_core::Interface::as_raw(self), dwtypeindex, dwbufferindex, dwflags).ok() @@ -3936,7 +3936,7 @@ impl IAsyncReader { (::windows_core::Interface::vtable(self).SyncReadAligned)(::windows_core::Interface::as_raw(self), psample.into_param().abi()).ok() } pub unsafe fn SyncRead(&self, llposition: i64, pbuffer: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SyncRead)(::windows_core::Interface::as_raw(self), llposition, pbuffer.len() as _, ::core::mem::transmute(pbuffer.as_ptr())).ok() + (::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<()> { (::windows_core::Interface::vtable(self).Length)(::windows_core::Interface::as_raw(self), ptotal, pavailable).ok() @@ -4218,7 +4218,7 @@ impl IBDA_ConditionalAccess { (::windows_core::Interface::vtable(self).get_SmartCardInfo)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbstrcardname), ::core::mem::transmute(pbstrcardmanufacturer), pfdaylightsavings, pbyratingregion, pltimezoneoffsetminutes, ::core::mem::transmute(pbstrlanguage), pealocationcode).ok() } pub unsafe fn get_SmartCardApplications(&self, pulcapplications: *mut u32, rgapplications: &mut [SmartCardApplication]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).get_SmartCardApplications)(::windows_core::Interface::as_raw(self), pulcapplications, rgapplications.len() as _, ::core::mem::transmute(rgapplications.as_ptr())).ok() + (::windows_core::Interface::vtable(self).get_SmartCardApplications)(::windows_core::Interface::as_raw(self), pulcapplications, rgapplications.len().try_into().unwrap(), ::core::mem::transmute(rgapplications.as_ptr())).ok() } pub unsafe fn get_Entitlement(&self, usvirtualchannel: u16) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -4281,10 +4281,10 @@ impl IBDA_ConditionalAccessEx { P0: ::windows_core::IntoParam<::windows_core::BSTR>, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CheckEntitlementToken)(::windows_core::Interface::as_raw(self), uldialogrequest, bstrlanguage.into_param().abi(), requesttype, pbentitlementtoken.len() as _, ::core::mem::transmute(pbentitlementtoken.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CheckEntitlementToken)(::windows_core::Interface::as_raw(self), uldialogrequest, bstrlanguage.into_param().abi(), requesttype, pbentitlementtoken.len().try_into().unwrap(), ::core::mem::transmute(pbentitlementtoken.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn SetCaptureToken(&self, pbcapturetoken: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetCaptureToken)(::windows_core::Interface::as_raw(self), pbcapturetoken.len() as _, ::core::mem::transmute(pbcapturetoken.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetCaptureToken)(::windows_core::Interface::as_raw(self), pbcapturetoken.len().try_into().unwrap(), ::core::mem::transmute(pbcapturetoken.as_ptr())).ok() } pub unsafe fn OpenBroadcastMmi(&self, uldialogrequest: u32, bstrlanguage: P0, eventid: u32) -> ::windows_core::Result<()> where @@ -4361,16 +4361,16 @@ impl IBDA_DRIWMDRMSession { (::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<()> { - (::windows_core::Interface::vtable(self).ProcessLicenseChallenge)(::windows_core::Interface::as_raw(self), pblicensemessage.len() as _, ::core::mem::transmute(pblicensemessage.as_ptr()), pdwcblicenseresponse, ppblicenseresponse).ok() + (::windows_core::Interface::vtable(self).ProcessLicenseChallenge)(::windows_core::Interface::as_raw(self), pblicensemessage.len().try_into().unwrap(), ::core::mem::transmute(pblicensemessage.as_ptr()), pdwcblicenseresponse, ppblicenseresponse).ok() } pub unsafe fn ProcessRegistrationChallenge(&self, pbregistrationmessage: &[u8], pdwcbregistrationresponse: *mut u32, ppbregistrationresponse: *mut *mut u8) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).ProcessRegistrationChallenge)(::windows_core::Interface::as_raw(self), pbregistrationmessage.len() as _, ::core::mem::transmute(pbregistrationmessage.as_ptr()), pdwcbregistrationresponse, ppbregistrationresponse).ok() + (::windows_core::Interface::vtable(self).ProcessRegistrationChallenge)(::windows_core::Interface::as_raw(self), pbregistrationmessage.len().try_into().unwrap(), ::core::mem::transmute(pbregistrationmessage.as_ptr()), pdwcbregistrationresponse, ppbregistrationresponse).ok() } pub unsafe fn SetRevInfo(&self, pbrevinfo: &[u8], pdwresponse: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetRevInfo)(::windows_core::Interface::as_raw(self), pbrevinfo.len() as _, ::core::mem::transmute(pbrevinfo.as_ptr()), pdwresponse).ok() + (::windows_core::Interface::vtable(self).SetRevInfo)(::windows_core::Interface::as_raw(self), pbrevinfo.len().try_into().unwrap(), ::core::mem::transmute(pbrevinfo.as_ptr()), pdwresponse).ok() } pub unsafe fn SetCrl(&self, pbcrllen: &[u8], pdwresponse: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetCrl)(::windows_core::Interface::as_raw(self), pbcrllen.len() as _, ::core::mem::transmute(pbcrllen.as_ptr()), pdwresponse).ok() + (::windows_core::Interface::vtable(self).SetCrl)(::windows_core::Interface::as_raw(self), pbcrllen.len().try_into().unwrap(), ::core::mem::transmute(pbcrllen.as_ptr()), pdwresponse).ok() } pub unsafe fn GetHMSAssociationData(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetHMSAssociationData)(::windows_core::Interface::as_raw(self)).ok() @@ -4820,7 +4820,7 @@ impl IBDA_DiseqCommand { (::windows_core::Interface::vtable(self).SetDiseqRepeats)(::windows_core::Interface::as_raw(self), ulrepeats).ok() } pub unsafe fn put_DiseqSendCommand(&self, ulrequestid: u32, pbcommand: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).put_DiseqSendCommand)(::windows_core::Interface::as_raw(self), ulrequestid, pbcommand.len() as _, ::core::mem::transmute(pbcommand.as_ptr())).ok() + (::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<()> { (::windows_core::Interface::vtable(self).get_DiseqResponse)(::windows_core::Interface::as_raw(self), ulrequestid, pulcbresponselen, pbresponse).ok() @@ -4921,7 +4921,7 @@ impl IBDA_EthernetFilter { (::windows_core::Interface::vtable(self).GetMulticastListSize)(::windows_core::Interface::as_raw(self), pulcbaddresses).ok() } pub unsafe fn PutMulticastList(&self, paddresslist: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).PutMulticastList)(::windows_core::Interface::as_raw(self), paddresslist.len() as _, ::core::mem::transmute(paddresslist.as_ptr())).ok() + (::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<()> { (::windows_core::Interface::vtable(self).GetMulticastList)(::windows_core::Interface::as_raw(self), pulcbaddresses, paddresslist).ok() @@ -5215,7 +5215,7 @@ impl IBDA_IPV4Filter { (::windows_core::Interface::vtable(self).GetMulticastListSize)(::windows_core::Interface::as_raw(self), pulcbaddresses).ok() } pub unsafe fn PutMulticastList(&self, paddresslist: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).PutMulticastList)(::windows_core::Interface::as_raw(self), paddresslist.len() as _, ::core::mem::transmute(paddresslist.as_ptr())).ok() + (::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<()> { (::windows_core::Interface::vtable(self).GetMulticastList)(::windows_core::Interface::as_raw(self), pulcbaddresses, paddresslist).ok() @@ -5253,7 +5253,7 @@ impl IBDA_IPV6Filter { (::windows_core::Interface::vtable(self).GetMulticastListSize)(::windows_core::Interface::as_raw(self), pulcbaddresses).ok() } pub unsafe fn PutMulticastList(&self, paddresslist: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).PutMulticastList)(::windows_core::Interface::as_raw(self), paddresslist.len() as _, ::core::mem::transmute(paddresslist.as_ptr())).ok() + (::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<()> { (::windows_core::Interface::vtable(self).GetMulticastList)(::windows_core::Interface::as_raw(self), pulcbaddresses, paddresslist).ok() @@ -5288,7 +5288,7 @@ pub struct IBDA_IPV6Filter_Vtbl { pub struct IBDA_ISDBConditionalAccess(::windows_core::IUnknown); impl IBDA_ISDBConditionalAccess { pub unsafe fn SetIsdbCasRequest(&self, ulrequestid: u32, pbrequestbuffer: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetIsdbCasRequest)(::windows_core::Interface::as_raw(self), ulrequestid, pbrequestbuffer.len() as _, ::core::mem::transmute(pbrequestbuffer.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetIsdbCasRequest)(::windows_core::Interface::as_raw(self), ulrequestid, pbrequestbuffer.len().try_into().unwrap(), ::core::mem::transmute(pbrequestbuffer.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IBDA_ISDBConditionalAccess, ::windows_core::IUnknown); @@ -5350,7 +5350,7 @@ pub struct IBDA_LNBInfo_Vtbl { pub struct IBDA_MUX(::windows_core::IUnknown); impl IBDA_MUX { pub unsafe fn SetPidList(&self, pbpidlistbuffer: &[BDA_MUX_PIDLISTITEM]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetPidList)(::windows_core::Interface::as_raw(self), pbpidlistbuffer.len() as _, ::core::mem::transmute(pbpidlistbuffer.as_ptr())).ok() + (::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<()> { (::windows_core::Interface::vtable(self).GetPidList)(::windows_core::Interface::as_raw(self), pulpidlistcount, pbpidlistbuffer).ok() @@ -5631,19 +5631,19 @@ pub struct IBDA_SignalStatistics_Vtbl { pub struct IBDA_Topology(::windows_core::IUnknown); impl IBDA_Topology { pub unsafe fn GetNodeTypes(&self, pulcnodetypes: *mut u32, rgulnodetypes: &mut [u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNodeTypes)(::windows_core::Interface::as_raw(self), pulcnodetypes, rgulnodetypes.len() as _, ::core::mem::transmute(rgulnodetypes.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetNodeTypes)(::windows_core::Interface::as_raw(self), pulcnodetypes, 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<()> { - (::windows_core::Interface::vtable(self).GetNodeDescriptors)(::windows_core::Interface::as_raw(self), ulcnodedescriptors, rgnodedescriptors.len() as _, ::core::mem::transmute(rgnodedescriptors.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetNodeDescriptors)(::windows_core::Interface::as_raw(self), ulcnodedescriptors, 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<()> { - (::windows_core::Interface::vtable(self).GetNodeInterfaces)(::windows_core::Interface::as_raw(self), ulnodetype, pulcinterfaces, rgguidinterfaces.len() as _, ::core::mem::transmute(rgguidinterfaces.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetNodeInterfaces)(::windows_core::Interface::as_raw(self), ulnodetype, pulcinterfaces, 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<()> { - (::windows_core::Interface::vtable(self).GetPinTypes)(::windows_core::Interface::as_raw(self), pulcpintypes, rgulpintypes.len() as _, ::core::mem::transmute(rgulpintypes.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetPinTypes)(::windows_core::Interface::as_raw(self), pulcpintypes, 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<()> { - (::windows_core::Interface::vtable(self).GetTemplateConnections)(::windows_core::Interface::as_raw(self), pulcconnections, rgconnections.len() as _, ::core::mem::transmute(rgconnections.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetTemplateConnections)(::windows_core::Interface::as_raw(self), pulcconnections, 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<()> { (::windows_core::Interface::vtable(self).CreatePin)(::windows_core::Interface::as_raw(self), ulpintype, pulpinid).ok() @@ -5802,13 +5802,13 @@ impl IBDA_WMDRMSession { (::windows_core::Interface::vtable(self).GetStatus)(::windows_core::Interface::as_raw(self), maxcapturetoken, maxstreamingpid, maxlicense, minsecuritylevel, revinfosequencenumber, revinfoissuedtime, revinfottl, revlistversion, ulstate).ok() } pub unsafe fn SetRevInfo(&self, pbrevinfo: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetRevInfo)(::windows_core::Interface::as_raw(self), pbrevinfo.len() as _, ::core::mem::transmute(pbrevinfo.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetRevInfo)(::windows_core::Interface::as_raw(self), pbrevinfo.len().try_into().unwrap(), ::core::mem::transmute(pbrevinfo.as_ptr())).ok() } pub unsafe fn SetCrl(&self, pbcrllen: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetCrl)(::windows_core::Interface::as_raw(self), pbcrllen.len() as _, ::core::mem::transmute(pbcrllen.as_ptr())).ok() + (::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<()> { - (::windows_core::Interface::vtable(self).TransactMessage)(::windows_core::Interface::as_raw(self), pbrequest.len() as _, ::core::mem::transmute(pbrequest.as_ptr()), pulcbresponse, pbresponse).ok() + (::windows_core::Interface::vtable(self).TransactMessage)(::windows_core::Interface::as_raw(self), pbrequest.len().try_into().unwrap(), ::core::mem::transmute(pbrequest.as_ptr()), pulcbresponse, pbresponse).ok() } pub unsafe fn GetLicense(&self, uuidkey: *const ::windows_core::GUID, pulpackagelen: *mut u32, pbpackage: *mut u8) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetLicense)(::windows_core::Interface::as_raw(self), uuidkey, pulpackagelen, pbpackage).ok() @@ -5817,7 +5817,7 @@ impl IBDA_WMDRMSession { (::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<()> { - (::windows_core::Interface::vtable(self).RenewLicense)(::windows_core::Interface::as_raw(self), pbinxmrlicense.len() as _, ::core::mem::transmute(pbinxmrlicense.as_ptr()), pbentitlementtoken.len() as _, ::core::mem::transmute(pbentitlementtoken.as_ptr()), puldescramblestatus, puloutxmrlicenselen, pboutxmrlicense).ok() + (::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, puloutxmrlicenselen, pboutxmrlicense).ok() } pub unsafe fn GetKeyInfo(&self, pulkeyinfolen: *mut u32, pbkeyinfo: *mut u8) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetKeyInfo)(::windows_core::Interface::as_raw(self), pulkeyinfolen, pbkeyinfo).ok() @@ -5851,10 +5851,10 @@ impl IBDA_WMDRMTuner { where P0: ::windows_core::IntoParam<::windows_core::BSTR>, { - (::windows_core::Interface::vtable(self).PurchaseEntitlement)(::windows_core::Interface::as_raw(self), uldialogrequest, bstrlanguage.into_param().abi(), pbpurchasetoken.len() as _, ::core::mem::transmute(pbpurchasetoken.as_ptr()), puldescramblestatus, pulcapturetokenlen, pbcapturetoken).ok() + (::windows_core::Interface::vtable(self).PurchaseEntitlement)(::windows_core::Interface::as_raw(self), uldialogrequest, bstrlanguage.into_param().abi(), pbpurchasetoken.len().try_into().unwrap(), ::core::mem::transmute(pbpurchasetoken.as_ptr()), puldescramblestatus, pulcapturetokenlen, pbcapturetoken).ok() } pub unsafe fn CancelCaptureToken(&self, pbcapturetoken: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).CancelCaptureToken)(::windows_core::Interface::as_raw(self), pbcapturetoken.len() as _, ::core::mem::transmute(pbcapturetoken.as_ptr())).ok() + (::windows_core::Interface::vtable(self).CancelCaptureToken)(::windows_core::Interface::as_raw(self), pbcapturetoken.len().try_into().unwrap(), ::core::mem::transmute(pbcapturetoken.as_ptr())).ok() } pub unsafe fn SetPidProtection(&self, ulpid: u32, uuidkey: *const ::windows_core::GUID) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).SetPidProtection)(::windows_core::Interface::as_raw(self), ulpid, uuidkey).ok() @@ -8513,7 +8513,7 @@ impl IDvdInfo { (::windows_core::Interface::vtable(self).GetCurrentVolumeInfo)(::windows_core::Interface::as_raw(self), pulnumofvol, pulthisvolnum, pside, pulnumoftitles).ok() } pub unsafe fn GetDVDTextInfo(&self, ptextmanager: &mut [u8], pulactualsize: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDVDTextInfo)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ptextmanager.as_ptr()), ptextmanager.len() as _, pulactualsize).ok() + (::windows_core::Interface::vtable(self).GetDVDTextInfo)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ptextmanager.as_ptr()), ptextmanager.len().try_into().unwrap(), pulactualsize).ok() } pub unsafe fn GetPlayerParentalLevel(&self, pulparentallevel: *mut u32, pulcountrycode: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetPlayerParentalLevel)(::windows_core::Interface::as_raw(self), pulparentallevel, pulcountrycode).ok() @@ -8527,7 +8527,7 @@ impl IDvdInfo { (::windows_core::Interface::vtable(self).GetTitleParentalLevels)(::windows_core::Interface::as_raw(self), ultitle, &mut result__).from_abi(result__) } pub unsafe fn GetRoot(&self, proot: &mut [u8], pulactualsize: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetRoot)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(proot.as_ptr()), proot.len() as _, pulactualsize).ok() + (::windows_core::Interface::vtable(self).GetRoot)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(proot.as_ptr()), proot.len().try_into().unwrap(), pulactualsize).ok() } } ::windows_core::imp::interface_hierarchy!(IDvdInfo, ::windows_core::IUnknown); @@ -8674,7 +8674,7 @@ impl IDvdInfo2 { (::windows_core::Interface::vtable(self).GetTitleParentalLevels)(::windows_core::Interface::as_raw(self), ultitle, &mut result__).from_abi(result__) } pub unsafe fn GetDVDDirectory(&self, pszwpath: &mut [u16], pulactualsize: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDVDDirectory)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszwpath.as_ptr()), pszwpath.len() as _, pulactualsize).ok() + (::windows_core::Interface::vtable(self).GetDVDDirectory)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszwpath.as_ptr()), pszwpath.len().try_into().unwrap(), pulactualsize).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -8989,7 +8989,7 @@ impl IEnumFilters { #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, ppfilter: &mut [::core::option::Option], pcfetched: ::core::option::Option<*mut u32>) -> ::windows_core::HRESULT { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppfilter.len() as _, ::core::mem::transmute(ppfilter.as_ptr()), ::core::mem::transmute(pcfetched.unwrap_or(::std::ptr::null_mut()))) + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppfilter.len().try_into().unwrap(), ::core::mem::transmute(ppfilter.as_ptr()), ::core::mem::transmute(pcfetched.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn Skip(&self, cfilters: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), cfilters).ok() @@ -9028,7 +9028,7 @@ impl IEnumMediaTypes { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Media_MediaFoundation\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Media_MediaFoundation"))] pub unsafe fn Next(&self, ppmediatypes: &mut [*mut super::MediaFoundation::AM_MEDIA_TYPE], pcfetched: ::core::option::Option<*mut u32>) -> ::windows_core::HRESULT { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppmediatypes.len() as _, ::core::mem::transmute(ppmediatypes.as_ptr()), ::core::mem::transmute(pcfetched.unwrap_or(::std::ptr::null_mut()))) + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppmediatypes.len().try_into().unwrap(), ::core::mem::transmute(ppmediatypes.as_ptr()), ::core::mem::transmute(pcfetched.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn Skip(&self, cmediatypes: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), cmediatypes).ok() @@ -9065,7 +9065,7 @@ pub struct IEnumMediaTypes_Vtbl { pub struct IEnumPIDMap(::windows_core::IUnknown); impl IEnumPIDMap { pub unsafe fn Next(&self, ppidmap: &mut [PID_MAP], pcreceived: *mut u32) -> ::windows_core::HRESULT { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppidmap.len() as _, ::core::mem::transmute(ppidmap.as_ptr()), pcreceived) + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppidmap.len().try_into().unwrap(), ::core::mem::transmute(ppidmap.as_ptr()), pcreceived) } pub unsafe fn Skip(&self, crecords: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), crecords).ok() @@ -9099,7 +9099,7 @@ pub struct IEnumPIDMap_Vtbl { pub struct IEnumPins(::windows_core::IUnknown); impl IEnumPins { pub unsafe fn Next(&self, pppins: &mut [::core::option::Option], pcfetched: ::core::option::Option<*mut u32>) -> ::windows_core::HRESULT { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), pppins.len() as _, ::core::mem::transmute(pppins.as_ptr()), ::core::mem::transmute(pcfetched.unwrap_or(::std::ptr::null_mut()))) + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), pppins.len().try_into().unwrap(), ::core::mem::transmute(pppins.as_ptr()), ::core::mem::transmute(pcfetched.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn Skip(&self, cpins: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), cpins).ok() @@ -9133,7 +9133,7 @@ pub struct IEnumPins_Vtbl { pub struct IEnumRegFilters(::windows_core::IUnknown); impl IEnumRegFilters { pub unsafe fn Next(&self, apregfilter: &mut [*mut REGFILTER], pcfetched: ::core::option::Option<*mut u32>) -> ::windows_core::HRESULT { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), apregfilter.len() as _, ::core::mem::transmute(apregfilter.as_ptr()), ::core::mem::transmute(pcfetched.unwrap_or(::std::ptr::null_mut()))) + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), apregfilter.len().try_into().unwrap(), ::core::mem::transmute(apregfilter.as_ptr()), ::core::mem::transmute(pcfetched.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn Skip(&self, cfilters: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), cfilters).ok() @@ -9167,7 +9167,7 @@ pub struct IEnumRegFilters_Vtbl { pub struct IEnumStreamIdMap(::windows_core::IUnknown); impl IEnumStreamIdMap { pub unsafe fn Next(&self, pstreamidmap: &mut [STREAM_ID_MAP], pcreceived: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), pstreamidmap.len() as _, ::core::mem::transmute(pstreamidmap.as_ptr()), ::core::mem::transmute(pcreceived.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), pstreamidmap.len().try_into().unwrap(), ::core::mem::transmute(pstreamidmap.as_ptr()), ::core::mem::transmute(pcreceived.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Skip(&self, crecords: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), crecords).ok() @@ -10085,7 +10085,7 @@ impl IFrequencyMap { (::windows_core::Interface::vtable(self).get_FrequencyMapping)(::windows_core::Interface::as_raw(self), ulcount, ppullist).ok() } pub unsafe fn put_FrequencyMapping(&self, plist: &[u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).put_FrequencyMapping)(::windows_core::Interface::as_raw(self), plist.len() as _, ::core::mem::transmute(plist.as_ptr())).ok() + (::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() } pub unsafe fn CountryCode(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -10725,7 +10725,7 @@ impl IMPEG2StreamIdMap { (::windows_core::Interface::vtable(self).MapStreamId)(::windows_core::Interface::as_raw(self), ulstreamid, mediasamplecontent, ulsubstreamfiltervalue, idataoffset).ok() } pub unsafe fn UnmapStreamId(&self, pulstreamid: &[u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).UnmapStreamId)(::windows_core::Interface::as_raw(self), pulstreamid.len() as _, ::core::mem::transmute(pulstreamid.as_ptr())).ok() + (::windows_core::Interface::vtable(self).UnmapStreamId)(::windows_core::Interface::as_raw(self), pulstreamid.len().try_into().unwrap(), ::core::mem::transmute(pulstreamid.as_ptr())).ok() } pub unsafe fn EnumStreamIdMap(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -11418,10 +11418,10 @@ impl IMediaSample2 { (::windows_core::Interface::vtable(self).base__.SetMediaTime)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ptimestart.unwrap_or(::std::ptr::null())), ::core::mem::transmute(ptimeend.unwrap_or(::std::ptr::null()))).ok() } pub unsafe fn GetProperties(&self, pbproperties: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetProperties)(::windows_core::Interface::as_raw(self), pbproperties.len() as _, ::core::mem::transmute(pbproperties.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetProperties)(::windows_core::Interface::as_raw(self), pbproperties.len().try_into().unwrap(), ::core::mem::transmute(pbproperties.as_ptr())).ok() } pub unsafe fn SetProperties(&self, pbproperties: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetProperties)(::windows_core::Interface::as_raw(self), pbproperties.len() as _, ::core::mem::transmute(pbproperties.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetProperties)(::windows_core::Interface::as_raw(self), pbproperties.len().try_into().unwrap(), ::core::mem::transmute(pbproperties.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IMediaSample2, ::windows_core::IUnknown, IMediaSample); @@ -11921,7 +11921,7 @@ impl IMemInputPin { } pub unsafe fn ReceiveMultiple(&self, psamples: &[::core::option::Option]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).ReceiveMultiple)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(psamples.as_ptr()), psamples.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).ReceiveMultiple)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(psamples.as_ptr()), psamples.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn ReceiveCanBlock(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).ReceiveCanBlock)(::windows_core::Interface::as_raw(self)).ok() @@ -12451,7 +12451,7 @@ impl IOverlay { #[doc = "Required features: `\"Win32_Graphics_Gdi\"`"] #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn SetPalette(&self, ppalette: &[super::super::Graphics::Gdi::PALETTEENTRY]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetPalette)(::windows_core::Interface::as_raw(self), ppalette.len() as _, ::core::mem::transmute(ppalette.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetPalette)(::windows_core::Interface::as_raw(self), ppalette.len().try_into().unwrap(), ::core::mem::transmute(ppalette.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -13233,7 +13233,7 @@ impl IResourceManager { P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).RegisterGroup)(::windows_core::Interface::as_raw(self), pname.into_param().abi(), paltokens.len() as _, ::core::mem::transmute(paltokens.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).RegisterGroup)(::windows_core::Interface::as_raw(self), pname.into_param().abi(), paltokens.len().try_into().unwrap(), ::core::mem::transmute(paltokens.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn RequestResource(&self, idresource: i32, pfocusobject: P0, pconsumer: P1) -> ::windows_core::Result<()> where @@ -14282,7 +14282,7 @@ impl IVMRMonitorConfig { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] pub unsafe fn GetAvailableMonitors(&self, pinfo: &mut [VMRMONITORINFO], pdwnumdevices: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetAvailableMonitors)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pinfo.as_ptr()), pinfo.len() as _, pdwnumdevices).ok() + (::windows_core::Interface::vtable(self).GetAvailableMonitors)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pinfo.as_ptr()), pinfo.len().try_into().unwrap(), pdwnumdevices).ok() } } ::windows_core::imp::interface_hierarchy!(IVMRMonitorConfig, ::windows_core::IUnknown); @@ -14326,7 +14326,7 @@ impl IVMRMonitorConfig9 { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] pub unsafe fn GetAvailableMonitors(&self, pinfo: &mut [VMR9MonitorInfo], pdwnumdevices: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetAvailableMonitors)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pinfo.as_ptr()), pinfo.len() as _, pdwnumdevices).ok() + (::windows_core::Interface::vtable(self).GetAvailableMonitors)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pinfo.as_ptr()), pinfo.len().try_into().unwrap(), pdwnumdevices).ok() } } ::windows_core::imp::interface_hierarchy!(IVMRMonitorConfig9, ::windows_core::IUnknown); 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 076ed06435..695b87a1cd 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/DxMediaObjects/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/DxMediaObjects/mod.rs @@ -280,7 +280,7 @@ impl IMediaObject { (::windows_core::Interface::vtable(self).ProcessInput)(::windows_core::Interface::as_raw(self), dwinputstreamindex, pbuffer.into_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<()> { - (::windows_core::Interface::vtable(self).ProcessOutput)(::windows_core::Interface::as_raw(self), dwflags, poutputbuffers.len() as _, ::core::mem::transmute(poutputbuffers.as_ptr()), pdwstatus).ok() + (::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).ok() } pub unsafe fn Lock(&self, block: i32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Lock)(::windows_core::Interface::as_raw(self), block).ok() @@ -342,7 +342,7 @@ pub struct IMediaObject_Vtbl { pub struct IMediaObjectInPlace(::windows_core::IUnknown); impl IMediaObjectInPlace { pub unsafe fn Process(&self, pdata: &mut [u8], reftimestart: i64, dwflags: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Process)(::windows_core::Interface::as_raw(self), pdata.len() as _, ::core::mem::transmute(pdata.as_ptr()), reftimestart, dwflags).ok() + (::windows_core::Interface::vtable(self).Process)(::windows_core::Interface::as_raw(self), pdata.len().try_into().unwrap(), ::core::mem::transmute(pdata.as_ptr()), reftimestart, dwflags).ok() } pub unsafe fn Clone(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Win32/Media/MediaFoundation/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/MediaFoundation/mod.rs index be16d235fc..105352470b 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/MediaFoundation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/MediaFoundation/mod.rs @@ -765,7 +765,7 @@ pub unsafe fn MFCreatePresentationClock() -> ::windows_core::Result]>) -> ::windows_core::Result { ::windows_targets::link!("mfplat.dll" "system" fn MFCreatePresentationDescriptor(cstreamdescriptors : u32, apstreamdescriptors : *const * mut::core::ffi::c_void, pppresentationdescriptor : *mut * mut::core::ffi::c_void) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - MFCreatePresentationDescriptor(apstreamdescriptors.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(apstreamdescriptors.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), &mut result__).from_abi(result__) + MFCreatePresentationDescriptor(apstreamdescriptors.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(apstreamdescriptors.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), &mut result__).from_abi(result__) } #[inline] pub unsafe fn MFCreatePresentationDescriptorFromASFProfile(piprofile: P0) -> ::windows_core::Result @@ -973,7 +973,7 @@ pub unsafe fn MFCreateStandardQualityManager() -> ::windows_core::Result]) -> ::windows_core::Result { ::windows_targets::link!("mfplat.dll" "system" fn MFCreateStreamDescriptor(dwstreamidentifier : u32, cmediatypes : u32, apmediatypes : *const * mut::core::ffi::c_void, ppdescriptor : *mut * mut::core::ffi::c_void) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - MFCreateStreamDescriptor(dwstreamidentifier, apmediatypes.len() as _, ::core::mem::transmute(apmediatypes.as_ptr()), &mut result__).from_abi(result__) + MFCreateStreamDescriptor(dwstreamidentifier, apmediatypes.len().try_into().unwrap(), ::core::mem::transmute(apmediatypes.as_ptr()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -1168,7 +1168,7 @@ where { ::windows_targets::link!("mfsensorgroup.dll" "system" fn MFCreateVirtualCamera(r#type : MFVirtualCameraType, lifetime : MFVirtualCameraLifetime, access : MFVirtualCameraAccess, friendlyname : ::windows_core::PCWSTR, sourceid : ::windows_core::PCWSTR, categories : *const ::windows_core::GUID, categorycount : u32, virtualcamera : *mut * mut::core::ffi::c_void) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - MFCreateVirtualCamera(r#type, lifetime, access, friendlyname.into_param().abi(), sourceid.into_param().abi(), ::core::mem::transmute(categories.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), categories.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + MFCreateVirtualCamera(r#type, lifetime, access, friendlyname.into_param().abi(), sourceid.into_param().abi(), ::core::mem::transmute(categories.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), categories.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } #[inline] pub unsafe fn MFCreateWAVEMediaSink(ptargetbytestream: P0, paudiomediatype: P1) -> ::windows_core::Result @@ -1238,7 +1238,7 @@ where pub unsafe fn MFDeserializePresentationDescriptor(pbdata: &[u8]) -> ::windows_core::Result { ::windows_targets::link!("mfplat.dll" "system" fn MFDeserializePresentationDescriptor(cbdata : u32, pbdata : *const u8, pppd : *mut * mut::core::ffi::c_void) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - MFDeserializePresentationDescriptor(pbdata.len() as _, ::core::mem::transmute(pbdata.as_ptr()), &mut result__).from_abi(result__) + MFDeserializePresentationDescriptor(pbdata.len().try_into().unwrap(), ::core::mem::transmute(pbdata.as_ptr()), &mut result__).from_abi(result__) } #[inline] pub unsafe fn MFEndCreateFile(presult: P0) -> ::windows_core::Result @@ -1286,7 +1286,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("mfplat.dll" "system" fn MFGetAttributesAsBlob(pattributes : * mut::core::ffi::c_void, pbuf : *mut u8, cbbufsize : u32) -> ::windows_core::HRESULT); - MFGetAttributesAsBlob(pattributes.into_param().abi(), ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _).ok() + MFGetAttributesAsBlob(pattributes.into_param().abi(), ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap()).ok() } #[inline] pub unsafe fn MFGetAttributesAsBlobSize(pattributes: P0) -> ::windows_core::Result @@ -1307,7 +1307,7 @@ pub unsafe fn MFGetContentProtectionSystemCLSID(guidprotectionsystemid: *const : pub unsafe fn MFGetLocalId(verifier: &[u8]) -> ::windows_core::Result<::windows_core::PWSTR> { ::windows_targets::link!("mf.dll" "system" fn MFGetLocalId(verifier : *const u8, size : u32, id : *mut ::windows_core::PWSTR) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - MFGetLocalId(::core::mem::transmute(verifier.as_ptr()), verifier.len() as _, &mut result__).from_abi(result__) + MFGetLocalId(::core::mem::transmute(verifier.as_ptr()), verifier.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[inline] pub unsafe fn MFGetMFTMerit(pmft: P0, verifier: &[u8]) -> ::windows_core::Result @@ -1316,7 +1316,7 @@ where { ::windows_targets::link!("mfplat.dll" "system" fn MFGetMFTMerit(pmft : * mut::core::ffi::c_void, cbverifier : u32, verifier : *const u8, merit : *mut u32) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - MFGetMFTMerit(pmft.into_param().abi(), verifier.len() as _, ::core::mem::transmute(verifier.as_ptr()), &mut result__).from_abi(result__) + MFGetMFTMerit(pmft.into_param().abi(), verifier.len().try_into().unwrap(), ::core::mem::transmute(verifier.as_ptr()), &mut result__).from_abi(result__) } #[inline] pub unsafe fn MFGetPlaneSize(format: u32, dwwidth: u32, dwheight: u32) -> ::windows_core::Result { @@ -1442,7 +1442,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("mfplat.dll" "system" fn MFInitAttributesFromBlob(pattributes : * mut::core::ffi::c_void, pbuf : *const u8, cbbufsize : u32) -> ::windows_core::HRESULT); - MFInitAttributesFromBlob(pattributes.into_param().abi(), ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _).ok() + MFInitAttributesFromBlob(pattributes.into_param().abi(), ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1758,7 +1758,7 @@ where P0: ::windows_core::IntoParam, { ::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); - MFSplitSample(psample.into_param().abi(), ::core::mem::transmute(poutputsamples.as_ptr()), poutputsamples.len() as _, pdwoutputsamplecount).ok() + MFSplitSample(psample.into_param().abi(), ::core::mem::transmute(poutputsamples.as_ptr()), poutputsamples.len().try_into().unwrap(), pdwoutputsamplecount).ok() } #[inline] pub unsafe fn MFStartup(version: u32, dwflags: u32) -> ::windows_core::Result<()> { @@ -1798,7 +1798,18 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("mfplat.dll" "system" fn MFTRegister(clsidmft : ::windows_core::GUID, guidcategory : ::windows_core::GUID, pszname : ::windows_core::PCWSTR, flags : u32, cinputtypes : u32, pinputtypes : *const MFT_REGISTER_TYPE_INFO, coutputtypes : u32, poutputtypes : *const MFT_REGISTER_TYPE_INFO, pattributes : * mut::core::ffi::c_void) -> ::windows_core::HRESULT); - MFTRegister(::core::mem::transmute(clsidmft), ::core::mem::transmute(guidcategory), pszname.into_param().abi(), flags, pinputtypes.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pinputtypes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), poutputtypes.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(poutputtypes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pattributes.into_param().abi()).ok() + MFTRegister( + ::core::mem::transmute(clsidmft), + ::core::mem::transmute(guidcategory), + pszname.into_param().abi(), + flags, + pinputtypes.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), + ::core::mem::transmute(pinputtypes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), + poutputtypes.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), + ::core::mem::transmute(poutputtypes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), + pattributes.into_param().abi(), + ) + .ok() } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -1809,7 +1820,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("mfplat.dll" "system" fn MFTRegisterLocal(pclassfactory : * mut::core::ffi::c_void, guidcategory : *const ::windows_core::GUID, pszname : ::windows_core::PCWSTR, flags : u32, cinputtypes : u32, pinputtypes : *const MFT_REGISTER_TYPE_INFO, coutputtypes : u32, poutputtypes : *const MFT_REGISTER_TYPE_INFO) -> ::windows_core::HRESULT); - MFTRegisterLocal(pclassfactory.into_param().abi(), guidcategory, pszname.into_param().abi(), flags, pinputtypes.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pinputtypes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), poutputtypes.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(poutputtypes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + MFTRegisterLocal(pclassfactory.into_param().abi(), guidcategory, pszname.into_param().abi(), flags, pinputtypes.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pinputtypes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), poutputtypes.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(poutputtypes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() } #[inline] pub unsafe fn MFTRegisterLocalByCLSID(clisdmft: *const ::windows_core::GUID, guidcategory: *const ::windows_core::GUID, pszname: P0, flags: u32, pinputtypes: ::core::option::Option<&[MFT_REGISTER_TYPE_INFO]>, poutputtypes: ::core::option::Option<&[MFT_REGISTER_TYPE_INFO]>) -> ::windows_core::Result<()> @@ -1817,7 +1828,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("mfplat.dll" "system" fn MFTRegisterLocalByCLSID(clisdmft : *const ::windows_core::GUID, guidcategory : *const ::windows_core::GUID, pszname : ::windows_core::PCWSTR, flags : u32, cinputtypes : u32, pinputtypes : *const MFT_REGISTER_TYPE_INFO, coutputtypes : u32, poutputtypes : *const MFT_REGISTER_TYPE_INFO) -> ::windows_core::HRESULT); - MFTRegisterLocalByCLSID(clisdmft, guidcategory, pszname.into_param().abi(), flags, pinputtypes.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pinputtypes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), poutputtypes.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(poutputtypes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + MFTRegisterLocalByCLSID(clisdmft, guidcategory, pszname.into_param().abi(), flags, pinputtypes.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pinputtypes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), poutputtypes.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(poutputtypes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() } #[inline] pub unsafe fn MFTUnregister(clsidmft: ::windows_core::GUID) -> ::windows_core::Result<()> { @@ -1880,7 +1891,7 @@ where #[inline] pub unsafe fn MFValidateMediaTypeSize(formattype: ::windows_core::GUID, pblock: ::core::option::Option<&[u8]>) -> ::windows_core::Result<()> { ::windows_targets::link!("mfplat.dll" "system" fn MFValidateMediaTypeSize(formattype : ::windows_core::GUID, pblock : *const u8, cbsize : u32) -> ::windows_core::HRESULT); - MFValidateMediaTypeSize(::core::mem::transmute(formattype), ::core::mem::transmute(pblock.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pblock.as_deref().map_or(0, |slice| slice.len() as _)).ok() + MFValidateMediaTypeSize(::core::mem::transmute(formattype), ::core::mem::transmute(pblock.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pblock.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } #[inline] pub unsafe fn MFWrapMediaType(porig: P0, majortype: *const ::windows_core::GUID, subtype: *const ::windows_core::GUID) -> ::windows_core::Result @@ -2253,7 +2264,7 @@ impl ID3D12VideoDecodeCommandList { #[doc = "Required features: `\"Win32_Graphics_Direct3D12\"`"] #[cfg(feature = "Win32_Graphics_Direct3D12")] pub unsafe fn ResourceBarrier(&self, pbarriers: &[super::super::Graphics::Direct3D12::D3D12_RESOURCE_BARRIER]) { - (::windows_core::Interface::vtable(self).ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len() as _, ::core::mem::transmute(pbarriers.as_ptr())) + (::windows_core::Interface::vtable(self).ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len().try_into().unwrap(), ::core::mem::transmute(pbarriers.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D12\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12"))] @@ -2443,7 +2454,7 @@ impl ID3D12VideoDecodeCommandList1 { #[doc = "Required features: `\"Win32_Graphics_Direct3D12\"`"] #[cfg(feature = "Win32_Graphics_Direct3D12")] pub unsafe fn ResourceBarrier(&self, pbarriers: &[super::super::Graphics::Direct3D12::D3D12_RESOURCE_BARRIER]) { - (::windows_core::Interface::vtable(self).base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len() as _, ::core::mem::transmute(pbarriers.as_ptr())) + (::windows_core::Interface::vtable(self).base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len().try_into().unwrap(), ::core::mem::transmute(pbarriers.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D12\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12"))] @@ -2604,7 +2615,7 @@ impl ID3D12VideoDecodeCommandList2 { #[doc = "Required features: `\"Win32_Graphics_Direct3D12\"`"] #[cfg(feature = "Win32_Graphics_Direct3D12")] pub unsafe fn ResourceBarrier(&self, pbarriers: &[super::super::Graphics::Direct3D12::D3D12_RESOURCE_BARRIER]) { - (::windows_core::Interface::vtable(self).base__.base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len() as _, ::core::mem::transmute(pbarriers.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len().try_into().unwrap(), ::core::mem::transmute(pbarriers.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D12\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12"))] @@ -2797,7 +2808,7 @@ impl ID3D12VideoDecodeCommandList3 { #[doc = "Required features: `\"Win32_Graphics_Direct3D12\"`"] #[cfg(feature = "Win32_Graphics_Direct3D12")] pub unsafe fn ResourceBarrier(&self, pbarriers: &[super::super::Graphics::Direct3D12::D3D12_RESOURCE_BARRIER]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len() as _, ::core::mem::transmute(pbarriers.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len().try_into().unwrap(), ::core::mem::transmute(pbarriers.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D12\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12"))] @@ -2897,7 +2908,7 @@ impl ID3D12VideoDecodeCommandList3 { #[doc = "Required features: `\"Win32_Graphics_Direct3D12\"`"] #[cfg(feature = "Win32_Graphics_Direct3D12")] pub unsafe fn Barrier(&self, pbarriergroups: &[super::super::Graphics::Direct3D12::D3D12_BARRIER_GROUP]) { - (::windows_core::Interface::vtable(self).Barrier)(::windows_core::Interface::as_raw(self), pbarriergroups.len() as _, ::core::mem::transmute(pbarriergroups.as_ptr())) + (::windows_core::Interface::vtable(self).Barrier)(::windows_core::Interface::as_raw(self), pbarriergroups.len().try_into().unwrap(), ::core::mem::transmute(pbarriergroups.as_ptr())) } } #[cfg(feature = "Win32_Graphics_Direct3D12")] @@ -3245,7 +3256,7 @@ impl ID3D12VideoDevice { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).CreateVideoProcessor)(::windows_core::Interface::as_raw(self), nodemask, poutputstreamdesc, pinputstreamdescs.len() as _, ::core::mem::transmute(pinputstreamdescs.as_ptr()), &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateVideoProcessor)(::windows_core::Interface::as_raw(self), nodemask, poutputstreamdesc, pinputstreamdescs.len().try_into().unwrap(), ::core::mem::transmute(pinputstreamdescs.as_ptr()), &::IID, &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(ID3D12VideoDevice, ::windows_core::IUnknown); @@ -3302,7 +3313,7 @@ impl ID3D12VideoDevice1 { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).base__.CreateVideoProcessor)(::windows_core::Interface::as_raw(self), nodemask, poutputstreamdesc, pinputstreamdescs.len() as _, ::core::mem::transmute(pinputstreamdescs.as_ptr()), &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateVideoProcessor)(::windows_core::Interface::as_raw(self), nodemask, poutputstreamdesc, pinputstreamdescs.len().try_into().unwrap(), ::core::mem::transmute(pinputstreamdescs.as_ptr()), &::IID, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Graphics_Direct3D12\"`, `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))] @@ -3377,7 +3388,7 @@ impl ID3D12VideoDevice2 { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).base__.base__.CreateVideoProcessor)(::windows_core::Interface::as_raw(self), nodemask, poutputstreamdesc, pinputstreamdescs.len() as _, ::core::mem::transmute(pinputstreamdescs.as_ptr()), &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.CreateVideoProcessor)(::windows_core::Interface::as_raw(self), nodemask, poutputstreamdesc, pinputstreamdescs.len().try_into().unwrap(), ::core::mem::transmute(pinputstreamdescs.as_ptr()), &::IID, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Graphics_Direct3D12\"`, `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))] @@ -3427,7 +3438,7 @@ impl ID3D12VideoDevice2 { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).CreateVideoProcessor1)(::windows_core::Interface::as_raw(self), nodemask, poutputstreamdesc, pinputstreamdescs.len() as _, ::core::mem::transmute(pinputstreamdescs.as_ptr()), pprotectedresourcesession.into_param().abi(), &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateVideoProcessor1)(::windows_core::Interface::as_raw(self), nodemask, poutputstreamdesc, pinputstreamdescs.len().try_into().unwrap(), ::core::mem::transmute(pinputstreamdescs.as_ptr()), pprotectedresourcesession.into_param().abi(), &::IID, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Graphics_Direct3D12\"`"] #[cfg(feature = "Win32_Graphics_Direct3D12")] @@ -3512,7 +3523,7 @@ impl ID3D12VideoDevice3 { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).base__.base__.base__.CreateVideoProcessor)(::windows_core::Interface::as_raw(self), nodemask, poutputstreamdesc, pinputstreamdescs.len() as _, ::core::mem::transmute(pinputstreamdescs.as_ptr()), &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.CreateVideoProcessor)(::windows_core::Interface::as_raw(self), nodemask, poutputstreamdesc, pinputstreamdescs.len().try_into().unwrap(), ::core::mem::transmute(pinputstreamdescs.as_ptr()), &::IID, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Graphics_Direct3D12\"`, `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(all(feature = "Win32_Graphics_Direct3D12", feature = "Win32_Graphics_Dxgi_Common"))] @@ -3562,7 +3573,7 @@ impl ID3D12VideoDevice3 { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).base__.CreateVideoProcessor1)(::windows_core::Interface::as_raw(self), nodemask, poutputstreamdesc, pinputstreamdescs.len() as _, ::core::mem::transmute(pinputstreamdescs.as_ptr()), pprotectedresourcesession.into_param().abi(), &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateVideoProcessor1)(::windows_core::Interface::as_raw(self), nodemask, poutputstreamdesc, pinputstreamdescs.len().try_into().unwrap(), ::core::mem::transmute(pinputstreamdescs.as_ptr()), pprotectedresourcesession.into_param().abi(), &::IID, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Graphics_Direct3D12\"`"] #[cfg(feature = "Win32_Graphics_Direct3D12")] @@ -3681,7 +3692,7 @@ impl ID3D12VideoEncodeCommandList { #[doc = "Required features: `\"Win32_Graphics_Direct3D12\"`"] #[cfg(feature = "Win32_Graphics_Direct3D12")] pub unsafe fn ResourceBarrier(&self, pbarriers: &[super::super::Graphics::Direct3D12::D3D12_RESOURCE_BARRIER]) { - (::windows_core::Interface::vtable(self).ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len() as _, ::core::mem::transmute(pbarriers.as_ptr())) + (::windows_core::Interface::vtable(self).ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len().try_into().unwrap(), ::core::mem::transmute(pbarriers.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D12\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12"))] @@ -3892,7 +3903,7 @@ impl ID3D12VideoEncodeCommandList1 { #[doc = "Required features: `\"Win32_Graphics_Direct3D12\"`"] #[cfg(feature = "Win32_Graphics_Direct3D12")] pub unsafe fn ResourceBarrier(&self, pbarriers: &[super::super::Graphics::Direct3D12::D3D12_RESOURCE_BARRIER]) { - (::windows_core::Interface::vtable(self).base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len() as _, ::core::mem::transmute(pbarriers.as_ptr())) + (::windows_core::Interface::vtable(self).base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len().try_into().unwrap(), ::core::mem::transmute(pbarriers.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D12\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12"))] @@ -4078,7 +4089,7 @@ impl ID3D12VideoEncodeCommandList2 { #[doc = "Required features: `\"Win32_Graphics_Direct3D12\"`"] #[cfg(feature = "Win32_Graphics_Direct3D12")] pub unsafe fn ResourceBarrier(&self, pbarriers: &[super::super::Graphics::Direct3D12::D3D12_RESOURCE_BARRIER]) { - (::windows_core::Interface::vtable(self).base__.base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len() as _, ::core::mem::transmute(pbarriers.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len().try_into().unwrap(), ::core::mem::transmute(pbarriers.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D12\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12"))] @@ -4278,7 +4289,7 @@ impl ID3D12VideoEncodeCommandList3 { #[doc = "Required features: `\"Win32_Graphics_Direct3D12\"`"] #[cfg(feature = "Win32_Graphics_Direct3D12")] pub unsafe fn ResourceBarrier(&self, pbarriers: &[super::super::Graphics::Direct3D12::D3D12_RESOURCE_BARRIER]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len() as _, ::core::mem::transmute(pbarriers.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len().try_into().unwrap(), ::core::mem::transmute(pbarriers.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D12\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12"))] @@ -4389,7 +4400,7 @@ impl ID3D12VideoEncodeCommandList3 { #[doc = "Required features: `\"Win32_Graphics_Direct3D12\"`"] #[cfg(feature = "Win32_Graphics_Direct3D12")] pub unsafe fn Barrier(&self, pbarriergroups: &[super::super::Graphics::Direct3D12::D3D12_BARRIER_GROUP]) { - (::windows_core::Interface::vtable(self).Barrier)(::windows_core::Interface::as_raw(self), pbarriergroups.len() as _, ::core::mem::transmute(pbarriergroups.as_ptr())) + (::windows_core::Interface::vtable(self).Barrier)(::windows_core::Interface::as_raw(self), pbarriergroups.len().try_into().unwrap(), ::core::mem::transmute(pbarriergroups.as_ptr())) } } #[cfg(feature = "Win32_Graphics_Direct3D12")] @@ -4571,7 +4582,7 @@ impl ID3D12VideoEncoderHeap { (::windows_core::Interface::vtable(self).GetResolutionListCount)(::windows_core::Interface::as_raw(self)) } pub unsafe fn GetResolutionList(&self, presolutionlist: &mut [D3D12_VIDEO_ENCODER_PICTURE_RESOLUTION_DESC]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetResolutionList)(::windows_core::Interface::as_raw(self), presolutionlist.len() as _, ::core::mem::transmute(presolutionlist.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetResolutionList)(::windows_core::Interface::as_raw(self), presolutionlist.len().try_into().unwrap(), ::core::mem::transmute(presolutionlist.as_ptr())).ok() } } #[cfg(feature = "Win32_Graphics_Direct3D12")] @@ -4899,7 +4910,7 @@ impl ID3D12VideoProcessCommandList { #[doc = "Required features: `\"Win32_Graphics_Direct3D12\"`"] #[cfg(feature = "Win32_Graphics_Direct3D12")] pub unsafe fn ResourceBarrier(&self, pbarriers: &[super::super::Graphics::Direct3D12::D3D12_RESOURCE_BARRIER]) { - (::windows_core::Interface::vtable(self).ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len() as _, ::core::mem::transmute(pbarriers.as_ptr())) + (::windows_core::Interface::vtable(self).ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len().try_into().unwrap(), ::core::mem::transmute(pbarriers.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D12\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12"))] @@ -4957,7 +4968,7 @@ impl ID3D12VideoProcessCommandList { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).ProcessFrames)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), poutputarguments, pinputarguments.len() as _, ::core::mem::transmute(pinputarguments.as_ptr())) + (::windows_core::Interface::vtable(self).ProcessFrames)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), poutputarguments, pinputarguments.len().try_into().unwrap(), ::core::mem::transmute(pinputarguments.as_ptr())) } #[doc = "Required features: `\"Win32_Graphics_Direct3D12\"`"] #[cfg(feature = "Win32_Graphics_Direct3D12")] @@ -5089,7 +5100,7 @@ impl ID3D12VideoProcessCommandList1 { #[doc = "Required features: `\"Win32_Graphics_Direct3D12\"`"] #[cfg(feature = "Win32_Graphics_Direct3D12")] pub unsafe fn ResourceBarrier(&self, pbarriers: &[super::super::Graphics::Direct3D12::D3D12_RESOURCE_BARRIER]) { - (::windows_core::Interface::vtable(self).base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len() as _, ::core::mem::transmute(pbarriers.as_ptr())) + (::windows_core::Interface::vtable(self).base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len().try_into().unwrap(), ::core::mem::transmute(pbarriers.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D12\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12"))] @@ -5147,7 +5158,7 @@ impl ID3D12VideoProcessCommandList1 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.ProcessFrames)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), poutputarguments, pinputarguments.len() as _, ::core::mem::transmute(pinputarguments.as_ptr())) + (::windows_core::Interface::vtable(self).base__.ProcessFrames)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), poutputarguments, pinputarguments.len().try_into().unwrap(), ::core::mem::transmute(pinputarguments.as_ptr())) } #[doc = "Required features: `\"Win32_Graphics_Direct3D12\"`"] #[cfg(feature = "Win32_Graphics_Direct3D12")] @@ -5160,7 +5171,7 @@ impl ID3D12VideoProcessCommandList1 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).ProcessFrames1)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), poutputarguments, pinputarguments.len() as _, ::core::mem::transmute(pinputarguments.as_ptr())) + (::windows_core::Interface::vtable(self).ProcessFrames1)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), poutputarguments, pinputarguments.len().try_into().unwrap(), ::core::mem::transmute(pinputarguments.as_ptr())) } } #[cfg(feature = "Win32_Graphics_Direct3D12")] @@ -5250,7 +5261,7 @@ impl ID3D12VideoProcessCommandList2 { #[doc = "Required features: `\"Win32_Graphics_Direct3D12\"`"] #[cfg(feature = "Win32_Graphics_Direct3D12")] pub unsafe fn ResourceBarrier(&self, pbarriers: &[super::super::Graphics::Direct3D12::D3D12_RESOURCE_BARRIER]) { - (::windows_core::Interface::vtable(self).base__.base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len() as _, ::core::mem::transmute(pbarriers.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len().try_into().unwrap(), ::core::mem::transmute(pbarriers.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D12\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12"))] @@ -5308,7 +5319,7 @@ impl ID3D12VideoProcessCommandList2 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.ProcessFrames)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), poutputarguments, pinputarguments.len() as _, ::core::mem::transmute(pinputarguments.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.ProcessFrames)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), poutputarguments, pinputarguments.len().try_into().unwrap(), ::core::mem::transmute(pinputarguments.as_ptr())) } #[doc = "Required features: `\"Win32_Graphics_Direct3D12\"`"] #[cfg(feature = "Win32_Graphics_Direct3D12")] @@ -5321,7 +5332,7 @@ impl ID3D12VideoProcessCommandList2 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.ProcessFrames1)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), poutputarguments, pinputarguments.len() as _, ::core::mem::transmute(pinputarguments.as_ptr())) + (::windows_core::Interface::vtable(self).base__.ProcessFrames1)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), poutputarguments, pinputarguments.len().try_into().unwrap(), ::core::mem::transmute(pinputarguments.as_ptr())) } #[doc = "Required features: `\"Win32_Graphics_Direct3D12\"`"] #[cfg(feature = "Win32_Graphics_Direct3D12")] @@ -5443,7 +5454,7 @@ impl ID3D12VideoProcessCommandList3 { #[doc = "Required features: `\"Win32_Graphics_Direct3D12\"`"] #[cfg(feature = "Win32_Graphics_Direct3D12")] pub unsafe fn ResourceBarrier(&self, pbarriers: &[super::super::Graphics::Direct3D12::D3D12_RESOURCE_BARRIER]) { - (::windows_core::Interface::vtable(self).base__.base__.base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len() as _, ::core::mem::transmute(pbarriers.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.ResourceBarrier)(::windows_core::Interface::as_raw(self), pbarriers.len().try_into().unwrap(), ::core::mem::transmute(pbarriers.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D12\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D12"))] @@ -5501,7 +5512,7 @@ impl ID3D12VideoProcessCommandList3 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.ProcessFrames)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), poutputarguments, pinputarguments.len() as _, ::core::mem::transmute(pinputarguments.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.base__.ProcessFrames)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), poutputarguments, pinputarguments.len().try_into().unwrap(), ::core::mem::transmute(pinputarguments.as_ptr())) } #[doc = "Required features: `\"Win32_Graphics_Direct3D12\"`"] #[cfg(feature = "Win32_Graphics_Direct3D12")] @@ -5514,7 +5525,7 @@ impl ID3D12VideoProcessCommandList3 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.ProcessFrames1)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), poutputarguments, pinputarguments.len() as _, ::core::mem::transmute(pinputarguments.as_ptr())) + (::windows_core::Interface::vtable(self).base__.base__.ProcessFrames1)(::windows_core::Interface::as_raw(self), pvideoprocessor.into_param().abi(), poutputarguments, pinputarguments.len().try_into().unwrap(), ::core::mem::transmute(pinputarguments.as_ptr())) } #[doc = "Required features: `\"Win32_Graphics_Direct3D12\"`"] #[cfg(feature = "Win32_Graphics_Direct3D12")] @@ -5543,7 +5554,7 @@ impl ID3D12VideoProcessCommandList3 { #[doc = "Required features: `\"Win32_Graphics_Direct3D12\"`"] #[cfg(feature = "Win32_Graphics_Direct3D12")] pub unsafe fn Barrier(&self, pbarriergroups: &[super::super::Graphics::Direct3D12::D3D12_BARRIER_GROUP]) { - (::windows_core::Interface::vtable(self).Barrier)(::windows_core::Interface::as_raw(self), pbarriergroups.len() as _, ::core::mem::transmute(pbarriergroups.as_ptr())) + (::windows_core::Interface::vtable(self).Barrier)(::windows_core::Interface::as_raw(self), pbarriergroups.len().try_into().unwrap(), ::core::mem::transmute(pbarriergroups.as_ptr())) } } #[cfg(feature = "Win32_Graphics_Direct3D12")] @@ -5620,7 +5631,7 @@ impl ID3D12VideoProcessor { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Dxgi_Common"))] pub unsafe fn GetInputStreamDescs(&self, pinputstreamdescs: &mut [D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetInputStreamDescs)(::windows_core::Interface::as_raw(self), pinputstreamdescs.len() as _, ::core::mem::transmute(pinputstreamdescs.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetInputStreamDescs)(::windows_core::Interface::as_raw(self), pinputstreamdescs.len().try_into().unwrap(), ::core::mem::transmute(pinputstreamdescs.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Dxgi_Common"))] @@ -5710,7 +5721,7 @@ impl ID3D12VideoProcessor1 { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Dxgi_Common"))] pub unsafe fn GetInputStreamDescs(&self, pinputstreamdescs: &mut [D3D12_VIDEO_PROCESS_INPUT_STREAM_DESC]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetInputStreamDescs)(::windows_core::Interface::as_raw(self), pinputstreamdescs.len() as _, ::core::mem::transmute(pinputstreamdescs.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.GetInputStreamDescs)(::windows_core::Interface::as_raw(self), pinputstreamdescs.len().try_into().unwrap(), ::core::mem::transmute(pinputstreamdescs.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Dxgi_Common\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Dxgi_Common"))] @@ -5754,7 +5765,7 @@ impl IDXVAHD_Device { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D9\"`"] #[cfg(all(feature = "Win32_Foundation", 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 [::core::option::Option], psharedhandle: ::core::option::Option<*mut super::super::Foundation::HANDLE>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).CreateVideoSurface)(::windows_core::Interface::as_raw(self), width, height, format, pool, usage, r#type, ppsurfaces.len() as _, ::core::mem::transmute(ppsurfaces.as_ptr()), ::core::mem::transmute(psharedhandle.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).CreateVideoSurface)(::windows_core::Interface::as_raw(self), width, height, format, pool, usage, r#type, ppsurfaces.len().try_into().unwrap(), ::core::mem::transmute(ppsurfaces.as_ptr()), ::core::mem::transmute(psharedhandle.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Graphics_Direct3D9\"`"] #[cfg(feature = "Win32_Graphics_Direct3D9")] @@ -5764,20 +5775,20 @@ impl IDXVAHD_Device { #[doc = "Required features: `\"Win32_Graphics_Direct3D9\"`"] #[cfg(feature = "Win32_Graphics_Direct3D9")] pub unsafe fn GetVideoProcessorOutputFormats(&self, pformats: &mut [super::super::Graphics::Direct3D9::D3DFORMAT]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetVideoProcessorOutputFormats)(::windows_core::Interface::as_raw(self), pformats.len() as _, ::core::mem::transmute(pformats.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetVideoProcessorOutputFormats)(::windows_core::Interface::as_raw(self), pformats.len().try_into().unwrap(), ::core::mem::transmute(pformats.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Graphics_Direct3D9\"`"] #[cfg(feature = "Win32_Graphics_Direct3D9")] pub unsafe fn GetVideoProcessorInputFormats(&self, pformats: &mut [super::super::Graphics::Direct3D9::D3DFORMAT]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetVideoProcessorInputFormats)(::windows_core::Interface::as_raw(self), pformats.len() as _, ::core::mem::transmute(pformats.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetVideoProcessorInputFormats)(::windows_core::Interface::as_raw(self), pformats.len().try_into().unwrap(), ::core::mem::transmute(pformats.as_ptr())).ok() } pub unsafe fn GetVideoProcessorCaps(&self, pcaps: &mut [DXVAHD_VPCAPS]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetVideoProcessorCaps)(::windows_core::Interface::as_raw(self), pcaps.len() as _, ::core::mem::transmute(pcaps.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetVideoProcessorCaps)(::windows_core::Interface::as_raw(self), pcaps.len().try_into().unwrap(), ::core::mem::transmute(pcaps.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetVideoProcessorCustomRates(&self, pvpguid: *const ::windows_core::GUID, prates: &mut [DXVAHD_CUSTOM_RATE_DATA]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetVideoProcessorCustomRates)(::windows_core::Interface::as_raw(self), pvpguid, prates.len() as _, ::core::mem::transmute(prates.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetVideoProcessorCustomRates)(::windows_core::Interface::as_raw(self), pvpguid, prates.len().try_into().unwrap(), ::core::mem::transmute(prates.as_ptr())).ok() } pub unsafe fn GetVideoProcessorFilterRange(&self, filter: DXVAHD_FILTER) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -5845,7 +5856,7 @@ impl IDXVAHD_VideoProcessor { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).VideoProcessBltHD)(::windows_core::Interface::as_raw(self), poutputsurface.into_param().abi(), outputframe, pstreams.len() as _, ::core::mem::transmute(pstreams.as_ptr())).ok() + (::windows_core::Interface::vtable(self).VideoProcessBltHD)(::windows_core::Interface::as_raw(self), poutputsurface.into_param().abi(), outputframe, pstreams.len().try_into().unwrap(), ::core::mem::transmute(pstreams.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IDXVAHD_VideoProcessor, ::windows_core::IUnknown); @@ -6271,7 +6282,7 @@ impl IDirectXVideoDecoderService { #[cfg(feature = "Win32_Graphics_Direct3D9")] pub unsafe fn CreateVideoDecoder(&self, guid: *const ::windows_core::GUID, pvideodesc: *const DXVA2_VideoDesc, pconfig: *const DXVA2_ConfigPictureDecode, ppdecoderrendertargets: &[::core::option::Option]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateVideoDecoder)(::windows_core::Interface::as_raw(self), guid, pvideodesc, pconfig, ::core::mem::transmute(ppdecoderrendertargets.as_ptr()), ppdecoderrendertargets.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateVideoDecoder)(::windows_core::Interface::as_raw(self), guid, pvideodesc, pconfig, ::core::mem::transmute(ppdecoderrendertargets.as_ptr()), ppdecoderrendertargets.len().try_into().unwrap(), &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IDirectXVideoDecoderService, ::windows_core::IUnknown, IDirectXVideoAccelerationService); @@ -6357,7 +6368,7 @@ impl IDirectXVideoProcessor { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).VideoProcessBlt)(::windows_core::Interface::as_raw(self), prendertarget.into_param().abi(), pbltparams, ::core::mem::transmute(psamples.as_ptr()), psamples.len() as _, ::core::mem::transmute(phandlecomplete.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).VideoProcessBlt)(::windows_core::Interface::as_raw(self), prendertarget.into_param().abi(), pbltparams, ::core::mem::transmute(psamples.as_ptr()), psamples.len().try_into().unwrap(), ::core::mem::transmute(phandlecomplete.unwrap_or(::std::ptr::null_mut()))).ok() } } ::windows_core::imp::interface_hierarchy!(IDirectXVideoProcessor, ::windows_core::IUnknown); @@ -6754,10 +6765,10 @@ impl IMF2DBuffer { (::windows_core::Interface::vtable(self).GetContiguousLength)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn ContiguousCopyTo(&self, pbdestbuffer: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).ContiguousCopyTo)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbdestbuffer.as_ptr()), pbdestbuffer.len() as _).ok() + (::windows_core::Interface::vtable(self).ContiguousCopyTo)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbdestbuffer.as_ptr()), pbdestbuffer.len().try_into().unwrap()).ok() } pub unsafe fn ContiguousCopyFrom(&self, pbsrcbuffer: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).ContiguousCopyFrom)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbsrcbuffer.as_ptr()), pbsrcbuffer.len() as _).ok() + (::windows_core::Interface::vtable(self).ContiguousCopyFrom)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbsrcbuffer.as_ptr()), pbsrcbuffer.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(IMF2DBuffer, ::windows_core::IUnknown); @@ -6806,10 +6817,10 @@ impl IMF2DBuffer2 { (::windows_core::Interface::vtable(self).base__.GetContiguousLength)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn ContiguousCopyTo(&self, pbdestbuffer: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.ContiguousCopyTo)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbdestbuffer.as_ptr()), pbdestbuffer.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.ContiguousCopyTo)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbdestbuffer.as_ptr()), pbdestbuffer.len().try_into().unwrap()).ok() } pub unsafe fn ContiguousCopyFrom(&self, pbsrcbuffer: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.ContiguousCopyFrom)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbsrcbuffer.as_ptr()), pbsrcbuffer.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.ContiguousCopyFrom)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbsrcbuffer.as_ptr()), pbsrcbuffer.len().try_into().unwrap()).ok() } 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<()> { (::windows_core::Interface::vtable(self).Lock2DSize)(::windows_core::Interface::as_raw(self), lockflags, ppbscanline0, plpitch, ppbbufferstart, pcbbufferlength).ok() @@ -7178,7 +7189,7 @@ impl IMFASFProfile { (::windows_core::Interface::vtable(self).base__.GetStringLength)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetString(&self, guidkey: *const ::windows_core::GUID, pwszvalue: &mut [u16], pcchlength: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len() as _, ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len().try_into().unwrap(), ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedString(&self, guidkey: *const ::windows_core::GUID, ppwszvalue: *mut ::windows_core::PWSTR, pcchlength: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetAllocatedString)(::windows_core::Interface::as_raw(self), guidkey, ppwszvalue, pcchlength).ok() @@ -7188,7 +7199,7 @@ impl IMFASFProfile { (::windows_core::Interface::vtable(self).base__.GetBlobSize)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &mut [u8], pcbblobsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _, ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap(), ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedBlob(&self, guidkey: *const ::windows_core::GUID, ppbuf: *mut *mut u8, pcbsize: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetAllocatedBlob)(::windows_core::Interface::as_raw(self), guidkey, ppbuf, pcbsize).ok() @@ -7230,7 +7241,7 @@ impl IMFASFProfile { (::windows_core::Interface::vtable(self).base__.SetString)(::windows_core::Interface::as_raw(self), guidkey, wszvalue.into_param().abi()).ok() } pub unsafe fn SetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap()).ok() } pub unsafe fn SetUnknown(&self, guidkey: *const ::windows_core::GUID, punknown: P0) -> ::windows_core::Result<()> where @@ -7467,7 +7478,7 @@ impl IMFASFStreamConfig { (::windows_core::Interface::vtable(self).base__.GetStringLength)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetString(&self, guidkey: *const ::windows_core::GUID, pwszvalue: &mut [u16], pcchlength: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len() as _, ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len().try_into().unwrap(), ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedString(&self, guidkey: *const ::windows_core::GUID, ppwszvalue: *mut ::windows_core::PWSTR, pcchlength: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetAllocatedString)(::windows_core::Interface::as_raw(self), guidkey, ppwszvalue, pcchlength).ok() @@ -7477,7 +7488,7 @@ impl IMFASFStreamConfig { (::windows_core::Interface::vtable(self).base__.GetBlobSize)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &mut [u8], pcbblobsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _, ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap(), ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedBlob(&self, guidkey: *const ::windows_core::GUID, ppbuf: *mut *mut u8, pcbsize: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetAllocatedBlob)(::windows_core::Interface::as_raw(self), guidkey, ppbuf, pcbsize).ok() @@ -7519,7 +7530,7 @@ impl IMFASFStreamConfig { (::windows_core::Interface::vtable(self).base__.SetString)(::windows_core::Interface::as_raw(self), guidkey, wszvalue.into_param().abi()).ok() } pub unsafe fn SetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap()).ok() } pub unsafe fn SetUnknown(&self, guidkey: *const ::windows_core::GUID, punknown: P0) -> ::windows_core::Result<()> where @@ -7576,7 +7587,7 @@ impl IMFASFStreamConfig { (::windows_core::Interface::vtable(self).GetPayloadExtension)(::windows_core::Interface::as_raw(self), wpayloadextensionnumber, pguidextensionsystemid, pcbextensiondatasize, pbextensionsysteminfo, pcbextensionsysteminfo).ok() } pub unsafe fn AddPayloadExtension(&self, guidextensionsystemid: ::windows_core::GUID, cbextensiondatasize: u16, pbextensionsysteminfo: &[u8]) -> ::windows_core::Result<()> { - (::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() as _).ok() + (::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() } pub unsafe fn RemoveAllPayloadExtensions(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).RemoveAllPayloadExtensions)(::windows_core::Interface::as_raw(self)).ok() @@ -7779,7 +7790,7 @@ impl IMFActivate { (::windows_core::Interface::vtable(self).base__.GetStringLength)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetString(&self, guidkey: *const ::windows_core::GUID, pwszvalue: &mut [u16], pcchlength: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len() as _, ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len().try_into().unwrap(), ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedString(&self, guidkey: *const ::windows_core::GUID, ppwszvalue: *mut ::windows_core::PWSTR, pcchlength: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetAllocatedString)(::windows_core::Interface::as_raw(self), guidkey, ppwszvalue, pcchlength).ok() @@ -7789,7 +7800,7 @@ impl IMFActivate { (::windows_core::Interface::vtable(self).base__.GetBlobSize)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &mut [u8], pcbblobsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _, ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap(), ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedBlob(&self, guidkey: *const ::windows_core::GUID, ppbuf: *mut *mut u8, pcbsize: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetAllocatedBlob)(::windows_core::Interface::as_raw(self), guidkey, ppbuf, pcbsize).ok() @@ -7831,7 +7842,7 @@ impl IMFActivate { (::windows_core::Interface::vtable(self).base__.SetString)(::windows_core::Interface::as_raw(self), guidkey, wszvalue.into_param().abi()).ok() } pub unsafe fn SetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap()).ok() } pub unsafe fn SetUnknown(&self, guidkey: *const ::windows_core::GUID, punknown: P0) -> ::windows_core::Result<()> where @@ -8039,7 +8050,7 @@ impl IMFAttributes { (::windows_core::Interface::vtable(self).GetStringLength)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetString(&self, guidkey: *const ::windows_core::GUID, pwszvalue: &mut [u16], pcchlength: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len() as _, ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len().try_into().unwrap(), ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedString(&self, guidkey: *const ::windows_core::GUID, ppwszvalue: *mut ::windows_core::PWSTR, pcchlength: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetAllocatedString)(::windows_core::Interface::as_raw(self), guidkey, ppwszvalue, pcchlength).ok() @@ -8049,7 +8060,7 @@ impl IMFAttributes { (::windows_core::Interface::vtable(self).GetBlobSize)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &mut [u8], pcbblobsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _, ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap(), ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedBlob(&self, guidkey: *const ::windows_core::GUID, ppbuf: *mut *mut u8, pcbsize: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetAllocatedBlob)(::windows_core::Interface::as_raw(self), guidkey, ppbuf, pcbsize).ok() @@ -8091,7 +8102,7 @@ impl IMFAttributes { (::windows_core::Interface::vtable(self).SetString)(::windows_core::Interface::as_raw(self), guidkey, wszvalue.into_param().abi()).ok() } pub unsafe fn SetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _).ok() + (::windows_core::Interface::vtable(self).SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap()).ok() } pub unsafe fn SetUnknown(&self, guidkey: *const ::windows_core::GUID, punknown: P0) -> ::windows_core::Result<()> where @@ -8227,7 +8238,7 @@ impl IMFAudioMediaType { (::windows_core::Interface::vtable(self).base__.base__.GetStringLength)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetString(&self, guidkey: *const ::windows_core::GUID, pwszvalue: &mut [u16], pcchlength: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len() as _, ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len().try_into().unwrap(), ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedString(&self, guidkey: *const ::windows_core::GUID, ppwszvalue: *mut ::windows_core::PWSTR, pcchlength: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.GetAllocatedString)(::windows_core::Interface::as_raw(self), guidkey, ppwszvalue, pcchlength).ok() @@ -8237,7 +8248,7 @@ impl IMFAudioMediaType { (::windows_core::Interface::vtable(self).base__.base__.GetBlobSize)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &mut [u8], pcbblobsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _, ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap(), ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedBlob(&self, guidkey: *const ::windows_core::GUID, ppbuf: *mut *mut u8, pcbsize: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.GetAllocatedBlob)(::windows_core::Interface::as_raw(self), guidkey, ppbuf, pcbsize).ok() @@ -8279,7 +8290,7 @@ impl IMFAudioMediaType { (::windows_core::Interface::vtable(self).base__.base__.SetString)(::windows_core::Interface::as_raw(self), guidkey, wszvalue.into_param().abi()).ok() } pub unsafe fn SetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap()).ok() } pub unsafe fn SetUnknown(&self, guidkey: *const ::windows_core::GUID, punknown: P0) -> ::windows_core::Result<()> where @@ -8419,10 +8430,10 @@ impl IMFAudioStreamVolume { (::windows_core::Interface::vtable(self).GetChannelVolume)(::windows_core::Interface::as_raw(self), dwindex, &mut result__).from_abi(result__) } pub unsafe fn SetAllVolumes(&self, pfvolumes: &[f32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetAllVolumes)(::windows_core::Interface::as_raw(self), pfvolumes.len() as _, ::core::mem::transmute(pfvolumes.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetAllVolumes)(::windows_core::Interface::as_raw(self), pfvolumes.len().try_into().unwrap(), ::core::mem::transmute(pfvolumes.as_ptr())).ok() } pub unsafe fn GetAllVolumes(&self, pfvolumes: &mut [f32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetAllVolumes)(::windows_core::Interface::as_raw(self), pfvolumes.len() as _, ::core::mem::transmute(pfvolumes.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetAllVolumes)(::windows_core::Interface::as_raw(self), pfvolumes.len().try_into().unwrap(), ::core::mem::transmute(pfvolumes.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IMFAudioStreamVolume, ::windows_core::IUnknown); @@ -8496,14 +8507,14 @@ impl IMFByteStream { (::windows_core::Interface::vtable(self).IsEndOfStream)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn Read(&self, pb: &mut [u8], pcbread: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Read)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pb.as_ptr()), pb.len() as _, pcbread).ok() + (::windows_core::Interface::vtable(self).Read)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pb.as_ptr()), pb.len().try_into().unwrap(), pcbread).ok() } pub unsafe fn BeginRead(&self, pb: &mut [u8], pcallback: P0, punkstate: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::IUnknown>, { - (::windows_core::Interface::vtable(self).BeginRead)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pb.as_ptr()), pb.len() as _, pcallback.into_param().abi(), punkstate.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).BeginRead)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pb.as_ptr()), pb.len().try_into().unwrap(), pcallback.into_param().abi(), punkstate.into_param().abi()).ok() } pub unsafe fn EndRead(&self, presult: P0) -> ::windows_core::Result where @@ -8514,14 +8525,14 @@ impl IMFByteStream { } pub unsafe fn Write(&self, pb: &[u8]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).Write)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pb.as_ptr()), pb.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).Write)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pb.as_ptr()), pb.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn BeginWrite(&self, pb: &[u8], pcallback: P0, punkstate: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::IUnknown>, { - (::windows_core::Interface::vtable(self).BeginWrite)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pb.as_ptr()), pb.len() as _, pcallback.into_param().abi(), punkstate.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).BeginWrite)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pb.as_ptr()), pb.len().try_into().unwrap(), pcallback.into_param().abi(), punkstate.into_param().abi()).ok() } pub unsafe fn EndWrite(&self, presult: P0) -> ::windows_core::Result where @@ -8900,7 +8911,7 @@ impl IMFCameraControlDefaultsCollection { (::windows_core::Interface::vtable(self).base__.GetStringLength)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetString(&self, guidkey: *const ::windows_core::GUID, pwszvalue: &mut [u16], pcchlength: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len() as _, ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len().try_into().unwrap(), ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedString(&self, guidkey: *const ::windows_core::GUID, ppwszvalue: *mut ::windows_core::PWSTR, pcchlength: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetAllocatedString)(::windows_core::Interface::as_raw(self), guidkey, ppwszvalue, pcchlength).ok() @@ -8910,7 +8921,7 @@ impl IMFCameraControlDefaultsCollection { (::windows_core::Interface::vtable(self).base__.GetBlobSize)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &mut [u8], pcbblobsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _, ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap(), ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedBlob(&self, guidkey: *const ::windows_core::GUID, ppbuf: *mut *mut u8, pcbsize: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetAllocatedBlob)(::windows_core::Interface::as_raw(self), guidkey, ppbuf, pcbsize).ok() @@ -8952,7 +8963,7 @@ impl IMFCameraControlDefaultsCollection { (::windows_core::Interface::vtable(self).base__.SetString)(::windows_core::Interface::as_raw(self), guidkey, wszvalue.into_param().abi()).ok() } pub unsafe fn SetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap()).ok() } pub unsafe fn SetUnknown(&self, guidkey: *const ::windows_core::GUID, punknown: P0) -> ::windows_core::Result<()> where @@ -10019,11 +10030,11 @@ impl IMFContentDecryptionModule { (::windows_core::Interface::vtable(self).CreateSession)(::windows_core::Interface::as_raw(self), sessiontype, callbacks.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn SetServerCertificate(&self, certificate: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetServerCertificate)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(certificate.as_ptr()), certificate.len() as _).ok() + (::windows_core::Interface::vtable(self).SetServerCertificate)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(certificate.as_ptr()), certificate.len().try_into().unwrap()).ok() } pub unsafe fn CreateTrustedInput(&self, contentinitdata: &[u8]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateTrustedInput)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(contentinitdata.as_ptr()), contentinitdata.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateTrustedInput)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(contentinitdata.as_ptr()), contentinitdata.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn GetProtectionSystemIds(&self, systemids: *mut *mut ::windows_core::GUID, count: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetProtectionSystemIds)(::windows_core::Interface::as_raw(self), systemids, count).ok() @@ -10113,7 +10124,7 @@ impl IMFContentDecryptionModuleFactory { P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateContentDecryptionModuleAccess)(::windows_core::Interface::as_raw(self), keysystem.into_param().abi(), ::core::mem::transmute(configurations.as_ptr()), configurations.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateContentDecryptionModuleAccess)(::windows_core::Interface::as_raw(self), keysystem.into_param().abi(), ::core::mem::transmute(configurations.as_ptr()), configurations.len().try_into().unwrap(), &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IMFContentDecryptionModuleFactory, ::windows_core::IUnknown); @@ -10164,10 +10175,10 @@ impl IMFContentDecryptionModuleSession { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).GenerateRequest)(::windows_core::Interface::as_raw(self), initdatatype.into_param().abi(), ::core::mem::transmute(initdata.as_ptr()), initdata.len() as _).ok() + (::windows_core::Interface::vtable(self).GenerateRequest)(::windows_core::Interface::as_raw(self), initdatatype.into_param().abi(), ::core::mem::transmute(initdata.as_ptr()), initdata.len().try_into().unwrap()).ok() } pub unsafe fn Update(&self, response: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Update)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(response.as_ptr()), response.len() as _).ok() + (::windows_core::Interface::vtable(self).Update)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(response.as_ptr()), response.len().try_into().unwrap()).ok() } pub unsafe fn Close(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Close)(::windows_core::Interface::as_raw(self)).ok() @@ -10207,7 +10218,7 @@ impl IMFContentDecryptionModuleSessionCallbacks { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).KeyMessage)(::windows_core::Interface::as_raw(self), messagetype, ::core::mem::transmute(message.as_ptr()), message.len() as _, destinationurl.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).KeyMessage)(::windows_core::Interface::as_raw(self), messagetype, ::core::mem::transmute(message.as_ptr()), message.len().try_into().unwrap(), destinationurl.into_param().abi()).ok() } pub unsafe fn KeyStatusChanged(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).KeyStatusChanged)(::windows_core::Interface::as_raw(self)).ok() @@ -10233,7 +10244,7 @@ pub struct IMFContentDecryptorContext(::windows_core::IUnknown); impl IMFContentDecryptorContext { pub unsafe fn InitializeHardwareKey(&self, inputprivatedata: ::core::option::Option<&[u8]>) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).InitializeHardwareKey)(::windows_core::Interface::as_raw(self), inputprivatedata.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(inputprivatedata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).InitializeHardwareKey)(::windows_core::Interface::as_raw(self), inputprivatedata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(inputprivatedata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IMFContentDecryptorContext, ::windows_core::IUnknown); @@ -10306,7 +10317,7 @@ pub struct IMFContentEnabler_Vtbl { pub struct IMFContentProtectionDevice(::windows_core::IUnknown); impl IMFContentProtectionDevice { pub unsafe fn InvokeFunction(&self, functionid: u32, inputbuffer: &[u8], outputbufferbytecount: *mut u32, outputbuffer: *mut u8) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).InvokeFunction)(::windows_core::Interface::as_raw(self), functionid, inputbuffer.len() as _, ::core::mem::transmute(inputbuffer.as_ptr()), outputbufferbytecount, outputbuffer).ok() + (::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, outputbuffer).ok() } pub unsafe fn GetPrivateDataByteCount(&self, privateinputbytecount: *mut u32, privateoutputbytecount: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetPrivateDataByteCount)(::windows_core::Interface::as_raw(self), privateinputbytecount, privateoutputbytecount).ok() @@ -10493,7 +10504,7 @@ pub struct IMFDLNASinkInit_Vtbl { pub struct 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<()> { - (::windows_core::Interface::vtable(self).ProcessLicenseRequest)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(plicenserequest.as_ptr()), plicenserequest.len() as _, pplicenseresponse, pcblicenseresponse, ::core::mem::transmute(pbstrkid)).ok() + (::windows_core::Interface::vtable(self).ProcessLicenseRequest)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(plicenserequest.as_ptr()), plicenserequest.len().try_into().unwrap(), pplicenseresponse, pcblicenseresponse, ::core::mem::transmute(pbstrkid)).ok() } pub unsafe fn GetChainedLicenseResponse(&self, pplicenseresponse: *mut *mut u8, pcblicenseresponse: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetChainedLicenseResponse)(::windows_core::Interface::as_raw(self), pplicenseresponse, pcblicenseresponse).ok() @@ -10939,7 +10950,7 @@ pub struct IMFExtendedCameraIntrinsicModel_Vtbl { pub struct IMFExtendedCameraIntrinsics(::windows_core::IUnknown); impl IMFExtendedCameraIntrinsics { pub unsafe fn InitializeFromBuffer(&self, pbbuffer: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).InitializeFromBuffer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbbuffer.as_ptr()), pbbuffer.len() as _).ok() + (::windows_core::Interface::vtable(self).InitializeFromBuffer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbbuffer.as_ptr()), pbbuffer.len().try_into().unwrap()).ok() } pub unsafe fn GetBufferSize(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -11222,7 +11233,7 @@ impl IMFHttpDownloadRequest { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::IUnknown>, { - (::windows_core::Interface::vtable(self).BeginSendRequest)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbpayload.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbpayload.as_deref().map_or(0, |slice| slice.len() as _), pcallback.into_param().abi(), punkstate.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).BeginSendRequest)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbpayload.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbpayload.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcallback.into_param().abi(), punkstate.into_param().abi()).ok() } pub unsafe fn EndSendRequest(&self, presult: P0) -> ::windows_core::Result<()> where @@ -11248,7 +11259,7 @@ impl IMFHttpDownloadRequest { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::IUnknown>, { - (::windows_core::Interface::vtable(self).BeginReadPayload)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pb.as_ptr()), pb.len() as _, pcallback.into_param().abi(), punkstate.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).BeginReadPayload)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pb.as_ptr()), pb.len().try_into().unwrap(), pcallback.into_param().abi(), punkstate.into_param().abi()).ok() } pub unsafe fn EndReadPayload(&self, presult: P0, pqwoffset: *mut u64, pcbread: *mut u32) -> ::windows_core::Result<()> where @@ -11507,7 +11518,7 @@ pub struct IMFInputTrustAuthority_Vtbl { pub struct IMFLocalMFTRegistration(::windows_core::IUnknown); impl IMFLocalMFTRegistration { pub unsafe fn RegisterMFTs(&self, pmfts: &[MFT_REGISTRATION_INFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).RegisterMFTs)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pmfts.as_ptr()), pmfts.len() as _).ok() + (::windows_core::Interface::vtable(self).RegisterMFTs)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pmfts.as_ptr()), pmfts.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(IMFLocalMFTRegistration, ::windows_core::IUnknown); @@ -11937,7 +11948,7 @@ impl IMFMediaEngineClassFactory3 { P0: ::windows_core::IntoParam<::windows_core::BSTR>, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateMediaKeySystemAccess)(::windows_core::Interface::as_raw(self), keysystem.into_param().abi(), ::core::mem::transmute(ppsupportedconfigurationsarray.as_ptr()), ppsupportedconfigurationsarray.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateMediaKeySystemAccess)(::windows_core::Interface::as_raw(self), keysystem.into_param().abi(), ::core::mem::transmute(ppsupportedconfigurationsarray.as_ptr()), ppsupportedconfigurationsarray.len().try_into().unwrap(), &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IMFMediaEngineClassFactory3, ::windows_core::IUnknown); @@ -12080,7 +12091,7 @@ impl IMFMediaEngineEMENotify { where P0: ::windows_core::IntoParam<::windows_core::BSTR>, { - (::windows_core::Interface::vtable(self).Encrypted)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbinitdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbinitdata.as_deref().map_or(0, |slice| slice.len() as _), bstrinitdatatype.into_param().abi()) + (::windows_core::Interface::vtable(self).Encrypted)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbinitdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbinitdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), bstrinitdatatype.into_param().abi()) } pub unsafe fn WaitingForKey(&self) { (::windows_core::Interface::vtable(self).WaitingForKey)(::windows_core::Interface::as_raw(self)) @@ -12638,7 +12649,7 @@ pub struct IMFMediaEngineExtension_Vtbl { pub struct IMFMediaEngineNeedKeyNotify(::windows_core::IUnknown); impl IMFMediaEngineNeedKeyNotify { pub unsafe fn NeedKey(&self, initdata: ::core::option::Option<&[u8]>) { - (::windows_core::Interface::vtable(self).NeedKey)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(initdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), initdata.as_deref().map_or(0, |slice| slice.len() as _)) + (::windows_core::Interface::vtable(self).NeedKey)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(initdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), initdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } } ::windows_core::imp::interface_hierarchy!(IMFMediaEngineNeedKeyNotify, ::windows_core::IUnknown); @@ -12739,7 +12750,7 @@ impl IMFMediaEngineProtectedContent { (::windows_core::Interface::vtable(self).SetContentProtectionManager)(::windows_core::Interface::as_raw(self), pcpm.into_param().abi()).ok() } pub unsafe fn SetApplicationCertificate(&self, pbblob: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetApplicationCertificate)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbblob.as_ptr()), pbblob.len() as _).ok() + (::windows_core::Interface::vtable(self).SetApplicationCertificate)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbblob.as_ptr()), pbblob.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(IMFMediaEngineProtectedContent, ::windows_core::IUnknown); @@ -13054,7 +13065,7 @@ impl IMFMediaEvent { (::windows_core::Interface::vtable(self).base__.GetStringLength)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetString(&self, guidkey: *const ::windows_core::GUID, pwszvalue: &mut [u16], pcchlength: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len() as _, ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len().try_into().unwrap(), ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedString(&self, guidkey: *const ::windows_core::GUID, ppwszvalue: *mut ::windows_core::PWSTR, pcchlength: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetAllocatedString)(::windows_core::Interface::as_raw(self), guidkey, ppwszvalue, pcchlength).ok() @@ -13064,7 +13075,7 @@ impl IMFMediaEvent { (::windows_core::Interface::vtable(self).base__.GetBlobSize)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &mut [u8], pcbblobsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _, ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap(), ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedBlob(&self, guidkey: *const ::windows_core::GUID, ppbuf: *mut *mut u8, pcbsize: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetAllocatedBlob)(::windows_core::Interface::as_raw(self), guidkey, ppbuf, pcbsize).ok() @@ -13106,7 +13117,7 @@ impl IMFMediaEvent { (::windows_core::Interface::vtable(self).base__.SetString)(::windows_core::Interface::as_raw(self), guidkey, wszvalue.into_param().abi()).ok() } pub unsafe fn SetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap()).ok() } pub unsafe fn SetUnknown(&self, guidkey: *const ::windows_core::GUID, punknown: P0) -> ::windows_core::Result<()> where @@ -13301,7 +13312,7 @@ impl IMFMediaKeySession { (::windows_core::Interface::vtable(self).SessionId)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn Update(&self, key: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Update)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(key.as_ptr()), key.len() as _).ok() + (::windows_core::Interface::vtable(self).Update)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(key.as_ptr()), key.len().try_into().unwrap()).ok() } pub unsafe fn Close(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Close)(::windows_core::Interface::as_raw(self)).ok() @@ -13340,7 +13351,7 @@ impl IMFMediaKeySession2 { (::windows_core::Interface::vtable(self).base__.SessionId)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn Update(&self, key: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.Update)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(key.as_ptr()), key.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.Update)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(key.as_ptr()), key.len().try_into().unwrap()).ok() } pub unsafe fn Close(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.Close)(::windows_core::Interface::as_raw(self)).ok() @@ -13361,7 +13372,7 @@ impl IMFMediaKeySession2 { where P0: ::windows_core::IntoParam<::windows_core::BSTR>, { - (::windows_core::Interface::vtable(self).GenerateRequest)(::windows_core::Interface::as_raw(self), initdatatype.into_param().abi(), ::core::mem::transmute(pbinitdata.as_ptr()), pbinitdata.len() as _).ok() + (::windows_core::Interface::vtable(self).GenerateRequest)(::windows_core::Interface::as_raw(self), initdatatype.into_param().abi(), ::core::mem::transmute(pbinitdata.as_ptr()), pbinitdata.len().try_into().unwrap()).ok() } pub unsafe fn Expiration(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -13403,7 +13414,7 @@ impl IMFMediaKeySessionNotify { where P0: ::windows_core::IntoParam<::windows_core::BSTR>, { - (::windows_core::Interface::vtable(self).KeyMessage)(::windows_core::Interface::as_raw(self), destinationurl.into_param().abi(), ::core::mem::transmute(message.as_ptr()), message.len() as _) + (::windows_core::Interface::vtable(self).KeyMessage)(::windows_core::Interface::as_raw(self), destinationurl.into_param().abi(), ::core::mem::transmute(message.as_ptr()), message.len().try_into().unwrap()) } pub unsafe fn KeyAdded(&self) { (::windows_core::Interface::vtable(self).KeyAdded)(::windows_core::Interface::as_raw(self)) @@ -13435,7 +13446,7 @@ impl IMFMediaKeySessionNotify2 { where P0: ::windows_core::IntoParam<::windows_core::BSTR>, { - (::windows_core::Interface::vtable(self).base__.KeyMessage)(::windows_core::Interface::as_raw(self), destinationurl.into_param().abi(), ::core::mem::transmute(message.as_ptr()), message.len() as _) + (::windows_core::Interface::vtable(self).base__.KeyMessage)(::windows_core::Interface::as_raw(self), destinationurl.into_param().abi(), ::core::mem::transmute(message.as_ptr()), message.len().try_into().unwrap()) } pub unsafe fn KeyAdded(&self) { (::windows_core::Interface::vtable(self).base__.KeyAdded)(::windows_core::Interface::as_raw(self)) @@ -13447,7 +13458,7 @@ impl IMFMediaKeySessionNotify2 { where P0: ::windows_core::IntoParam<::windows_core::BSTR>, { - (::windows_core::Interface::vtable(self).KeyMessage2)(::windows_core::Interface::as_raw(self), emessagetype, destinationurl.into_param().abi(), ::core::mem::transmute(pbmessage.as_ptr()), pbmessage.len() as _) + (::windows_core::Interface::vtable(self).KeyMessage2)(::windows_core::Interface::as_raw(self), emessagetype, destinationurl.into_param().abi(), ::core::mem::transmute(pbmessage.as_ptr()), pbmessage.len().try_into().unwrap()) } pub unsafe fn KeyStatusChange(&self) { (::windows_core::Interface::vtable(self).KeyStatusChange)(::windows_core::Interface::as_raw(self)) @@ -13522,7 +13533,7 @@ impl IMFMediaKeys { P1: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateSession)(::windows_core::Interface::as_raw(self), mimetype.into_param().abi(), ::core::mem::transmute(initdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), initdata.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(customdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), customdata.as_deref().map_or(0, |slice| slice.len() as _), notify.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateSession)(::windows_core::Interface::as_raw(self), mimetype.into_param().abi(), ::core::mem::transmute(initdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), initdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(customdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), customdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), notify.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn KeySystem(&self) -> ::windows_core::Result<::windows_core::BSTR> { let mut result__ = ::std::mem::zeroed(); @@ -13562,7 +13573,7 @@ impl IMFMediaKeys2 { P1: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.CreateSession)(::windows_core::Interface::as_raw(self), mimetype.into_param().abi(), ::core::mem::transmute(initdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), initdata.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(customdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), customdata.as_deref().map_or(0, |slice| slice.len() as _), notify.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateSession)(::windows_core::Interface::as_raw(self), mimetype.into_param().abi(), ::core::mem::transmute(initdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), initdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(customdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), customdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), notify.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn KeySystem(&self) -> ::windows_core::Result<::windows_core::BSTR> { let mut result__ = ::std::mem::zeroed(); @@ -13583,7 +13594,7 @@ impl IMFMediaKeys2 { (::windows_core::Interface::vtable(self).CreateSession2)(::windows_core::Interface::as_raw(self), esessiontype, pmfmediakeysessionnotify2.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn SetServerCertificate(&self, pbservercertificate: ::core::option::Option<&[u8]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetServerCertificate)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbservercertificate.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbservercertificate.as_deref().map_or(0, |slice| slice.len() as _)).ok() + (::windows_core::Interface::vtable(self).SetServerCertificate)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbservercertificate.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbservercertificate.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } pub unsafe fn GetDOMException(&self, systemcode: ::windows_core::HRESULT) -> ::windows_core::Result<::windows_core::HRESULT> { let mut result__ = ::std::mem::zeroed(); @@ -14665,7 +14676,7 @@ impl IMFMediaType { (::windows_core::Interface::vtable(self).base__.GetStringLength)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetString(&self, guidkey: *const ::windows_core::GUID, pwszvalue: &mut [u16], pcchlength: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len() as _, ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len().try_into().unwrap(), ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedString(&self, guidkey: *const ::windows_core::GUID, ppwszvalue: *mut ::windows_core::PWSTR, pcchlength: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetAllocatedString)(::windows_core::Interface::as_raw(self), guidkey, ppwszvalue, pcchlength).ok() @@ -14675,7 +14686,7 @@ impl IMFMediaType { (::windows_core::Interface::vtable(self).base__.GetBlobSize)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &mut [u8], pcbblobsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _, ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap(), ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedBlob(&self, guidkey: *const ::windows_core::GUID, ppbuf: *mut *mut u8, pcbsize: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetAllocatedBlob)(::windows_core::Interface::as_raw(self), guidkey, ppbuf, pcbsize).ok() @@ -14717,7 +14728,7 @@ impl IMFMediaType { (::windows_core::Interface::vtable(self).base__.SetString)(::windows_core::Interface::as_raw(self), guidkey, wszvalue.into_param().abi()).ok() } pub unsafe fn SetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap()).ok() } pub unsafe fn SetUnknown(&self, guidkey: *const ::windows_core::GUID, punknown: P0) -> ::windows_core::Result<()> where @@ -15060,7 +15071,7 @@ impl IMFNetCredential { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).SetUser)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbdata.as_ptr()), pbdata.len() as _, fdataisencrypted.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).SetUser)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), fdataisencrypted.into_param().abi()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -15068,7 +15079,7 @@ impl IMFNetCredential { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).SetPassword)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbdata.as_ptr()), pbdata.len() as _, fdataisencrypted.into_param().abi()).ok() + (::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_param().abi()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -15479,7 +15490,7 @@ impl IMFOutputPolicy { (::windows_core::Interface::vtable(self).base__.GetStringLength)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetString(&self, guidkey: *const ::windows_core::GUID, pwszvalue: &mut [u16], pcchlength: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len() as _, ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len().try_into().unwrap(), ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedString(&self, guidkey: *const ::windows_core::GUID, ppwszvalue: *mut ::windows_core::PWSTR, pcchlength: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetAllocatedString)(::windows_core::Interface::as_raw(self), guidkey, ppwszvalue, pcchlength).ok() @@ -15489,7 +15500,7 @@ impl IMFOutputPolicy { (::windows_core::Interface::vtable(self).base__.GetBlobSize)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &mut [u8], pcbblobsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _, ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap(), ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedBlob(&self, guidkey: *const ::windows_core::GUID, ppbuf: *mut *mut u8, pcbsize: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetAllocatedBlob)(::windows_core::Interface::as_raw(self), guidkey, ppbuf, pcbsize).ok() @@ -15531,7 +15542,7 @@ impl IMFOutputPolicy { (::windows_core::Interface::vtable(self).base__.SetString)(::windows_core::Interface::as_raw(self), guidkey, wszvalue.into_param().abi()).ok() } pub unsafe fn SetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap()).ok() } pub unsafe fn SetUnknown(&self, guidkey: *const ::windows_core::GUID, punknown: P0) -> ::windows_core::Result<()> where @@ -15637,7 +15648,7 @@ impl IMFOutputSchema { (::windows_core::Interface::vtable(self).base__.GetStringLength)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetString(&self, guidkey: *const ::windows_core::GUID, pwszvalue: &mut [u16], pcchlength: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len() as _, ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len().try_into().unwrap(), ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedString(&self, guidkey: *const ::windows_core::GUID, ppwszvalue: *mut ::windows_core::PWSTR, pcchlength: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetAllocatedString)(::windows_core::Interface::as_raw(self), guidkey, ppwszvalue, pcchlength).ok() @@ -15647,7 +15658,7 @@ impl IMFOutputSchema { (::windows_core::Interface::vtable(self).base__.GetBlobSize)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &mut [u8], pcbblobsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _, ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap(), ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedBlob(&self, guidkey: *const ::windows_core::GUID, ppbuf: *mut *mut u8, pcbsize: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetAllocatedBlob)(::windows_core::Interface::as_raw(self), guidkey, ppbuf, pcbsize).ok() @@ -15689,7 +15700,7 @@ impl IMFOutputSchema { (::windows_core::Interface::vtable(self).base__.SetString)(::windows_core::Interface::as_raw(self), guidkey, wszvalue.into_param().abi()).ok() } pub unsafe fn SetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap()).ok() } pub unsafe fn SetUnknown(&self, guidkey: *const ::windows_core::GUID, punknown: P0) -> ::windows_core::Result<()> where @@ -15755,7 +15766,7 @@ impl IMFOutputTrustAuthority { (::windows_core::Interface::vtable(self).GetAction)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn SetPolicy(&self, pppolicy: ::core::option::Option<&[::core::option::Option]>, ppbticket: ::core::option::Option<*mut *mut u8>, pcbticket: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetPolicy)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pppolicy.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pppolicy.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppbticket.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbticket.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).SetPolicy)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pppolicy.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pppolicy.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(ppbticket.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbticket.unwrap_or(::std::ptr::null_mut()))).ok() } } ::windows_core::imp::interface_hierarchy!(IMFOutputTrustAuthority, ::windows_core::IUnknown); @@ -16630,7 +16641,7 @@ impl IMFPresentationDescriptor { (::windows_core::Interface::vtable(self).base__.GetStringLength)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetString(&self, guidkey: *const ::windows_core::GUID, pwszvalue: &mut [u16], pcchlength: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len() as _, ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len().try_into().unwrap(), ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedString(&self, guidkey: *const ::windows_core::GUID, ppwszvalue: *mut ::windows_core::PWSTR, pcchlength: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetAllocatedString)(::windows_core::Interface::as_raw(self), guidkey, ppwszvalue, pcchlength).ok() @@ -16640,7 +16651,7 @@ impl IMFPresentationDescriptor { (::windows_core::Interface::vtable(self).base__.GetBlobSize)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &mut [u8], pcbblobsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _, ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap(), ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedBlob(&self, guidkey: *const ::windows_core::GUID, ppbuf: *mut *mut u8, pcbsize: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetAllocatedBlob)(::windows_core::Interface::as_raw(self), guidkey, ppbuf, pcbsize).ok() @@ -16682,7 +16693,7 @@ impl IMFPresentationDescriptor { (::windows_core::Interface::vtable(self).base__.SetString)(::windows_core::Interface::as_raw(self), guidkey, wszvalue.into_param().abi()).ok() } pub unsafe fn SetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap()).ok() } pub unsafe fn SetUnknown(&self, guidkey: *const ::windows_core::GUID, punknown: P0) -> ::windows_core::Result<()> where @@ -16796,7 +16807,7 @@ pub struct IMFPresentationTimeSource_Vtbl { pub struct IMFProtectedEnvironmentAccess(::windows_core::IUnknown); impl IMFProtectedEnvironmentAccess { pub unsafe fn Call(&self, input: &[u8], output: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Call)(::windows_core::Interface::as_raw(self), input.len() as _, ::core::mem::transmute(input.as_ptr()), output.len() as _, ::core::mem::transmute(output.as_ptr())).ok() + (::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<()> { (::windows_core::Interface::vtable(self).ReadGRL)(::windows_core::Interface::as_raw(self), outputlength, output).ok() @@ -17400,7 +17411,7 @@ impl IMFSSLCertificateManager { P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).OnServerCertificate)(::windows_core::Interface::as_raw(self), pszurl.into_param().abi(), ::core::mem::transmute(pbdata.as_ptr()), pbdata.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).OnServerCertificate)(::windows_core::Interface::as_raw(self), pszurl.into_param().abi(), ::core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IMFSSLCertificateManager, ::windows_core::IUnknown); @@ -17475,7 +17486,7 @@ impl IMFSample { (::windows_core::Interface::vtable(self).base__.GetStringLength)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetString(&self, guidkey: *const ::windows_core::GUID, pwszvalue: &mut [u16], pcchlength: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len() as _, ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len().try_into().unwrap(), ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedString(&self, guidkey: *const ::windows_core::GUID, ppwszvalue: *mut ::windows_core::PWSTR, pcchlength: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetAllocatedString)(::windows_core::Interface::as_raw(self), guidkey, ppwszvalue, pcchlength).ok() @@ -17485,7 +17496,7 @@ impl IMFSample { (::windows_core::Interface::vtable(self).base__.GetBlobSize)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &mut [u8], pcbblobsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _, ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap(), ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedBlob(&self, guidkey: *const ::windows_core::GUID, ppbuf: *mut *mut u8, pcbsize: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetAllocatedBlob)(::windows_core::Interface::as_raw(self), guidkey, ppbuf, pcbsize).ok() @@ -17527,7 +17538,7 @@ impl IMFSample { (::windows_core::Interface::vtable(self).base__.SetString)(::windows_core::Interface::as_raw(self), guidkey, wszvalue.into_param().abi()).ok() } pub unsafe fn SetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap()).ok() } pub unsafe fn SetUnknown(&self, guidkey: *const ::windows_core::GUID, punknown: P0) -> ::windows_core::Result<()> where @@ -17692,7 +17703,7 @@ impl IMFSampleGrabberSinkCallback { (::windows_core::Interface::vtable(self).OnSetPresentationClock)(::windows_core::Interface::as_raw(self), ppresentationclock.into_param().abi()).ok() } pub unsafe fn OnProcessSample(&self, guidmajormediatype: *const ::windows_core::GUID, dwsampleflags: u32, llsampletime: i64, llsampleduration: i64, psamplebuffer: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).OnProcessSample)(::windows_core::Interface::as_raw(self), guidmajormediatype, dwsampleflags, llsampletime, llsampleduration, ::core::mem::transmute(psamplebuffer.as_ptr()), psamplebuffer.len() as _).ok() + (::windows_core::Interface::vtable(self).OnProcessSample)(::windows_core::Interface::as_raw(self), guidmajormediatype, dwsampleflags, llsampletime, llsampleduration, ::core::mem::transmute(psamplebuffer.as_ptr()), psamplebuffer.len().try_into().unwrap()).ok() } pub unsafe fn OnShutdown(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).OnShutdown)(::windows_core::Interface::as_raw(self)).ok() @@ -17739,7 +17750,7 @@ impl IMFSampleGrabberSinkCallback2 { (::windows_core::Interface::vtable(self).base__.OnSetPresentationClock)(::windows_core::Interface::as_raw(self), ppresentationclock.into_param().abi()).ok() } pub unsafe fn OnProcessSample(&self, guidmajormediatype: *const ::windows_core::GUID, dwsampleflags: u32, llsampletime: i64, llsampleduration: i64, psamplebuffer: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.OnProcessSample)(::windows_core::Interface::as_raw(self), guidmajormediatype, dwsampleflags, llsampletime, llsampleduration, ::core::mem::transmute(psamplebuffer.as_ptr()), psamplebuffer.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.OnProcessSample)(::windows_core::Interface::as_raw(self), guidmajormediatype, dwsampleflags, llsampletime, llsampleduration, ::core::mem::transmute(psamplebuffer.as_ptr()), psamplebuffer.len().try_into().unwrap()).ok() } pub unsafe fn OnShutdown(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.OnShutdown)(::windows_core::Interface::as_raw(self)).ok() @@ -17748,7 +17759,7 @@ impl IMFSampleGrabberSinkCallback2 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).OnProcessSampleEx)(::windows_core::Interface::as_raw(self), guidmajormediatype, dwsampleflags, llsampletime, llsampleduration, ::core::mem::transmute(psamplebuffer.as_ptr()), psamplebuffer.len() as _, pattributes.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).OnProcessSampleEx)(::windows_core::Interface::as_raw(self), guidmajormediatype, dwsampleflags, llsampletime, llsampleduration, ::core::mem::transmute(psamplebuffer.as_ptr()), psamplebuffer.len().try_into().unwrap(), pattributes.into_param().abi()).ok() } } ::windows_core::imp::interface_hierarchy!(IMFSampleGrabberSinkCallback2, ::windows_core::IUnknown, IMFClockStateSink, IMFSampleGrabberSinkCallback); @@ -17958,7 +17969,7 @@ impl IMFSecureChannel { (::windows_core::Interface::vtable(self).GetCertificate)(::windows_core::Interface::as_raw(self), ppcert, pcbcert).ok() } pub unsafe fn SetupSession(&self, pbencryptedsessionkey: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetupSession)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbencryptedsessionkey.as_ptr()), pbencryptedsessionkey.len() as _).ok() + (::windows_core::Interface::vtable(self).SetupSession)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbencryptedsessionkey.as_ptr()), pbencryptedsessionkey.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(IMFSecureChannel, ::windows_core::IUnknown); @@ -18090,10 +18101,10 @@ pub struct IMFSensorActivityMonitor_Vtbl { pub struct IMFSensorActivityReport(::windows_core::IUnknown); impl IMFSensorActivityReport { pub unsafe fn GetFriendlyName(&self, friendlyname: &mut [u16], pcchwritten: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetFriendlyName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(friendlyname.as_ptr()), friendlyname.len() as _, pcchwritten).ok() + (::windows_core::Interface::vtable(self).GetFriendlyName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(friendlyname.as_ptr()), friendlyname.len().try_into().unwrap(), pcchwritten).ok() } pub unsafe fn GetSymbolicLink(&self, symboliclink: &mut [u16], pcchwritten: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSymbolicLink)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(symboliclink.as_ptr()), symboliclink.len() as _, pcchwritten).ok() + (::windows_core::Interface::vtable(self).GetSymbolicLink)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(symboliclink.as_ptr()), symboliclink.len().try_into().unwrap(), pcchwritten).ok() } pub unsafe fn GetProcessCount(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -18137,7 +18148,7 @@ impl IMFSensorDevice { (::windows_core::Interface::vtable(self).GetFlags)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetSymbolicLink(&self, symboliclink: &mut [u16], pcchwritten: *mut i32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSymbolicLink)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(symboliclink.as_ptr()), symboliclink.len() as _, pcchwritten).ok() + (::windows_core::Interface::vtable(self).GetSymbolicLink)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(symboliclink.as_ptr()), symboliclink.len().try_into().unwrap(), pcchwritten).ok() } pub unsafe fn GetDeviceAttributes(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -18185,7 +18196,7 @@ pub struct IMFSensorDevice_Vtbl { pub struct IMFSensorGroup(::windows_core::IUnknown); impl IMFSensorGroup { pub unsafe fn GetSymbolicLink(&self, symboliclink: &mut [u16], pcchwritten: *mut i32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSymbolicLink)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(symboliclink.as_ptr()), symboliclink.len() as _, pcchwritten).ok() + (::windows_core::Interface::vtable(self).GetSymbolicLink)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(symboliclink.as_ptr()), symboliclink.len().try_into().unwrap(), pcchwritten).ok() } pub unsafe fn GetFlags(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -18425,7 +18436,7 @@ impl IMFSensorStream { (::windows_core::Interface::vtable(self).base__.GetStringLength)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetString(&self, guidkey: *const ::windows_core::GUID, pwszvalue: &mut [u16], pcchlength: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len() as _, ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len().try_into().unwrap(), ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedString(&self, guidkey: *const ::windows_core::GUID, ppwszvalue: *mut ::windows_core::PWSTR, pcchlength: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetAllocatedString)(::windows_core::Interface::as_raw(self), guidkey, ppwszvalue, pcchlength).ok() @@ -18435,7 +18446,7 @@ impl IMFSensorStream { (::windows_core::Interface::vtable(self).base__.GetBlobSize)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &mut [u8], pcbblobsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _, ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap(), ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedBlob(&self, guidkey: *const ::windows_core::GUID, ppbuf: *mut *mut u8, pcbsize: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetAllocatedBlob)(::windows_core::Interface::as_raw(self), guidkey, ppbuf, pcbsize).ok() @@ -18477,7 +18488,7 @@ impl IMFSensorStream { (::windows_core::Interface::vtable(self).base__.SetString)(::windows_core::Interface::as_raw(self), guidkey, wszvalue.into_param().abi()).ok() } pub unsafe fn SetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap()).ok() } pub unsafe fn SetUnknown(&self, guidkey: *const ::windows_core::GUID, punknown: P0) -> ::windows_core::Result<()> where @@ -19008,7 +19019,7 @@ impl IMFSourceBuffer { (::windows_core::Interface::vtable(self).SetAppendWindowEnd)(::windows_core::Interface::as_raw(self), time).ok() } pub unsafe fn Append(&self, pdata: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Append)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdata.as_ptr()), pdata.len() as _).ok() + (::windows_core::Interface::vtable(self).Append)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap()).ok() } pub unsafe fn AppendByteStream(&self, pstream: P0, pmaxlen: ::core::option::Option<*const u64>) -> ::windows_core::Result<()> where @@ -19628,7 +19639,7 @@ impl IMFSpatialAudioSample { (::windows_core::Interface::vtable(self).base__.base__.GetStringLength)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetString(&self, guidkey: *const ::windows_core::GUID, pwszvalue: &mut [u16], pcchlength: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len() as _, ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len().try_into().unwrap(), ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedString(&self, guidkey: *const ::windows_core::GUID, ppwszvalue: *mut ::windows_core::PWSTR, pcchlength: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.GetAllocatedString)(::windows_core::Interface::as_raw(self), guidkey, ppwszvalue, pcchlength).ok() @@ -19638,7 +19649,7 @@ impl IMFSpatialAudioSample { (::windows_core::Interface::vtable(self).base__.base__.GetBlobSize)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &mut [u8], pcbblobsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _, ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap(), ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedBlob(&self, guidkey: *const ::windows_core::GUID, ppbuf: *mut *mut u8, pcbsize: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.GetAllocatedBlob)(::windows_core::Interface::as_raw(self), guidkey, ppbuf, pcbsize).ok() @@ -19680,7 +19691,7 @@ impl IMFSpatialAudioSample { (::windows_core::Interface::vtable(self).base__.base__.SetString)(::windows_core::Interface::as_raw(self), guidkey, wszvalue.into_param().abi()).ok() } pub unsafe fn SetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap()).ok() } pub unsafe fn SetUnknown(&self, guidkey: *const ::windows_core::GUID, punknown: P0) -> ::windows_core::Result<()> where @@ -19843,7 +19854,7 @@ impl IMFStreamDescriptor { (::windows_core::Interface::vtable(self).base__.GetStringLength)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetString(&self, guidkey: *const ::windows_core::GUID, pwszvalue: &mut [u16], pcchlength: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len() as _, ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len().try_into().unwrap(), ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedString(&self, guidkey: *const ::windows_core::GUID, ppwszvalue: *mut ::windows_core::PWSTR, pcchlength: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetAllocatedString)(::windows_core::Interface::as_raw(self), guidkey, ppwszvalue, pcchlength).ok() @@ -19853,7 +19864,7 @@ impl IMFStreamDescriptor { (::windows_core::Interface::vtable(self).base__.GetBlobSize)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &mut [u8], pcbblobsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _, ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap(), ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedBlob(&self, guidkey: *const ::windows_core::GUID, ppbuf: *mut *mut u8, pcbsize: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetAllocatedBlob)(::windows_core::Interface::as_raw(self), guidkey, ppbuf, pcbsize).ok() @@ -19895,7 +19906,7 @@ impl IMFStreamDescriptor { (::windows_core::Interface::vtable(self).base__.SetString)(::windows_core::Interface::as_raw(self), guidkey, wszvalue.into_param().abi()).ok() } pub unsafe fn SetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap()).ok() } pub unsafe fn SetUnknown(&self, guidkey: *const ::windows_core::GUID, punknown: P0) -> ::windows_core::Result<()> where @@ -20059,7 +20070,7 @@ impl IMFSystemId { (::windows_core::Interface::vtable(self).GetData)(::windows_core::Interface::as_raw(self), size, data).ok() } pub unsafe fn Setup(&self, stage: u32, pbin: &[u8], pcbout: *mut u32, ppbout: *mut *mut u8) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Setup)(::windows_core::Interface::as_raw(self), stage, pbin.len() as _, ::core::mem::transmute(pbin.as_ptr()), pcbout, ppbout).ok() + (::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, ppbout).ok() } } ::windows_core::imp::interface_hierarchy!(IMFSystemId, ::windows_core::IUnknown); @@ -20417,7 +20428,7 @@ impl IMFTimedTextCueList { (::windows_core::Interface::vtable(self).AddTextCue)(::windows_core::Interface::as_raw(self), start, duration, text.into_param().abi(), ::core::mem::transmute(cue.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn AddDataCue(&self, start: f64, duration: f64, data: &[u8], cue: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).AddDataCue)(::windows_core::Interface::as_raw(self), start, duration, ::core::mem::transmute(data.as_ptr()), data.len() as _, ::core::mem::transmute(cue.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).AddDataCue)(::windows_core::Interface::as_raw(self), start, duration, ::core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap(), ::core::mem::transmute(cue.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn RemoveCue(&self, cue: P0) -> ::windows_core::Result<()> where @@ -21017,7 +21028,7 @@ impl IMFTopology { (::windows_core::Interface::vtable(self).base__.GetStringLength)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetString(&self, guidkey: *const ::windows_core::GUID, pwszvalue: &mut [u16], pcchlength: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len() as _, ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len().try_into().unwrap(), ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedString(&self, guidkey: *const ::windows_core::GUID, ppwszvalue: *mut ::windows_core::PWSTR, pcchlength: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetAllocatedString)(::windows_core::Interface::as_raw(self), guidkey, ppwszvalue, pcchlength).ok() @@ -21027,7 +21038,7 @@ impl IMFTopology { (::windows_core::Interface::vtable(self).base__.GetBlobSize)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &mut [u8], pcbblobsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _, ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap(), ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedBlob(&self, guidkey: *const ::windows_core::GUID, ppbuf: *mut *mut u8, pcbsize: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetAllocatedBlob)(::windows_core::Interface::as_raw(self), guidkey, ppbuf, pcbsize).ok() @@ -21069,7 +21080,7 @@ impl IMFTopology { (::windows_core::Interface::vtable(self).base__.SetString)(::windows_core::Interface::as_raw(self), guidkey, wszvalue.into_param().abi()).ok() } pub unsafe fn SetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap()).ok() } pub unsafe fn SetUnknown(&self, guidkey: *const ::windows_core::GUID, punknown: P0) -> ::windows_core::Result<()> where @@ -21215,7 +21226,7 @@ impl IMFTopologyNode { (::windows_core::Interface::vtable(self).base__.GetStringLength)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetString(&self, guidkey: *const ::windows_core::GUID, pwszvalue: &mut [u16], pcchlength: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len() as _, ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len().try_into().unwrap(), ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedString(&self, guidkey: *const ::windows_core::GUID, ppwszvalue: *mut ::windows_core::PWSTR, pcchlength: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetAllocatedString)(::windows_core::Interface::as_raw(self), guidkey, ppwszvalue, pcchlength).ok() @@ -21225,7 +21236,7 @@ impl IMFTopologyNode { (::windows_core::Interface::vtable(self).base__.GetBlobSize)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &mut [u8], pcbblobsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _, ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap(), ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedBlob(&self, guidkey: *const ::windows_core::GUID, ppbuf: *mut *mut u8, pcbsize: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetAllocatedBlob)(::windows_core::Interface::as_raw(self), guidkey, ppbuf, pcbsize).ok() @@ -21267,7 +21278,7 @@ impl IMFTopologyNode { (::windows_core::Interface::vtable(self).base__.SetString)(::windows_core::Interface::as_raw(self), guidkey, wszvalue.into_param().abi()).ok() } pub unsafe fn SetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap()).ok() } pub unsafe fn SetUnknown(&self, guidkey: *const ::windows_core::GUID, punknown: P0) -> ::windows_core::Result<()> where @@ -21400,7 +21411,7 @@ pub struct IMFTopologyNode_Vtbl { pub struct IMFTopologyNodeAttributeEditor(::windows_core::IUnknown); impl IMFTopologyNodeAttributeEditor { pub unsafe fn UpdateNodeAttributes(&self, topoid: u64, pupdates: &[MFTOPONODE_ATTRIBUTE_UPDATE]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).UpdateNodeAttributes)(::windows_core::Interface::as_raw(self), topoid, pupdates.len() as _, ::core::mem::transmute(pupdates.as_ptr())).ok() + (::windows_core::Interface::vtable(self).UpdateNodeAttributes)(::windows_core::Interface::as_raw(self), topoid, pupdates.len().try_into().unwrap(), ::core::mem::transmute(pupdates.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IMFTopologyNodeAttributeEditor, ::windows_core::IUnknown); @@ -21597,7 +21608,7 @@ impl IMFTransform { (::windows_core::Interface::vtable(self).GetStreamCount)(::windows_core::Interface::as_raw(self), pcinputstreams, pcoutputstreams).ok() } pub unsafe fn GetStreamIDs(&self, pdwinputids: &mut [u32], pdwoutputids: &mut [u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetStreamIDs)(::windows_core::Interface::as_raw(self), pdwinputids.len() as _, ::core::mem::transmute(pdwinputids.as_ptr()), pdwoutputids.len() as _, ::core::mem::transmute(pdwoutputids.as_ptr())).ok() + (::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<()> { (::windows_core::Interface::vtable(self).GetInputStreamInfo)(::windows_core::Interface::as_raw(self), dwinputstreamid, pstreaminfo).ok() @@ -21679,7 +21690,7 @@ impl IMFTransform { (::windows_core::Interface::vtable(self).ProcessInput)(::windows_core::Interface::as_raw(self), dwinputstreamid, psample.into_param().abi(), dwflags).ok() } pub unsafe fn ProcessOutput(&self, dwflags: u32, poutputsamples: &mut [MFT_OUTPUT_DATA_BUFFER], pdwstatus: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).ProcessOutput)(::windows_core::Interface::as_raw(self), dwflags, poutputsamples.len() as _, ::core::mem::transmute(poutputsamples.as_ptr()), pdwstatus).ok() + (::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).ok() } } ::windows_core::imp::interface_hierarchy!(IMFTransform, ::windows_core::IUnknown); @@ -22041,7 +22052,7 @@ impl IMFVideoMediaType { (::windows_core::Interface::vtable(self).base__.base__.GetStringLength)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetString(&self, guidkey: *const ::windows_core::GUID, pwszvalue: &mut [u16], pcchlength: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len() as _, ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len().try_into().unwrap(), ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedString(&self, guidkey: *const ::windows_core::GUID, ppwszvalue: *mut ::windows_core::PWSTR, pcchlength: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.GetAllocatedString)(::windows_core::Interface::as_raw(self), guidkey, ppwszvalue, pcchlength).ok() @@ -22051,7 +22062,7 @@ impl IMFVideoMediaType { (::windows_core::Interface::vtable(self).base__.base__.GetBlobSize)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &mut [u8], pcbblobsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _, ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap(), ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedBlob(&self, guidkey: *const ::windows_core::GUID, ppbuf: *mut *mut u8, pcbsize: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.GetAllocatedBlob)(::windows_core::Interface::as_raw(self), guidkey, ppbuf, pcbsize).ok() @@ -22093,7 +22104,7 @@ impl IMFVideoMediaType { (::windows_core::Interface::vtable(self).base__.base__.SetString)(::windows_core::Interface::as_raw(self), guidkey, wszvalue.into_param().abi()).ok() } pub unsafe fn SetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap()).ok() } pub unsafe fn SetUnknown(&self, guidkey: *const ::windows_core::GUID, punknown: P0) -> ::windows_core::Result<()> where @@ -22906,7 +22917,7 @@ impl IMFVirtualCamera { (::windows_core::Interface::vtable(self).base__.GetStringLength)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetString(&self, guidkey: *const ::windows_core::GUID, pwszvalue: &mut [u16], pcchlength: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len() as _, ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetString)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len().try_into().unwrap(), ::core::mem::transmute(pcchlength.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedString(&self, guidkey: *const ::windows_core::GUID, ppwszvalue: *mut ::windows_core::PWSTR, pcchlength: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetAllocatedString)(::windows_core::Interface::as_raw(self), guidkey, ppwszvalue, pcchlength).ok() @@ -22916,7 +22927,7 @@ impl IMFVirtualCamera { (::windows_core::Interface::vtable(self).base__.GetBlobSize)(::windows_core::Interface::as_raw(self), guidkey, &mut result__).from_abi(result__) } pub unsafe fn GetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &mut [u8], pcbblobsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _, ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap(), ::core::mem::transmute(pcbblobsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedBlob(&self, guidkey: *const ::windows_core::GUID, ppbuf: *mut *mut u8, pcbsize: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetAllocatedBlob)(::windows_core::Interface::as_raw(self), guidkey, ppbuf, pcbsize).ok() @@ -22958,7 +22969,7 @@ impl IMFVirtualCamera { (::windows_core::Interface::vtable(self).base__.SetString)(::windows_core::Interface::as_raw(self), guidkey, wszvalue.into_param().abi()).ok() } pub unsafe fn SetBlob(&self, guidkey: *const ::windows_core::GUID, pbuf: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.SetBlob)(::windows_core::Interface::as_raw(self), guidkey, ::core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap()).ok() } pub unsafe fn SetUnknown(&self, guidkey: *const ::windows_core::GUID, punknown: P0) -> ::windows_core::Result<()> where @@ -22996,14 +23007,14 @@ impl IMFVirtualCamera { #[doc = "Required features: `\"Win32_Devices_Properties\"`"] #[cfg(feature = "Win32_Devices_Properties")] pub unsafe fn AddProperty(&self, pkey: *const super::super::Devices::Properties::DEVPROPKEY, r#type: super::super::Devices::Properties::DEVPROPTYPE, pbdata: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).AddProperty)(::windows_core::Interface::as_raw(self), pkey, r#type, ::core::mem::transmute(pbdata.as_ptr()), pbdata.len() as _).ok() + (::windows_core::Interface::vtable(self).AddProperty)(::windows_core::Interface::as_raw(self), pkey, r#type, ::core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap()).ok() } pub unsafe fn AddRegistryEntry(&self, entryname: P0, subkeypath: P1, dwregtype: u32, pbdata: &[u8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).AddRegistryEntry)(::windows_core::Interface::as_raw(self), entryname.into_param().abi(), subkeypath.into_param().abi(), dwregtype, ::core::mem::transmute(pbdata.as_ptr()), pbdata.len() as _).ok() + (::windows_core::Interface::vtable(self).AddRegistryEntry)(::windows_core::Interface::as_raw(self), entryname.into_param().abi(), subkeypath.into_param().abi(), dwregtype, ::core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap()).ok() } pub unsafe fn Start(&self, pcallback: P0) -> ::windows_core::Result<()> where @@ -23296,7 +23307,7 @@ impl IOPMVideoOutput { (::windows_core::Interface::vtable(self).COPPCompatibleGetInformation)(::windows_core::Interface::as_raw(self), pparameters, prequestedinformation).ok() } pub unsafe fn Configure(&self, pparameters: *const OPM_CONFIGURE_PARAMETERS, pbadditionalparameters: ::core::option::Option<&[u8]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Configure)(::windows_core::Interface::as_raw(self), pparameters, pbadditionalparameters.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pbadditionalparameters.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + (::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() } } ::windows_core::imp::interface_hierarchy!(IOPMVideoOutput, ::windows_core::IUnknown); @@ -23673,7 +23684,7 @@ pub struct ITocParser_Vtbl { pub struct 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<()> { - (::windows_core::Interface::vtable(self).GetIdentifier)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(guidlicensorid), ::core::mem::transmute(pbephemeron.as_ptr()), pbephemeron.len() as _, ppbblobvalidationid, pcbblobsize).ok() + (::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, pcbblobsize).ok() } } ::windows_core::imp::interface_hierarchy!(IValidateBinding, ::windows_core::IUnknown); @@ -23816,12 +23827,12 @@ impl IWMCodecStrings { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Media_DxMediaObjects\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Media_DxMediaObjects"))] pub unsafe fn GetName(&self, pmt: *mut super::DxMediaObjects::DMO_MEDIA_TYPE, szname: ::core::option::Option<&mut [u16]>, pcchlength: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetName)(::windows_core::Interface::as_raw(self), pmt, szname.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(szname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pcchlength).ok() + (::windows_core::Interface::vtable(self).GetName)(::windows_core::Interface::as_raw(self), 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).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Media_DxMediaObjects\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Media_DxMediaObjects"))] pub unsafe fn GetDescription(&self, pmt: *mut super::DxMediaObjects::DMO_MEDIA_TYPE, szdescription: ::core::option::Option<&mut [u16]>, pcchlength: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDescription)(::windows_core::Interface::as_raw(self), pmt, szdescription.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(szdescription.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pcchlength).ok() + (::windows_core::Interface::vtable(self).GetDescription)(::windows_core::Interface::as_raw(self), 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).ok() } } ::windows_core::imp::interface_hierarchy!(IWMCodecStrings, ::windows_core::IUnknown); 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 e262827e3e..d9ce0ea972 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/MediaPlayer/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/MediaPlayer/mod.rs @@ -2007,7 +2007,7 @@ impl IWMPContentPartner { P0: ::windows_core::IntoParam<::windows_core::BSTR>, P1: ::windows_core::IntoParam<::windows_core::BSTR>, { - (::windows_core::Interface::vtable(self).GetCommands)(::windows_core::Interface::as_raw(self), location.into_param().abi(), plocationcontext, itemlocation.into_param().abi(), prgitemids.len() as _, ::core::mem::transmute(prgitemids.as_ptr()), pcitemids, pprgitems).ok() + (::windows_core::Interface::vtable(self).GetCommands)(::windows_core::Interface::as_raw(self), location.into_param().abi(), plocationcontext, itemlocation.into_param().abi(), prgitemids.len().try_into().unwrap(), ::core::mem::transmute(prgitemids.as_ptr()), pcitemids, pprgitems).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -2016,7 +2016,7 @@ impl IWMPContentPartner { P0: ::windows_core::IntoParam<::windows_core::BSTR>, P1: ::windows_core::IntoParam<::windows_core::BSTR>, { - (::windows_core::Interface::vtable(self).InvokeCommand)(::windows_core::Interface::as_raw(self), dwcommandid, location.into_param().abi(), plocationcontext, itemlocation.into_param().abi(), rgitemids.len() as _, ::core::mem::transmute(rgitemids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).InvokeCommand)(::windows_core::Interface::as_raw(self), dwcommandid, location.into_param().abi(), plocationcontext, itemlocation.into_param().abi(), rgitemids.len().try_into().unwrap(), ::core::mem::transmute(rgitemids.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2254,7 +2254,7 @@ impl IWMPContentPartnerCallback { (::windows_core::Interface::vtable(self).ChangeView)(::windows_core::Interface::as_raw(self), bstrtype.into_param().abi(), bstrid.into_param().abi(), bstrfilter.into_param().abi()).ok() } pub unsafe fn AddListContents(&self, dwlistcookie: u32, prgitems: &[u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).AddListContents)(::windows_core::Interface::as_raw(self), dwlistcookie, prgitems.len() as _, ::core::mem::transmute(prgitems.as_ptr())).ok() + (::windows_core::Interface::vtable(self).AddListContents)(::windows_core::Interface::as_raw(self), dwlistcookie, prgitems.len().try_into().unwrap(), ::core::mem::transmute(prgitems.as_ptr())).ok() } pub unsafe fn ListContentsComplete(&self, dwlistcookie: u32, hrsuccess: ::windows_core::HRESULT) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).ListContentsComplete)(::windows_core::Interface::as_raw(self), dwlistcookie, hrsuccess).ok() 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 9fdff0f7de..ebd6531f4a 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/Multimedia/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/Multimedia/mod.rs @@ -6,7 +6,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("avifil32.dll" "system" fn AVIBuildFilterA(lpszfilter : ::windows_core::PSTR, cbfilter : i32, fsaving : super::super::Foundation:: BOOL) -> ::windows_core::HRESULT); - AVIBuildFilterA(::core::mem::transmute(lpszfilter.as_ptr()), lpszfilter.len() as _, fsaving.into_param().abi()).ok() + AVIBuildFilterA(::core::mem::transmute(lpszfilter.as_ptr()), lpszfilter.len().try_into().unwrap(), fsaving.into_param().abi()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -16,7 +16,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("avifil32.dll" "system" fn AVIBuildFilterW(lpszfilter : ::windows_core::PWSTR, cbfilter : i32, fsaving : super::super::Foundation:: BOOL) -> ::windows_core::HRESULT); - AVIBuildFilterW(::core::mem::transmute(lpszfilter.as_ptr()), lpszfilter.len() as _, fsaving.into_param().abi()).ok() + AVIBuildFilterW(::core::mem::transmute(lpszfilter.as_ptr()), lpszfilter.len().try_into().unwrap(), fsaving.into_param().abi()).ok() } #[inline] pub unsafe fn AVIClearClipboard() -> ::windows_core::Result<()> { @@ -150,7 +150,7 @@ where #[inline] pub unsafe fn AVIMakeFileFromStreams(ppfile: *mut ::core::option::Option, papstreams: &[::core::option::Option]) -> ::windows_core::Result<()> { ::windows_targets::link!("avifil32.dll" "system" fn AVIMakeFileFromStreams(ppfile : *mut * mut::core::ffi::c_void, nstreams : i32, papstreams : *const * mut::core::ffi::c_void) -> ::windows_core::HRESULT); - AVIMakeFileFromStreams(::core::mem::transmute(ppfile), papstreams.len() as _, ::core::mem::transmute(papstreams.as_ptr())).ok() + AVIMakeFileFromStreams(::core::mem::transmute(ppfile), papstreams.len().try_into().unwrap(), ::core::mem::transmute(papstreams.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -195,7 +195,7 @@ where #[inline] pub unsafe fn AVISaveOptionsFree(plpoptions: &[*const AVICOMPRESSOPTIONS]) -> ::windows_core::Result<()> { ::windows_targets::link!("avifil32.dll" "system" fn AVISaveOptionsFree(nstreams : i32, plpoptions : *const *const AVICOMPRESSOPTIONS) -> ::windows_core::HRESULT); - AVISaveOptionsFree(plpoptions.len() as _, ::core::mem::transmute(plpoptions.as_ptr())).ok() + AVISaveOptionsFree(plpoptions.len().try_into().unwrap(), ::core::mem::transmute(plpoptions.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -462,7 +462,7 @@ where #[inline] pub unsafe fn DrawDibChangePalette(hdd: isize, istart: i32, lppe: &[super::super::Graphics::Gdi::PALETTEENTRY]) -> super::super::Foundation::BOOL { ::windows_targets::link!("msvfw32.dll" "system" fn DrawDibChangePalette(hdd : isize, istart : i32, ilen : i32, lppe : *const super::super::Graphics::Gdi:: PALETTEENTRY) -> super::super::Foundation:: BOOL); - DrawDibChangePalette(hdd, istart, lppe.len() as _, ::core::mem::transmute(lppe.as_ptr())) + DrawDibChangePalette(hdd, istart, lppe.len().try_into().unwrap(), ::core::mem::transmute(lppe.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -957,14 +957,14 @@ where #[inline] pub unsafe fn capGetDriverDescriptionA(wdriverindex: u32, lpszname: &mut [u8], lpszver: &mut [u8]) -> super::super::Foundation::BOOL { ::windows_targets::link!("avicap32.dll" "system" fn capGetDriverDescriptionA(wdriverindex : u32, lpszname : ::windows_core::PSTR, cbname : i32, lpszver : ::windows_core::PSTR, cbver : i32) -> super::super::Foundation:: BOOL); - capGetDriverDescriptionA(wdriverindex, ::core::mem::transmute(lpszname.as_ptr()), lpszname.len() as _, ::core::mem::transmute(lpszver.as_ptr()), lpszver.len() as _) + capGetDriverDescriptionA(wdriverindex, ::core::mem::transmute(lpszname.as_ptr()), lpszname.len().try_into().unwrap(), ::core::mem::transmute(lpszver.as_ptr()), lpszver.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn capGetDriverDescriptionW(wdriverindex: u32, lpszname: &mut [u16], lpszver: &mut [u16]) -> super::super::Foundation::BOOL { ::windows_targets::link!("avicap32.dll" "system" fn capGetDriverDescriptionW(wdriverindex : u32, lpszname : ::windows_core::PWSTR, cbname : i32, lpszver : ::windows_core::PWSTR, cbver : i32) -> super::super::Foundation:: BOOL); - capGetDriverDescriptionW(wdriverindex, ::core::mem::transmute(lpszname.as_ptr()), lpszname.len() as _, ::core::mem::transmute(lpszver.as_ptr()), lpszver.len() as _) + capGetDriverDescriptionW(wdriverindex, ::core::mem::transmute(lpszname.as_ptr()), lpszname.len().try_into().unwrap(), ::core::mem::transmute(lpszver.as_ptr()), lpszver.len().try_into().unwrap()) } #[inline] pub unsafe fn joyGetDevCapsA(ujoyid: usize, pjc: *mut JOYCAPSA, cbjc: u32) -> u32 { @@ -1086,14 +1086,14 @@ pub unsafe fn mciGetDriverData(wdeviceid: u32) -> usize { #[inline] pub unsafe fn mciGetErrorStringA(mcierr: u32, psztext: &mut [u8]) -> super::super::Foundation::BOOL { ::windows_targets::link!("winmm.dll" "system" fn mciGetErrorStringA(mcierr : u32, psztext : ::windows_core::PSTR, cchtext : u32) -> super::super::Foundation:: BOOL); - mciGetErrorStringA(mcierr, ::core::mem::transmute(psztext.as_ptr()), psztext.len() as _) + mciGetErrorStringA(mcierr, ::core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn mciGetErrorStringW(mcierr: u32, psztext: &mut [u16]) -> super::super::Foundation::BOOL { ::windows_targets::link!("winmm.dll" "system" fn mciGetErrorStringW(mcierr : u32, psztext : ::windows_core::PWSTR, cchtext : u32) -> super::super::Foundation:: BOOL); - mciGetErrorStringW(mcierr, ::core::mem::transmute(psztext.as_ptr()), psztext.len() as _) + mciGetErrorStringW(mcierr, ::core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap()) } #[inline] pub unsafe fn mciGetYieldProc(mciid: u32, pdwyielddata: *const u32) -> YIELDPROC { @@ -1130,7 +1130,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("winmm.dll" "system" fn mciSendStringA(lpstrcommand : ::windows_core::PCSTR, lpstrreturnstring : ::windows_core::PSTR, ureturnlength : u32, hwndcallback : super::super::Foundation:: HWND) -> u32); - mciSendStringA(lpstrcommand.into_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() as _), hwndcallback.into_param().abi()) + mciSendStringA(lpstrcommand.into_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.into_param().abi()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1141,7 +1141,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("winmm.dll" "system" fn mciSendStringW(lpstrcommand : ::windows_core::PCWSTR, lpstrreturnstring : ::windows_core::PWSTR, ureturnlength : u32, hwndcallback : super::super::Foundation:: HWND) -> u32); - mciSendStringW(lpstrcommand.into_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() as _), hwndcallback.into_param().abi()) + mciSendStringW(lpstrcommand.into_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.into_param().abi()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1289,7 +1289,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winmm.dll" "system" fn mmioRead(hmmio : HMMIO, pch : *mut i8, cch : i32) -> i32); - mmioRead(hmmio.into_param().abi(), ::core::mem::transmute(pch.as_ptr()), pch.len() as _) + mmioRead(hmmio.into_param().abi(), ::core::mem::transmute(pch.as_ptr()), pch.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1339,7 +1339,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winmm.dll" "system" fn mmioSetBuffer(hmmio : HMMIO, pchbuffer : ::windows_core::PSTR, cchbuffer : i32, fubuffer : u32) -> u32); - mmioSetBuffer(hmmio.into_param().abi(), ::core::mem::transmute(pchbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pchbuffer.as_deref().map_or(0, |slice| slice.len() as _), fubuffer) + mmioSetBuffer(hmmio.into_param().abi(), ::core::mem::transmute(pchbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pchbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), fubuffer) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1373,7 +1373,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winmm.dll" "system" fn mmioWrite(hmmio : HMMIO, pch : ::windows_core::PCSTR, cch : i32) -> i32); - mmioWrite(hmmio.into_param().abi(), ::core::mem::transmute(pch.as_ptr()), pch.len() as _) + mmioWrite(hmmio.into_param().abi(), ::core::mem::transmute(pch.as_ptr()), pch.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 6d898afda5..a45baa5372 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/Speech/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/Speech/mod.rs @@ -1696,10 +1696,10 @@ impl ISpPhoneticAlphabetConverter { (::windows_core::Interface::vtable(self).SetLangId)(::windows_core::Interface::as_raw(self), langid).ok() } pub unsafe fn SAPI2UPS(&self, pszsapiid: *const u16, pszupsid: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SAPI2UPS)(::windows_core::Interface::as_raw(self), pszsapiid, ::core::mem::transmute(pszupsid.as_ptr()), pszupsid.len() as _).ok() + (::windows_core::Interface::vtable(self).SAPI2UPS)(::windows_core::Interface::as_raw(self), pszsapiid, ::core::mem::transmute(pszupsid.as_ptr()), pszupsid.len().try_into().unwrap()).ok() } pub unsafe fn UPS2SAPI(&self, pszupsid: *const u16, pszsapiid: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).UPS2SAPI)(::windows_core::Interface::as_raw(self), pszupsid, ::core::mem::transmute(pszsapiid.as_ptr()), pszsapiid.len() as _).ok() + (::windows_core::Interface::vtable(self).UPS2SAPI)(::windows_core::Interface::as_raw(self), pszupsid, ::core::mem::transmute(pszsapiid.as_ptr()), pszsapiid.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2300,7 +2300,7 @@ impl ISpRecoGrammar { (::windows_core::Interface::vtable(self).SetDictationState)(::windows_core::Interface::as_raw(self), newstate).ok() } pub unsafe fn SetWordSequenceData(&self, ptext: ::core::option::Option<&[u16]>, pinfo: *const SPTEXTSELECTIONINFO) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetWordSequenceData)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ptext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ptext.as_deref().map_or(0, |slice| slice.len() as _), pinfo).ok() + (::windows_core::Interface::vtable(self).SetWordSequenceData)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ptext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ptext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pinfo).ok() } pub unsafe fn SetTextSelection(&self, pinfo: *const SPTEXTSELECTIONINFO) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).SetTextSelection)(::windows_core::Interface::as_raw(self), pinfo).ok() @@ -2473,7 +2473,7 @@ impl ISpRecoResult { (::windows_core::Interface::vtable(self).GetResultTimes)(::windows_core::Interface::as_raw(self), ptimes).ok() } pub unsafe fn GetAlternates(&self, ulstartelement: u32, celements: u32, ppphrases: &mut [::core::option::Option], pcphrasesreturned: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetAlternates)(::windows_core::Interface::as_raw(self), ulstartelement, celements, ppphrases.len() as _, ::core::mem::transmute(ppphrases.as_ptr()), pcphrasesreturned).ok() + (::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).ok() } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -2556,7 +2556,7 @@ impl ISpRecoResult2 { (::windows_core::Interface::vtable(self).base__.GetResultTimes)(::windows_core::Interface::as_raw(self), ptimes).ok() } pub unsafe fn GetAlternates(&self, ulstartelement: u32, celements: u32, ppphrases: &mut [::core::option::Option], pcphrasesreturned: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetAlternates)(::windows_core::Interface::as_raw(self), ulstartelement, celements, ppphrases.len() as _, ::core::mem::transmute(ppphrases.as_ptr()), pcphrasesreturned).ok() + (::windows_core::Interface::vtable(self).base__.GetAlternates)(::windows_core::Interface::as_raw(self), ulstartelement, celements, ppphrases.len().try_into().unwrap(), ::core::mem::transmute(ppphrases.as_ptr()), pcphrasesreturned).ok() } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -3703,7 +3703,7 @@ impl ISpXMLRecoResult { (::windows_core::Interface::vtable(self).base__.GetResultTimes)(::windows_core::Interface::as_raw(self), ptimes).ok() } pub unsafe fn GetAlternates(&self, ulstartelement: u32, celements: u32, ppphrases: &mut [::core::option::Option], pcphrasesreturned: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetAlternates)(::windows_core::Interface::as_raw(self), ulstartelement, celements, ppphrases.len() as _, ::core::mem::transmute(ppphrases.as_ptr()), pcphrasesreturned).ok() + (::windows_core::Interface::vtable(self).base__.GetAlternates)(::windows_core::Interface::as_raw(self), ulstartelement, celements, ppphrases.len().try_into().unwrap(), ::core::mem::transmute(ppphrases.as_ptr()), pcphrasesreturned).ok() } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] 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 ae32dea898..964b46d96f 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/WindowsMediaFormat/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/WindowsMediaFormat/mod.rs @@ -472,7 +472,7 @@ impl IWMBackupRestoreProps { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).SetProp)(::windows_core::Interface::as_raw(self), pszname.into_param().abi(), r#type, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len() as _).ok() + (::windows_core::Interface::vtable(self).SetProp)(::windows_core::Interface::as_raw(self), pszname.into_param().abi(), r#type, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len().try_into().unwrap()).ok() } pub unsafe fn RemoveProp(&self, pcwszname: P0) -> ::windows_core::Result<()> where @@ -708,7 +708,7 @@ impl IWMCodecInfo3 { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).SetCodecEnumerationSetting)(::windows_core::Interface::as_raw(self), guidtype, dwcodecindex, pszname.into_param().abi(), r#type, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len() as _).ok() + (::windows_core::Interface::vtable(self).SetCodecEnumerationSetting)(::windows_core::Interface::as_raw(self), guidtype, dwcodecindex, pszname.into_param().abi(), r#type, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len().try_into().unwrap()).ok() } pub unsafe fn GetCodecEnumerationSetting(&self, guidtype: *const ::windows_core::GUID, dwcodecindex: u32, pszname: P0, ptype: *mut WMT_ATTR_DATATYPE, pvalue: *mut u8, pdwsize: *mut u32) -> ::windows_core::Result<()> where @@ -742,7 +742,7 @@ impl IWMCredentialCallback { P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).AcquireCredentials)(::windows_core::Interface::as_raw(self), pwszrealm.into_param().abi(), pwszsite.into_param().abi(), ::core::mem::transmute(pwszuser.as_ptr()), pwszuser.len() as _, ::core::mem::transmute(pwszpassword.as_ptr()), pwszpassword.len() as _, hrstatus, pdwflags).ok() + (::windows_core::Interface::vtable(self).AcquireCredentials)(::windows_core::Interface::as_raw(self), pwszrealm.into_param().abi(), pwszsite.into_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).ok() } } ::windows_core::imp::interface_hierarchy!(IWMCredentialCallback, ::windows_core::IUnknown); @@ -787,10 +787,10 @@ pub struct IWMDRMEditor_Vtbl { pub struct IWMDRMMessageParser(::windows_core::IUnknown); impl IWMDRMMessageParser { pub unsafe fn ParseRegistrationReqMsg(&self, pbregistrationreqmsg: &[u8], ppdevicecert: *mut ::core::option::Option, pdeviceserialnumber: *mut DRM_VAL16) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).ParseRegistrationReqMsg)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbregistrationreqmsg.as_ptr()), pbregistrationreqmsg.len() as _, ::core::mem::transmute(ppdevicecert), pdeviceserialnumber).ok() + (::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).ok() } pub unsafe fn ParseLicenseRequestMsg(&self, pblicenserequestmsg: &[u8], ppdevicecert: *mut ::core::option::Option, pdeviceserialnumber: *mut DRM_VAL16, pbstraction: *mut ::windows_core::BSTR) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).ParseLicenseRequestMsg)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pblicenserequestmsg.as_ptr()), pblicenserequestmsg.len() as _, ::core::mem::transmute(ppdevicecert), pdeviceserialnumber, ::core::mem::transmute(pbstraction)).ok() + (::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, ::core::mem::transmute(pbstraction)).ok() } } ::windows_core::imp::interface_hierarchy!(IWMDRMMessageParser, ::windows_core::IUnknown); @@ -833,7 +833,7 @@ impl IWMDRMReader { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).SetDRMProperty)(::windows_core::Interface::as_raw(self), pwstrname.into_param().abi(), dwtype, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len() as _).ok() + (::windows_core::Interface::vtable(self).SetDRMProperty)(::windows_core::Interface::as_raw(self), pwstrname.into_param().abi(), dwtype, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len().try_into().unwrap()).ok() } pub unsafe fn GetDRMProperty(&self, pwstrname: P0, pdwtype: *mut WMT_ATTR_DATATYPE, pvalue: *mut u8, pcblength: *mut u16) -> ::windows_core::Result<()> where @@ -888,7 +888,7 @@ impl IWMDRMReader2 { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).base__.SetDRMProperty)(::windows_core::Interface::as_raw(self), pwstrname.into_param().abi(), dwtype, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.SetDRMProperty)(::windows_core::Interface::as_raw(self), pwstrname.into_param().abi(), dwtype, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len().try_into().unwrap()).ok() } pub unsafe fn GetDRMProperty(&self, pwstrname: P0, pdwtype: *mut WMT_ATTR_DATATYPE, pvalue: *mut u8, pcblength: *mut u16) -> ::windows_core::Result<()> where @@ -959,7 +959,7 @@ impl IWMDRMReader3 { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).base__.base__.SetDRMProperty)(::windows_core::Interface::as_raw(self), pwstrname.into_param().abi(), dwtype, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.SetDRMProperty)(::windows_core::Interface::as_raw(self), pwstrname.into_param().abi(), dwtype, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len().try_into().unwrap()).ok() } pub unsafe fn GetDRMProperty(&self, pwstrname: P0, pdwtype: *mut WMT_ATTR_DATATYPE, pvalue: *mut u8, pcblength: *mut u16) -> ::windows_core::Result<()> where @@ -1144,7 +1144,7 @@ impl IWMDRMWriter { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).SetDRMAttribute)(::windows_core::Interface::as_raw(self), wstreamnum, pszname.into_param().abi(), r#type, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len() as _).ok() + (::windows_core::Interface::vtable(self).SetDRMAttribute)(::windows_core::Interface::as_raw(self), wstreamnum, pszname.into_param().abi(), r#type, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(IWMDRMWriter, ::windows_core::IUnknown); @@ -1180,7 +1180,7 @@ impl IWMDRMWriter2 { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).base__.SetDRMAttribute)(::windows_core::Interface::as_raw(self), wstreamnum, pszname.into_param().abi(), r#type, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.SetDRMAttribute)(::windows_core::Interface::as_raw(self), wstreamnum, pszname.into_param().abi(), r#type, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1224,7 +1224,7 @@ impl IWMDRMWriter3 { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).base__.base__.SetDRMAttribute)(::windows_core::Interface::as_raw(self), wstreamnum, pszname.into_param().abi(), r#type, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.SetDRMAttribute)(::windows_core::Interface::as_raw(self), wstreamnum, pszname.into_param().abi(), r#type, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1257,10 +1257,10 @@ pub struct IWMDeviceRegistration(::windows_core::IUnknown); impl IWMDeviceRegistration { pub unsafe fn RegisterDevice(&self, dwregistertype: u32, pbcertificate: &[u8], serialnumber: DRM_VAL16) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).RegisterDevice)(::windows_core::Interface::as_raw(self), dwregistertype, ::core::mem::transmute(pbcertificate.as_ptr()), pbcertificate.len() as _, ::core::mem::transmute(serialnumber), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).RegisterDevice)(::windows_core::Interface::as_raw(self), dwregistertype, ::core::mem::transmute(pbcertificate.as_ptr()), pbcertificate.len().try_into().unwrap(), ::core::mem::transmute(serialnumber), &mut result__).from_abi(result__) } pub unsafe fn UnregisterDevice(&self, dwregistertype: u32, pbcertificate: &[u8], serialnumber: DRM_VAL16) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).UnregisterDevice)(::windows_core::Interface::as_raw(self), dwregistertype, ::core::mem::transmute(pbcertificate.as_ptr()), pbcertificate.len() as _, ::core::mem::transmute(serialnumber)).ok() + (::windows_core::Interface::vtable(self).UnregisterDevice)(::windows_core::Interface::as_raw(self), dwregistertype, ::core::mem::transmute(pbcertificate.as_ptr()), pbcertificate.len().try_into().unwrap(), ::core::mem::transmute(serialnumber)).ok() } pub unsafe fn GetRegistrationStats(&self, dwregistertype: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1276,7 +1276,7 @@ impl IWMDeviceRegistration { } pub unsafe fn GetRegisteredDeviceByID(&self, dwregistertype: u32, pbcertificate: &[u8], serialnumber: DRM_VAL16) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).GetRegisteredDeviceByID)(::windows_core::Interface::as_raw(self), dwregistertype, ::core::mem::transmute(pbcertificate.as_ptr()), pbcertificate.len() as _, ::core::mem::transmute(serialnumber), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).GetRegisteredDeviceByID)(::windows_core::Interface::as_raw(self), dwregistertype, ::core::mem::transmute(pbcertificate.as_ptr()), pbcertificate.len().try_into().unwrap(), ::core::mem::transmute(serialnumber), &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IWMDeviceRegistration, ::windows_core::IUnknown); @@ -1340,7 +1340,7 @@ impl IWMHeaderInfo { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).SetAttribute)(::windows_core::Interface::as_raw(self), wstreamnum, pszname.into_param().abi(), r#type, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len() as _).ok() + (::windows_core::Interface::vtable(self).SetAttribute)(::windows_core::Interface::as_raw(self), wstreamnum, pszname.into_param().abi(), r#type, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len().try_into().unwrap()).ok() } pub unsafe fn GetMarkerCount(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1421,7 +1421,7 @@ impl IWMHeaderInfo2 { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).base__.SetAttribute)(::windows_core::Interface::as_raw(self), wstreamnum, pszname.into_param().abi(), r#type, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.SetAttribute)(::windows_core::Interface::as_raw(self), wstreamnum, pszname.into_param().abi(), r#type, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len().try_into().unwrap()).ok() } pub unsafe fn GetMarkerCount(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1499,7 +1499,7 @@ impl IWMHeaderInfo3 { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).base__.base__.SetAttribute)(::windows_core::Interface::as_raw(self), wstreamnum, pszname.into_param().abi(), r#type, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.SetAttribute)(::windows_core::Interface::as_raw(self), wstreamnum, pszname.into_param().abi(), r#type, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len().try_into().unwrap()).ok() } pub unsafe fn GetMarkerCount(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1555,13 +1555,13 @@ impl IWMHeaderInfo3 { (::windows_core::Interface::vtable(self).GetAttributeByIndexEx)(::windows_core::Interface::as_raw(self), wstreamnum, windex, ::core::mem::transmute(pwszname), pwnamelen, ptype, pwlangindex, pvalue, pdwdatalength).ok() } pub unsafe fn ModifyAttribute(&self, wstreamnum: u16, windex: u16, r#type: WMT_ATTR_DATATYPE, wlangindex: u16, pvalue: &[u8]) -> ::windows_core::Result<()> { - (::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() as _).ok() + (::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() } pub unsafe fn AddAttribute(&self, wstreamnum: u16, pszname: P0, pwindex: *mut u16, r#type: WMT_ATTR_DATATYPE, wlangindex: u16, pvalue: &[u8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).AddAttribute)(::windows_core::Interface::as_raw(self), wstreamnum, pszname.into_param().abi(), pwindex, r#type, wlangindex, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len() as _).ok() + (::windows_core::Interface::vtable(self).AddAttribute)(::windows_core::Interface::as_raw(self), wstreamnum, pszname.into_param().abi(), pwindex, 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<()> { (::windows_core::Interface::vtable(self).DeleteAttribute)(::windows_core::Interface::as_raw(self), wstreamnum, windex).ok() @@ -1571,7 +1571,7 @@ impl IWMHeaderInfo3 { P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).AddCodecInfo)(::windows_core::Interface::as_raw(self), pwszname.into_param().abi(), pwszdescription.into_param().abi(), codectype, pbcodecinfo.len() as _, ::core::mem::transmute(pbcodecinfo.as_ptr())).ok() + (::windows_core::Interface::vtable(self).AddCodecInfo)(::windows_core::Interface::as_raw(self), pwszname.into_param().abi(), pwszdescription.into_param().abi(), codectype, pbcodecinfo.len().try_into().unwrap(), ::core::mem::transmute(pbcodecinfo.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IWMHeaderInfo3, ::windows_core::IUnknown, IWMHeaderInfo, IWMHeaderInfo2); @@ -2803,7 +2803,7 @@ impl IWMProximityDetection { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).StartDetection)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbregistrationmsg.as_ptr()), pbregistrationmsg.len() as _, ::core::mem::transmute(pblocaladdress.as_ptr()), pblocaladdress.len() as _, dwextraportsallowed, ::core::mem::transmute(ppregistrationresponsemsg), pcallback.into_param().abi(), pvcontext).ok() + (::windows_core::Interface::vtable(self).StartDetection)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbregistrationmsg.as_ptr()), pbregistrationmsg.len().try_into().unwrap(), ::core::mem::transmute(pblocaladdress.as_ptr()), pblocaladdress.len().try_into().unwrap(), dwextraportsallowed, ::core::mem::transmute(ppregistrationresponsemsg), pcallback.into_param().abi(), pvcontext).ok() } } ::windows_core::imp::interface_hierarchy!(IWMProximityDetection, ::windows_core::IUnknown); @@ -3266,7 +3266,7 @@ impl IWMReaderAdvanced2 { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).SetOutputSetting)(::windows_core::Interface::as_raw(self), dwoutputnum, pszname.into_param().abi(), r#type, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len() as _).ok() + (::windows_core::Interface::vtable(self).SetOutputSetting)(::windows_core::Interface::as_raw(self), dwoutputnum, pszname.into_param().abi(), r#type, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len().try_into().unwrap()).ok() } pub unsafe fn Preroll(&self, cnsstart: u64, cnsduration: u64, frate: f32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Preroll)(::windows_core::Interface::as_raw(self), cnsstart, cnsduration, frate).ok() @@ -3490,7 +3490,7 @@ impl IWMReaderAdvanced3 { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).base__.SetOutputSetting)(::windows_core::Interface::as_raw(self), dwoutputnum, pszname.into_param().abi(), r#type, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.SetOutputSetting)(::windows_core::Interface::as_raw(self), dwoutputnum, pszname.into_param().abi(), r#type, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len().try_into().unwrap()).ok() } pub unsafe fn Preroll(&self, cnsstart: u64, cnsduration: u64, frate: f32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.Preroll)(::windows_core::Interface::as_raw(self), cnsstart, cnsduration, frate).ok() @@ -3698,7 +3698,7 @@ impl IWMReaderAdvanced4 { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).base__.base__.SetOutputSetting)(::windows_core::Interface::as_raw(self), dwoutputnum, pszname.into_param().abi(), r#type, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.SetOutputSetting)(::windows_core::Interface::as_raw(self), dwoutputnum, pszname.into_param().abi(), r#type, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len().try_into().unwrap()).ok() } pub unsafe fn Preroll(&self, cnsstart: u64, cnsduration: u64, frate: f32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.Preroll)(::windows_core::Interface::as_raw(self), cnsstart, cnsduration, frate).ok() @@ -3959,7 +3959,7 @@ impl IWMReaderAdvanced5 { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).base__.base__.base__.SetOutputSetting)(::windows_core::Interface::as_raw(self), dwoutputnum, pszname.into_param().abi(), r#type, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.SetOutputSetting)(::windows_core::Interface::as_raw(self), dwoutputnum, pszname.into_param().abi(), r#type, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len().try_into().unwrap()).ok() } pub unsafe fn Preroll(&self, cnsstart: u64, cnsduration: u64, frate: f32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.Preroll)(::windows_core::Interface::as_raw(self), cnsstart, cnsduration, frate).ok() @@ -4212,7 +4212,7 @@ impl IWMReaderAdvanced6 { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.SetOutputSetting)(::windows_core::Interface::as_raw(self), dwoutputnum, pszname.into_param().abi(), r#type, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.SetOutputSetting)(::windows_core::Interface::as_raw(self), dwoutputnum, pszname.into_param().abi(), r#type, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len().try_into().unwrap()).ok() } pub unsafe fn Preroll(&self, cnsstart: u64, cnsduration: u64, frate: f32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.Preroll)(::windows_core::Interface::as_raw(self), cnsstart, cnsduration, frate).ok() @@ -4296,7 +4296,7 @@ impl IWMReaderAdvanced6 { (::windows_core::Interface::vtable(self).base__.SetPlayerHook)(::windows_core::Interface::as_raw(self), dwoutputnum, phook.into_param().abi()).ok() } pub unsafe fn SetProtectStreamSamples(&self, pbcertificate: &[u8], dwcertificatetype: u32, dwflags: u32, pbinitializationvector: *mut u8, pcbinitializationvector: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetProtectStreamSamples)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbcertificate.as_ptr()), pbcertificate.len() as _, dwcertificatetype, dwflags, pbinitializationvector, pcbinitializationvector).ok() + (::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, pcbinitializationvector).ok() } } ::windows_core::imp::interface_hierarchy!(IWMReaderAdvanced6, ::windows_core::IUnknown, IWMReaderAdvanced, IWMReaderAdvanced2, IWMReaderAdvanced3, IWMReaderAdvanced4, IWMReaderAdvanced5); @@ -4428,7 +4428,7 @@ impl IWMReaderNetworkConfig { (::windows_core::Interface::vtable(self).GetUDPPortRanges)(::windows_core::Interface::as_raw(self), prangearray, pcranges).ok() } pub unsafe fn SetUDPPortRanges(&self, prangearray: &[WM_PORT_NUMBER_RANGE]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetUDPPortRanges)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(prangearray.as_ptr()), prangearray.len() as _).ok() + (::windows_core::Interface::vtable(self).SetUDPPortRanges)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(prangearray.as_ptr()), prangearray.len().try_into().unwrap()).ok() } pub unsafe fn GetProxySettings(&self, pwszprotocol: P0) -> ::windows_core::Result where @@ -4700,7 +4700,7 @@ impl IWMReaderNetworkConfig2 { (::windows_core::Interface::vtable(self).base__.GetUDPPortRanges)(::windows_core::Interface::as_raw(self), prangearray, pcranges).ok() } pub unsafe fn SetUDPPortRanges(&self, prangearray: &[WM_PORT_NUMBER_RANGE]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetUDPPortRanges)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(prangearray.as_ptr()), prangearray.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.SetUDPPortRanges)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(prangearray.as_ptr()), prangearray.len().try_into().unwrap()).ok() } pub unsafe fn GetProxySettings(&self, pwszprotocol: P0) -> ::windows_core::Result where @@ -5844,7 +5844,7 @@ impl IWMStreamConfig2 { (::windows_core::Interface::vtable(self).SetTransportType)(::windows_core::Interface::as_raw(self), ntransporttype).ok() } pub unsafe fn AddDataUnitExtension(&self, guidextensionsystemid: ::windows_core::GUID, cbextensiondatasize: u16, pbextensionsysteminfo: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).AddDataUnitExtension)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(guidextensionsystemid), cbextensiondatasize, ::core::mem::transmute(pbextensionsysteminfo.as_ptr()), pbextensionsysteminfo.len() as _).ok() + (::windows_core::Interface::vtable(self).AddDataUnitExtension)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(guidextensionsystemid), cbextensiondatasize, ::core::mem::transmute(pbextensionsysteminfo.as_ptr()), pbextensionsysteminfo.len().try_into().unwrap()).ok() } pub unsafe fn GetDataUnitExtensionCount(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -5930,7 +5930,7 @@ impl IWMStreamConfig3 { (::windows_core::Interface::vtable(self).base__.SetTransportType)(::windows_core::Interface::as_raw(self), ntransporttype).ok() } pub unsafe fn AddDataUnitExtension(&self, guidextensionsystemid: ::windows_core::GUID, cbextensiondatasize: u16, pbextensionsysteminfo: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.AddDataUnitExtension)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(guidextensionsystemid), cbextensiondatasize, ::core::mem::transmute(pbextensionsysteminfo.as_ptr()), pbextensionsysteminfo.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.AddDataUnitExtension)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(guidextensionsystemid), cbextensiondatasize, ::core::mem::transmute(pbextensionsysteminfo.as_ptr()), pbextensionsysteminfo.len().try_into().unwrap()).ok() } pub unsafe fn GetDataUnitExtensionCount(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -6083,7 +6083,7 @@ impl IWMSyncReader { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).SetOutputSetting)(::windows_core::Interface::as_raw(self), dwoutputnum, pszname.into_param().abi(), r#type, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len() as _).ok() + (::windows_core::Interface::vtable(self).SetOutputSetting)(::windows_core::Interface::as_raw(self), dwoutputnum, pszname.into_param().abi(), r#type, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len().try_into().unwrap()).ok() } pub unsafe fn GetOutputCount(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -6227,7 +6227,7 @@ impl IWMSyncReader2 { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).base__.SetOutputSetting)(::windows_core::Interface::as_raw(self), dwoutputnum, pszname.into_param().abi(), r#type, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.SetOutputSetting)(::windows_core::Interface::as_raw(self), dwoutputnum, pszname.into_param().abi(), r#type, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len().try_into().unwrap()).ok() } pub unsafe fn GetOutputCount(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -6638,7 +6638,7 @@ impl IWMWriterAdvanced2 { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).SetInputSetting)(::windows_core::Interface::as_raw(self), dwinputnum, pszname.into_param().abi(), r#type, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len() as _).ok() + (::windows_core::Interface::vtable(self).SetInputSetting)(::windows_core::Interface::as_raw(self), dwinputnum, pszname.into_param().abi(), r#type, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(IWMWriterAdvanced2, ::windows_core::IUnknown, IWMWriterAdvanced); @@ -6723,7 +6723,7 @@ impl IWMWriterAdvanced3 { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).base__.SetInputSetting)(::windows_core::Interface::as_raw(self), dwinputnum, pszname.into_param().abi(), r#type, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.SetInputSetting)(::windows_core::Interface::as_raw(self), dwinputnum, pszname.into_param().abi(), r#type, ::core::mem::transmute(pvalue.as_ptr()), pvalue.len().try_into().unwrap()).ok() } pub unsafe fn GetStatisticsEx(&self, wstreamnum: u16, pstats: *mut WM_WRITER_STATISTICS_EX) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetStatisticsEx)(::windows_core::Interface::as_raw(self), wstreamnum, pstats).ok() diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/Dhcp/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/Dhcp/mod.rs index 1a2edfe91a..b7d30f4d74 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/Dhcp/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/Dhcp/mod.rs @@ -734,7 +734,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::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); - DhcpHlprAddV4PolicyCondition(policy, parentexpr, r#type, optionid, suboptionid, vendorname.into_param().abi(), operator, ::core::mem::transmute(value.as_ptr()), value.len() as _, conditionindex) + DhcpHlprAddV4PolicyCondition(policy, parentexpr, r#type, optionid, suboptionid, vendorname.into_param().abi(), operator, ::core::mem::transmute(value.as_ptr()), value.len().try_into().unwrap(), conditionindex) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1081,7 +1081,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dhcpsapi.dll" "system" fn DhcpServerQueryDnsRegCredentials(serveripaddress : ::windows_core::PCWSTR, unamesize : u32, uname : ::windows_core::PWSTR, domainsize : u32, domain : ::windows_core::PWSTR) -> u32); - DhcpServerQueryDnsRegCredentials(serveripaddress.into_param().abi(), uname.len() as _, ::core::mem::transmute(uname.as_ptr()), domain.len() as _, ::core::mem::transmute(domain.as_ptr())) + DhcpServerQueryDnsRegCredentials(serveripaddress.into_param().abi(), uname.len().try_into().unwrap(), ::core::mem::transmute(uname.as_ptr()), domain.len().try_into().unwrap(), ::core::mem::transmute(domain.as_ptr())) } #[inline] pub unsafe fn DhcpServerRedoAuthorization(serveripaddr: P0, dwreserved: u32) -> u32 diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/Dns/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/Dns/mod.rs index e1b71a3255..ea9678a8dd 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/Dns/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/Dns/mod.rs @@ -73,7 +73,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::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); - DnsConnectionGetProxyInfoForHostUrl(pwszhosturl.into_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() as _), dwexplicitinterfaceindex, pproxyinfoex) + DnsConnectionGetProxyInfoForHostUrl(pwszhosturl.into_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) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -84,7 +84,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::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); - DnsConnectionGetProxyInfoForHostUrlEx(pwszhosturl.into_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() as _), dwexplicitinterfaceindex, pwszconnectionname.into_param().abi(), pproxyinfoex) + DnsConnectionGetProxyInfoForHostUrlEx(pwszhosturl.into_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.into_param().abi(), pproxyinfoex) } #[inline] pub unsafe fn DnsConnectionGetProxyList(pwszconnectionname: P0, pproxylist: *mut DNS_CONNECTION_PROXY_LIST) -> u32 @@ -392,7 +392,7 @@ pub unsafe fn DnsServiceResolveCancel(pcancelhandle: *const DNS_SERVICE_CANCEL) #[inline] pub unsafe fn DnsSetApplicationSettings(pservers: &[DNS_CUSTOM_SERVER], psettings: ::core::option::Option<*const DNS_APPLICATION_SETTINGS>) -> u32 { ::windows_targets::link!("dnsapi.dll" "system" fn DnsSetApplicationSettings(cservers : u32, pservers : *const DNS_CUSTOM_SERVER, psettings : *const DNS_APPLICATION_SETTINGS) -> u32); - DnsSetApplicationSettings(pservers.len() as _, ::core::mem::transmute(pservers.as_ptr()), ::core::mem::transmute(psettings.unwrap_or(::std::ptr::null()))) + DnsSetApplicationSettings(pservers.len().try_into().unwrap(), ::core::mem::transmute(pservers.as_ptr()), ::core::mem::transmute(psettings.unwrap_or(::std::ptr::null()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/IpHelper/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/IpHelper/mod.rs index 4f03aaad70..dd45742309 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/IpHelper/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/IpHelper/mod.rs @@ -78,7 +78,7 @@ pub unsafe fn ConvertInterfaceIndexToLuid(interfaceindex: u32, interfaceluid: *m #[inline] pub unsafe fn ConvertInterfaceLuidToAlias(interfaceluid: *const super::Ndis::NET_LUID_LH, interfacealias: &mut [u16]) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn ConvertInterfaceLuidToAlias(interfaceluid : *const super::Ndis:: NET_LUID_LH, interfacealias : ::windows_core::PWSTR, length : usize) -> super::super::Foundation:: WIN32_ERROR); - ConvertInterfaceLuidToAlias(interfaceluid, ::core::mem::transmute(interfacealias.as_ptr()), interfacealias.len() as _).ok() + ConvertInterfaceLuidToAlias(interfaceluid, ::core::mem::transmute(interfacealias.as_ptr()), interfacealias.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis"))] @@ -99,14 +99,14 @@ pub unsafe fn ConvertInterfaceLuidToIndex(interfaceluid: *const super::Ndis::NET #[inline] pub unsafe fn ConvertInterfaceLuidToNameA(interfaceluid: *const super::Ndis::NET_LUID_LH, interfacename: &mut [u8]) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn ConvertInterfaceLuidToNameA(interfaceluid : *const super::Ndis:: NET_LUID_LH, interfacename : ::windows_core::PSTR, length : usize) -> super::super::Foundation:: WIN32_ERROR); - ConvertInterfaceLuidToNameA(interfaceluid, ::core::mem::transmute(interfacename.as_ptr()), interfacename.len() as _).ok() + ConvertInterfaceLuidToNameA(interfaceluid, ::core::mem::transmute(interfacename.as_ptr()), interfacename.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis"))] #[inline] pub unsafe fn ConvertInterfaceLuidToNameW(interfaceluid: *const super::Ndis::NET_LUID_LH, interfacename: &mut [u16]) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn ConvertInterfaceLuidToNameW(interfaceluid : *const super::Ndis:: NET_LUID_LH, interfacename : ::windows_core::PWSTR, length : usize) -> super::super::Foundation:: WIN32_ERROR); - ConvertInterfaceLuidToNameW(interfaceluid, ::core::mem::transmute(interfacename.as_ptr()), interfacename.len() as _).ok() + ConvertInterfaceLuidToNameW(interfaceluid, ::core::mem::transmute(interfacename.as_ptr()), interfacename.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis"))] @@ -692,7 +692,7 @@ pub unsafe fn GetNetworkConnectivityHintForInterface(interfaceindex: u32, connec #[inline] pub unsafe fn GetNetworkInformation(networkguid: *const ::windows_core::GUID, compartmentid: *mut u32, siteid: *mut u32, networkname: &mut [u16]) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn GetNetworkInformation(networkguid : *const ::windows_core::GUID, compartmentid : *mut u32, siteid : *mut u32, networkname : ::windows_core::PWSTR, length : u32) -> super::super::Foundation:: WIN32_ERROR); - GetNetworkInformation(networkguid, compartmentid, siteid, ::core::mem::transmute(networkname.as_ptr()), networkname.len() as _).ok() + GetNetworkInformation(networkguid, compartmentid, siteid, ::core::mem::transmute(networkname.as_ptr()), networkname.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -741,12 +741,36 @@ pub unsafe fn GetPerAdapterInfo(ifindex: u32, pperadapterinfo: ::core::option::O #[inline] pub unsafe fn GetPerTcp6ConnectionEStats(row: *const MIB_TCP6ROW, estatstype: TCP_ESTATS_TYPE, rw: ::core::option::Option<&mut [u8]>, rwversion: u32, ros: ::core::option::Option<&mut [u8]>, rosversion: u32, rod: ::core::option::Option<&mut [u8]>, rodversion: u32) -> u32 { ::windows_targets::link!("iphlpapi.dll" "system" fn GetPerTcp6ConnectionEStats(row : *const MIB_TCP6ROW, estatstype : TCP_ESTATS_TYPE, rw : *mut u8, rwversion : u32, rwsize : u32, ros : *mut u8, rosversion : u32, rossize : u32, rod : *mut u8, rodversion : u32, rodsize : u32) -> u32); - GetPerTcp6ConnectionEStats(row, estatstype, ::core::mem::transmute(rw.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), rwversion, rw.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ros.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), rosversion, ros.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rod.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), rodversion, rod.as_deref().map_or(0, |slice| slice.len() as _)) + GetPerTcp6ConnectionEStats( + row, + estatstype, + ::core::mem::transmute(rw.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), + rwversion, + rw.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), + ::core::mem::transmute(ros.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), + rosversion, + ros.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), + ::core::mem::transmute(rod.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), + rodversion, + rod.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), + ) } #[inline] pub unsafe fn GetPerTcpConnectionEStats(row: *const MIB_TCPROW_LH, estatstype: TCP_ESTATS_TYPE, rw: ::core::option::Option<&mut [u8]>, rwversion: u32, ros: ::core::option::Option<&mut [u8]>, rosversion: u32, rod: ::core::option::Option<&mut [u8]>, rodversion: u32) -> u32 { ::windows_targets::link!("iphlpapi.dll" "system" fn GetPerTcpConnectionEStats(row : *const MIB_TCPROW_LH, estatstype : TCP_ESTATS_TYPE, rw : *mut u8, rwversion : u32, rwsize : u32, ros : *mut u8, rosversion : u32, rossize : u32, rod : *mut u8, rodversion : u32, rodsize : u32) -> u32); - GetPerTcpConnectionEStats(row, estatstype, ::core::mem::transmute(rw.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), rwversion, rw.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ros.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), rosversion, ros.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rod.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), rodversion, rod.as_deref().map_or(0, |slice| slice.len() as _)) + GetPerTcpConnectionEStats( + row, + estatstype, + ::core::mem::transmute(rw.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), + rwversion, + rw.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), + ::core::mem::transmute(ros.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), + rosversion, + ros.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), + ::core::mem::transmute(rod.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), + rodversion, + rod.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), + ) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1328,12 +1352,12 @@ where #[inline] pub unsafe fn SetPerTcp6ConnectionEStats(row: *const MIB_TCP6ROW, estatstype: TCP_ESTATS_TYPE, rw: &[u8], rwversion: u32, offset: u32) -> u32 { ::windows_targets::link!("iphlpapi.dll" "system" fn SetPerTcp6ConnectionEStats(row : *const MIB_TCP6ROW, estatstype : TCP_ESTATS_TYPE, rw : *const u8, rwversion : u32, rwsize : u32, offset : u32) -> u32); - SetPerTcp6ConnectionEStats(row, estatstype, ::core::mem::transmute(rw.as_ptr()), rwversion, rw.len() as _, offset) + SetPerTcp6ConnectionEStats(row, estatstype, ::core::mem::transmute(rw.as_ptr()), rwversion, rw.len().try_into().unwrap(), offset) } #[inline] pub unsafe fn SetPerTcpConnectionEStats(row: *const MIB_TCPROW_LH, estatstype: TCP_ESTATS_TYPE, rw: &[u8], rwversion: u32, offset: u32) -> u32 { ::windows_targets::link!("iphlpapi.dll" "system" fn SetPerTcpConnectionEStats(row : *const MIB_TCPROW_LH, estatstype : TCP_ESTATS_TYPE, rw : *const u8, rwversion : u32, rwsize : u32, offset : u32) -> u32); - SetPerTcpConnectionEStats(row, estatstype, ::core::mem::transmute(rw.as_ptr()), rwversion, rw.len() as _, offset) + SetPerTcpConnectionEStats(row, estatstype, ::core::mem::transmute(rw.as_ptr()), rwversion, rw.len().try_into().unwrap(), offset) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 107fbc69e3..1208b4c3c4 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetManagement/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetManagement/mod.rs @@ -4,7 +4,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("mstask.dll" "system" fn GetNetScheduleAccountInformation(pwszservername : ::windows_core::PCWSTR, ccaccount : u32, wszaccount : ::windows_core::PWSTR) -> ::windows_core::HRESULT); - GetNetScheduleAccountInformation(pwszservername.into_param().abi(), wszaccount.len() as _, ::core::mem::transmute(wszaccount.as_ptr())).ok() + GetNetScheduleAccountInformation(pwszservername.into_param().abi(), wszaccount.len().try_into().unwrap(), ::core::mem::transmute(wszaccount.as_ptr())).ok() } #[inline] pub unsafe fn I_NetLogonControl2(servername: P0, functioncode: u32, querylevel: u32, data: *const u8, buffer: *mut *mut u8) -> u32 @@ -17,22 +17,22 @@ where #[inline] pub unsafe fn LogErrorA(dwmessageid: u32, plpwssubstrings: &[::windows_core::PCSTR], dwerrorcode: u32) { ::windows_targets::link!("rtutils.dll" "system" fn LogErrorA(dwmessageid : u32, cnumberofsubstrings : u32, plpwssubstrings : *const ::windows_core::PCSTR, dwerrorcode : u32) -> ()); - LogErrorA(dwmessageid, plpwssubstrings.len() as _, ::core::mem::transmute(plpwssubstrings.as_ptr()), dwerrorcode) + LogErrorA(dwmessageid, plpwssubstrings.len().try_into().unwrap(), ::core::mem::transmute(plpwssubstrings.as_ptr()), dwerrorcode) } #[inline] pub unsafe fn LogErrorW(dwmessageid: u32, plpwssubstrings: &[::windows_core::PCWSTR], dwerrorcode: u32) { ::windows_targets::link!("rtutils.dll" "system" fn LogErrorW(dwmessageid : u32, cnumberofsubstrings : u32, plpwssubstrings : *const ::windows_core::PCWSTR, dwerrorcode : u32) -> ()); - LogErrorW(dwmessageid, plpwssubstrings.len() as _, ::core::mem::transmute(plpwssubstrings.as_ptr()), dwerrorcode) + LogErrorW(dwmessageid, plpwssubstrings.len().try_into().unwrap(), ::core::mem::transmute(plpwssubstrings.as_ptr()), dwerrorcode) } #[inline] pub unsafe fn LogEventA(weventtype: u32, dwmessageid: u32, plpwssubstrings: &[::windows_core::PCSTR]) { ::windows_targets::link!("rtutils.dll" "system" fn LogEventA(weventtype : u32, dwmessageid : u32, cnumberofsubstrings : u32, plpwssubstrings : *const ::windows_core::PCSTR) -> ()); - LogEventA(weventtype, dwmessageid, plpwssubstrings.len() as _, ::core::mem::transmute(plpwssubstrings.as_ptr())) + LogEventA(weventtype, dwmessageid, plpwssubstrings.len().try_into().unwrap(), ::core::mem::transmute(plpwssubstrings.as_ptr())) } #[inline] pub unsafe fn LogEventW(weventtype: u32, dwmessageid: u32, plpwssubstrings: &[::windows_core::PCWSTR]) { ::windows_targets::link!("rtutils.dll" "system" fn LogEventW(weventtype : u32, dwmessageid : u32, cnumberofsubstrings : u32, plpwssubstrings : *const ::windows_core::PCWSTR) -> ()); - LogEventW(weventtype, dwmessageid, plpwssubstrings.len() as _, ::core::mem::transmute(plpwssubstrings.as_ptr())) + LogEventW(weventtype, dwmessageid, plpwssubstrings.len().try_into().unwrap(), ::core::mem::transmute(plpwssubstrings.as_ptr())) } #[inline] pub unsafe fn MprSetupProtocolEnum(dwtransportid: u32, lplpbuffer: *mut *mut u8, lpdwentriesread: *mut u32) -> u32 { @@ -793,7 +793,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("netapi32.dll" "system" fn NetRequestOfflineDomainJoin(pprovisionbindata : *const u8, cbprovisionbindatasize : u32, dwoptions : NET_REQUEST_PROVISION_OPTIONS, lpwindowspath : ::windows_core::PCWSTR) -> u32); - NetRequestOfflineDomainJoin(::core::mem::transmute(pprovisionbindata.as_ptr()), pprovisionbindata.len() as _, dwoptions, lpwindowspath.into_param().abi()) + NetRequestOfflineDomainJoin(::core::mem::transmute(pprovisionbindata.as_ptr()), pprovisionbindata.len().try_into().unwrap(), dwoptions, lpwindowspath.into_param().abi()) } #[inline] pub unsafe fn NetRequestProvisioningPackageInstall(ppackagebindata: &[u8], dwprovisionoptions: NET_REQUEST_PROVISION_OPTIONS, lpwindowspath: P0, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> u32 @@ -801,7 +801,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("netapi32.dll" "system" fn NetRequestProvisioningPackageInstall(ppackagebindata : *const u8, dwpackagebindatasize : u32, dwprovisionoptions : NET_REQUEST_PROVISION_OPTIONS, lpwindowspath : ::windows_core::PCWSTR, pvreserved : *const ::core::ffi::c_void) -> u32); - NetRequestProvisioningPackageInstall(::core::mem::transmute(ppackagebindata.as_ptr()), ppackagebindata.len() as _, dwprovisionoptions, lpwindowspath.into_param().abi(), ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null()))) + NetRequestProvisioningPackageInstall(::core::mem::transmute(ppackagebindata.as_ptr()), ppackagebindata.len().try_into().unwrap(), dwprovisionoptions, lpwindowspath.into_param().abi(), ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null()))) } #[inline] pub unsafe fn NetScheduleJobAdd(servername: P0, buffer: *mut u8, jobid: *mut u32) -> u32 @@ -952,7 +952,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::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); - NetServiceInstall(servername.into_param().abi(), service.into_param().abi(), argv.len() as _, ::core::mem::transmute(argv.as_ptr()), bufptr) + NetServiceInstall(servername.into_param().abi(), service.into_param().abi(), argv.len().try_into().unwrap(), ::core::mem::transmute(argv.as_ptr()), bufptr) } #[inline] pub unsafe fn NetSetPrimaryComputerName(server: P0, primaryname: P1, domainaccount: P2, domainaccountpassword: P3, reserved: u32) -> u32 @@ -1234,7 +1234,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("rtutils.dll" "system" fn RouterLogEventA(hloghandle : super::super::Foundation:: HANDLE, dweventtype : u32, dwmessageid : u32, dwsubstringcount : u32, plpszsubstringarray : *const ::windows_core::PCSTR, dwerrorcode : u32) -> ()); - RouterLogEventA(hloghandle.into_param().abi(), dweventtype, dwmessageid, plpszsubstringarray.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(plpszsubstringarray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dwerrorcode) + RouterLogEventA(hloghandle.into_param().abi(), 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())), dwerrorcode) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1244,7 +1244,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("rtutils.dll" "system" fn RouterLogEventDataA(hloghandle : super::super::Foundation:: HANDLE, dweventtype : u32, dwmessageid : u32, dwsubstringcount : u32, plpszsubstringarray : *const ::windows_core::PCSTR, dwdatabytes : u32, lpdatabytes : *mut u8) -> ()); - RouterLogEventDataA(hloghandle.into_param().abi(), dweventtype, dwmessageid, plpszsubstringarray.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(plpszsubstringarray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dwdatabytes, lpdatabytes) + RouterLogEventDataA(hloghandle.into_param().abi(), 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) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1254,7 +1254,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("rtutils.dll" "system" fn RouterLogEventDataW(hloghandle : super::super::Foundation:: HANDLE, dweventtype : u32, dwmessageid : u32, dwsubstringcount : u32, plpszsubstringarray : *const ::windows_core::PCWSTR, dwdatabytes : u32, lpdatabytes : *mut u8) -> ()); - RouterLogEventDataW(hloghandle.into_param().abi(), dweventtype, dwmessageid, plpszsubstringarray.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(plpszsubstringarray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dwdatabytes, lpdatabytes) + RouterLogEventDataW(hloghandle.into_param().abi(), 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) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1286,7 +1286,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("rtutils.dll" "system" fn RouterLogEventStringA(hloghandle : super::super::Foundation:: HANDLE, dweventtype : u32, dwmessageid : u32, dwsubstringcount : u32, plpszsubstringarray : *const ::windows_core::PCSTR, dwerrorcode : u32, dwerrorindex : u32) -> ()); - RouterLogEventStringA(hloghandle.into_param().abi(), dweventtype, dwmessageid, plpszsubstringarray.len() as _, ::core::mem::transmute(plpszsubstringarray.as_ptr()), dwerrorcode, dwerrorindex) + RouterLogEventStringA(hloghandle.into_param().abi(), dweventtype, dwmessageid, plpszsubstringarray.len().try_into().unwrap(), ::core::mem::transmute(plpszsubstringarray.as_ptr()), dwerrorcode, dwerrorindex) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1296,7 +1296,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("rtutils.dll" "system" fn RouterLogEventStringW(hloghandle : super::super::Foundation:: HANDLE, dweventtype : u32, dwmessageid : u32, dwsubstringcount : u32, plpszsubstringarray : *const ::windows_core::PCWSTR, dwerrorcode : u32, dwerrorindex : u32) -> ()); - RouterLogEventStringW(hloghandle.into_param().abi(), dweventtype, dwmessageid, plpszsubstringarray.len() as _, ::core::mem::transmute(plpszsubstringarray.as_ptr()), dwerrorcode, dwerrorindex) + RouterLogEventStringW(hloghandle.into_param().abi(), dweventtype, dwmessageid, plpszsubstringarray.len().try_into().unwrap(), ::core::mem::transmute(plpszsubstringarray.as_ptr()), dwerrorcode, dwerrorindex) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1328,7 +1328,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("rtutils.dll" "system" fn RouterLogEventW(hloghandle : super::super::Foundation:: HANDLE, dweventtype : u32, dwmessageid : u32, dwsubstringcount : u32, plpszsubstringarray : *const ::windows_core::PCWSTR, dwerrorcode : u32) -> ()); - RouterLogEventW(hloghandle.into_param().abi(), dweventtype, dwmessageid, plpszsubstringarray.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(plpszsubstringarray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dwerrorcode) + RouterLogEventW(hloghandle.into_param().abi(), 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())), dwerrorcode) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1501,7 +1501,7 @@ where pub struct IEnumNetCfgBindingInterface(::windows_core::IUnknown); impl IEnumNetCfgBindingInterface { pub unsafe fn Next(&self, rgelt: &mut [::core::option::Option], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -1534,7 +1534,7 @@ pub struct IEnumNetCfgBindingInterface_Vtbl { pub struct IEnumNetCfgBindingPath(::windows_core::IUnknown); impl IEnumNetCfgBindingPath { pub unsafe fn Next(&self, rgelt: &mut [::core::option::Option], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -1567,7 +1567,7 @@ pub struct IEnumNetCfgBindingPath_Vtbl { pub struct IEnumNetCfgComponent(::windows_core::IUnknown); impl IEnumNetCfgComponent { pub unsafe fn Next(&self, rgelt: &mut [::core::option::Option], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -2298,7 +2298,7 @@ impl INetCfgComponentUpperEdge { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).RemoveInterfacesFromAdapter)(::windows_core::Interface::as_raw(self), padapter.into_param().abi(), pguidinterfaceids.len() as _, ::core::mem::transmute(pguidinterfaceids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).RemoveInterfacesFromAdapter)(::windows_core::Interface::as_raw(self), padapter.into_param().abi(), pguidinterfaceids.len().try_into().unwrap(), ::core::mem::transmute(pguidinterfaceids.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(INetCfgComponentUpperEdge, ::windows_core::IUnknown); 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 df86ee7471..126ddcfdce 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetShell/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetShell/mod.rs @@ -28,7 +28,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("netsh.dll" "system" fn PreprocessCommand(hmodule : super::super::Foundation:: HANDLE, ppwcarguments : *mut ::windows_core::PWSTR, dwcurrentindex : u32, dwargcount : u32, ptttags : *mut TAG_TYPE, dwtagcount : u32, dwminargs : u32, dwmaxargs : u32, pdwtagtype : *mut u32) -> u32); - PreprocessCommand(hmodule.into_param().abi(), ::core::mem::transmute(ppwcarguments.as_ptr()), dwcurrentindex, ppwcarguments.len() as _, ::core::mem::transmute(ptttags.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ptttags.as_deref().map_or(0, |slice| slice.len() as _), dwminargs, dwmaxargs, ::core::mem::transmute(pdwtagtype.unwrap_or(::std::ptr::null_mut()))) + PreprocessCommand(hmodule.into_param().abi(), ::core::mem::transmute(ppwcarguments.as_ptr()), dwcurrentindex, ppwcarguments.len().try_into().unwrap(), ::core::mem::transmute(ptttags.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ptttags.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), dwminargs, dwmaxargs, ::core::mem::transmute(pdwtagtype.unwrap_or(::std::ptr::null_mut()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 286b10d26f..4c4fffa35f 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetworkDiagnosticsFramework/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetworkDiagnosticsFramework/mod.rs @@ -43,7 +43,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::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); - NdfCreateIncident(helperclassname.into_param().abi(), attributes.len() as _, ::core::mem::transmute(attributes.as_ptr()), handle).ok() + NdfCreateIncident(helperclassname.into_param().abi(), attributes.len().try_into().unwrap(), ::core::mem::transmute(attributes.as_ptr()), handle).ok() } #[inline] pub unsafe fn NdfCreateNetConnectionIncident(handle: *mut *mut ::core::ffi::c_void, id: ::windows_core::GUID) -> ::windows_core::Result<()> { @@ -136,7 +136,7 @@ impl INetDiagExtensibleHelper { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn ResolveAttributes(&self, rgkeyattributes: &[HELPER_ATTRIBUTE], pcelt: *mut u32, prgmatchvalues: *mut *mut HELPER_ATTRIBUTE) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).ResolveAttributes)(::windows_core::Interface::as_raw(self), rgkeyattributes.len() as _, ::core::mem::transmute(rgkeyattributes.as_ptr()), pcelt, prgmatchvalues).ok() + (::windows_core::Interface::vtable(self).ResolveAttributes)(::windows_core::Interface::as_raw(self), rgkeyattributes.len().try_into().unwrap(), ::core::mem::transmute(rgkeyattributes.as_ptr()), pcelt, prgmatchvalues).ok() } } ::windows_core::imp::interface_hierarchy!(INetDiagExtensibleHelper, ::windows_core::IUnknown); @@ -162,7 +162,7 @@ impl INetDiagHelper { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn Initialize(&self, rgattributes: &[HELPER_ATTRIBUTE]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Initialize)(::windows_core::Interface::as_raw(self), rgattributes.len() as _, ::core::mem::transmute(rgattributes.as_ptr())).ok() + (::windows_core::Interface::vtable(self).Initialize)(::windows_core::Interface::as_raw(self), rgattributes.len().try_into().unwrap(), ::core::mem::transmute(rgattributes.as_ptr())).ok() } pub unsafe fn GetDiagnosticsInfo(&self) -> ::windows_core::Result<*mut DiagnosticsInfo> { let mut result__ = ::std::mem::zeroed(); @@ -310,7 +310,7 @@ impl INetDiagHelperEx { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn ReconfirmLowHealth(&self, presults: &[HypothesisResult], ppwszupdateddescription: *mut ::windows_core::PWSTR, pupdatedstatus: *mut DIAGNOSIS_STATUS) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).ReconfirmLowHealth)(::windows_core::Interface::as_raw(self), presults.len() as _, ::core::mem::transmute(presults.as_ptr()), ppwszupdateddescription, pupdatedstatus).ok() + (::windows_core::Interface::vtable(self).ReconfirmLowHealth)(::windows_core::Interface::as_raw(self), presults.len().try_into().unwrap(), ::core::mem::transmute(presults.as_ptr()), ppwszupdateddescription, pupdatedstatus).ok() } pub unsafe fn SetUtilities(&self, putilities: P0) -> ::windows_core::Result<()> where diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/P2P/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/P2P/mod.rs index 900d772fca..f80c99fa25 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/P2P/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/P2P/mod.rs @@ -405,7 +405,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("p2p.dll" "system" fn PeerCollabRegisterEvent(hevent : super::super::Foundation:: HANDLE, ceventregistration : u32, peventregistrations : *const PEER_COLLAB_EVENT_REGISTRATION, phpeerevent : *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT); - PeerCollabRegisterEvent(hevent.into_param().abi(), peventregistrations.len() as _, ::core::mem::transmute(peventregistrations.as_ptr()), phpeerevent).ok() + PeerCollabRegisterEvent(hevent.into_param().abi(), peventregistrations.len().try_into().unwrap(), ::core::mem::transmute(peventregistrations.as_ptr()), phpeerevent).ok() } #[inline] pub unsafe fn PeerCollabSetEndpointName(pwzendpointname: P0) -> ::windows_core::Result<()> @@ -496,21 +496,21 @@ where #[inline] pub unsafe fn PeerDistClientAddContentInformation(hpeerdist: isize, hcontenthandle: isize, pbuffer: &[u8], lpoverlapped: *const super::super::System::IO::OVERLAPPED) -> u32 { ::windows_targets::link!("peerdist.dll" "system" fn PeerDistClientAddContentInformation(hpeerdist : isize, hcontenthandle : isize, cbnumberofbytes : u32, pbuffer : *const u8, lpoverlapped : *const super::super::System::IO:: OVERLAPPED) -> u32); - PeerDistClientAddContentInformation(hpeerdist, hcontenthandle, pbuffer.len() as _, ::core::mem::transmute(pbuffer.as_ptr()), lpoverlapped) + PeerDistClientAddContentInformation(hpeerdist, hcontenthandle, pbuffer.len().try_into().unwrap(), ::core::mem::transmute(pbuffer.as_ptr()), lpoverlapped) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_IO\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] pub unsafe fn PeerDistClientAddData(hpeerdist: isize, hcontenthandle: isize, pbuffer: &[u8], lpoverlapped: *const super::super::System::IO::OVERLAPPED) -> u32 { ::windows_targets::link!("peerdist.dll" "system" fn PeerDistClientAddData(hpeerdist : isize, hcontenthandle : isize, cbnumberofbytes : u32, pbuffer : *const u8, lpoverlapped : *const super::super::System::IO:: OVERLAPPED) -> u32); - PeerDistClientAddData(hpeerdist, hcontenthandle, pbuffer.len() as _, ::core::mem::transmute(pbuffer.as_ptr()), lpoverlapped) + PeerDistClientAddData(hpeerdist, hcontenthandle, pbuffer.len().try_into().unwrap(), ::core::mem::transmute(pbuffer.as_ptr()), lpoverlapped) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_IO\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] pub unsafe fn PeerDistClientBlockRead(hpeerdist: isize, hcontenthandle: isize, pbuffer: ::core::option::Option<&mut [u8]>, dwtimeoutinmilliseconds: u32, lpoverlapped: *const super::super::System::IO::OVERLAPPED) -> u32 { ::windows_targets::link!("peerdist.dll" "system" fn PeerDistClientBlockRead(hpeerdist : isize, hcontenthandle : isize, cbmaxnumberofbytes : u32, pbuffer : *mut u8, dwtimeoutinmilliseconds : u32, lpoverlapped : *const super::super::System::IO:: OVERLAPPED) -> u32); - PeerDistClientBlockRead(hpeerdist, hcontenthandle, pbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dwtimeoutinmilliseconds, lpoverlapped) + PeerDistClientBlockRead(hpeerdist, hcontenthandle, pbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dwtimeoutinmilliseconds, lpoverlapped) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_IO\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] @@ -561,7 +561,7 @@ where #[inline] pub unsafe fn PeerDistClientStreamRead(hpeerdist: isize, hcontenthandle: isize, pbuffer: ::core::option::Option<&mut [u8]>, dwtimeoutinmilliseconds: u32, lpoverlapped: *const super::super::System::IO::OVERLAPPED) -> u32 { ::windows_targets::link!("peerdist.dll" "system" fn PeerDistClientStreamRead(hpeerdist : isize, hcontenthandle : isize, cbmaxnumberofbytes : u32, pbuffer : *mut u8, dwtimeoutinmilliseconds : u32, lpoverlapped : *const super::super::System::IO:: OVERLAPPED) -> u32); - PeerDistClientStreamRead(hpeerdist, hcontenthandle, pbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dwtimeoutinmilliseconds, lpoverlapped) + PeerDistClientStreamRead(hpeerdist, hcontenthandle, pbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dwtimeoutinmilliseconds, lpoverlapped) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_IO\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] @@ -608,7 +608,7 @@ where #[inline] pub unsafe fn PeerDistServerCancelAsyncOperation(hpeerdist: isize, pcontentidentifier: &[u8], poverlapped: *const super::super::System::IO::OVERLAPPED) -> u32 { ::windows_targets::link!("peerdist.dll" "system" fn PeerDistServerCancelAsyncOperation(hpeerdist : isize, cbcontentidentifier : u32, pcontentidentifier : *const u8, poverlapped : *const super::super::System::IO:: OVERLAPPED) -> u32); - PeerDistServerCancelAsyncOperation(hpeerdist, pcontentidentifier.len() as _, ::core::mem::transmute(pcontentidentifier.as_ptr()), poverlapped) + PeerDistServerCancelAsyncOperation(hpeerdist, pcontentidentifier.len().try_into().unwrap(), ::core::mem::transmute(pcontentidentifier.as_ptr()), poverlapped) } #[inline] pub unsafe fn PeerDistServerCloseContentInformation(hpeerdist: isize, hcontentinfo: isize) -> u32 { @@ -628,7 +628,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("peerdist.dll" "system" fn PeerDistServerOpenContentInformation(hpeerdist : isize, cbcontentidentifier : u32, pcontentidentifier : *const u8, ullcontentoffset : u64, cbcontentlength : u64, hcompletionport : super::super::Foundation:: HANDLE, ulcompletionkey : usize, phcontentinfo : *mut isize) -> u32); - PeerDistServerOpenContentInformation(hpeerdist, pcontentidentifier.len() as _, ::core::mem::transmute(pcontentidentifier.as_ptr()), ullcontentoffset, cbcontentlength, hcompletionport.into_param().abi(), ulcompletionkey, phcontentinfo) + PeerDistServerOpenContentInformation(hpeerdist, pcontentidentifier.len().try_into().unwrap(), ::core::mem::transmute(pcontentidentifier.as_ptr()), ullcontentoffset, cbcontentlength, hcompletionport.into_param().abi(), ulcompletionkey, phcontentinfo) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -638,14 +638,14 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("peerdist.dll" "system" fn PeerDistServerOpenContentInformationEx(hpeerdist : isize, cbcontentidentifier : u32, pcontentidentifier : *const u8, ullcontentoffset : u64, cbcontentlength : u64, pretrievaloptions : *const PEERDIST_RETRIEVAL_OPTIONS, hcompletionport : super::super::Foundation:: HANDLE, ulcompletionkey : usize, phcontentinfo : *mut isize) -> u32); - PeerDistServerOpenContentInformationEx(hpeerdist, pcontentidentifier.len() as _, ::core::mem::transmute(pcontentidentifier.as_ptr()), ullcontentoffset, cbcontentlength, pretrievaloptions, hcompletionport.into_param().abi(), ulcompletionkey, phcontentinfo) + PeerDistServerOpenContentInformationEx(hpeerdist, pcontentidentifier.len().try_into().unwrap(), ::core::mem::transmute(pcontentidentifier.as_ptr()), ullcontentoffset, cbcontentlength, pretrievaloptions, hcompletionport.into_param().abi(), ulcompletionkey, phcontentinfo) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_IO\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] pub unsafe fn PeerDistServerPublishAddToStream(hpeerdist: isize, hstream: isize, pbuffer: &[u8], lpoverlapped: *const super::super::System::IO::OVERLAPPED) -> u32 { ::windows_targets::link!("peerdist.dll" "system" fn PeerDistServerPublishAddToStream(hpeerdist : isize, hstream : isize, cbnumberofbytes : u32, pbuffer : *const u8, lpoverlapped : *const super::super::System::IO:: OVERLAPPED) -> u32); - PeerDistServerPublishAddToStream(hpeerdist, hstream, pbuffer.len() as _, ::core::mem::transmute(pbuffer.as_ptr()), lpoverlapped) + PeerDistServerPublishAddToStream(hpeerdist, hstream, pbuffer.len().try_into().unwrap(), ::core::mem::transmute(pbuffer.as_ptr()), lpoverlapped) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_IO\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] @@ -662,19 +662,19 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("peerdist.dll" "system" fn PeerDistServerPublishStream(hpeerdist : isize, cbcontentidentifier : u32, pcontentidentifier : *const u8, cbcontentlength : u64, ppublishoptions : *const PEERDIST_PUBLICATION_OPTIONS, hcompletionport : super::super::Foundation:: HANDLE, ulcompletionkey : usize, phstream : *mut isize) -> u32); - PeerDistServerPublishStream(hpeerdist, pcontentidentifier.len() as _, ::core::mem::transmute(pcontentidentifier.as_ptr()), cbcontentlength, ::core::mem::transmute(ppublishoptions.unwrap_or(::std::ptr::null())), hcompletionport.into_param().abi(), ulcompletionkey, phstream) + PeerDistServerPublishStream(hpeerdist, pcontentidentifier.len().try_into().unwrap(), ::core::mem::transmute(pcontentidentifier.as_ptr()), cbcontentlength, ::core::mem::transmute(ppublishoptions.unwrap_or(::std::ptr::null())), hcompletionport.into_param().abi(), ulcompletionkey, phstream) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_IO\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] pub unsafe fn PeerDistServerRetrieveContentInformation(hpeerdist: isize, hcontentinfo: isize, pbuffer: &mut [u8], lpoverlapped: *const super::super::System::IO::OVERLAPPED) -> u32 { ::windows_targets::link!("peerdist.dll" "system" fn PeerDistServerRetrieveContentInformation(hpeerdist : isize, hcontentinfo : isize, cbmaxnumberofbytes : u32, pbuffer : *mut u8, lpoverlapped : *const super::super::System::IO:: OVERLAPPED) -> u32); - PeerDistServerRetrieveContentInformation(hpeerdist, hcontentinfo, pbuffer.len() as _, ::core::mem::transmute(pbuffer.as_ptr()), lpoverlapped) + PeerDistServerRetrieveContentInformation(hpeerdist, hcontentinfo, pbuffer.len().try_into().unwrap(), ::core::mem::transmute(pbuffer.as_ptr()), lpoverlapped) } #[inline] pub unsafe fn PeerDistServerUnpublish(hpeerdist: isize, pcontentidentifier: &[u8]) -> u32 { ::windows_targets::link!("peerdist.dll" "system" fn PeerDistServerUnpublish(hpeerdist : isize, cbcontentidentifier : u32, pcontentidentifier : *const u8) -> u32); - PeerDistServerUnpublish(hpeerdist, pcontentidentifier.len() as _, ::core::mem::transmute(pcontentidentifier.as_ptr())) + PeerDistServerUnpublish(hpeerdist, pcontentidentifier.len().try_into().unwrap(), ::core::mem::transmute(pcontentidentifier.as_ptr())) } #[inline] pub unsafe fn PeerDistShutdown(hpeerdist: isize) -> u32 { @@ -891,7 +891,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("p2pgraph.dll" "system" fn PeerGraphOpen(pwzgraphid : ::windows_core::PCWSTR, pwzpeerid : ::windows_core::PCWSTR, pwzdatabasename : ::windows_core::PCWSTR, psecurityinterface : *const PEER_SECURITY_INTERFACE, crecordtypesyncprecedence : u32, precordtypesyncprecedence : *const ::windows_core::GUID, phgraph : *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT); - PeerGraphOpen(pwzgraphid.into_param().abi(), pwzpeerid.into_param().abi(), pwzdatabasename.into_param().abi(), ::core::mem::transmute(psecurityinterface.unwrap_or(::std::ptr::null())), precordtypesyncprecedence.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(precordtypesyncprecedence.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), phgraph).ok() + PeerGraphOpen(pwzgraphid.into_param().abi(), pwzpeerid.into_param().abi(), pwzdatabasename.into_param().abi(), ::core::mem::transmute(psecurityinterface.unwrap_or(::std::ptr::null())), precordtypesyncprecedence.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(precordtypesyncprecedence.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), phgraph).ok() } #[doc = "Required features: `\"Win32_Networking_WinSock\"`"] #[cfg(feature = "Win32_Networking_WinSock")] @@ -920,7 +920,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("p2pgraph.dll" "system" fn PeerGraphRegisterEvent(hgraph : *const ::core::ffi::c_void, hevent : super::super::Foundation:: HANDLE, ceventregistrations : u32, peventregistrations : *const PEER_GRAPH_EVENT_REGISTRATION, phpeerevent : *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT); - PeerGraphRegisterEvent(hgraph, hevent.into_param().abi(), peventregistrations.len() as _, ::core::mem::transmute(peventregistrations.as_ptr()), phpeerevent).ok() + PeerGraphRegisterEvent(hgraph, hevent.into_param().abi(), peventregistrations.len().try_into().unwrap(), ::core::mem::transmute(peventregistrations.as_ptr()), phpeerevent).ok() } #[inline] pub unsafe fn PeerGraphSearchRecords(hgraph: *const ::core::ffi::c_void, pwzcriteria: P0, phpeerenum: *mut *mut ::core::ffi::c_void) -> ::windows_core::Result<()> @@ -992,7 +992,7 @@ pub unsafe fn PeerGraphUpdateRecord(hgraph: *const ::core::ffi::c_void, precord: #[inline] pub unsafe fn PeerGraphValidateDeferredRecords(hgraph: *const ::core::ffi::c_void, precordids: &[::windows_core::GUID]) -> ::windows_core::Result<()> { ::windows_targets::link!("p2pgraph.dll" "system" fn PeerGraphValidateDeferredRecords(hgraph : *const ::core::ffi::c_void, crecordids : u32, precordids : *const ::windows_core::GUID) -> ::windows_core::HRESULT); - PeerGraphValidateDeferredRecords(hgraph, precordids.len() as _, ::core::mem::transmute(precordids.as_ptr())).ok() + PeerGraphValidateDeferredRecords(hgraph, precordids.len().try_into().unwrap(), ::core::mem::transmute(precordids.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1022,7 +1022,7 @@ pub unsafe fn PeerGroupConnect(hgroup: *const ::core::ffi::c_void) -> ::windows_ #[inline] pub unsafe fn PeerGroupConnectByAddress(hgroup: *const ::core::ffi::c_void, paddresses: &[PEER_ADDRESS]) -> ::windows_core::Result<()> { ::windows_targets::link!("p2p.dll" "system" fn PeerGroupConnectByAddress(hgroup : *const ::core::ffi::c_void, caddresses : u32, paddresses : *const PEER_ADDRESS) -> ::windows_core::HRESULT); - PeerGroupConnectByAddress(hgroup, paddresses.len() as _, ::core::mem::transmute(paddresses.as_ptr())).ok() + PeerGroupConnectByAddress(hgroup, paddresses.len().try_into().unwrap(), ::core::mem::transmute(paddresses.as_ptr())).ok() } #[inline] pub unsafe fn PeerGroupCreate(pproperties: *const PEER_GROUP_PROPERTIES, phgroup: *mut *mut ::core::ffi::c_void) -> ::windows_core::Result<()> { @@ -1038,7 +1038,7 @@ where { ::windows_targets::link!("p2p.dll" "system" fn PeerGroupCreateInvitation(hgroup : *const ::core::ffi::c_void, pwzidentityinfo : ::windows_core::PCWSTR, pftexpiration : *const super::super::Foundation:: FILETIME, croles : u32, proles : *const ::windows_core::GUID, ppwzinvitation : *mut ::windows_core::PWSTR) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - PeerGroupCreateInvitation(hgroup, pwzidentityinfo.into_param().abi(), ::core::mem::transmute(pftexpiration.unwrap_or(::std::ptr::null())), proles.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(proles.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), &mut result__).from_abi(result__) + PeerGroupCreateInvitation(hgroup, pwzidentityinfo.into_param().abi(), ::core::mem::transmute(pftexpiration.unwrap_or(::std::ptr::null())), proles.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(proles.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), &mut result__).from_abi(result__) } #[inline] pub unsafe fn PeerGroupCreatePasswordInvitation(hgroup: *const ::core::ffi::c_void) -> ::windows_core::Result<::windows_core::PWSTR> { @@ -1220,7 +1220,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("p2p.dll" "system" fn PeerGroupRegisterEvent(hgroup : *const ::core::ffi::c_void, hevent : super::super::Foundation:: HANDLE, ceventregistration : u32, peventregistrations : *const PEER_GROUP_EVENT_REGISTRATION, phpeerevent : *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT); - PeerGroupRegisterEvent(hgroup, hevent.into_param().abi(), peventregistrations.len() as _, ::core::mem::transmute(peventregistrations.as_ptr()), phpeerevent).ok() + PeerGroupRegisterEvent(hgroup, hevent.into_param().abi(), peventregistrations.len().try_into().unwrap(), ::core::mem::transmute(peventregistrations.as_ptr()), phpeerevent).ok() } #[inline] pub unsafe fn PeerGroupResumePasswordAuthentication(hgroup: *const ::core::ffi::c_void, hpeereventhandle: *const ::core::ffi::c_void) -> ::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 6fed7b6c1a..fbcdfa2b89 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/QoS/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/QoS/mod.rs @@ -196,7 +196,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("traffic.dll" "system" fn TcGetFlowNameA(flowhandle : super::super::Foundation:: HANDLE, strsize : u32, pflowname : ::windows_core::PSTR) -> u32); - TcGetFlowNameA(flowhandle.into_param().abi(), pflowname.len() as _, ::core::mem::transmute(pflowname.as_ptr())) + TcGetFlowNameA(flowhandle.into_param().abi(), pflowname.len().try_into().unwrap(), ::core::mem::transmute(pflowname.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -206,7 +206,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("traffic.dll" "system" fn TcGetFlowNameW(flowhandle : super::super::Foundation:: HANDLE, strsize : u32, pflowname : ::windows_core::PWSTR) -> u32); - TcGetFlowNameW(flowhandle.into_param().abi(), pflowname.len() as _, ::core::mem::transmute(pflowname.as_ptr())) + TcGetFlowNameW(flowhandle.into_param().abi(), pflowname.len().try_into().unwrap(), ::core::mem::transmute(pflowname.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Networking_WinSock\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Networking_WinSock"))] 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 dd3d46d158..43140c1131 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/Rras/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/Rras/mod.rs @@ -842,7 +842,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("mprapi.dll" "system" fn MprConfigInterfaceTransportAdd(hmprconfig : super::super::Foundation:: HANDLE, hrouterinterface : super::super::Foundation:: HANDLE, dwtransportid : u32, lpwstransportname : ::windows_core::PCWSTR, pinterfaceinfo : *const u8, dwinterfaceinfosize : u32, phrouteriftransport : *mut super::super::Foundation:: HANDLE) -> u32); - MprConfigInterfaceTransportAdd(hmprconfig.into_param().abi(), hrouterinterface.into_param().abi(), dwtransportid, lpwstransportname.into_param().abi(), ::core::mem::transmute(pinterfaceinfo.as_ptr()), pinterfaceinfo.len() as _, phrouteriftransport) + MprConfigInterfaceTransportAdd(hmprconfig.into_param().abi(), hrouterinterface.into_param().abi(), dwtransportid, lpwstransportname.into_param().abi(), ::core::mem::transmute(pinterfaceinfo.as_ptr()), pinterfaceinfo.len().try_into().unwrap(), phrouteriftransport) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -900,7 +900,7 @@ where P2: ::windows_core::IntoParam, { ::windows_targets::link!("mprapi.dll" "system" fn MprConfigInterfaceTransportSetInfo(hmprconfig : super::super::Foundation:: HANDLE, hrouterinterface : super::super::Foundation:: HANDLE, hrouteriftransport : super::super::Foundation:: HANDLE, pinterfaceinfo : *const u8, dwinterfaceinfosize : u32) -> u32); - MprConfigInterfaceTransportSetInfo(hmprconfig.into_param().abi(), hrouterinterface.into_param().abi(), hrouteriftransport.into_param().abi(), ::core::mem::transmute(pinterfaceinfo.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pinterfaceinfo.as_deref().map_or(0, |slice| slice.len() as _)) + MprConfigInterfaceTransportSetInfo(hmprconfig.into_param().abi(), hrouterinterface.into_param().abi(), hrouteriftransport.into_param().abi(), ::core::mem::transmute(pinterfaceinfo.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pinterfaceinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1004,7 +1004,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("mprapi.dll" "system" fn MprConfigTransportCreate(hmprconfig : super::super::Foundation:: HANDLE, dwtransportid : u32, lpwstransportname : ::windows_core::PCWSTR, pglobalinfo : *const u8, dwglobalinfosize : u32, pclientinterfaceinfo : *const u8, dwclientinterfaceinfosize : u32, lpwsdllpath : ::windows_core::PCWSTR, phroutertransport : *mut super::super::Foundation:: HANDLE) -> u32); - MprConfigTransportCreate(hmprconfig.into_param().abi(), dwtransportid, lpwstransportname.into_param().abi(), ::core::mem::transmute(pglobalinfo.as_ptr()), pglobalinfo.len() as _, ::core::mem::transmute(pclientinterfaceinfo.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pclientinterfaceinfo.as_deref().map_or(0, |slice| slice.len() as _), lpwsdllpath.into_param().abi(), phroutertransport) + MprConfigTransportCreate(hmprconfig.into_param().abi(), dwtransportid, lpwstransportname.into_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.into_param().abi(), phroutertransport) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1058,7 +1058,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("mprapi.dll" "system" fn MprConfigTransportSetInfo(hmprconfig : super::super::Foundation:: HANDLE, hroutertransport : super::super::Foundation:: HANDLE, pglobalinfo : *const u8, dwglobalinfosize : u32, pclientinterfaceinfo : *const u8, dwclientinterfaceinfosize : u32, lpwsdllpath : ::windows_core::PCWSTR) -> u32); - MprConfigTransportSetInfo(hmprconfig.into_param().abi(), hroutertransport.into_param().abi(), ::core::mem::transmute(pglobalinfo.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pglobalinfo.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pclientinterfaceinfo.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pclientinterfaceinfo.as_deref().map_or(0, |slice| slice.len() as _), lpwsdllpath.into_param().abi()) + MprConfigTransportSetInfo(hmprconfig.into_param().abi(), hroutertransport.into_param().abi(), ::core::mem::transmute(pglobalinfo.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pglobalinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pclientinterfaceinfo.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pclientinterfaceinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpwsdllpath.into_param().abi()) } #[inline] pub unsafe fn MprInfoBlockAdd(lpheader: *const ::core::ffi::c_void, dwinfotype: u32, dwitemsize: u32, dwitemcount: u32, lpitemdata: *const u8, lplpnewheader: *mut *mut ::core::ffi::c_void) -> u32 { @@ -1560,12 +1560,12 @@ where #[inline] pub unsafe fn RasGetErrorStringA(resourceid: u32, lpszstring: &mut [u8]) -> u32 { ::windows_targets::link!("rasapi32.dll" "system" fn RasGetErrorStringA(resourceid : u32, lpszstring : ::windows_core::PSTR, inbufsize : u32) -> u32); - RasGetErrorStringA(resourceid, ::core::mem::transmute(lpszstring.as_ptr()), lpszstring.len() as _) + RasGetErrorStringA(resourceid, ::core::mem::transmute(lpszstring.as_ptr()), lpszstring.len().try_into().unwrap()) } #[inline] pub unsafe fn RasGetErrorStringW(resourceid: u32, lpszstring: &mut [u16]) -> u32 { ::windows_targets::link!("rasapi32.dll" "system" fn RasGetErrorStringW(resourceid : u32, lpszstring : ::windows_core::PWSTR, inbufsize : u32) -> u32); - RasGetErrorStringW(resourceid, ::core::mem::transmute(lpszstring.as_ptr()), lpszstring.len() as _) + RasGetErrorStringW(resourceid, ::core::mem::transmute(lpszstring.as_ptr()), lpszstring.len().try_into().unwrap()) } #[inline] pub unsafe fn RasGetLinkStatistics(hrasconn: P0, dwsubentry: u32, lpstatistics: *mut RAS_STATS) -> u32 @@ -1786,7 +1786,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("rasapi32.dll" "system" fn RasSetCustomAuthDataA(pszphonebook : ::windows_core::PCSTR, pszentry : ::windows_core::PCSTR, pbcustomauthdata : *const u8, dwsizeofcustomauthdata : u32) -> u32); - RasSetCustomAuthDataA(pszphonebook.into_param().abi(), pszentry.into_param().abi(), ::core::mem::transmute(pbcustomauthdata.as_ptr()), pbcustomauthdata.len() as _) + RasSetCustomAuthDataA(pszphonebook.into_param().abi(), pszentry.into_param().abi(), ::core::mem::transmute(pbcustomauthdata.as_ptr()), pbcustomauthdata.len().try_into().unwrap()) } #[inline] pub unsafe fn RasSetCustomAuthDataW(pszphonebook: P0, pszentry: P1, pbcustomauthdata: &[u8]) -> u32 @@ -1795,7 +1795,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("rasapi32.dll" "system" fn RasSetCustomAuthDataW(pszphonebook : ::windows_core::PCWSTR, pszentry : ::windows_core::PCWSTR, pbcustomauthdata : *const u8, dwsizeofcustomauthdata : u32) -> u32); - RasSetCustomAuthDataW(pszphonebook.into_param().abi(), pszentry.into_param().abi(), ::core::mem::transmute(pbcustomauthdata.as_ptr()), pbcustomauthdata.len() as _) + RasSetCustomAuthDataW(pszphonebook.into_param().abi(), pszentry.into_param().abi(), ::core::mem::transmute(pbcustomauthdata.as_ptr()), pbcustomauthdata.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 5719130ff1..b06f7c29db 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/Snmp/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/Snmp/mod.rs @@ -76,7 +76,7 @@ pub unsafe fn SnmpEncodeMsg(session: isize, srcentity: isize, dstentity: isize, #[inline] pub unsafe fn SnmpEntityToStr(entity: isize, string: &mut [u8]) -> u32 { ::windows_targets::link!("wsnmp32.dll" "system" fn SnmpEntityToStr(entity : isize, size : u32, string : ::windows_core::PSTR) -> u32); - SnmpEntityToStr(entity, string.len() as _, ::core::mem::transmute(string.as_ptr())) + SnmpEntityToStr(entity, string.len().try_into().unwrap(), ::core::mem::transmute(string.as_ptr())) } #[inline] pub unsafe fn SnmpFreeContext(context: isize) -> u32 { @@ -234,7 +234,7 @@ pub unsafe fn SnmpOidCopy(srcoid: *mut smiOID, dstoid: *mut smiOID) -> u32 { #[inline] pub unsafe fn SnmpOidToStr(srcoid: *const smiOID, string: &mut [u8]) -> u32 { ::windows_targets::link!("wsnmp32.dll" "system" fn SnmpOidToStr(srcoid : *const smiOID, size : u32, string : ::windows_core::PSTR) -> u32); - SnmpOidToStr(srcoid, string.len() as _, ::core::mem::transmute(string.as_ptr())) + SnmpOidToStr(srcoid, string.len().try_into().unwrap(), ::core::mem::transmute(string.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 12cb5369d1..2146bf3874 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WNet/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WNet/mod.rs @@ -37,7 +37,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ntlanman.dll" "system" fn NPAddConnection4(hwndowner : super::super::Foundation:: HWND, lpnetresource : *const NETRESOURCEW, lpauthbuffer : *const ::core::ffi::c_void, cbauthbuffer : u32, dwflags : u32, lpuseoptions : *const u8, cbuseoptions : u32) -> u32); - NPAddConnection4(hwndowner.into_param().abi(), lpnetresource, ::core::mem::transmute(lpauthbuffer.unwrap_or(::std::ptr::null())), cbauthbuffer, dwflags, ::core::mem::transmute(lpuseoptions.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpuseoptions.as_deref().map_or(0, |slice| slice.len() as _)) + NPAddConnection4(hwndowner.into_param().abi(), lpnetresource, ::core::mem::transmute(lpauthbuffer.unwrap_or(::std::ptr::null())), cbauthbuffer, dwflags, ::core::mem::transmute(lpuseoptions.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpuseoptions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -124,7 +124,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("ntlanman.dll" "system" fn NPGetPersistentUseOptionsForConnection(lpremotepath : ::windows_core::PCWSTR, lpreaduseoptions : *const u8, cbreaduseoptions : u32, lpwriteuseoptions : *mut u8, lpsizewriteuseoptions : *mut u32) -> u32); - NPGetPersistentUseOptionsForConnection(lpremotepath.into_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() as _), lpwriteuseoptions, lpsizewriteuseoptions) + NPGetPersistentUseOptionsForConnection(lpremotepath.into_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, lpsizewriteuseoptions) } #[inline] pub unsafe fn NPGetResourceInformation(lpnetresource: *const NETRESOURCEW, lpbuffer: *mut ::core::ffi::c_void, lpbuffersize: *mut u32, lplpsystem: *mut ::windows_core::PWSTR) -> u32 { @@ -213,7 +213,7 @@ where P0: ::windows_core::IntoParam, { ::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 : u32, lpuseoptions : *const u8, cbuseoptions : u32) -> super::super::Foundation:: WIN32_ERROR); - WNetAddConnection4A(hwndowner.into_param().abi(), lpnetresource, pauthbuffer, cbauthbuffer, dwflags, ::core::mem::transmute(lpuseoptions.as_ptr()), lpuseoptions.len() as _).ok() + WNetAddConnection4A(hwndowner.into_param().abi(), lpnetresource, pauthbuffer, cbauthbuffer, dwflags, ::core::mem::transmute(lpuseoptions.as_ptr()), lpuseoptions.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -223,7 +223,7 @@ where P0: ::windows_core::IntoParam, { ::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 : u32, lpuseoptions : *const u8, cbuseoptions : u32) -> super::super::Foundation:: WIN32_ERROR); - WNetAddConnection4W(hwndowner.into_param().abi(), lpnetresource, pauthbuffer, cbauthbuffer, dwflags, ::core::mem::transmute(lpuseoptions.as_ptr()), lpuseoptions.len() as _).ok() + WNetAddConnection4W(hwndowner.into_param().abi(), lpnetresource, pauthbuffer, cbauthbuffer, dwflags, ::core::mem::transmute(lpuseoptions.as_ptr()), lpuseoptions.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -396,14 +396,14 @@ where #[inline] pub unsafe fn WNetGetLastErrorA(lperror: *mut u32, lperrorbuf: &mut [u8], lpnamebuf: &mut [u8]) -> ::windows_core::Result<()> { ::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); - WNetGetLastErrorA(lperror, ::core::mem::transmute(lperrorbuf.as_ptr()), lperrorbuf.len() as _, ::core::mem::transmute(lpnamebuf.as_ptr()), lpnamebuf.len() as _).ok() + WNetGetLastErrorA(lperror, ::core::mem::transmute(lperrorbuf.as_ptr()), lperrorbuf.len().try_into().unwrap(), ::core::mem::transmute(lpnamebuf.as_ptr()), lpnamebuf.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn WNetGetLastErrorW(lperror: *mut u32, lperrorbuf: &mut [u16], lpnamebuf: &mut [u16]) -> ::windows_core::Result<()> { ::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); - WNetGetLastErrorW(lperror, ::core::mem::transmute(lperrorbuf.as_ptr()), lperrorbuf.len() as _, ::core::mem::transmute(lpnamebuf.as_ptr()), lpnamebuf.len() as _).ok() + WNetGetLastErrorW(lperror, ::core::mem::transmute(lperrorbuf.as_ptr()), lperrorbuf.len().try_into().unwrap(), ::core::mem::transmute(lpnamebuf.as_ptr()), lpnamebuf.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -547,7 +547,19 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("mpr.dll" "system" fn WNetUseConnection4A(hwndowner : super::super::Foundation:: HWND, lpnetresource : *const NETRESOURCEA, pauthbuffer : *const ::core::ffi::c_void, cbauthbuffer : u32, dwflags : u32, lpuseoptions : *const u8, cbuseoptions : u32, lpaccessname : ::windows_core::PSTR, lpbuffersize : *mut u32, lpresult : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - WNetUseConnection4A(hwndowner.into_param().abi(), lpnetresource, ::core::mem::transmute(pauthbuffer.unwrap_or(::std::ptr::null())), cbauthbuffer, dwflags, ::core::mem::transmute(lpuseoptions.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpuseoptions.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpaccessname), ::core::mem::transmute(lpbuffersize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpresult.unwrap_or(::std::ptr::null_mut()))).ok() + WNetUseConnection4A( + hwndowner.into_param().abi(), + lpnetresource, + ::core::mem::transmute(pauthbuffer.unwrap_or(::std::ptr::null())), + cbauthbuffer, + dwflags, + ::core::mem::transmute(lpuseoptions.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), + lpuseoptions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), + ::core::mem::transmute(lpaccessname), + ::core::mem::transmute(lpbuffersize.unwrap_or(::std::ptr::null_mut())), + ::core::mem::transmute(lpresult.unwrap_or(::std::ptr::null_mut())), + ) + .ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -557,7 +569,19 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("mpr.dll" "system" fn WNetUseConnection4W(hwndowner : super::super::Foundation:: HWND, lpnetresource : *const NETRESOURCEW, pauthbuffer : *const ::core::ffi::c_void, cbauthbuffer : u32, dwflags : u32, lpuseoptions : *const u8, cbuseoptions : u32, lpaccessname : ::windows_core::PWSTR, lpbuffersize : *mut u32, lpresult : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - WNetUseConnection4W(hwndowner.into_param().abi(), lpnetresource, ::core::mem::transmute(pauthbuffer.unwrap_or(::std::ptr::null())), cbauthbuffer, dwflags, ::core::mem::transmute(lpuseoptions.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpuseoptions.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpaccessname), ::core::mem::transmute(lpbuffersize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpresult.unwrap_or(::std::ptr::null_mut()))).ok() + WNetUseConnection4W( + hwndowner.into_param().abi(), + lpnetresource, + ::core::mem::transmute(pauthbuffer.unwrap_or(::std::ptr::null())), + cbauthbuffer, + dwflags, + ::core::mem::transmute(lpuseoptions.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), + lpuseoptions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), + ::core::mem::transmute(lpaccessname), + ::core::mem::transmute(lpbuffersize.unwrap_or(::std::ptr::null_mut())), + ::core::mem::transmute(lpresult.unwrap_or(::std::ptr::null_mut())), + ) + .ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 038a62dff4..32ecbda1f2 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WebDav/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WebDav/mod.rs @@ -8,7 +8,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::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); - DavAddConnection(connectionhandle, remotename.into_param().abi(), username.into_param().abi(), password.into_param().abi(), ::core::mem::transmute(clientcert.as_ptr()), clientcert.len() as _) + DavAddConnection(connectionhandle, remotename.into_param().abi(), username.into_param().abi(), password.into_param().abi(), ::core::mem::transmute(clientcert.as_ptr()), clientcert.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 0b64b4cc6f..5829691d45 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WiFi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WiFi/mod.rs @@ -145,7 +145,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wlanapi.dll" "system" fn WlanExtractPsdIEDataList(hclienthandle : super::super::Foundation:: HANDLE, dwiedatasize : u32, prawiedata : *const u8, strformat : ::windows_core::PCWSTR, preserved : *const ::core::ffi::c_void, pppsdiedatalist : *mut *mut WLAN_RAW_DATA_LIST) -> u32); - WlanExtractPsdIEDataList(hclienthandle.into_param().abi(), prawiedata.len() as _, ::core::mem::transmute(prawiedata.as_ptr()), strformat.into_param().abi(), ::core::mem::transmute(preserved.unwrap_or(::std::ptr::null())), pppsdiedatalist) + WlanExtractPsdIEDataList(hclienthandle.into_param().abi(), prawiedata.len().try_into().unwrap(), ::core::mem::transmute(prawiedata.as_ptr()), strformat.into_param().abi(), ::core::mem::transmute(preserved.unwrap_or(::std::ptr::null())), pppsdiedatalist) } #[inline] pub unsafe fn WlanFreeMemory(pmemory: *const ::core::ffi::c_void) { @@ -345,7 +345,7 @@ where P2: ::windows_core::IntoParam, { ::windows_targets::link!("wlanapi.dll" "system" fn WlanHostedNetworkSetSecondaryKey(hclienthandle : super::super::Foundation:: HANDLE, dwkeylength : u32, puckeydata : *const u8, bispassphrase : super::super::Foundation:: BOOL, bpersistent : super::super::Foundation:: BOOL, pfailreason : *mut WLAN_HOSTED_NETWORK_REASON, pvreserved : *const ::core::ffi::c_void) -> u32); - WlanHostedNetworkSetSecondaryKey(hclienthandle.into_param().abi(), puckeydata.len() as _, ::core::mem::transmute(puckeydata.as_ptr()), bispassphrase.into_param().abi(), bpersistent.into_param().abi(), ::core::mem::transmute(pfailreason.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null()))) + WlanHostedNetworkSetSecondaryKey(hclienthandle.into_param().abi(), puckeydata.len().try_into().unwrap(), ::core::mem::transmute(puckeydata.as_ptr()), bispassphrase.into_param().abi(), bpersistent.into_param().abi(), ::core::mem::transmute(pfailreason.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -407,7 +407,7 @@ where #[inline] pub unsafe fn WlanReasonCodeToString(dwreasoncode: u32, pstringbuffer: &[u16], preserved: ::core::option::Option<*const ::core::ffi::c_void>) -> u32 { ::windows_targets::link!("wlanapi.dll" "system" fn WlanReasonCodeToString(dwreasoncode : u32, dwbuffersize : u32, pstringbuffer : ::windows_core::PCWSTR, preserved : *const ::core::ffi::c_void) -> u32); - WlanReasonCodeToString(dwreasoncode, pstringbuffer.len() as _, ::core::mem::transmute(pstringbuffer.as_ptr()), ::core::mem::transmute(preserved.unwrap_or(::std::ptr::null()))) + WlanReasonCodeToString(dwreasoncode, pstringbuffer.len().try_into().unwrap(), ::core::mem::transmute(pstringbuffer.as_ptr()), ::core::mem::transmute(preserved.unwrap_or(::std::ptr::null()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -528,7 +528,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wlanapi.dll" "system" fn WlanSetProfileCustomUserData(hclienthandle : super::super::Foundation:: HANDLE, pinterfaceguid : *const ::windows_core::GUID, strprofilename : ::windows_core::PCWSTR, dwdatasize : u32, pdata : *const u8, preserved : *const ::core::ffi::c_void) -> u32); - WlanSetProfileCustomUserData(hclienthandle.into_param().abi(), pinterfaceguid, strprofilename.into_param().abi(), pdata.len() as _, ::core::mem::transmute(pdata.as_ptr()), ::core::mem::transmute(preserved.unwrap_or(::std::ptr::null()))) + WlanSetProfileCustomUserData(hclienthandle.into_param().abi(), pinterfaceguid, strprofilename.into_param().abi(), pdata.len().try_into().unwrap(), ::core::mem::transmute(pdata.as_ptr()), ::core::mem::transmute(preserved.unwrap_or(::std::ptr::null()))) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Security_ExtensibleAuthenticationProtocol\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_ExtensibleAuthenticationProtocol"))] @@ -539,7 +539,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wlanapi.dll" "system" fn WlanSetProfileEapUserData(hclienthandle : super::super::Foundation:: HANDLE, pinterfaceguid : *const ::windows_core::GUID, strprofilename : ::windows_core::PCWSTR, eaptype : super::super::Security::ExtensibleAuthenticationProtocol:: EAP_METHOD_TYPE, dwflags : WLAN_SET_EAPHOST_FLAGS, dweapuserdatasize : u32, pbeapuserdata : *const u8, preserved : *const ::core::ffi::c_void) -> u32); - WlanSetProfileEapUserData(hclienthandle.into_param().abi(), pinterfaceguid, strprofilename.into_param().abi(), ::core::mem::transmute(eaptype), dwflags, pbeapuserdata.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pbeapuserdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(preserved.unwrap_or(::std::ptr::null()))) + WlanSetProfileEapUserData(hclienthandle.into_param().abi(), pinterfaceguid, strprofilename.into_param().abi(), ::core::mem::transmute(eaptype), dwflags, pbeapuserdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pbeapuserdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(preserved.unwrap_or(::std::ptr::null()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -561,7 +561,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wlanapi.dll" "system" fn WlanSetProfileList(hclienthandle : super::super::Foundation:: HANDLE, pinterfaceguid : *const ::windows_core::GUID, dwitems : u32, strprofilenames : *const ::windows_core::PCWSTR, preserved : *const ::core::ffi::c_void) -> u32); - WlanSetProfileList(hclienthandle.into_param().abi(), pinterfaceguid, strprofilenames.len() as _, ::core::mem::transmute(strprofilenames.as_ptr()), ::core::mem::transmute(preserved.unwrap_or(::std::ptr::null()))) + WlanSetProfileList(hclienthandle.into_param().abi(), pinterfaceguid, strprofilenames.len().try_into().unwrap(), ::core::mem::transmute(strprofilenames.as_ptr()), ::core::mem::transmute(preserved.unwrap_or(::std::ptr::null()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -915,7 +915,7 @@ pub struct IDot11AdHocSecuritySettings_Vtbl { pub struct IEnumDot11AdHocInterfaces(::windows_core::IUnknown); impl IEnumDot11AdHocInterfaces { pub unsafe fn Next(&self, rgelt: &mut [::core::option::Option], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -949,7 +949,7 @@ pub struct IEnumDot11AdHocInterfaces_Vtbl { pub struct IEnumDot11AdHocNetworks(::windows_core::IUnknown); impl IEnumDot11AdHocNetworks { pub unsafe fn Next(&self, rgelt: &mut [::core::option::Option], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -983,7 +983,7 @@ pub struct IEnumDot11AdHocNetworks_Vtbl { pub struct IEnumDot11AdHocSecuritySettings(::windows_core::IUnknown); impl IEnumDot11AdHocSecuritySettings { pub unsafe fn Next(&self, rgelt: &mut [::core::option::Option], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsConnectNow/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsConnectNow/mod.rs index 73335ac550..27fd20e763 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsConnectNow/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsConnectNow/mod.rs @@ -28,7 +28,7 @@ pub struct IWCNConnectNotify_Vtbl { pub struct IWCNDevice(::windows_core::IUnknown); impl IWCNDevice { pub unsafe fn SetPassword(&self, r#type: WCN_PASSWORD_TYPE, pbpassword: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetPassword)(::windows_core::Interface::as_raw(self), r#type, pbpassword.len() as _, ::core::mem::transmute(pbpassword.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetPassword)(::windows_core::Interface::as_raw(self), r#type, pbpassword.len().try_into().unwrap(), ::core::mem::transmute(pbpassword.as_ptr())).ok() } pub unsafe fn Connect(&self, pnotify: P0) -> ::windows_core::Result<()> where @@ -37,17 +37,17 @@ impl IWCNDevice { (::windows_core::Interface::vtable(self).Connect)(::windows_core::Interface::as_raw(self), pnotify.into_param().abi()).ok() } pub unsafe fn GetAttribute(&self, attributetype: WCN_ATTRIBUTE_TYPE, pbbuffer: &mut [u8], pdwbufferused: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetAttribute)(::windows_core::Interface::as_raw(self), attributetype, pbbuffer.len() as _, ::core::mem::transmute(pbbuffer.as_ptr()), pdwbufferused).ok() + (::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).ok() } pub unsafe fn GetIntegerAttribute(&self, attributetype: WCN_ATTRIBUTE_TYPE) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).GetIntegerAttribute)(::windows_core::Interface::as_raw(self), attributetype, &mut result__).from_abi(result__) } pub unsafe fn GetStringAttribute(&self, attributetype: WCN_ATTRIBUTE_TYPE, wszstring: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetStringAttribute)(::windows_core::Interface::as_raw(self), attributetype, wszstring.len() as _, ::core::mem::transmute(wszstring.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetStringAttribute)(::windows_core::Interface::as_raw(self), attributetype, wszstring.len().try_into().unwrap(), ::core::mem::transmute(wszstring.as_ptr())).ok() } pub unsafe fn GetNetworkProfile(&self, wszprofile: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNetworkProfile)(::windows_core::Interface::as_raw(self), wszprofile.len() as _, ::core::mem::transmute(wszprofile.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetNetworkProfile)(::windows_core::Interface::as_raw(self), wszprofile.len().try_into().unwrap(), ::core::mem::transmute(wszprofile.as_ptr())).ok() } pub unsafe fn SetNetworkProfile(&self, pszprofilexml: P0) -> ::windows_core::Result<()> where @@ -56,10 +56,10 @@ impl IWCNDevice { (::windows_core::Interface::vtable(self).SetNetworkProfile)(::windows_core::Interface::as_raw(self), pszprofilexml.into_param().abi()).ok() } pub unsafe fn GetVendorExtension(&self, pvendorextspec: *const WCN_VENDOR_EXTENSION_SPEC, pbbuffer: &mut [u8], pdwbufferused: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetVendorExtension)(::windows_core::Interface::as_raw(self), pvendorextspec, pbbuffer.len() as _, ::core::mem::transmute(pbbuffer.as_ptr()), pdwbufferused).ok() + (::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).ok() } pub unsafe fn SetVendorExtension(&self, pvendorextspec: *const WCN_VENDOR_EXTENSION_SPEC, pbbuffer: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetVendorExtension)(::windows_core::Interface::as_raw(self), pvendorextspec, pbbuffer.len() as _, ::core::mem::transmute(pbbuffer.as_ptr())).ok() + (::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() } pub unsafe fn Unadvise(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Unadvise)(::windows_core::Interface::as_raw(self)).ok() @@ -69,11 +69,11 @@ impl IWCNDevice { ::windows_core::Interface::as_raw(self), r#type, dwoobpasswordid, - pbpassword.as_deref().map_or(0, |slice| slice.len() as _), + pbpassword.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pbpassword.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - pbremotepublickeyhash.as_deref().map_or(0, |slice| slice.len() as _), + pbremotepublickeyhash.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pbremotepublickeyhash.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - pbdhkeyblob.as_deref().map_or(0, |slice| slice.len() as _), + pbdhkeyblob.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pbdhkeyblob.as_deref().map_or(::core::ptr::null(), |slice| slice.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 0bc2aa2ffc..447ad1dd4d 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsConnectionManager/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsConnectionManager/mod.rs @@ -15,7 +15,7 @@ where { ::windows_targets::link!("ondemandconnroutehelper.dll" "system" fn GetInterfaceContextTableForHostName(hostname : ::windows_core::PCWSTR, proxyname : ::windows_core::PCWSTR, flags : u32, connectionprofilefilterrawdata : *const u8, connectionprofilefilterrawdatasize : u32, interfacecontexttable : *mut *mut NET_INTERFACE_CONTEXT_TABLE) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - GetInterfaceContextTableForHostName(hostname.into_param().abi(), proxyname.into_param().abi(), flags, ::core::mem::transmute(connectionprofilefilterrawdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), connectionprofilefilterrawdata.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + GetInterfaceContextTableForHostName(hostname.into_param().abi(), proxyname.into_param().abi(), flags, ::core::mem::transmute(connectionprofilefilterrawdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), connectionprofilefilterrawdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } #[inline] pub unsafe fn OnDemandGetRoutingHint(destinationhostname: P0) -> ::windows_core::Result @@ -78,7 +78,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wcmapi.dll" "system" fn WcmSetProperty(pinterface : *const ::windows_core::GUID, strprofilename : ::windows_core::PCWSTR, property : WCM_PROPERTY, preserved : *const ::core::ffi::c_void, dwdatasize : u32, pbdata : *const u8) -> u32); - WcmSetProperty(::core::mem::transmute(pinterface.unwrap_or(::std::ptr::null())), strprofilename.into_param().abi(), property, ::core::mem::transmute(preserved.unwrap_or(::std::ptr::null())), pbdata.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pbdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + WcmSetProperty(::core::mem::transmute(pinterface.unwrap_or(::std::ptr::null())), strprofilename.into_param().abi(), property, ::core::mem::transmute(preserved.unwrap_or(::std::ptr::null())), pbdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pbdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } pub const NET_INTERFACE_FLAG_CONNECT_IF_NEEDED: u32 = 1u32; pub const NET_INTERFACE_FLAG_NONE: u32 = 0u32; diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsFilteringPlatform/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsFilteringPlatform/mod.rs index 0611037d0c..dae9232392 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsFilteringPlatform/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsFilteringPlatform/mod.rs @@ -448,7 +448,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("fwpuclnt.dll" "system" fn FwpmIPsecTunnelAdd0(enginehandle : super::super::Foundation:: HANDLE, flags : u32, mainmodepolicy : *const FWPM_PROVIDER_CONTEXT0, tunnelpolicy : *const FWPM_PROVIDER_CONTEXT0, numfilterconditions : u32, filterconditions : *const FWPM_FILTER_CONDITION0, sd : super::super::Security:: PSECURITY_DESCRIPTOR) -> u32); - FwpmIPsecTunnelAdd0(enginehandle.into_param().abi(), flags, ::core::mem::transmute(mainmodepolicy.unwrap_or(::std::ptr::null())), tunnelpolicy, filterconditions.len() as _, ::core::mem::transmute(filterconditions.as_ptr()), sd.into_param().abi()) + FwpmIPsecTunnelAdd0(enginehandle.into_param().abi(), flags, ::core::mem::transmute(mainmodepolicy.unwrap_or(::std::ptr::null())), tunnelpolicy, filterconditions.len().try_into().unwrap(), ::core::mem::transmute(filterconditions.as_ptr()), sd.into_param().abi()) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Security\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] @@ -459,7 +459,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("fwpuclnt.dll" "system" fn FwpmIPsecTunnelAdd1(enginehandle : super::super::Foundation:: HANDLE, flags : u32, mainmodepolicy : *const FWPM_PROVIDER_CONTEXT1, tunnelpolicy : *const FWPM_PROVIDER_CONTEXT1, numfilterconditions : u32, filterconditions : *const FWPM_FILTER_CONDITION0, keymodkey : *const ::windows_core::GUID, sd : super::super::Security:: PSECURITY_DESCRIPTOR) -> u32); - FwpmIPsecTunnelAdd1(enginehandle.into_param().abi(), flags, ::core::mem::transmute(mainmodepolicy.unwrap_or(::std::ptr::null())), tunnelpolicy, filterconditions.len() as _, ::core::mem::transmute(filterconditions.as_ptr()), ::core::mem::transmute(keymodkey.unwrap_or(::std::ptr::null())), sd.into_param().abi()) + FwpmIPsecTunnelAdd1(enginehandle.into_param().abi(), flags, ::core::mem::transmute(mainmodepolicy.unwrap_or(::std::ptr::null())), tunnelpolicy, filterconditions.len().try_into().unwrap(), ::core::mem::transmute(filterconditions.as_ptr()), ::core::mem::transmute(keymodkey.unwrap_or(::std::ptr::null())), sd.into_param().abi()) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Security\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] @@ -470,7 +470,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("fwpuclnt.dll" "system" fn FwpmIPsecTunnelAdd2(enginehandle : super::super::Foundation:: HANDLE, flags : u32, mainmodepolicy : *const FWPM_PROVIDER_CONTEXT2, tunnelpolicy : *const FWPM_PROVIDER_CONTEXT2, numfilterconditions : u32, filterconditions : *const FWPM_FILTER_CONDITION0, keymodkey : *const ::windows_core::GUID, sd : super::super::Security:: PSECURITY_DESCRIPTOR) -> u32); - FwpmIPsecTunnelAdd2(enginehandle.into_param().abi(), flags, ::core::mem::transmute(mainmodepolicy.unwrap_or(::std::ptr::null())), tunnelpolicy, filterconditions.len() as _, ::core::mem::transmute(filterconditions.as_ptr()), ::core::mem::transmute(keymodkey.unwrap_or(::std::ptr::null())), sd.into_param().abi()) + FwpmIPsecTunnelAdd2(enginehandle.into_param().abi(), flags, ::core::mem::transmute(mainmodepolicy.unwrap_or(::std::ptr::null())), tunnelpolicy, filterconditions.len().try_into().unwrap(), ::core::mem::transmute(filterconditions.as_ptr()), ::core::mem::transmute(keymodkey.unwrap_or(::std::ptr::null())), sd.into_param().abi()) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Security\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] @@ -481,7 +481,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("fwpuclnt.dll" "system" fn FwpmIPsecTunnelAdd3(enginehandle : super::super::Foundation:: HANDLE, flags : u32, mainmodepolicy : *const FWPM_PROVIDER_CONTEXT3, tunnelpolicy : *const FWPM_PROVIDER_CONTEXT3, numfilterconditions : u32, filterconditions : *const FWPM_FILTER_CONDITION0, keymodkey : *const ::windows_core::GUID, sd : super::super::Security:: PSECURITY_DESCRIPTOR) -> u32); - FwpmIPsecTunnelAdd3(enginehandle.into_param().abi(), flags, ::core::mem::transmute(mainmodepolicy.unwrap_or(::std::ptr::null())), tunnelpolicy, filterconditions.len() as _, ::core::mem::transmute(filterconditions.as_ptr()), ::core::mem::transmute(keymodkey.unwrap_or(::std::ptr::null())), sd.into_param().abi()) + FwpmIPsecTunnelAdd3(enginehandle.into_param().abi(), flags, ::core::mem::transmute(mainmodepolicy.unwrap_or(::std::ptr::null())), tunnelpolicy, filterconditions.len().try_into().unwrap(), ::core::mem::transmute(filterconditions.as_ptr()), ::core::mem::transmute(keymodkey.unwrap_or(::std::ptr::null())), sd.into_param().abi()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 f14baf2f5a..19c4051dd6 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsFirewall/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsFirewall/mod.rs @@ -83,7 +83,7 @@ pub unsafe fn NetworkIsolationRegisterForAppContainerChanges(flags: u32, callbac #[inline] pub unsafe fn NetworkIsolationSetAppContainerConfig(appcontainersids: &[super::super::Security::SID_AND_ATTRIBUTES]) -> u32 { ::windows_targets::link!("api-ms-win-net-isolation-l1-1-0.dll" "system" fn NetworkIsolationSetAppContainerConfig(dwnumpublicappcs : u32, appcontainersids : *const super::super::Security:: SID_AND_ATTRIBUTES) -> u32); - NetworkIsolationSetAppContainerConfig(appcontainersids.len() as _, ::core::mem::transmute(appcontainersids.as_ptr())) + NetworkIsolationSetAppContainerConfig(appcontainersids.len().try_into().unwrap(), ::core::mem::transmute(appcontainersids.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -97,7 +97,7 @@ where P4: ::windows_core::IntoParam, { ::windows_targets::link!("api-ms-win-net-isolation-l1-1-0.dll" "system" fn NetworkIsolationSetupAppContainerBinaries(applicationcontainersid : super::super::Foundation:: PSID, packagefullname : ::windows_core::PCWSTR, packagefolder : ::windows_core::PCWSTR, displayname : ::windows_core::PCWSTR, bbinariesfullycomputed : super::super::Foundation:: BOOL, binaries : *const ::windows_core::PCWSTR, binariescount : u32) -> ::windows_core::HRESULT); - NetworkIsolationSetupAppContainerBinaries(applicationcontainersid.into_param().abi(), packagefullname.into_param().abi(), packagefolder.into_param().abi(), displayname.into_param().abi(), bbinariesfullycomputed.into_param().abi(), ::core::mem::transmute(binaries.as_ptr()), binaries.len() as _).ok() + NetworkIsolationSetupAppContainerBinaries(applicationcontainersid.into_param().abi(), packagefullname.into_param().abi(), packagefolder.into_param().abi(), displayname.into_param().abi(), bbinariesfullycomputed.into_param().abi(), ::core::mem::transmute(binaries.as_ptr()), binaries.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -296,7 +296,7 @@ pub struct IDynamicPortMappingCollection_Vtbl { pub struct IEnumNetConnection(::windows_core::IUnknown); impl IEnumNetConnection { pub unsafe fn Next(&self, rgelt: &mut [::core::option::Option], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -332,7 +332,7 @@ impl IEnumNetSharingEveryConnection { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", 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<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgvar.len() as _, ::core::mem::transmute(rgvar.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgvar.len().try_into().unwrap(), ::core::mem::transmute(rgvar.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -371,7 +371,7 @@ impl IEnumNetSharingPortMapping { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", 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<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgvar.len() as _, ::core::mem::transmute(rgvar.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgvar.len().try_into().unwrap(), ::core::mem::transmute(rgvar.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -410,7 +410,7 @@ impl IEnumNetSharingPrivateConnection { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", 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<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgvar.len() as _, ::core::mem::transmute(rgvar.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgvar.len().try_into().unwrap(), ::core::mem::transmute(rgvar.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -449,7 +449,7 @@ impl IEnumNetSharingPublicConnection { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", 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<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgvar.len() as _, ::core::mem::transmute(rgvar.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgvar.len().try_into().unwrap(), ::core::mem::transmute(rgvar.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Networking/ActiveDirectory/mod.rs b/crates/libs/windows/src/Windows/Win32/Networking/ActiveDirectory/mod.rs index ce3c8ed6cc..ab443ab4e4 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/ActiveDirectory/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/ActiveDirectory/mod.rs @@ -21,7 +21,7 @@ pub unsafe fn ADsBuildVarArrayInt(lpdwobjecttypes: *mut u32, dwobjecttypes: u32, #[inline] pub unsafe fn ADsBuildVarArrayStr(lpppathnames: &[::windows_core::PCWSTR], pvar: *mut super::super::System::Variant::VARIANT) -> ::windows_core::Result<()> { ::windows_targets::link!("activeds.dll" "system" fn ADsBuildVarArrayStr(lpppathnames : *const ::windows_core::PCWSTR, dwpathnames : u32, pvar : *mut super::super::System::Variant:: VARIANT) -> ::windows_core::HRESULT); - ADsBuildVarArrayStr(::core::mem::transmute(lpppathnames.as_ptr()), lpppathnames.len() as _, pvar).ok() + ADsBuildVarArrayStr(::core::mem::transmute(lpppathnames.as_ptr()), lpppathnames.len().try_into().unwrap(), pvar).ok() } #[inline] pub unsafe fn ADsDecodeBinaryData(szsrcdata: P0, ppbdestdata: *mut *mut u8, pdwdestlen: *mut u32) -> ::windows_core::Result<()> @@ -59,7 +59,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); - ADsGetLastError(lperror, ::core::mem::transmute(lperrorbuf.as_ptr()), lperrorbuf.len() as _, ::core::mem::transmute(lpnamebuf.as_ptr()), lpnamebuf.len() as _).ok() + ADsGetLastError(lperror, ::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<()> @@ -240,7 +240,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::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); - DsAddressToSiteNamesA(computername.into_param().abi(), socketaddresses.len() as _, ::core::mem::transmute(socketaddresses.as_ptr()), sitenames) + DsAddressToSiteNamesA(computername.into_param().abi(), socketaddresses.len().try_into().unwrap(), ::core::mem::transmute(socketaddresses.as_ptr()), sitenames) } #[doc = "Required features: `\"Win32_Networking_WinSock\"`"] #[cfg(feature = "Win32_Networking_WinSock")] @@ -250,7 +250,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::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); - DsAddressToSiteNamesExA(computername.into_param().abi(), socketaddresses.len() as _, ::core::mem::transmute(socketaddresses.as_ptr()), sitenames, subnetnames) + DsAddressToSiteNamesExA(computername.into_param().abi(), socketaddresses.len().try_into().unwrap(), ::core::mem::transmute(socketaddresses.as_ptr()), sitenames, subnetnames) } #[doc = "Required features: `\"Win32_Networking_WinSock\"`"] #[cfg(feature = "Win32_Networking_WinSock")] @@ -260,7 +260,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::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); - DsAddressToSiteNamesExW(computername.into_param().abi(), socketaddresses.len() as _, ::core::mem::transmute(socketaddresses.as_ptr()), sitenames, subnetnames) + DsAddressToSiteNamesExW(computername.into_param().abi(), socketaddresses.len().try_into().unwrap(), ::core::mem::transmute(socketaddresses.as_ptr()), sitenames, subnetnames) } #[doc = "Required features: `\"Win32_Networking_WinSock\"`"] #[cfg(feature = "Win32_Networking_WinSock")] @@ -270,7 +270,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::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); - DsAddressToSiteNamesW(computername.into_param().abi(), socketaddresses.len() as _, ::core::mem::transmute(socketaddresses.as_ptr()), sitenames) + DsAddressToSiteNamesW(computername.into_param().abi(), socketaddresses.len().try_into().unwrap(), ::core::mem::transmute(socketaddresses.as_ptr()), sitenames) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -460,7 +460,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ntdsapi.dll" "system" fn DsCrackNamesA(hds : super::super::Foundation:: HANDLE, flags : DS_NAME_FLAGS, formatoffered : DS_NAME_FORMAT, formatdesired : DS_NAME_FORMAT, cnames : u32, rpnames : *const ::windows_core::PCSTR, ppresult : *mut *mut DS_NAME_RESULTA) -> u32); - DsCrackNamesA(hds.into_param().abi(), flags, formatoffered, formatdesired, rpnames.len() as _, ::core::mem::transmute(rpnames.as_ptr()), ppresult) + DsCrackNamesA(hds.into_param().abi(), flags, formatoffered, formatdesired, rpnames.len().try_into().unwrap(), ::core::mem::transmute(rpnames.as_ptr()), ppresult) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -470,17 +470,17 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ntdsapi.dll" "system" fn DsCrackNamesW(hds : super::super::Foundation:: HANDLE, flags : DS_NAME_FLAGS, formatoffered : DS_NAME_FORMAT, formatdesired : DS_NAME_FORMAT, cnames : u32, rpnames : *const ::windows_core::PCWSTR, ppresult : *mut *mut DS_NAME_RESULTW) -> u32); - DsCrackNamesW(hds.into_param().abi(), flags, formatoffered, formatdesired, rpnames.len() as _, ::core::mem::transmute(rpnames.as_ptr()), ppresult) + DsCrackNamesW(hds.into_param().abi(), flags, formatoffered, formatdesired, rpnames.len().try_into().unwrap(), ::core::mem::transmute(rpnames.as_ptr()), ppresult) } #[inline] pub unsafe fn DsCrackSpn2A(pszspn: &[u8], pcserviceclass: ::core::option::Option<*mut u32>, serviceclass: ::windows_core::PSTR, pcservicename: ::core::option::Option<*mut u32>, servicename: ::windows_core::PSTR, pcinstancename: ::core::option::Option<*mut u32>, instancename: ::windows_core::PSTR, pinstanceport: ::core::option::Option<*mut u16>) -> u32 { ::windows_targets::link!("dsparse.dll" "system" fn DsCrackSpn2A(pszspn : ::windows_core::PCSTR, cspn : u32, pcserviceclass : *mut u32, serviceclass : ::windows_core::PSTR, pcservicename : *mut u32, servicename : ::windows_core::PSTR, pcinstancename : *mut u32, instancename : ::windows_core::PSTR, pinstanceport : *mut u16) -> u32); - DsCrackSpn2A(::core::mem::transmute(pszspn.as_ptr()), pszspn.len() as _, ::core::mem::transmute(pcserviceclass.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(serviceclass), ::core::mem::transmute(pcservicename.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(servicename), ::core::mem::transmute(pcinstancename.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(instancename), ::core::mem::transmute(pinstanceport.unwrap_or(::std::ptr::null_mut()))) + DsCrackSpn2A(::core::mem::transmute(pszspn.as_ptr()), pszspn.len().try_into().unwrap(), ::core::mem::transmute(pcserviceclass.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(serviceclass), ::core::mem::transmute(pcservicename.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(servicename), ::core::mem::transmute(pcinstancename.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(instancename), ::core::mem::transmute(pinstanceport.unwrap_or(::std::ptr::null_mut()))) } #[inline] pub unsafe fn DsCrackSpn2W(pszspn: &[u16], pcserviceclass: ::core::option::Option<*mut u32>, serviceclass: ::windows_core::PWSTR, pcservicename: ::core::option::Option<*mut u32>, servicename: ::windows_core::PWSTR, pcinstancename: ::core::option::Option<*mut u32>, instancename: ::windows_core::PWSTR, pinstanceport: ::core::option::Option<*mut u16>) -> u32 { ::windows_targets::link!("dsparse.dll" "system" fn DsCrackSpn2W(pszspn : ::windows_core::PCWSTR, cspn : u32, pcserviceclass : *mut u32, serviceclass : ::windows_core::PWSTR, pcservicename : *mut u32, servicename : ::windows_core::PWSTR, pcinstancename : *mut u32, instancename : ::windows_core::PWSTR, pinstanceport : *mut u16) -> u32); - DsCrackSpn2W(::core::mem::transmute(pszspn.as_ptr()), pszspn.len() as _, ::core::mem::transmute(pcserviceclass.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(serviceclass), ::core::mem::transmute(pcservicename.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(servicename), ::core::mem::transmute(pcinstancename.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(instancename), ::core::mem::transmute(pinstanceport.unwrap_or(::std::ptr::null_mut()))) + DsCrackSpn2W(::core::mem::transmute(pszspn.as_ptr()), pszspn.len().try_into().unwrap(), ::core::mem::transmute(pcserviceclass.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(serviceclass), ::core::mem::transmute(pcservicename.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(servicename), ::core::mem::transmute(pcinstancename.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(instancename), ::core::mem::transmute(pinstanceport.unwrap_or(::std::ptr::null_mut()))) } #[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 @@ -519,14 +519,14 @@ where #[inline] pub unsafe fn DsCrackUnquotedMangledRdnA(pszrdn: &[u8], pguid: ::core::option::Option<*mut ::windows_core::GUID>, pedsmanglefor: ::core::option::Option<*mut DS_MANGLE_FOR>) -> super::super::Foundation::BOOL { ::windows_targets::link!("dsparse.dll" "system" fn DsCrackUnquotedMangledRdnA(pszrdn : ::windows_core::PCSTR, cchrdn : u32, pguid : *mut ::windows_core::GUID, pedsmanglefor : *mut DS_MANGLE_FOR) -> super::super::Foundation:: BOOL); - DsCrackUnquotedMangledRdnA(::core::mem::transmute(pszrdn.as_ptr()), pszrdn.len() as _, ::core::mem::transmute(pguid.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pedsmanglefor.unwrap_or(::std::ptr::null_mut()))) + DsCrackUnquotedMangledRdnA(::core::mem::transmute(pszrdn.as_ptr()), pszrdn.len().try_into().unwrap(), ::core::mem::transmute(pguid.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pedsmanglefor.unwrap_or(::std::ptr::null_mut()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsCrackUnquotedMangledRdnW(pszrdn: &[u16], pguid: ::core::option::Option<*mut ::windows_core::GUID>, pedsmanglefor: ::core::option::Option<*mut DS_MANGLE_FOR>) -> super::super::Foundation::BOOL { ::windows_targets::link!("dsparse.dll" "system" fn DsCrackUnquotedMangledRdnW(pszrdn : ::windows_core::PCWSTR, cchrdn : u32, pguid : *mut ::windows_core::GUID, pedsmanglefor : *mut DS_MANGLE_FOR) -> super::super::Foundation:: BOOL); - DsCrackUnquotedMangledRdnW(::core::mem::transmute(pszrdn.as_ptr()), pszrdn.len() as _, ::core::mem::transmute(pguid.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pedsmanglefor.unwrap_or(::std::ptr::null_mut()))) + DsCrackUnquotedMangledRdnW(::core::mem::transmute(pszrdn.as_ptr()), pszrdn.len().try_into().unwrap(), ::core::mem::transmute(pguid.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pedsmanglefor.unwrap_or(::std::ptr::null_mut()))) } #[inline] pub unsafe fn DsDeregisterDnsHostRecordsA(servername: P0, dnsdomainname: P1, domainguid: ::core::option::Option<*const ::windows_core::GUID>, dsaguid: ::core::option::Option<*const ::windows_core::GUID>, dnshostname: P2) -> u32 @@ -571,12 +571,12 @@ where #[inline] pub unsafe fn DsFreeDomainControllerInfoA(infolevel: u32, pinfo: &[u8]) { ::windows_targets::link!("ntdsapi.dll" "system" fn DsFreeDomainControllerInfoA(infolevel : u32, cinfo : u32, pinfo : *const ::core::ffi::c_void) -> ()); - DsFreeDomainControllerInfoA(infolevel, pinfo.len() as _, ::core::mem::transmute(pinfo.as_ptr())) + DsFreeDomainControllerInfoA(infolevel, pinfo.len().try_into().unwrap(), ::core::mem::transmute(pinfo.as_ptr())) } #[inline] pub unsafe fn DsFreeDomainControllerInfoW(infolevel: u32, pinfo: &[u8]) { ::windows_targets::link!("ntdsapi.dll" "system" fn DsFreeDomainControllerInfoW(infolevel : u32, cinfo : u32, pinfo : *const ::core::ffi::c_void) -> ()); - DsFreeDomainControllerInfoW(infolevel, pinfo.len() as _, ::core::mem::transmute(pinfo.as_ptr())) + DsFreeDomainControllerInfoW(infolevel, pinfo.len().try_into().unwrap(), ::core::mem::transmute(pinfo.as_ptr())) } #[inline] pub unsafe fn DsFreeNameResultA(presult: *const DS_NAME_RESULTA) { @@ -606,12 +606,12 @@ pub unsafe fn DsFreeSchemaGuidMapW(pguidmap: *const DS_SCHEMA_GUID_MAPW) { #[inline] pub unsafe fn DsFreeSpnArrayA(rpszspn: &mut [::windows_core::PSTR]) { ::windows_targets::link!("ntdsapi.dll" "system" fn DsFreeSpnArrayA(cspn : u32, rpszspn : *mut ::windows_core::PSTR) -> ()); - DsFreeSpnArrayA(rpszspn.len() as _, ::core::mem::transmute(rpszspn.as_ptr())) + DsFreeSpnArrayA(rpszspn.len().try_into().unwrap(), ::core::mem::transmute(rpszspn.as_ptr())) } #[inline] pub unsafe fn DsFreeSpnArrayW(rpszspn: &mut [::windows_core::PWSTR]) { ::windows_targets::link!("ntdsapi.dll" "system" fn DsFreeSpnArrayW(cspn : u32, rpszspn : *mut ::windows_core::PWSTR) -> ()); - DsFreeSpnArrayW(rpszspn.len() as _, ::core::mem::transmute(rpszspn.as_ptr())) + DsFreeSpnArrayW(rpszspn.len().try_into().unwrap(), ::core::mem::transmute(rpszspn.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -742,7 +742,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dsuiext.dll" "system" fn DsGetFriendlyClassName(pszobjectclass : ::windows_core::PCWSTR, pszbuffer : ::windows_core::PWSTR, cchbuffer : u32) -> ::windows_core::HRESULT); - DsGetFriendlyClassName(pszobjectclass.into_param().abi(), ::core::mem::transmute(pszbuffer.as_ptr()), pszbuffer.len() as _).ok() + DsGetFriendlyClassName(pszobjectclass.into_param().abi(), ::core::mem::transmute(pszbuffer.as_ptr()), pszbuffer.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_UI_WindowsAndMessaging\"`"] #[cfg(feature = "Win32_UI_WindowsAndMessaging")] @@ -842,14 +842,14 @@ where #[inline] pub unsafe fn DsIsMangledRdnValueA(pszrdn: &[u8], edsmanglefordesired: DS_MANGLE_FOR) -> super::super::Foundation::BOOL { ::windows_targets::link!("dsparse.dll" "system" fn DsIsMangledRdnValueA(pszrdn : ::windows_core::PCSTR, crdn : u32, edsmanglefordesired : DS_MANGLE_FOR) -> super::super::Foundation:: BOOL); - DsIsMangledRdnValueA(::core::mem::transmute(pszrdn.as_ptr()), pszrdn.len() as _, edsmanglefordesired) + DsIsMangledRdnValueA(::core::mem::transmute(pszrdn.as_ptr()), pszrdn.len().try_into().unwrap(), edsmanglefordesired) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn DsIsMangledRdnValueW(pszrdn: &[u16], edsmanglefordesired: DS_MANGLE_FOR) -> super::super::Foundation::BOOL { ::windows_targets::link!("dsparse.dll" "system" fn DsIsMangledRdnValueW(pszrdn : ::windows_core::PCWSTR, crdn : u32, edsmanglefordesired : DS_MANGLE_FOR) -> super::super::Foundation:: BOOL); - DsIsMangledRdnValueW(::core::mem::transmute(pszrdn.as_ptr()), pszrdn.len() as _, edsmanglefordesired) + DsIsMangledRdnValueW(::core::mem::transmute(pszrdn.as_ptr()), pszrdn.len().try_into().unwrap(), edsmanglefordesired) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1031,7 +1031,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ntdsapi.dll" "system" fn DsMapSchemaGuidsA(hds : super::super::Foundation:: HANDLE, cguids : u32, rguids : *const ::windows_core::GUID, ppguidmap : *mut *mut DS_SCHEMA_GUID_MAPA) -> u32); - DsMapSchemaGuidsA(hds.into_param().abi(), rguids.len() as _, ::core::mem::transmute(rguids.as_ptr()), ppguidmap) + DsMapSchemaGuidsA(hds.into_param().abi(), rguids.len().try_into().unwrap(), ::core::mem::transmute(rguids.as_ptr()), ppguidmap) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1041,7 +1041,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ntdsapi.dll" "system" fn DsMapSchemaGuidsW(hds : super::super::Foundation:: HANDLE, cguids : u32, rguids : *const ::windows_core::GUID, ppguidmap : *mut *mut DS_SCHEMA_GUID_MAPW) -> u32); - DsMapSchemaGuidsW(hds.into_param().abi(), rguids.len() as _, ::core::mem::transmute(rguids.as_ptr()), ppguidmap) + DsMapSchemaGuidsW(hds.into_param().abi(), rguids.len().try_into().unwrap(), ::core::mem::transmute(rguids.as_ptr()), ppguidmap) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Security_Authentication_Identity\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_Authentication_Identity"))] @@ -1062,7 +1062,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("ntdsapi.dll" "system" fn DsQuerySitesByCostA(hds : super::super::Foundation:: HANDLE, pszfromsite : ::windows_core::PCSTR, rgsztosites : *const ::windows_core::PCSTR, ctosites : u32, dwflags : u32, prgsiteinfo : *mut *mut DS_SITE_COST_INFO) -> u32); - DsQuerySitesByCostA(hds.into_param().abi(), pszfromsite.into_param().abi(), ::core::mem::transmute(rgsztosites.as_ptr()), rgsztosites.len() as _, dwflags, prgsiteinfo) + DsQuerySitesByCostA(hds.into_param().abi(), pszfromsite.into_param().abi(), ::core::mem::transmute(rgsztosites.as_ptr()), rgsztosites.len().try_into().unwrap(), dwflags, prgsiteinfo) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1073,7 +1073,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("ntdsapi.dll" "system" fn DsQuerySitesByCostW(hds : super::super::Foundation:: HANDLE, pwszfromsite : ::windows_core::PCWSTR, rgwsztosites : *const ::windows_core::PCWSTR, ctosites : u32, dwflags : u32, prgsiteinfo : *mut *mut DS_SITE_COST_INFO) -> u32); - DsQuerySitesByCostW(hds.into_param().abi(), pwszfromsite.into_param().abi(), ::core::mem::transmute(rgwsztosites.as_ptr()), rgwsztosites.len() as _, dwflags, prgsiteinfo) + DsQuerySitesByCostW(hds.into_param().abi(), pwszfromsite.into_param().abi(), ::core::mem::transmute(rgwsztosites.as_ptr()), rgwsztosites.len().try_into().unwrap(), dwflags, prgsiteinfo) } #[inline] pub unsafe fn DsQuerySitesFree(rgsiteinfo: *const DS_SITE_COST_INFO) { @@ -1083,12 +1083,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); - DsQuoteRdnValueA(psunquotedrdnvalue.len() as _, ::core::mem::transmute(psunquotedrdnvalue.as_ptr()), pcquotedrdnvaluelength, ::core::mem::transmute(psquotedrdnvalue)) + DsQuoteRdnValueA(psunquotedrdnvalue.len().try_into().unwrap(), ::core::mem::transmute(psunquotedrdnvalue.as_ptr()), pcquotedrdnvaluelength, ::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); - DsQuoteRdnValueW(psunquotedrdnvalue.len() as _, ::core::mem::transmute(psunquotedrdnvalue.as_ptr()), pcquotedrdnvaluelength, ::core::mem::transmute(psquotedrdnvalue)) + DsQuoteRdnValueW(psunquotedrdnvalue.len().try_into().unwrap(), ::core::mem::transmute(psunquotedrdnvalue.as_ptr()), pcquotedrdnvaluelength, ::core::mem::transmute(psquotedrdnvalue)) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1393,12 +1393,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); - DsUnquoteRdnValueA(psquotedrdnvalue.len() as _, ::core::mem::transmute(psquotedrdnvalue.as_ptr()), pcunquotedrdnvaluelength, ::core::mem::transmute(psunquotedrdnvalue)) + DsUnquoteRdnValueA(psquotedrdnvalue.len().try_into().unwrap(), ::core::mem::transmute(psquotedrdnvalue.as_ptr()), pcunquotedrdnvaluelength, ::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); - DsUnquoteRdnValueW(psquotedrdnvalue.len() as _, ::core::mem::transmute(psquotedrdnvalue.as_ptr()), pcunquotedrdnvaluelength, ::core::mem::transmute(psunquotedrdnvalue)) + DsUnquoteRdnValueW(psquotedrdnvalue.len().try_into().unwrap(), ::core::mem::transmute(psquotedrdnvalue.as_ptr()), pcunquotedrdnvaluelength, ::core::mem::transmute(psunquotedrdnvalue)) } #[inline] pub unsafe fn DsValidateSubnetNameA(subnetname: P0) -> u32 @@ -1425,7 +1425,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("ntdsapi.dll" "system" fn DsWriteAccountSpnA(hds : super::super::Foundation:: HANDLE, operation : DS_SPN_WRITE_OP, pszaccount : ::windows_core::PCSTR, cspn : u32, rpszspn : *const ::windows_core::PCSTR) -> u32); - DsWriteAccountSpnA(hds.into_param().abi(), operation, pszaccount.into_param().abi(), rpszspn.len() as _, ::core::mem::transmute(rpszspn.as_ptr())) + DsWriteAccountSpnA(hds.into_param().abi(), operation, pszaccount.into_param().abi(), rpszspn.len().try_into().unwrap(), ::core::mem::transmute(rpszspn.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1436,7 +1436,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("ntdsapi.dll" "system" fn DsWriteAccountSpnW(hds : super::super::Foundation:: HANDLE, operation : DS_SPN_WRITE_OP, pszaccount : ::windows_core::PCWSTR, cspn : u32, rpszspn : *const ::windows_core::PCWSTR) -> u32); - DsWriteAccountSpnW(hds.into_param().abi(), operation, pszaccount.into_param().abi(), rpszspn.len() as _, ::core::mem::transmute(rpszspn.as_ptr())) + DsWriteAccountSpnW(hds.into_param().abi(), operation, pszaccount.into_param().abi(), rpszspn.len().try_into().unwrap(), ::core::mem::transmute(rpszspn.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -9134,7 +9134,7 @@ impl IDsDisplaySpecifier { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).GetIconLocation)(::windows_core::Interface::as_raw(self), pszobjectclass.into_param().abi(), dwflags, ::core::mem::transmute(pszbuffer.as_ptr()), pszbuffer.len() as _, presid).ok() + (::windows_core::Interface::vtable(self).GetIconLocation)(::windows_core::Interface::as_raw(self), pszobjectclass.into_param().abi(), dwflags, ::core::mem::transmute(pszbuffer.as_ptr()), pszbuffer.len().try_into().unwrap(), presid).ok() } #[doc = "Required features: `\"Win32_UI_WindowsAndMessaging\"`"] #[cfg(feature = "Win32_UI_WindowsAndMessaging")] @@ -9148,14 +9148,14 @@ impl IDsDisplaySpecifier { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).GetFriendlyClassName)(::windows_core::Interface::as_raw(self), pszobjectclass.into_param().abi(), ::core::mem::transmute(pszbuffer.as_ptr()), pszbuffer.len() as _).ok() + (::windows_core::Interface::vtable(self).GetFriendlyClassName)(::windows_core::Interface::as_raw(self), pszobjectclass.into_param().abi(), ::core::mem::transmute(pszbuffer.as_ptr()), pszbuffer.len().try_into().unwrap()).ok() } pub unsafe fn GetFriendlyAttributeName(&self, pszobjectclass: P0, pszattributename: P1, pszbuffer: &mut [u16]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).GetFriendlyAttributeName)(::windows_core::Interface::as_raw(self), pszobjectclass.into_param().abi(), pszattributename.into_param().abi(), ::core::mem::transmute(pszbuffer.as_ptr()), pszbuffer.len() as _).ok() + (::windows_core::Interface::vtable(self).GetFriendlyAttributeName)(::windows_core::Interface::as_raw(self), pszobjectclass.into_param().abi(), pszattributename.into_param().abi(), ::core::mem::transmute(pszbuffer.as_ptr()), pszbuffer.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 492a0ee03f..1ead22b924 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/BackgroundIntelligentTransferService/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/BackgroundIntelligentTransferService/mod.rs @@ -190,7 +190,7 @@ impl IBackgroundCopyCallback1 { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).OnProgressEx)(::windows_core::Interface::as_raw(self), progresstype, pgroup.into_param().abi(), pjob.into_param().abi(), dwfileindex, dwprogressvalue, pbyte.len() as _, ::core::mem::transmute(pbyte.as_ptr())).ok() + (::windows_core::Interface::vtable(self).OnProgressEx)(::windows_core::Interface::as_raw(self), progresstype, pgroup.into_param().abi(), pjob.into_param().abi(), dwfileindex, dwprogressvalue, pbyte.len().try_into().unwrap(), ::core::mem::transmute(pbyte.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IBackgroundCopyCallback1, ::windows_core::IUnknown); @@ -287,7 +287,7 @@ impl IBackgroundCopyCallback3 { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).FileRangesTransferred)(::windows_core::Interface::as_raw(self), job.into_param().abi(), file.into_param().abi(), ranges.len() as _, ::core::mem::transmute(ranges.as_ptr())).ok() + (::windows_core::Interface::vtable(self).FileRangesTransferred)(::windows_core::Interface::as_raw(self), job.into_param().abi(), file.into_param().abi(), ranges.len().try_into().unwrap(), ::core::mem::transmute(ranges.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IBackgroundCopyCallback3, ::windows_core::IUnknown, IBackgroundCopyCallback, IBackgroundCopyCallback2); @@ -703,7 +703,7 @@ impl IBackgroundCopyFile6 { (::windows_core::Interface::vtable(self).UpdateDownloadPosition)(::windows_core::Interface::as_raw(self), offset).ok() } pub unsafe fn RequestFileRanges(&self, ranges: &[BG_FILE_RANGE]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).RequestFileRanges)(::windows_core::Interface::as_raw(self), ranges.len() as _, ::core::mem::transmute(ranges.as_ptr())).ok() + (::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<()> { (::windows_core::Interface::vtable(self).GetFilledFileRanges)(::windows_core::Interface::as_raw(self), rangecount, ranges).ok() @@ -827,7 +827,7 @@ pub struct IBackgroundCopyGroup_Vtbl { pub struct IBackgroundCopyJob(::windows_core::IUnknown); impl IBackgroundCopyJob { pub unsafe fn AddFileSet(&self, pfileset: &[BG_FILE_INFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).AddFileSet)(::windows_core::Interface::as_raw(self), pfileset.len() as _, ::core::mem::transmute(pfileset.as_ptr())).ok() + (::windows_core::Interface::vtable(self).AddFileSet)(::windows_core::Interface::as_raw(self), pfileset.len().try_into().unwrap(), ::core::mem::transmute(pfileset.as_ptr())).ok() } pub unsafe fn AddFile(&self, remoteurl: P0, localname: P1) -> ::windows_core::Result<()> where @@ -1018,7 +1018,7 @@ impl IBackgroundCopyJob1 { (::windows_core::Interface::vtable(self).GetStatus)(::windows_core::Interface::as_raw(self), pdwstatus, pdwwin32result, pdwtransportresult, pdwnumofretries).ok() } pub unsafe fn AddFiles(&self, ppfileset: &[*const FILESETINFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).AddFiles)(::windows_core::Interface::as_raw(self), ppfileset.len() as _, ::core::mem::transmute(ppfileset.as_ptr())).ok() + (::windows_core::Interface::vtable(self).AddFiles)(::windows_core::Interface::as_raw(self), ppfileset.len().try_into().unwrap(), ::core::mem::transmute(ppfileset.as_ptr())).ok() } pub unsafe fn GetFile(&self, cfileindex: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1061,7 +1061,7 @@ pub struct IBackgroundCopyJob1_Vtbl { pub struct IBackgroundCopyJob2(::windows_core::IUnknown); impl IBackgroundCopyJob2 { pub unsafe fn AddFileSet(&self, pfileset: &[BG_FILE_INFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.AddFileSet)(::windows_core::Interface::as_raw(self), pfileset.len() as _, ::core::mem::transmute(pfileset.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.AddFileSet)(::windows_core::Interface::as_raw(self), pfileset.len().try_into().unwrap(), ::core::mem::transmute(pfileset.as_ptr())).ok() } pub unsafe fn AddFile(&self, remoteurl: P0, localname: P1) -> ::windows_core::Result<()> where @@ -1247,7 +1247,7 @@ pub struct IBackgroundCopyJob2_Vtbl { pub struct IBackgroundCopyJob3(::windows_core::IUnknown); impl IBackgroundCopyJob3 { pub unsafe fn AddFileSet(&self, pfileset: &[BG_FILE_INFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.AddFileSet)(::windows_core::Interface::as_raw(self), pfileset.len() as _, ::core::mem::transmute(pfileset.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.AddFileSet)(::windows_core::Interface::as_raw(self), pfileset.len().try_into().unwrap(), ::core::mem::transmute(pfileset.as_ptr())).ok() } pub unsafe fn AddFile(&self, remoteurl: P0, localname: P1) -> ::windows_core::Result<()> where @@ -1419,7 +1419,7 @@ impl IBackgroundCopyJob3 { P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).AddFileWithRanges)(::windows_core::Interface::as_raw(self), remoteurl.into_param().abi(), localname.into_param().abi(), ranges.len() as _, ::core::mem::transmute(ranges.as_ptr())).ok() + (::windows_core::Interface::vtable(self).AddFileWithRanges)(::windows_core::Interface::as_raw(self), remoteurl.into_param().abi(), localname.into_param().abi(), ranges.len().try_into().unwrap(), ::core::mem::transmute(ranges.as_ptr())).ok() } pub unsafe fn SetFileACLFlags(&self, flags: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).SetFileACLFlags)(::windows_core::Interface::as_raw(self), flags).ok() @@ -1450,7 +1450,7 @@ pub struct IBackgroundCopyJob3_Vtbl { pub struct IBackgroundCopyJob4(::windows_core::IUnknown); impl IBackgroundCopyJob4 { pub unsafe fn AddFileSet(&self, pfileset: &[BG_FILE_INFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.AddFileSet)(::windows_core::Interface::as_raw(self), pfileset.len() as _, ::core::mem::transmute(pfileset.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.AddFileSet)(::windows_core::Interface::as_raw(self), pfileset.len().try_into().unwrap(), ::core::mem::transmute(pfileset.as_ptr())).ok() } pub unsafe fn AddFile(&self, remoteurl: P0, localname: P1) -> ::windows_core::Result<()> where @@ -1622,7 +1622,7 @@ impl IBackgroundCopyJob4 { P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).base__.AddFileWithRanges)(::windows_core::Interface::as_raw(self), remoteurl.into_param().abi(), localname.into_param().abi(), ranges.len() as _, ::core::mem::transmute(ranges.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.AddFileWithRanges)(::windows_core::Interface::as_raw(self), remoteurl.into_param().abi(), localname.into_param().abi(), ranges.len().try_into().unwrap(), ::core::mem::transmute(ranges.as_ptr())).ok() } pub unsafe fn SetFileACLFlags(&self, flags: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.SetFileACLFlags)(::windows_core::Interface::as_raw(self), flags).ok() @@ -1682,7 +1682,7 @@ pub struct IBackgroundCopyJob4_Vtbl { pub struct IBackgroundCopyJob5(::windows_core::IUnknown); impl IBackgroundCopyJob5 { pub unsafe fn AddFileSet(&self, pfileset: &[BG_FILE_INFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.AddFileSet)(::windows_core::Interface::as_raw(self), pfileset.len() as _, ::core::mem::transmute(pfileset.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.AddFileSet)(::windows_core::Interface::as_raw(self), pfileset.len().try_into().unwrap(), ::core::mem::transmute(pfileset.as_ptr())).ok() } pub unsafe fn AddFile(&self, remoteurl: P0, localname: P1) -> ::windows_core::Result<()> where @@ -1854,7 +1854,7 @@ impl IBackgroundCopyJob5 { P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).base__.base__.AddFileWithRanges)(::windows_core::Interface::as_raw(self), remoteurl.into_param().abi(), localname.into_param().abi(), ranges.len() as _, ::core::mem::transmute(ranges.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.AddFileWithRanges)(::windows_core::Interface::as_raw(self), remoteurl.into_param().abi(), localname.into_param().abi(), ranges.len().try_into().unwrap(), ::core::mem::transmute(ranges.as_ptr())).ok() } pub unsafe fn SetFileACLFlags(&self, flags: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.SetFileACLFlags)(::windows_core::Interface::as_raw(self), flags).ok() @@ -2199,7 +2199,7 @@ impl IBackgroundCopyServerCertificateValidationCallback { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).ValidateServerCertificate)(::windows_core::Interface::as_raw(self), job.into_param().abi(), file.into_param().abi(), certdata.len() as _, ::core::mem::transmute(certdata.as_ptr()), certencodingtype, certstoredata.len() as _, ::core::mem::transmute(certstoredata.as_ptr())).ok() + (::windows_core::Interface::vtable(self).ValidateServerCertificate)(::windows_core::Interface::as_raw(self), job.into_param().abi(), file.into_param().abi(), certdata.len().try_into().unwrap(), ::core::mem::transmute(certdata.as_ptr()), certencodingtype, certstoredata.len().try_into().unwrap(), ::core::mem::transmute(certstoredata.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IBackgroundCopyServerCertificateValidationCallback, ::windows_core::IUnknown); @@ -2443,7 +2443,7 @@ pub struct IBitsTokenOptions_Vtbl { pub struct IEnumBackgroundCopyFiles(::windows_core::IUnknown); impl IEnumBackgroundCopyFiles { pub unsafe fn Next(&self, rgelt: &mut [::core::option::Option], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -2482,7 +2482,7 @@ pub struct IEnumBackgroundCopyFiles_Vtbl { pub struct IEnumBackgroundCopyGroups(::windows_core::IUnknown); impl IEnumBackgroundCopyGroups { pub unsafe fn Next(&self, rgelt: &mut [::windows_core::GUID], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -2521,7 +2521,7 @@ pub struct IEnumBackgroundCopyGroups_Vtbl { pub struct IEnumBackgroundCopyJobs(::windows_core::IUnknown); impl IEnumBackgroundCopyJobs { pub unsafe fn Next(&self, rgelt: &mut [::core::option::Option], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -2560,7 +2560,7 @@ pub struct IEnumBackgroundCopyJobs_Vtbl { pub struct IEnumBackgroundCopyJobs1(::windows_core::IUnknown); impl IEnumBackgroundCopyJobs1 { pub unsafe fn Next(&self, rgelt: &mut [::windows_core::GUID], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -2599,7 +2599,7 @@ pub struct IEnumBackgroundCopyJobs1_Vtbl { pub struct IEnumBitsPeerCacheRecords(::windows_core::IUnknown); impl IEnumBitsPeerCacheRecords { pub unsafe fn Next(&self, rgelt: &mut [::core::option::Option], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -2638,7 +2638,7 @@ pub struct IEnumBitsPeerCacheRecords_Vtbl { pub struct IEnumBitsPeers(::windows_core::IUnknown); impl IEnumBitsPeers { pub unsafe fn Next(&self, rgelt: &mut [::core::option::Option], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Networking/Clustering/mod.rs b/crates/libs/windows/src/Windows/Win32/Networking/Clustering/mod.rs index a26022d955..8fbc16dd42 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/Clustering/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/Clustering/mod.rs @@ -354,7 +354,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("resutils.dll" "system" fn ClusWorkersTerminate(clusworkers : *mut *mut CLUS_WORKER, clusworkerscount : usize, timeoutinmilliseconds : u32, waitonly : super::super::Foundation:: BOOL) -> u32); - ClusWorkersTerminate(::core::mem::transmute(clusworkers.as_ptr()), clusworkers.len() as _, timeoutinmilliseconds, waitonly.into_param().abi()) + ClusWorkersTerminate(::core::mem::transmute(clusworkers.as_ptr()), clusworkers.len().try_into().unwrap(), timeoutinmilliseconds, waitonly.into_param().abi()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -477,7 +477,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("resutils.dll" "system" fn ClusterEncrypt(hcluscryptprovider : HCLUSCRYPTPROVIDER, pdata : *const u8, cbdata : u32, ppdata : *mut *mut u8, pcbdata : *mut u32) -> u32); - ClusterEncrypt(hcluscryptprovider.into_param().abi(), ::core::mem::transmute(pdata.as_ptr()), pdata.len() as _, ppdata, pcbdata) + ClusterEncrypt(hcluscryptprovider.into_param().abi(), ::core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap(), ppdata, pcbdata) } #[inline] pub unsafe fn ClusterEnum(henum: P0, dwindex: u32, lpdwtype: *mut u32, lpszname: ::windows_core::PWSTR, lpcchname: *mut u32) -> u32 @@ -2069,7 +2069,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("clusapi.dll" "system" fn MoveClusterGroupEx(hgroup : HGROUP, hdestinationnode : HNODE, dwmoveflags : u32, lpinbuffer : *const u8, cbinbuffersize : u32) -> u32); - MoveClusterGroupEx(hgroup.into_param().abi(), hdestinationnode.into_param().abi(), 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() as _)) + MoveClusterGroupEx(hgroup.into_param().abi(), hdestinationnode.into_param().abi(), dwmoveflags, ::core::mem::transmute(lpinbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpinbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn MoveClusterGroupEx2(hgroup: P0, hdestinationnode: P1, dwmoveflags: u32, lpinbuffer: ::core::option::Option<&[u8]>, lpszreason: P2) -> u32 @@ -2079,7 +2079,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("clusapi.dll" "system" fn MoveClusterGroupEx2(hgroup : HGROUP, hdestinationnode : HNODE, dwmoveflags : u32, lpinbuffer : *const u8, cbinbuffersize : u32, lpszreason : ::windows_core::PCWSTR) -> u32); - MoveClusterGroupEx2(hgroup.into_param().abi(), hdestinationnode.into_param().abi(), 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() as _), lpszreason.into_param().abi()) + MoveClusterGroupEx2(hgroup.into_param().abi(), hdestinationnode.into_param().abi(), 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.into_param().abi()) } #[inline] pub unsafe fn OfflineClusterGroup(hgroup: P0) -> u32 @@ -2095,7 +2095,7 @@ where P0: ::windows_core::IntoParam
, { ::windows_targets::link!("clusapi.dll" "system" fn OfflineClusterGroupEx(hgroup : HGROUP, dwofflineflags : u32, lpinbuffer : *const u8, cbinbuffersize : u32) -> u32); - OfflineClusterGroupEx(hgroup.into_param().abi(), dwofflineflags, ::core::mem::transmute(lpinbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpinbuffer.as_deref().map_or(0, |slice| slice.len() as _)) + OfflineClusterGroupEx(hgroup.into_param().abi(), dwofflineflags, ::core::mem::transmute(lpinbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpinbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn OfflineClusterGroupEx2(hgroup: P0, dwofflineflags: u32, lpinbuffer: ::core::option::Option<*const u8>, cbinbuffersize: u32, lpszreason: P1) -> u32 @@ -2120,7 +2120,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("clusapi.dll" "system" fn OfflineClusterResourceEx(hresource : HRESOURCE, dwofflineflags : u32, lpinbuffer : *const u8, cbinbuffersize : u32) -> u32); - OfflineClusterResourceEx(hresource.into_param().abi(), dwofflineflags, ::core::mem::transmute(lpinbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpinbuffer.as_deref().map_or(0, |slice| slice.len() as _)) + OfflineClusterResourceEx(hresource.into_param().abi(), dwofflineflags, ::core::mem::transmute(lpinbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpinbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn OfflineClusterResourceEx2(hresource: P0, dwofflineflags: u32, lpinbuffer: ::core::option::Option<&[u8]>, lpszreason: P1) -> u32 @@ -2129,7 +2129,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("clusapi.dll" "system" fn OfflineClusterResourceEx2(hresource : HRESOURCE, dwofflineflags : u32, lpinbuffer : *const u8, cbinbuffersize : u32, lpszreason : ::windows_core::PCWSTR) -> u32); - OfflineClusterResourceEx2(hresource.into_param().abi(), dwofflineflags, ::core::mem::transmute(lpinbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpinbuffer.as_deref().map_or(0, |slice| slice.len() as _), lpszreason.into_param().abi()) + OfflineClusterResourceEx2(hresource.into_param().abi(), dwofflineflags, ::core::mem::transmute(lpinbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpinbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpszreason.into_param().abi()) } #[inline] pub unsafe fn OnlineClusterGroup(hgroup: P0, hdestinationnode: P1) -> u32 @@ -2147,7 +2147,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("clusapi.dll" "system" fn OnlineClusterGroupEx(hgroup : HGROUP, hdestinationnode : HNODE, dwonlineflags : u32, lpinbuffer : *const u8, cbinbuffersize : u32) -> u32); - OnlineClusterGroupEx(hgroup.into_param().abi(), hdestinationnode.into_param().abi(), 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() as _)) + OnlineClusterGroupEx(hgroup.into_param().abi(), hdestinationnode.into_param().abi(), dwonlineflags, ::core::mem::transmute(lpinbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpinbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn OnlineClusterGroupEx2(hgroup: P0, hdestinationnode: P1, dwonlineflags: u32, lpinbuffer: ::core::option::Option<&[u8]>, lpszreason: P2) -> u32 @@ -2157,7 +2157,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("clusapi.dll" "system" fn OnlineClusterGroupEx2(hgroup : HGROUP, hdestinationnode : HNODE, dwonlineflags : u32, lpinbuffer : *const u8, cbinbuffersize : u32, lpszreason : ::windows_core::PCWSTR) -> u32); - OnlineClusterGroupEx2(hgroup.into_param().abi(), hdestinationnode.into_param().abi(), 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() as _), lpszreason.into_param().abi()) + OnlineClusterGroupEx2(hgroup.into_param().abi(), hdestinationnode.into_param().abi(), 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.into_param().abi()) } #[inline] pub unsafe fn OnlineClusterResource(hresource: P0) -> u32 @@ -2173,7 +2173,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("clusapi.dll" "system" fn OnlineClusterResourceEx(hresource : HRESOURCE, dwonlineflags : u32, lpinbuffer : *const u8, cbinbuffersize : u32) -> u32); - OnlineClusterResourceEx(hresource.into_param().abi(), 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() as _)) + OnlineClusterResourceEx(hresource.into_param().abi(), dwonlineflags, ::core::mem::transmute(lpinbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpinbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn OnlineClusterResourceEx2(hresource: P0, dwonlineflags: u32, lpinbuffer: ::core::option::Option<&[u8]>, lpszreason: P1) -> u32 @@ -2182,7 +2182,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("clusapi.dll" "system" fn OnlineClusterResourceEx2(hresource : HRESOURCE, dwonlineflags : u32, lpinbuffer : *const u8, cbinbuffersize : u32, lpszreason : ::windows_core::PCWSTR) -> u32); - OnlineClusterResourceEx2(hresource.into_param().abi(), 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() as _), lpszreason.into_param().abi()) + OnlineClusterResourceEx2(hresource.into_param().abi(), 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.into_param().abi()) } #[inline] pub unsafe fn OpenCluster(lpszclustername: P0) -> HCLUSTER @@ -2774,7 +2774,7 @@ where #[inline] pub unsafe fn ResUtilGetBinaryProperty(ppboutvalue: *mut *mut u8, pcboutvaluesize: *mut u32, pvaluestruct: *const CLUSPROP_BINARY, pboldvalue: ::core::option::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); - ResUtilGetBinaryProperty(ppboutvalue, 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() as _), pppropertylist, pcbpropertylistsize) + ResUtilGetBinaryProperty(ppboutvalue, 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()), pppropertylist, pcbpropertylistsize) } #[doc = "Required features: `\"Win32_System_Registry\"`"] #[cfg(feature = "Win32_System_Registry")] @@ -3180,7 +3180,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("resutils.dll" "system" fn ResUtilSetBinaryValue(hkeyclusterkey : super::super::System::Registry:: HKEY, pszvaluename : ::windows_core::PCWSTR, pbnewvalue : *const u8, cbnewvaluesize : u32, ppboutvalue : *mut *mut u8, pcboutvaluesize : *mut u32) -> u32); - ResUtilSetBinaryValue(hkeyclusterkey.into_param().abi(), pszvaluename.into_param().abi(), ::core::mem::transmute(pbnewvalue.as_ptr()), pbnewvalue.len() as _, ::core::mem::transmute(ppboutvalue.unwrap_or(::std::ptr::null_mut())), pcboutvaluesize) + ResUtilSetBinaryValue(hkeyclusterkey.into_param().abi(), pszvaluename.into_param().abi(), ::core::mem::transmute(pbnewvalue.as_ptr()), pbnewvalue.len().try_into().unwrap(), ::core::mem::transmute(ppboutvalue.unwrap_or(::std::ptr::null_mut())), pcboutvaluesize) } #[doc = "Required features: `\"Win32_System_Registry\"`"] #[cfg(feature = "Win32_System_Registry")] @@ -3344,7 +3344,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("resutils.dll" "system" fn ResUtilSetValueEx(hkeyclusterkey : super::super::System::Registry:: HKEY, valuename : ::windows_core::PCWSTR, valuetype : u32, valuedata : *const u8, valuesize : u32, flags : u32) -> u32); - ResUtilSetValueEx(hkeyclusterkey.into_param().abi(), valuename.into_param().abi(), valuetype, ::core::mem::transmute(valuedata.as_ptr()), valuedata.len() as _, flags) + ResUtilSetValueEx(hkeyclusterkey.into_param().abi(), valuename.into_param().abi(), valuetype, ::core::mem::transmute(valuedata.as_ptr()), valuedata.len().try_into().unwrap(), flags) } #[doc = "Required features: `\"Win32_Security\"`"] #[cfg(feature = "Win32_Security")] @@ -3528,7 +3528,7 @@ where P0: ::windows_core::IntoParam
, { ::windows_targets::link!("clusapi.dll" "system" fn SetClusterGroupNodeList(hgroup : HGROUP, nodecount : u32, nodelist : *const HNODE) -> u32); - SetClusterGroupNodeList(hgroup.into_param().abi(), nodelist.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(nodelist.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + SetClusterGroupNodeList(hgroup.into_param().abi(), nodelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(nodelist.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] pub unsafe fn SetClusterGroupNodeListEx(hgroup: P0, nodelist: &[HNODE], lpszreason: P1) -> u32 @@ -3537,7 +3537,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("clusapi.dll" "system" fn SetClusterGroupNodeListEx(hgroup : HGROUP, nodecount : u32, nodelist : *const HNODE, lpszreason : ::windows_core::PCWSTR) -> u32); - SetClusterGroupNodeListEx(hgroup.into_param().abi(), nodelist.len() as _, ::core::mem::transmute(nodelist.as_ptr()), lpszreason.into_param().abi()) + SetClusterGroupNodeListEx(hgroup.into_param().abi(), nodelist.len().try_into().unwrap(), ::core::mem::transmute(nodelist.as_ptr()), lpszreason.into_param().abi()) } #[inline] pub unsafe fn SetClusterGroupSetDependencyExpression(hgroupset: P0, lpszdependencyexprssion: P1) -> u32 @@ -3602,7 +3602,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("clusapi.dll" "system" fn SetClusterNetworkPriorityOrder(hcluster : HCLUSTER, networkcount : u32, networklist : *const HNETWORK) -> u32); - SetClusterNetworkPriorityOrder(hcluster.into_param().abi(), networklist.len() as _, ::core::mem::transmute(networklist.as_ptr())) + SetClusterNetworkPriorityOrder(hcluster.into_param().abi(), networklist.len().try_into().unwrap(), ::core::mem::transmute(networklist.as_ptr())) } #[inline] pub unsafe fn SetClusterQuorumResource(hresource: P0, lpszdevicename: P1, dwmaxquologsize: u32) -> u32 diff --git a/crates/libs/windows/src/Windows/Win32/Networking/HttpServer/mod.rs b/crates/libs/windows/src/Windows/Win32/Networking/HttpServer/mod.rs index 790f130b3c..d1370b4c2a 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/HttpServer/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/HttpServer/mod.rs @@ -277,7 +277,7 @@ where requestqueuehandle.into_param().abi(), requestid, flags, - entitychunks.as_deref().map_or(0, |slice| slice.len() as _), + entitychunks.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(entitychunks.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(bytessent.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), 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 bf9bc0d05b..ffe5786dee 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/Ldap/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/Ldap/mod.rs @@ -13,12 +13,12 @@ pub unsafe fn LdapMapErrorToWin32(ldaperror: LDAP_RETCODE) -> ::windows_core::Re #[inline] pub unsafe fn LdapUTF8ToUnicode(lpsrcstr: &[u8], lpdeststr: &mut [u16]) -> i32 { ::windows_targets::link!("wldap32.dll" "cdecl" fn LdapUTF8ToUnicode(lpsrcstr : ::windows_core::PCSTR, cchsrc : i32, lpdeststr : ::windows_core::PWSTR, cchdest : i32) -> i32); - LdapUTF8ToUnicode(::core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len() as _, ::core::mem::transmute(lpdeststr.as_ptr()), lpdeststr.len() as _) + LdapUTF8ToUnicode(::core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len().try_into().unwrap(), ::core::mem::transmute(lpdeststr.as_ptr()), lpdeststr.len().try_into().unwrap()) } #[inline] pub unsafe fn LdapUnicodeToUTF8(lpsrcstr: &[u16], lpdeststr: &mut [u8]) -> i32 { ::windows_targets::link!("wldap32.dll" "cdecl" fn LdapUnicodeToUTF8(lpsrcstr : ::windows_core::PCWSTR, cchsrc : i32, lpdeststr : ::windows_core::PSTR, cchdest : i32) -> i32); - LdapUnicodeToUTF8(::core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len() as _, ::core::mem::transmute(lpdeststr.as_ptr()), lpdeststr.len() as _) + LdapUnicodeToUTF8(::core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len().try_into().unwrap(), ::core::mem::transmute(lpdeststr.as_ptr()), lpdeststr.len().try_into().unwrap()) } #[inline] pub unsafe fn ber_alloc_t(options: i32) -> *mut BerElement { @@ -762,17 +762,17 @@ pub unsafe fn ldap_err2stringW(err: u32) -> ::windows_core::PWSTR { #[inline] pub unsafe fn ldap_escape_filter_element(sourcefilterelement: &[u8], destfilterelement: ::core::option::Option<&mut [u8]>) -> u32 { ::windows_targets::link!("wldap32.dll" "cdecl" fn ldap_escape_filter_element(sourcefilterelement : ::windows_core::PCSTR, sourcelength : u32, destfilterelement : ::windows_core::PSTR, destlength : u32) -> u32); - ldap_escape_filter_element(::core::mem::transmute(sourcefilterelement.as_ptr()), sourcefilterelement.len() as _, ::core::mem::transmute(destfilterelement.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), destfilterelement.as_deref().map_or(0, |slice| slice.len() as _)) + ldap_escape_filter_element(::core::mem::transmute(sourcefilterelement.as_ptr()), sourcefilterelement.len().try_into().unwrap(), ::core::mem::transmute(destfilterelement.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), destfilterelement.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn ldap_escape_filter_elementA(sourcefilterelement: &[u8], destfilterelement: ::core::option::Option<&mut [u8]>) -> u32 { ::windows_targets::link!("wldap32.dll" "cdecl" fn ldap_escape_filter_elementA(sourcefilterelement : ::windows_core::PCSTR, sourcelength : u32, destfilterelement : ::windows_core::PSTR, destlength : u32) -> u32); - ldap_escape_filter_elementA(::core::mem::transmute(sourcefilterelement.as_ptr()), sourcefilterelement.len() as _, ::core::mem::transmute(destfilterelement.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), destfilterelement.as_deref().map_or(0, |slice| slice.len() as _)) + ldap_escape_filter_elementA(::core::mem::transmute(sourcefilterelement.as_ptr()), sourcefilterelement.len().try_into().unwrap(), ::core::mem::transmute(destfilterelement.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), destfilterelement.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn ldap_escape_filter_elementW(sourcefilterelement: &[u8], destfilterelement: ::windows_core::PWSTR, destlength: u32) -> u32 { ::windows_targets::link!("wldap32.dll" "cdecl" fn ldap_escape_filter_elementW(sourcefilterelement : ::windows_core::PCSTR, sourcelength : u32, destfilterelement : ::windows_core::PWSTR, destlength : u32) -> u32); - ldap_escape_filter_elementW(::core::mem::transmute(sourcefilterelement.as_ptr()), sourcefilterelement.len() as _, ::core::mem::transmute(destfilterelement), destlength) + ldap_escape_filter_elementW(::core::mem::transmute(sourcefilterelement.as_ptr()), sourcefilterelement.len().try_into().unwrap(), ::core::mem::transmute(destfilterelement), destlength) } #[inline] pub unsafe fn ldap_explode_dn(dn: P0, notypes: u32) -> *mut ::windows_core::PSTR 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 ab47096baf..3fb35bbae9 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/NetworkListManager/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/NetworkListManager/mod.rs @@ -14,7 +14,7 @@ impl IEnumNetworkConnections { #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, rgelt: &mut [::core::option::Option], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -75,7 +75,7 @@ impl IEnumNetworks { #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, rgelt: &mut [::core::option::Option], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -561,7 +561,7 @@ impl INetworkCostManager { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).SetDestinationAddresses)(::windows_core::Interface::as_raw(self), pdestipaddrlist.len() as _, ::core::mem::transmute(pdestipaddrlist.as_ptr()), bappend.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).SetDestinationAddresses)(::windows_core::Interface::as_raw(self), pdestipaddrlist.len().try_into().unwrap(), ::core::mem::transmute(pdestipaddrlist.as_ptr()), bappend.into_param().abi()).ok() } } ::windows_core::imp::interface_hierarchy!(INetworkCostManager, ::windows_core::IUnknown); 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 f4860cefce..2c8826551f 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/RemoteDifferentialCompression/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/RemoteDifferentialCompression/mod.rs @@ -146,7 +146,7 @@ impl IRdcGenerator { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).Process)(::windows_core::Interface::as_raw(self), endofinput.into_param().abi(), endofoutput, inputbuffer, outputbuffers.len() as _, ::core::mem::transmute(outputbuffers.as_ptr()), rdc_errorcode).ok() + (::windows_core::Interface::vtable(self).Process)(::windows_core::Interface::as_raw(self), endofinput.into_param().abi(), endofoutput, inputbuffer, outputbuffers.len().try_into().unwrap(), ::core::mem::transmute(outputbuffers.as_ptr()), rdc_errorcode).ok() } } ::windows_core::imp::interface_hierarchy!(IRdcGenerator, ::windows_core::IUnknown); @@ -254,7 +254,7 @@ impl IRdcLibrary { } pub unsafe fn CreateGenerator(&self, igeneratorparametersarray: &[::core::option::Option]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateGenerator)(::windows_core::Interface::as_raw(self), igeneratorparametersarray.len() as _, ::core::mem::transmute(igeneratorparametersarray.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateGenerator)(::windows_core::Interface::as_raw(self), igeneratorparametersarray.len().try_into().unwrap(), ::core::mem::transmute(igeneratorparametersarray.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn CreateComparator(&self, iseedsignaturesfile: P0, comparatorbuffersize: u32) -> ::windows_core::Result where 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 30a8f5ba92..34bb1383aa 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/WebSocket/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/WebSocket/mod.rs @@ -15,11 +15,11 @@ where WebSocketBeginClientHandshake( hwebsocket.into_param().abi(), ::core::mem::transmute(pszsubprotocols.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - pszsubprotocols.as_deref().map_or(0, |slice| slice.len() as _), + pszsubprotocols.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pszextensions.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - pszextensions.as_deref().map_or(0, |slice| slice.len() as _), + 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() as _), + pinitialheaders.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), padditionalheaders, puladditionalheadercount, ) @@ -32,7 +32,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("websocket.dll" "system" fn WebSocketBeginServerHandshake(hwebsocket : WEB_SOCKET_HANDLE, pszsubprotocolselected : ::windows_core::PCSTR, pszextensionselected : *const ::windows_core::PCSTR, ulextensionselectedcount : u32, prequestheaders : *const WEB_SOCKET_HTTP_HEADER, ulrequestheadercount : u32, presponseheaders : *mut *mut WEB_SOCKET_HTTP_HEADER, pulresponseheadercount : *mut u32) -> ::windows_core::HRESULT); - WebSocketBeginServerHandshake(hwebsocket.into_param().abi(), pszsubprotocolselected.into_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() as _), ::core::mem::transmute(prequestheaders.as_ptr()), prequestheaders.len() as _, presponseheaders, pulresponseheadercount).ok() + WebSocketBeginServerHandshake(hwebsocket.into_param().abi(), pszsubprotocolselected.into_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, pulresponseheadercount).ok() } #[inline] pub unsafe fn WebSocketCompleteAction(hwebsocket: P0, pvactioncontext: *const ::core::ffi::c_void, ulbytestransferred: u32) @@ -46,13 +46,13 @@ where pub unsafe fn WebSocketCreateClientHandle(pproperties: &[WEB_SOCKET_PROPERTY]) -> ::windows_core::Result { ::windows_targets::link!("websocket.dll" "system" fn WebSocketCreateClientHandle(pproperties : *const WEB_SOCKET_PROPERTY, ulpropertycount : u32, phwebsocket : *mut WEB_SOCKET_HANDLE) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - WebSocketCreateClientHandle(::core::mem::transmute(pproperties.as_ptr()), pproperties.len() as _, &mut result__).from_abi(result__) + WebSocketCreateClientHandle(::core::mem::transmute(pproperties.as_ptr()), pproperties.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[inline] pub unsafe fn WebSocketCreateServerHandle(pproperties: &[WEB_SOCKET_PROPERTY]) -> ::windows_core::Result { ::windows_targets::link!("websocket.dll" "system" fn WebSocketCreateServerHandle(pproperties : *const WEB_SOCKET_PROPERTY, ulpropertycount : u32, phwebsocket : *mut WEB_SOCKET_HANDLE) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - WebSocketCreateServerHandle(::core::mem::transmute(pproperties.as_ptr()), pproperties.len() as _, &mut result__).from_abi(result__) + WebSocketCreateServerHandle(::core::mem::transmute(pproperties.as_ptr()), pproperties.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[inline] pub unsafe fn WebSocketDeleteHandle(hwebsocket: P0) @@ -68,7 +68,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("websocket.dll" "system" fn WebSocketEndClientHandshake(hwebsocket : WEB_SOCKET_HANDLE, presponseheaders : *const WEB_SOCKET_HTTP_HEADER, ulreponseheadercount : u32, pulselectedextensions : *mut u32, pulselectedextensioncount : *mut u32, pulselectedsubprotocol : *mut u32) -> ::windows_core::HRESULT); - WebSocketEndClientHandshake(hwebsocket.into_param().abi(), ::core::mem::transmute(presponseheaders.as_ptr()), presponseheaders.len() as _, ::core::mem::transmute(pulselectedextensions.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pulselectedextensioncount.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pulselectedsubprotocol.unwrap_or(::std::ptr::null_mut()))).ok() + WebSocketEndClientHandshake(hwebsocket.into_param().abi(), ::core::mem::transmute(presponseheaders.as_ptr()), presponseheaders.len().try_into().unwrap(), ::core::mem::transmute(pulselectedextensions.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pulselectedextensioncount.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pulselectedsubprotocol.unwrap_or(::std::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WebSocketEndServerHandshake(hwebsocket: P0) -> ::windows_core::Result<()> 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 015b9c5785..1657f38c83 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/WinHttp/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/WinHttp/mod.rs @@ -3,12 +3,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); - WinHttpAddRequestHeaders(hrequest, ::core::mem::transmute(lpszheaders.as_ptr()), lpszheaders.len() as _, dwmodifiers).ok() + WinHttpAddRequestHeaders(hrequest, ::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); - WinHttpAddRequestHeadersEx(hrequest, dwmodifiers, ullflags, ullextra, pheaders.len() as _, ::core::mem::transmute(pheaders.as_ptr())) + WinHttpAddRequestHeadersEx(hrequest, dwmodifiers, ullflags, ullextra, pheaders.len().try_into().unwrap(), ::core::mem::transmute(pheaders.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -37,7 +37,7 @@ where #[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); - WinHttpCrackUrl(::core::mem::transmute(pwszurl.as_ptr()), pwszurl.len() as _, dwflags, lpurlcomponents).ok() + WinHttpCrackUrl(::core::mem::transmute(pwszurl.as_ptr()), pwszurl.len().try_into().unwrap(), dwflags, lpurlcomponents).ok() } #[inline] pub unsafe fn WinHttpCreateProxyResolver(hsession: *const ::core::ffi::c_void, phresolver: *mut *mut ::core::ffi::c_void) -> u32 { @@ -131,7 +131,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winhttp.dll" "system" fn WinHttpGetProxyForUrlEx2(hresolver : *const ::core::ffi::c_void, pcwszurl : ::windows_core::PCWSTR, pautoproxyoptions : *const WINHTTP_AUTOPROXY_OPTIONS, cbinterfaceselectioncontext : u32, pinterfaceselectioncontext : *const u8, pcontext : usize) -> u32); - WinHttpGetProxyForUrlEx2(hresolver, pcwszurl.into_param().abi(), pautoproxyoptions, pinterfaceselectioncontext.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pinterfaceselectioncontext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pcontext) + WinHttpGetProxyForUrlEx2(hresolver, pcwszurl.into_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) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -270,7 +270,7 @@ pub unsafe fn WinHttpResetAutoProxy(hsession: *const ::core::ffi::c_void, dwflag #[inline] pub unsafe fn WinHttpSendRequest(hrequest: *mut ::core::ffi::c_void, lpszheaders: ::core::option::Option<&[u16]>, lpoptional: ::core::option::Option<*const ::core::ffi::c_void>, dwoptionallength: u32, dwtotallength: u32, dwcontext: usize) -> ::windows_core::Result<()> { ::windows_targets::link!("winhttp.dll" "system" fn WinHttpSendRequest(hrequest : *mut ::core::ffi::c_void, lpszheaders : ::windows_core::PCWSTR, dwheaderslength : u32, lpoptional : *const ::core::ffi::c_void, dwoptionallength : u32, dwtotallength : u32, dwcontext : usize) -> super::super::Foundation:: BOOL); - WinHttpSendRequest(hrequest, ::core::mem::transmute(lpszheaders.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszheaders.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpoptional.unwrap_or(::std::ptr::null())), dwoptionallength, dwtotallength, dwcontext).ok() + WinHttpSendRequest(hrequest, ::core::mem::transmute(lpszheaders.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszheaders.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpoptional.unwrap_or(::std::ptr::null())), dwoptionallength, dwtotallength, dwcontext).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -295,7 +295,7 @@ pub unsafe fn WinHttpSetDefaultProxyConfiguration(pproxyinfo: *mut WINHTTP_PROXY #[inline] pub unsafe fn WinHttpSetOption(hinternet: ::core::option::Option<*const ::core::ffi::c_void>, dwoption: u32, lpbuffer: ::core::option::Option<&[u8]>) -> ::windows_core::Result<()> { ::windows_targets::link!("winhttp.dll" "system" fn WinHttpSetOption(hinternet : *const ::core::ffi::c_void, dwoption : u32, lpbuffer : *const ::core::ffi::c_void, dwbufferlength : u32) -> super::super::Foundation:: BOOL); - WinHttpSetOption(::core::mem::transmute(hinternet.unwrap_or(::std::ptr::null())), dwoption, ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _)).ok() + WinHttpSetOption(::core::mem::transmute(hinternet.unwrap_or(::std::ptr::null())), dwoption, ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -364,7 +364,7 @@ pub unsafe fn WinHttpWebSocketReceive(hwebsocket: *const ::core::ffi::c_void, pv #[inline] pub unsafe fn WinHttpWebSocketSend(hwebsocket: *const ::core::ffi::c_void, ebuffertype: WINHTTP_WEB_SOCKET_BUFFER_TYPE, pvbuffer: ::core::option::Option<&[u8]>) -> u32 { ::windows_targets::link!("winhttp.dll" "system" fn WinHttpWebSocketSend(hwebsocket : *const ::core::ffi::c_void, ebuffertype : WINHTTP_WEB_SOCKET_BUFFER_TYPE, pvbuffer : *const ::core::ffi::c_void, dwbufferlength : u32) -> u32); - WinHttpWebSocketSend(hwebsocket, ebuffertype, ::core::mem::transmute(pvbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pvbuffer.as_deref().map_or(0, |slice| slice.len() as _)) + WinHttpWebSocketSend(hwebsocket, ebuffertype, ::core::mem::transmute(pvbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pvbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn WinHttpWebSocketShutdown(hwebsocket: *const ::core::ffi::c_void, usstatus: u16, pvreason: ::core::option::Option<*const ::core::ffi::c_void>, dwreasonlength: u32) -> 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 4f6e66afa8..e80eac6436 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::IntoParam<::windows_core::PCWSTR>, { ::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); - AppCacheCheckManifest(pwszmasterurl.into_param().abi(), pwszmanifesturl.into_param().abi(), ::core::mem::transmute(pbmanifestdata.as_ptr()), pbmanifestdata.len() as _, ::core::mem::transmute(pbmanifestresponseheaders.as_ptr()), pbmanifestresponseheaders.len() as _, pestate, phnewappcache) + AppCacheCheckManifest(pwszmasterurl.into_param().abi(), pwszmanifesturl.into_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, phnewappcache) } #[inline] pub unsafe fn AppCacheCloseHandle(happcache: *const ::core::ffi::c_void) { @@ -19,7 +19,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wininet.dll" "system" fn AppCacheCreateAndCommitFile(happcache : *const ::core::ffi::c_void, pwszsourcefilepath : ::windows_core::PCWSTR, pwszurl : ::windows_core::PCWSTR, pbresponseheaders : *const u8, dwresponseheaderssize : u32) -> u32); - AppCacheCreateAndCommitFile(happcache, pwszsourcefilepath.into_param().abi(), pwszurl.into_param().abi(), ::core::mem::transmute(pbresponseheaders.as_ptr()), pbresponseheaders.len() as _) + AppCacheCreateAndCommitFile(happcache, pwszsourcefilepath.into_param().abi(), pwszurl.into_param().abi(), ::core::mem::transmute(pbresponseheaders.as_ptr()), pbresponseheaders.len().try_into().unwrap()) } #[inline] pub unsafe fn AppCacheDeleteGroup(pwszmanifesturl: P0) -> u32 @@ -45,7 +45,7 @@ pub unsafe fn AppCacheDuplicateHandle(happcache: *const ::core::ffi::c_void, phd #[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); - AppCacheFinalize(happcache, ::core::mem::transmute(pbmanifestdata.as_ptr()), pbmanifestdata.len() as _, pestate) + AppCacheFinalize(happcache, ::core::mem::transmute(pbmanifestdata.as_ptr()), pbmanifestdata.len().try_into().unwrap(), pestate) } #[inline] pub unsafe fn AppCacheFreeDownloadList(pdownloadlist: *mut APP_CACHE_DOWNLOAD_LIST) { @@ -131,7 +131,7 @@ where P3: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wininet.dll" "system" fn CommitUrlCacheEntryA(lpszurlname : ::windows_core::PCSTR, lpszlocalfilename : ::windows_core::PCSTR, expiretime : super::super::Foundation:: FILETIME, lastmodifiedtime : super::super::Foundation:: FILETIME, cacheentrytype : u32, lpheaderinfo : *const u8, cchheaderinfo : u32, lpszfileextension : ::windows_core::PCSTR, lpszoriginalurl : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - CommitUrlCacheEntryA(lpszurlname.into_param().abi(), lpszlocalfilename.into_param().abi(), ::core::mem::transmute(expiretime), ::core::mem::transmute(lastmodifiedtime), cacheentrytype, ::core::mem::transmute(lpheaderinfo.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpheaderinfo.as_deref().map_or(0, |slice| slice.len() as _), lpszfileextension.into_param().abi(), lpszoriginalurl.into_param().abi()).ok() + CommitUrlCacheEntryA(lpszurlname.into_param().abi(), lpszlocalfilename.into_param().abi(), ::core::mem::transmute(expiretime), ::core::mem::transmute(lastmodifiedtime), cacheentrytype, ::core::mem::transmute(lpheaderinfo.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpheaderinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpszfileextension.into_param().abi(), lpszoriginalurl.into_param().abi()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -141,7 +141,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wininet.dll" "system" fn CommitUrlCacheEntryBinaryBlob(pwszurlname : ::windows_core::PCWSTR, dwtype : u32, ftexpiretime : super::super::Foundation:: FILETIME, ftmodifiedtime : super::super::Foundation:: FILETIME, pbblob : *const u8, cbblob : u32) -> u32); - CommitUrlCacheEntryBinaryBlob(pwszurlname.into_param().abi(), dwtype, ::core::mem::transmute(ftexpiretime), ::core::mem::transmute(ftmodifiedtime), ::core::mem::transmute(pbblob.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbblob.as_deref().map_or(0, |slice| slice.len() as _)) + CommitUrlCacheEntryBinaryBlob(pwszurlname.into_param().abi(), dwtype, ::core::mem::transmute(ftexpiretime), ::core::mem::transmute(ftmodifiedtime), ::core::mem::transmute(pbblob.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbblob.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -154,7 +154,7 @@ where P3: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wininet.dll" "system" fn CommitUrlCacheEntryW(lpszurlname : ::windows_core::PCWSTR, lpszlocalfilename : ::windows_core::PCWSTR, expiretime : super::super::Foundation:: FILETIME, lastmodifiedtime : super::super::Foundation:: FILETIME, cacheentrytype : u32, lpszheaderinfo : ::windows_core::PCWSTR, cchheaderinfo : u32, lpszfileextension : ::windows_core::PCWSTR, lpszoriginalurl : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - CommitUrlCacheEntryW(lpszurlname.into_param().abi(), lpszlocalfilename.into_param().abi(), ::core::mem::transmute(expiretime), ::core::mem::transmute(lastmodifiedtime), cacheentrytype, ::core::mem::transmute(lpszheaderinfo.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszheaderinfo.as_deref().map_or(0, |slice| slice.len() as _), lpszfileextension.into_param().abi(), lpszoriginalurl.into_param().abi()).ok() + CommitUrlCacheEntryW(lpszurlname.into_param().abi(), lpszlocalfilename.into_param().abi(), ::core::mem::transmute(expiretime), ::core::mem::transmute(lastmodifiedtime), cacheentrytype, ::core::mem::transmute(lpszheaderinfo.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszheaderinfo.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpszfileextension.into_param().abi(), lpszoriginalurl.into_param().abi()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -312,7 +312,7 @@ pub unsafe fn DeleteWpadCacheForNetworks(param0: WPAD_CACHE_DELETE) -> super::su #[inline] pub unsafe fn DetectAutoProxyUrl(pszautoproxyurl: &mut [u8], dwdetectflags: PROXY_AUTO_DETECT_TYPE) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn DetectAutoProxyUrl(pszautoproxyurl : ::windows_core::PSTR, cchautoproxyurl : u32, dwdetectflags : PROXY_AUTO_DETECT_TYPE) -> super::super::Foundation:: BOOL); - DetectAutoProxyUrl(::core::mem::transmute(pszautoproxyurl.as_ptr()), pszautoproxyurl.len() as _, dwdetectflags).ok() + DetectAutoProxyUrl(::core::mem::transmute(pszautoproxyurl.as_ptr()), pszautoproxyurl.len().try_into().unwrap(), dwdetectflags).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -917,7 +917,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wininet.dll" "system" fn GopherGetAttributeA(hconnect : *const ::core::ffi::c_void, lpszlocator : ::windows_core::PCSTR, lpszattributename : ::windows_core::PCSTR, lpbuffer : *mut u8, dwbufferlength : u32, lpdwcharactersreturned : *mut u32, lpfnenumerator : GOPHER_ATTRIBUTE_ENUMERATOR, dwcontext : usize) -> super::super::Foundation:: BOOL); - GopherGetAttributeA(hconnect, lpszlocator.into_param().abi(), lpszattributename.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, lpdwcharactersreturned, lpfnenumerator, dwcontext).ok() + GopherGetAttributeA(hconnect, lpszlocator.into_param().abi(), lpszattributename.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), lpdwcharactersreturned, lpfnenumerator, dwcontext).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -928,7 +928,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wininet.dll" "system" fn GopherGetAttributeW(hconnect : *const ::core::ffi::c_void, lpszlocator : ::windows_core::PCWSTR, lpszattributename : ::windows_core::PCWSTR, lpbuffer : *mut u8, dwbufferlength : u32, lpdwcharactersreturned : *mut u32, lpfnenumerator : GOPHER_ATTRIBUTE_ENUMERATOR, dwcontext : usize) -> super::super::Foundation:: BOOL); - GopherGetAttributeW(hconnect, lpszlocator.into_param().abi(), lpszattributename.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, lpdwcharactersreturned, lpfnenumerator, dwcontext).ok() + GopherGetAttributeW(hconnect, lpszlocator.into_param().abi(), lpszattributename.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), lpdwcharactersreturned, lpfnenumerator, dwcontext).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -973,14 +973,14 @@ where #[inline] pub unsafe fn HttpAddRequestHeadersA(hrequest: *const ::core::ffi::c_void, lpszheaders: &[u8], dwmodifiers: HTTP_ADDREQ_FLAG) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn HttpAddRequestHeadersA(hrequest : *const ::core::ffi::c_void, lpszheaders : ::windows_core::PCSTR, dwheaderslength : u32, dwmodifiers : HTTP_ADDREQ_FLAG) -> super::super::Foundation:: BOOL); - HttpAddRequestHeadersA(hrequest, ::core::mem::transmute(lpszheaders.as_ptr()), lpszheaders.len() as _, dwmodifiers).ok() + HttpAddRequestHeadersA(hrequest, ::core::mem::transmute(lpszheaders.as_ptr()), lpszheaders.len().try_into().unwrap(), dwmodifiers).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn HttpAddRequestHeadersW(hrequest: *const ::core::ffi::c_void, lpszheaders: &[u16], dwmodifiers: HTTP_ADDREQ_FLAG) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn HttpAddRequestHeadersW(hrequest : *const ::core::ffi::c_void, lpszheaders : ::windows_core::PCWSTR, dwheaderslength : u32, dwmodifiers : HTTP_ADDREQ_FLAG) -> super::super::Foundation:: BOOL); - HttpAddRequestHeadersW(hrequest, ::core::mem::transmute(lpszheaders.as_ptr()), lpszheaders.len() as _, dwmodifiers).ok() + HttpAddRequestHeadersW(hrequest, ::core::mem::transmute(lpszheaders.as_ptr()), lpszheaders.len().try_into().unwrap(), dwmodifiers).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1127,7 +1127,7 @@ pub unsafe fn HttpQueryInfoW(hrequest: *const ::core::ffi::c_void, dwinfolevel: #[inline] pub unsafe fn HttpSendRequestA(hrequest: *const ::core::ffi::c_void, lpszheaders: ::core::option::Option<&[u8]>, lpoptional: ::core::option::Option<*const ::core::ffi::c_void>, dwoptionallength: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn HttpSendRequestA(hrequest : *const ::core::ffi::c_void, lpszheaders : ::windows_core::PCSTR, dwheaderslength : u32, lpoptional : *const ::core::ffi::c_void, dwoptionallength : u32) -> super::super::Foundation:: BOOL); - HttpSendRequestA(hrequest, ::core::mem::transmute(lpszheaders.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszheaders.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpoptional.unwrap_or(::std::ptr::null())), dwoptionallength).ok() + HttpSendRequestA(hrequest, ::core::mem::transmute(lpszheaders.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszheaders.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpoptional.unwrap_or(::std::ptr::null())), dwoptionallength).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1148,7 +1148,7 @@ pub unsafe fn HttpSendRequestExW(hrequest: *const ::core::ffi::c_void, lpbuffers #[inline] pub unsafe fn HttpSendRequestW(hrequest: *const ::core::ffi::c_void, lpszheaders: ::core::option::Option<&[u16]>, lpoptional: ::core::option::Option<*const ::core::ffi::c_void>, dwoptionallength: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn HttpSendRequestW(hrequest : *const ::core::ffi::c_void, lpszheaders : ::windows_core::PCWSTR, dwheaderslength : u32, lpoptional : *const ::core::ffi::c_void, dwoptionallength : u32) -> super::super::Foundation:: BOOL); - HttpSendRequestW(hrequest, ::core::mem::transmute(lpszheaders.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszheaders.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpoptional.unwrap_or(::std::ptr::null())), dwoptionallength).ok() + HttpSendRequestW(hrequest, ::core::mem::transmute(lpszheaders.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszheaders.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpoptional.unwrap_or(::std::ptr::null())), dwoptionallength).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1405,21 +1405,21 @@ where P1: ::windows_core::IntoParam, { ::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); - InternetConvertUrlFromWireToWideChar(::core::mem::transmute(pcszurl.as_ptr()), pcszurl.len() as _, pcwszbaseurl.into_param().abi(), dwcodepagehost, dwcodepagepath, fencodepathextra.into_param().abi(), dwcodepageextra, ppwszconvertedurl) + InternetConvertUrlFromWireToWideChar(::core::mem::transmute(pcszurl.as_ptr()), pcszurl.len().try_into().unwrap(), pcwszbaseurl.into_param().abi(), dwcodepagehost, dwcodepagepath, fencodepathextra.into_param().abi(), dwcodepageextra, ppwszconvertedurl) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Networking_WinHttp\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Networking_WinHttp"))] #[inline] pub unsafe fn InternetCrackUrlA(lpszurl: &[u8], dwflags: super::WinHttp::WIN_HTTP_CREATE_URL_FLAGS, lpurlcomponents: *mut URL_COMPONENTSA) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetCrackUrlA(lpszurl : ::windows_core::PCSTR, dwurllength : u32, dwflags : super::WinHttp:: WIN_HTTP_CREATE_URL_FLAGS, lpurlcomponents : *mut URL_COMPONENTSA) -> super::super::Foundation:: BOOL); - InternetCrackUrlA(::core::mem::transmute(lpszurl.as_ptr()), lpszurl.len() as _, dwflags, lpurlcomponents).ok() + InternetCrackUrlA(::core::mem::transmute(lpszurl.as_ptr()), lpszurl.len().try_into().unwrap(), dwflags, lpurlcomponents).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Networking_WinHttp\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Networking_WinHttp"))] #[inline] pub unsafe fn InternetCrackUrlW(lpszurl: &[u16], dwflags: super::WinHttp::WIN_HTTP_CREATE_URL_FLAGS, lpurlcomponents: *mut URL_COMPONENTSW) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetCrackUrlW(lpszurl : ::windows_core::PCWSTR, dwurllength : u32, dwflags : super::WinHttp:: WIN_HTTP_CREATE_URL_FLAGS, lpurlcomponents : *mut URL_COMPONENTSW) -> super::super::Foundation:: BOOL); - InternetCrackUrlW(::core::mem::transmute(lpszurl.as_ptr()), lpszurl.len() as _, dwflags, lpurlcomponents).ok() + InternetCrackUrlW(::core::mem::transmute(lpszurl.as_ptr()), lpszurl.len().try_into().unwrap(), dwflags, lpurlcomponents).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1542,21 +1542,21 @@ pub unsafe fn InternetGetConnectedState(lpdwflags: *mut INTERNET_CONNECTION, dwr #[inline] pub unsafe fn InternetGetConnectedStateEx(lpdwflags: *mut INTERNET_CONNECTION, lpszconnectionname: ::core::option::Option<&mut [u8]>, dwreserved: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetGetConnectedStateEx(lpdwflags : *mut INTERNET_CONNECTION, lpszconnectionname : ::windows_core::PSTR, dwnamelen : u32, dwreserved : u32) -> super::super::Foundation:: BOOL); - InternetGetConnectedStateEx(lpdwflags, ::core::mem::transmute(lpszconnectionname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszconnectionname.as_deref().map_or(0, |slice| slice.len() as _), dwreserved).ok() + InternetGetConnectedStateEx(lpdwflags, ::core::mem::transmute(lpszconnectionname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszconnectionname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), dwreserved).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn InternetGetConnectedStateExA(lpdwflags: ::core::option::Option<*mut INTERNET_CONNECTION>, lpszconnectionname: ::core::option::Option<&mut [u8]>, dwreserved: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetGetConnectedStateExA(lpdwflags : *mut INTERNET_CONNECTION, lpszconnectionname : ::windows_core::PSTR, cchnamelen : u32, dwreserved : u32) -> super::super::Foundation:: BOOL); - InternetGetConnectedStateExA(::core::mem::transmute(lpdwflags.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpszconnectionname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszconnectionname.as_deref().map_or(0, |slice| slice.len() as _), dwreserved).ok() + InternetGetConnectedStateExA(::core::mem::transmute(lpdwflags.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpszconnectionname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszconnectionname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), dwreserved).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn InternetGetConnectedStateExW(lpdwflags: ::core::option::Option<*mut INTERNET_CONNECTION>, lpszconnectionname: ::core::option::Option<&mut [u16]>, dwreserved: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetGetConnectedStateExW(lpdwflags : *mut INTERNET_CONNECTION, lpszconnectionname : ::windows_core::PWSTR, cchnamelen : u32, dwreserved : u32) -> super::super::Foundation:: BOOL); - InternetGetConnectedStateExW(::core::mem::transmute(lpdwflags.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpszconnectionname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszconnectionname.as_deref().map_or(0, |slice| slice.len() as _), dwreserved).ok() + InternetGetConnectedStateExW(::core::mem::transmute(lpdwflags.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpszconnectionname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszconnectionname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), dwreserved).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1757,7 +1757,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wininet.dll" "system" fn InternetOpenUrlA(hinternet : *const ::core::ffi::c_void, lpszurl : ::windows_core::PCSTR, lpszheaders : ::windows_core::PCSTR, dwheaderslength : u32, dwflags : u32, dwcontext : usize) -> *mut ::core::ffi::c_void); - InternetOpenUrlA(hinternet, lpszurl.into_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() as _), dwflags, dwcontext) + InternetOpenUrlA(hinternet, lpszurl.into_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) } #[inline] pub unsafe fn InternetOpenUrlW(hinternet: *const ::core::ffi::c_void, lpszurl: P0, lpszheaders: ::core::option::Option<&[u16]>, dwflags: u32, dwcontext: usize) -> *mut ::core::ffi::c_void @@ -1765,7 +1765,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wininet.dll" "system" fn InternetOpenUrlW(hinternet : *const ::core::ffi::c_void, lpszurl : ::windows_core::PCWSTR, lpszheaders : ::windows_core::PCWSTR, dwheaderslength : u32, dwflags : u32, dwcontext : usize) -> *mut ::core::ffi::c_void); - InternetOpenUrlW(hinternet, lpszurl.into_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() as _), dwflags, dwcontext) + InternetOpenUrlW(hinternet, lpszurl.into_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) } #[inline] pub unsafe fn InternetOpenW(lpszagent: P0, dwaccesstype: u32, lpszproxy: P1, lpszproxybypass: P2, dwflags: u32) -> *mut ::core::ffi::c_void @@ -2031,14 +2031,14 @@ where #[inline] pub unsafe fn InternetTimeFromSystemTime(pst: *const super::super::Foundation::SYSTEMTIME, dwrfc: u32, lpsztime: &mut [u8]) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetTimeFromSystemTime(pst : *const super::super::Foundation:: SYSTEMTIME, dwrfc : u32, lpsztime : ::windows_core::PSTR, cbtime : u32) -> super::super::Foundation:: BOOL); - InternetTimeFromSystemTime(pst, dwrfc, ::core::mem::transmute(lpsztime.as_ptr()), lpsztime.len() as _).ok() + InternetTimeFromSystemTime(pst, dwrfc, ::core::mem::transmute(lpsztime.as_ptr()), lpsztime.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn InternetTimeFromSystemTimeA(pst: *const super::super::Foundation::SYSTEMTIME, dwrfc: u32, lpsztime: &mut [u8]) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetTimeFromSystemTimeA(pst : *const super::super::Foundation:: SYSTEMTIME, dwrfc : u32, lpsztime : ::windows_core::PSTR, cbtime : u32) -> super::super::Foundation:: BOOL); - InternetTimeFromSystemTimeA(pst, dwrfc, ::core::mem::transmute(lpsztime.as_ptr()), lpsztime.len() as _).ok() + InternetTimeFromSystemTimeA(pst, dwrfc, ::core::mem::transmute(lpsztime.as_ptr()), lpsztime.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2135,7 +2135,7 @@ where #[inline] pub unsafe fn IsHostInProxyBypassList(tscheme: INTERNET_SCHEME, lpszhost: &[u8]) -> super::super::Foundation::BOOL { ::windows_targets::link!("wininet.dll" "system" fn IsHostInProxyBypassList(tscheme : INTERNET_SCHEME, lpszhost : ::windows_core::PCSTR, cchhost : u32) -> super::super::Foundation:: BOOL); - IsHostInProxyBypassList(tscheme, ::core::mem::transmute(lpszhost.as_ptr()), lpszhost.len() as _) + IsHostInProxyBypassList(tscheme, ::core::mem::transmute(lpszhost.as_ptr()), lpszhost.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2174,7 +2174,7 @@ pub unsafe fn LoadUrlCacheContent() -> super::super::Foundation::BOOL { #[inline] pub unsafe fn ParseX509EncodedCertificateForListBoxEntry(lpcert: &[u8], lpszlistboxentry: ::windows_core::PSTR, lpdwlistboxentry: *mut u32) -> u32 { ::windows_targets::link!("wininet.dll" "system" fn ParseX509EncodedCertificateForListBoxEntry(lpcert : *const u8, cbcert : u32, lpszlistboxentry : ::windows_core::PSTR, lpdwlistboxentry : *mut u32) -> u32); - ParseX509EncodedCertificateForListBoxEntry(::core::mem::transmute(lpcert.as_ptr()), lpcert.len() as _, ::core::mem::transmute(lpszlistboxentry), lpdwlistboxentry) + ParseX509EncodedCertificateForListBoxEntry(::core::mem::transmute(lpcert.as_ptr()), lpcert.len().try_into().unwrap(), ::core::mem::transmute(lpszlistboxentry), lpdwlistboxentry) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2412,7 +2412,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wininet.dll" "system" fn ShowX509EncodedCertificate(hwndparent : super::super::Foundation:: HWND, lpcert : *const u8, cbcert : u32) -> u32); - ShowX509EncodedCertificate(hwndparent.into_param().abi(), ::core::mem::transmute(lpcert.as_ptr()), lpcert.len() as _) + ShowX509EncodedCertificate(hwndparent.into_param().abi(), ::core::mem::transmute(lpcert.as_ptr()), lpcert.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2598,7 +2598,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wininet.dll" "system" fn UrlCacheUpdateEntryExtraData(happcache : *const ::core::ffi::c_void, pcwszurl : ::windows_core::PCWSTR, pbextradata : *const u8, cbextradata : u32) -> u32); - UrlCacheUpdateEntryExtraData(::core::mem::transmute(happcache.unwrap_or(::std::ptr::null())), pcwszurl.into_param().abi(), ::core::mem::transmute(pbextradata.as_ptr()), pbextradata.len() as _) + UrlCacheUpdateEntryExtraData(::core::mem::transmute(happcache.unwrap_or(::std::ptr::null())), pcwszurl.into_param().abi(), ::core::mem::transmute(pbextradata.as_ptr()), pbextradata.len().try_into().unwrap()) } #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::fmt::Debug, ::core::clone::Clone)] 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 8696dd6e47..f3e283215d 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/WinSock/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/WinSock/mod.rs @@ -107,12 +107,12 @@ where #[inline] pub unsafe fn GetHostNameW(name: &mut [u16]) -> i32 { ::windows_targets::link!("ws2_32.dll" "system" fn GetHostNameW(name : ::windows_core::PWSTR, namelen : i32) -> i32); - GetHostNameW(::core::mem::transmute(name.as_ptr()), name.len() as _) + GetHostNameW(::core::mem::transmute(name.as_ptr()), name.len().try_into().unwrap()) } #[inline] pub unsafe fn GetNameByTypeA(lpservicetype: *const ::windows_core::GUID, lpservicename: &mut [u8]) -> i32 { ::windows_targets::link!("mswsock.dll" "system" fn GetNameByTypeA(lpservicetype : *const ::windows_core::GUID, lpservicename : ::windows_core::PSTR, dwnamelength : u32) -> i32); - GetNameByTypeA(lpservicetype, ::core::mem::transmute(lpservicename.as_ptr()), lpservicename.len() as _) + GetNameByTypeA(lpservicetype, ::core::mem::transmute(lpservicename.as_ptr()), lpservicename.len().try_into().unwrap()) } #[inline] pub unsafe fn GetNameByTypeW(lpservicetype: *const ::windows_core::GUID, lpservicename: ::windows_core::PWSTR, dwnamelength: u32) -> i32 { @@ -125,7 +125,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ws2_32.dll" "system" fn GetNameInfoW(psockaddr : *const SOCKADDR, sockaddrlength : socklen_t, pnodebuffer : ::windows_core::PWSTR, nodebuffersize : u32, pservicebuffer : ::windows_core::PWSTR, servicebuffersize : u32, flags : i32) -> i32); - GetNameInfoW(psockaddr, sockaddrlength.into_param().abi(), ::core::mem::transmute(pnodebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pnodebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pservicebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pservicebuffer.as_deref().map_or(0, |slice| slice.len() as _), flags) + GetNameInfoW(psockaddr, sockaddrlength.into_param().abi(), ::core::mem::transmute(pnodebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pnodebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pservicebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pservicebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), flags) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -166,7 +166,7 @@ where #[inline] pub unsafe fn InetNtopW(family: i32, paddr: *const ::core::ffi::c_void, pstringbuf: &mut [u16]) -> ::windows_core::PCWSTR { ::windows_targets::link!("ws2_32.dll" "system" fn InetNtopW(family : i32, paddr : *const ::core::ffi::c_void, pstringbuf : ::windows_core::PWSTR, stringbufsize : usize) -> ::windows_core::PCWSTR); - InetNtopW(family, paddr, ::core::mem::transmute(pstringbuf.as_ptr()), pstringbuf.len() as _) + InetNtopW(family, paddr, ::core::mem::transmute(pstringbuf.as_ptr()), pstringbuf.len().try_into().unwrap()) } #[inline] pub unsafe fn InetPtonW(family: i32, pszaddrstring: P0, paddrbuf: *mut ::core::ffi::c_void) -> i32 @@ -184,7 +184,15 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ws2_32.dll" "system" fn ProcessSocketNotifications(completionport : super::super::Foundation:: HANDLE, registrationcount : u32, registrationinfos : *mut SOCK_NOTIFY_REGISTRATION, timeoutms : u32, completioncount : u32, completionportentries : *mut super::super::System::IO:: OVERLAPPED_ENTRY, receivedentrycount : *mut u32) -> u32); - ProcessSocketNotifications(completionport.into_param().abi(), registrationinfos.as_deref().map_or(0, |slice| slice.len() as _), ::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() as _), ::core::mem::transmute(completionportentries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(receivedentrycount.unwrap_or(::std::ptr::null_mut()))) + ProcessSocketNotifications( + completionport.into_param().abi(), + 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(::std::ptr::null_mut())), + ) } #[inline] pub unsafe fn RtlEthernetAddressToStringA(addr: *const DL_EUI48, s: &mut [u8; 18]) -> ::windows_core::PSTR { @@ -454,7 +462,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ws2_32.dll" "system" fn WSAAsyncGetHostByAddr(hwnd : super::super::Foundation:: HWND, wmsg : u32, addr : ::windows_core::PCSTR, len : i32, r#type : i32, buf : ::windows_core::PSTR, buflen : i32) -> super::super::Foundation:: HANDLE); - let result__ = WSAAsyncGetHostByAddr(hwnd.into_param().abi(), wmsg, ::core::mem::transmute(addr.as_ptr()), addr.len() as _, r#type, ::core::mem::transmute(buf.as_ptr()), buf.len() as _); + let result__ = WSAAsyncGetHostByAddr(hwnd.into_param().abi(), wmsg, ::core::mem::transmute(addr.as_ptr()), addr.len().try_into().unwrap(), r#type, ::core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap()); (!result__.is_invalid()).then(|| result__).ok_or_else(::windows_core::Error::from_win32) } #[doc = "Required features: `\"Win32_Foundation\"`"] @@ -466,7 +474,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("ws2_32.dll" "system" fn WSAAsyncGetHostByName(hwnd : super::super::Foundation:: HWND, wmsg : u32, name : ::windows_core::PCSTR, buf : ::windows_core::PSTR, buflen : i32) -> super::super::Foundation:: HANDLE); - let result__ = WSAAsyncGetHostByName(hwnd.into_param().abi(), wmsg, name.into_param().abi(), ::core::mem::transmute(buf.as_ptr()), buf.len() as _); + let result__ = WSAAsyncGetHostByName(hwnd.into_param().abi(), wmsg, name.into_param().abi(), ::core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap()); (!result__.is_invalid()).then(|| result__).ok_or_else(::windows_core::Error::from_win32) } #[doc = "Required features: `\"Win32_Foundation\"`"] @@ -478,7 +486,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("ws2_32.dll" "system" fn WSAAsyncGetProtoByName(hwnd : super::super::Foundation:: HWND, wmsg : u32, name : ::windows_core::PCSTR, buf : ::windows_core::PSTR, buflen : i32) -> super::super::Foundation:: HANDLE); - let result__ = WSAAsyncGetProtoByName(hwnd.into_param().abi(), wmsg, name.into_param().abi(), ::core::mem::transmute(buf.as_ptr()), buf.len() as _); + let result__ = WSAAsyncGetProtoByName(hwnd.into_param().abi(), wmsg, name.into_param().abi(), ::core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap()); (!result__.is_invalid()).then(|| result__).ok_or_else(::windows_core::Error::from_win32) } #[doc = "Required features: `\"Win32_Foundation\"`"] @@ -489,7 +497,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ws2_32.dll" "system" fn WSAAsyncGetProtoByNumber(hwnd : super::super::Foundation:: HWND, wmsg : u32, number : i32, buf : ::windows_core::PSTR, buflen : i32) -> super::super::Foundation:: HANDLE); - let result__ = WSAAsyncGetProtoByNumber(hwnd.into_param().abi(), wmsg, number, ::core::mem::transmute(buf.as_ptr()), buf.len() as _); + let result__ = WSAAsyncGetProtoByNumber(hwnd.into_param().abi(), wmsg, number, ::core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap()); (!result__.is_invalid()).then(|| result__).ok_or_else(::windows_core::Error::from_win32) } #[doc = "Required features: `\"Win32_Foundation\"`"] @@ -502,7 +510,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("ws2_32.dll" "system" fn WSAAsyncGetServByName(hwnd : super::super::Foundation:: HWND, wmsg : u32, name : ::windows_core::PCSTR, proto : ::windows_core::PCSTR, buf : ::windows_core::PSTR, buflen : i32) -> super::super::Foundation:: HANDLE); - let result__ = WSAAsyncGetServByName(hwnd.into_param().abi(), wmsg, name.into_param().abi(), proto.into_param().abi(), ::core::mem::transmute(buf.as_ptr()), buf.len() as _); + let result__ = WSAAsyncGetServByName(hwnd.into_param().abi(), wmsg, name.into_param().abi(), proto.into_param().abi(), ::core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap()); (!result__.is_invalid()).then(|| result__).ok_or_else(::windows_core::Error::from_win32) } #[doc = "Required features: `\"Win32_Foundation\"`"] @@ -514,7 +522,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("ws2_32.dll" "system" fn WSAAsyncGetServByPort(hwnd : super::super::Foundation:: HWND, wmsg : u32, port : i32, proto : ::windows_core::PCSTR, buf : ::windows_core::PSTR, buflen : i32) -> super::super::Foundation:: HANDLE); - let result__ = WSAAsyncGetServByPort(hwnd.into_param().abi(), wmsg, port, proto.into_param().abi(), ::core::mem::transmute(buf.as_ptr()), buf.len() as _); + let result__ = WSAAsyncGetServByPort(hwnd.into_param().abi(), wmsg, port, proto.into_param().abi(), ::core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap()); (!result__.is_invalid()).then(|| result__).ok_or_else(::windows_core::Error::from_win32) } #[doc = "Required features: `\"Win32_Foundation\"`"] @@ -931,7 +939,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ws2_32.dll" "system" fn WSARecv(s : SOCKET, lpbuffers : *const WSABUF, dwbuffercount : u32, lpnumberofbytesrecvd : *mut u32, lpflags : *mut u32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED, lpcompletionroutine : LPWSAOVERLAPPED_COMPLETION_ROUTINE) -> i32); - WSARecv(s.into_param().abi(), ::core::mem::transmute(lpbuffers.as_ptr()), lpbuffers.len() as _, ::core::mem::transmute(lpnumberofbytesrecvd.unwrap_or(::std::ptr::null_mut())), lpflags, ::core::mem::transmute(lpoverlapped.unwrap_or(::std::ptr::null_mut())), lpcompletionroutine) + WSARecv(s.into_param().abi(), ::core::mem::transmute(lpbuffers.as_ptr()), lpbuffers.len().try_into().unwrap(), ::core::mem::transmute(lpnumberofbytesrecvd.unwrap_or(::std::ptr::null_mut())), lpflags, ::core::mem::transmute(lpoverlapped.unwrap_or(::std::ptr::null_mut())), lpcompletionroutine) } #[inline] pub unsafe fn WSARecvDisconnect(s: P0, lpinbounddisconnectdata: ::core::option::Option<*const WSABUF>) -> i32 @@ -947,7 +955,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("mswsock.dll" "system" fn WSARecvEx(s : SOCKET, buf : ::windows_core::PSTR, len : i32, flags : *mut i32) -> i32); - WSARecvEx(s.into_param().abi(), ::core::mem::transmute(buf.as_ptr()), buf.len() as _, flags) + WSARecvEx(s.into_param().abi(), ::core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap(), flags) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_IO\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] @@ -957,7 +965,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ws2_32.dll" "system" fn WSARecvFrom(s : SOCKET, lpbuffers : *const WSABUF, dwbuffercount : u32, lpnumberofbytesrecvd : *mut u32, lpflags : *mut u32, lpfrom : *mut SOCKADDR, lpfromlen : *mut i32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED, lpcompletionroutine : LPWSAOVERLAPPED_COMPLETION_ROUTINE) -> i32); - WSARecvFrom(s.into_param().abi(), ::core::mem::transmute(lpbuffers.as_ptr()), lpbuffers.len() as _, ::core::mem::transmute(lpnumberofbytesrecvd.unwrap_or(::std::ptr::null_mut())), lpflags, ::core::mem::transmute(lpfrom.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpfromlen.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpoverlapped.unwrap_or(::std::ptr::null_mut())), lpcompletionroutine) + WSARecvFrom(s.into_param().abi(), ::core::mem::transmute(lpbuffers.as_ptr()), lpbuffers.len().try_into().unwrap(), ::core::mem::transmute(lpnumberofbytesrecvd.unwrap_or(::std::ptr::null_mut())), lpflags, ::core::mem::transmute(lpfrom.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpfromlen.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpoverlapped.unwrap_or(::std::ptr::null_mut())), lpcompletionroutine) } #[inline] pub unsafe fn WSARemoveServiceClass(lpserviceclassid: *const ::windows_core::GUID) -> i32 { @@ -987,7 +995,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ws2_32.dll" "system" fn WSASend(s : SOCKET, lpbuffers : *const WSABUF, dwbuffercount : u32, lpnumberofbytessent : *mut u32, dwflags : u32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED, lpcompletionroutine : LPWSAOVERLAPPED_COMPLETION_ROUTINE) -> i32); - WSASend(s.into_param().abi(), ::core::mem::transmute(lpbuffers.as_ptr()), lpbuffers.len() as _, ::core::mem::transmute(lpnumberofbytessent.unwrap_or(::std::ptr::null_mut())), dwflags, ::core::mem::transmute(lpoverlapped.unwrap_or(::std::ptr::null_mut())), lpcompletionroutine) + WSASend(s.into_param().abi(), ::core::mem::transmute(lpbuffers.as_ptr()), lpbuffers.len().try_into().unwrap(), ::core::mem::transmute(lpnumberofbytessent.unwrap_or(::std::ptr::null_mut())), dwflags, ::core::mem::transmute(lpoverlapped.unwrap_or(::std::ptr::null_mut())), lpcompletionroutine) } #[inline] pub unsafe fn WSASendDisconnect(s: P0, lpoutbounddisconnectdata: ::core::option::Option<*const WSABUF>) -> i32 @@ -1015,7 +1023,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ws2_32.dll" "system" fn WSASendTo(s : SOCKET, lpbuffers : *const WSABUF, dwbuffercount : u32, lpnumberofbytessent : *mut u32, dwflags : u32, lpto : *const SOCKADDR, itolen : i32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED, lpcompletionroutine : LPWSAOVERLAPPED_COMPLETION_ROUTINE) -> i32); - WSASendTo(s.into_param().abi(), ::core::mem::transmute(lpbuffers.as_ptr()), lpbuffers.len() as _, ::core::mem::transmute(lpnumberofbytessent.unwrap_or(::std::ptr::null_mut())), dwflags, ::core::mem::transmute(lpto.unwrap_or(::std::ptr::null())), itolen, ::core::mem::transmute(lpoverlapped.unwrap_or(::std::ptr::null_mut())), lpcompletionroutine) + WSASendTo(s.into_param().abi(), ::core::mem::transmute(lpbuffers.as_ptr()), lpbuffers.len().try_into().unwrap(), ::core::mem::transmute(lpnumberofbytessent.unwrap_or(::std::ptr::null_mut())), dwflags, ::core::mem::transmute(lpto.unwrap_or(::std::ptr::null())), itolen, ::core::mem::transmute(lpoverlapped.unwrap_or(::std::ptr::null_mut())), lpcompletionroutine) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1123,7 +1131,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("ws2_32.dll" "system" fn WSAWaitForMultipleEvents(cevents : u32, lphevents : *const super::super::Foundation:: HANDLE, fwaitall : super::super::Foundation:: BOOL, dwtimeout : u32, falertable : super::super::Foundation:: BOOL) -> super::super::Foundation:: WAIT_EVENT); - WSAWaitForMultipleEvents(lphevents.len() as _, ::core::mem::transmute(lphevents.as_ptr()), fwaitall.into_param().abi(), dwtimeout, falertable.into_param().abi()) + WSAWaitForMultipleEvents(lphevents.len().try_into().unwrap(), ::core::mem::transmute(lphevents.as_ptr()), fwaitall.into_param().abi(), dwtimeout, falertable.into_param().abi()) } #[inline] pub unsafe fn WSCDeinstallProvider(lpproviderid: *const ::windows_core::GUID, lperrno: *mut i32) -> i32 { @@ -1187,7 +1195,7 @@ pub unsafe fn WSCEnumProtocols32(lpiprotocols: ::core::option::Option<*const i32 #[inline] pub unsafe fn WSCGetApplicationCategory(path: &[u16], extra: ::core::option::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); - WSCGetApplicationCategory(::core::mem::transmute(path.as_ptr()), path.len() as _, ::core::mem::transmute(extra.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), extra.as_deref().map_or(0, |slice| slice.len() as _), ppermittedlspcategories, lperrno) + 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, lperrno) } #[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 { @@ -1259,7 +1267,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::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); - WSCInstallProvider(lpproviderid, lpszproviderdllpath.into_param().abi(), ::core::mem::transmute(lpprotocolinfolist.as_ptr()), lpprotocolinfolist.len() as _, lperrno) + WSCInstallProvider(lpproviderid, lpszproviderdllpath.into_param().abi(), ::core::mem::transmute(lpprotocolinfolist.as_ptr()), lpprotocolinfolist.len().try_into().unwrap(), lperrno) } #[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))] #[inline] @@ -1268,7 +1276,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::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); - WSCInstallProvider64_32(lpproviderid, lpszproviderdllpath.into_param().abi(), ::core::mem::transmute(lpprotocolinfolist.as_ptr()), lpprotocolinfolist.len() as _, lperrno) + WSCInstallProvider64_32(lpproviderid, lpszproviderdllpath.into_param().abi(), ::core::mem::transmute(lpprotocolinfolist.as_ptr()), lpprotocolinfolist.len().try_into().unwrap(), lperrno) } #[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))] #[inline] @@ -1279,23 +1287,23 @@ where P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("ws2_32.dll" "system" fn WSCInstallProviderAndChains64_32(lpproviderid : *const ::windows_core::GUID, lpszproviderdllpath : ::windows_core::PCWSTR, lpszproviderdllpath32 : ::windows_core::PCWSTR, lpszlspname : ::windows_core::PCWSTR, dwserviceflags : u32, lpprotocolinfolist : *mut WSAPROTOCOL_INFOW, dwnumberofentries : u32, lpdwcatalogentryid : *mut u32, lperrno : *mut i32) -> i32); - WSCInstallProviderAndChains64_32(lpproviderid, lpszproviderdllpath.into_param().abi(), lpszproviderdllpath32.into_param().abi(), lpszlspname.into_param().abi(), dwserviceflags, ::core::mem::transmute(lpprotocolinfolist.as_ptr()), lpprotocolinfolist.len() as _, ::core::mem::transmute(lpdwcatalogentryid.unwrap_or(::std::ptr::null_mut())), lperrno) + WSCInstallProviderAndChains64_32(lpproviderid, lpszproviderdllpath.into_param().abi(), lpszproviderdllpath32.into_param().abi(), lpszlspname.into_param().abi(), dwserviceflags, ::core::mem::transmute(lpprotocolinfolist.as_ptr()), lpprotocolinfolist.len().try_into().unwrap(), ::core::mem::transmute(lpdwcatalogentryid.unwrap_or(::std::ptr::null_mut())), lperrno) } #[inline] pub unsafe fn WSCSetApplicationCategory(path: &[u16], extra: ::core::option::Option<&[u16]>, permittedlspcategories: u32, pprevpermlspcat: ::core::option::Option<*mut u32>, lperrno: *mut i32) -> i32 { ::windows_targets::link!("ws2_32.dll" "system" fn WSCSetApplicationCategory(path : ::windows_core::PCWSTR, pathlength : u32, extra : ::windows_core::PCWSTR, extralength : u32, permittedlspcategories : u32, pprevpermlspcat : *mut u32, lperrno : *mut i32) -> i32); - WSCSetApplicationCategory(::core::mem::transmute(path.as_ptr()), path.len() as _, ::core::mem::transmute(extra.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), extra.as_deref().map_or(0, |slice| slice.len() as _), permittedlspcategories, ::core::mem::transmute(pprevpermlspcat.unwrap_or(::std::ptr::null_mut())), lperrno) + WSCSetApplicationCategory(::core::mem::transmute(path.as_ptr()), path.len().try_into().unwrap(), ::core::mem::transmute(extra.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), extra.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), permittedlspcategories, ::core::mem::transmute(pprevpermlspcat.unwrap_or(::std::ptr::null_mut())), lperrno) } #[inline] pub unsafe fn WSCSetProviderInfo(lpproviderid: *const ::windows_core::GUID, infotype: WSC_PROVIDER_INFO_TYPE, info: &[u8], flags: u32, lperrno: *mut i32) -> i32 { ::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); - WSCSetProviderInfo(lpproviderid, infotype, ::core::mem::transmute(info.as_ptr()), info.len() as _, flags, lperrno) + WSCSetProviderInfo(lpproviderid, infotype, ::core::mem::transmute(info.as_ptr()), info.len().try_into().unwrap(), flags, lperrno) } #[cfg(any(target_arch = "aarch64", 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); - WSCSetProviderInfo32(lpproviderid, infotype, ::core::mem::transmute(info.as_ptr()), info.len() as _, flags, lperrno) + WSCSetProviderInfo32(lpproviderid, infotype, ::core::mem::transmute(info.as_ptr()), info.len().try_into().unwrap(), flags, lperrno) } #[inline] pub unsafe fn WSCUnInstallNameSpace(lpproviderid: *const ::windows_core::GUID) -> i32 { @@ -1314,7 +1322,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::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); - WSCUpdateProvider(lpproviderid, lpszproviderdllpath.into_param().abi(), ::core::mem::transmute(lpprotocolinfolist.as_ptr()), lpprotocolinfolist.len() as _, lperrno) + WSCUpdateProvider(lpproviderid, lpszproviderdllpath.into_param().abi(), ::core::mem::transmute(lpprotocolinfolist.as_ptr()), lpprotocolinfolist.len().try_into().unwrap(), lperrno) } #[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))] #[inline] @@ -1323,7 +1331,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::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); - WSCUpdateProvider32(lpproviderid, lpszproviderdllpath.into_param().abi(), ::core::mem::transmute(lpprotocolinfolist.as_ptr()), lpprotocolinfolist.len() as _, lperrno) + WSCUpdateProvider32(lpproviderid, lpszproviderdllpath.into_param().abi(), ::core::mem::transmute(lpprotocolinfolist.as_ptr()), lpprotocolinfolist.len().try_into().unwrap(), lperrno) } #[inline] pub unsafe fn WSCWriteNameSpaceOrder(lpproviderid: *mut ::windows_core::GUID, dwnumberofentries: u32) -> i32 { @@ -1404,7 +1412,7 @@ where #[inline] pub unsafe fn gethostbyaddr(addr: &[u8], r#type: i32) -> *mut HOSTENT { ::windows_targets::link!("ws2_32.dll" "system" fn gethostbyaddr(addr : ::windows_core::PCSTR, len : i32, r#type : i32) -> *mut HOSTENT); - gethostbyaddr(::core::mem::transmute(addr.as_ptr()), addr.len() as _, r#type) + gethostbyaddr(::core::mem::transmute(addr.as_ptr()), addr.len().try_into().unwrap(), r#type) } #[inline] pub unsafe fn gethostbyname(name: P0) -> *mut HOSTENT @@ -1417,7 +1425,7 @@ where #[inline] pub unsafe fn gethostname(name: &mut [u8]) -> i32 { ::windows_targets::link!("ws2_32.dll" "system" fn gethostname(name : ::windows_core::PSTR, namelen : i32) -> i32); - gethostname(::core::mem::transmute(name.as_ptr()), name.len() as _) + gethostname(::core::mem::transmute(name.as_ptr()), name.len().try_into().unwrap()) } #[inline] pub unsafe fn getnameinfo(psockaddr: *const SOCKADDR, sockaddrlength: P0, pnodebuffer: ::core::option::Option<&mut [u8]>, pservicebuffer: ::core::option::Option<&mut [u8]>, flags: i32) -> i32 @@ -1425,7 +1433,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ws2_32.dll" "system" fn getnameinfo(psockaddr : *const SOCKADDR, sockaddrlength : socklen_t, pnodebuffer : ::windows_core::PSTR, nodebuffersize : u32, pservicebuffer : ::windows_core::PSTR, servicebuffersize : u32, flags : i32) -> i32); - getnameinfo(psockaddr, sockaddrlength.into_param().abi(), ::core::mem::transmute(pnodebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pnodebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pservicebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pservicebuffer.as_deref().map_or(0, |slice| slice.len() as _), flags) + getnameinfo(psockaddr, sockaddrlength.into_param().abi(), ::core::mem::transmute(pnodebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pnodebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pservicebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pservicebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), flags) } #[inline] pub unsafe fn getpeername(s: P0, name: *mut SOCKADDR, namelen: *mut i32) -> i32 @@ -1507,7 +1515,7 @@ pub unsafe fn inet_ntoa(r#in: IN_ADDR) -> ::windows_core::PSTR { #[inline] pub unsafe fn inet_ntop(family: i32, paddr: *const ::core::ffi::c_void, pstringbuf: &mut [u8]) -> ::windows_core::PCSTR { ::windows_targets::link!("ws2_32.dll" "system" fn inet_ntop(family : i32, paddr : *const ::core::ffi::c_void, pstringbuf : ::windows_core::PSTR, stringbufsize : usize) -> ::windows_core::PCSTR); - inet_ntop(family, paddr, ::core::mem::transmute(pstringbuf.as_ptr()), pstringbuf.len() as _) + inet_ntop(family, paddr, ::core::mem::transmute(pstringbuf.as_ptr()), pstringbuf.len().try_into().unwrap()) } #[inline] pub unsafe fn inet_pton(family: i32, pszaddrstring: P0, paddrbuf: *mut ::core::ffi::c_void) -> i32 @@ -1549,7 +1557,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ws2_32.dll" "system" fn recv(s : SOCKET, buf : ::windows_core::PSTR, len : i32, flags : SEND_RECV_FLAGS) -> i32); - recv(s.into_param().abi(), ::core::mem::transmute(buf.as_ptr()), buf.len() as _, flags) + recv(s.into_param().abi(), ::core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap(), flags) } #[inline] pub unsafe fn recvfrom(s: P0, buf: &mut [u8], flags: i32, from: ::core::option::Option<*mut SOCKADDR>, fromlen: ::core::option::Option<*mut i32>) -> i32 @@ -1557,7 +1565,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ws2_32.dll" "system" fn recvfrom(s : SOCKET, buf : ::windows_core::PSTR, len : i32, flags : i32, from : *mut SOCKADDR, fromlen : *mut i32) -> i32); - recvfrom(s.into_param().abi(), ::core::mem::transmute(buf.as_ptr()), buf.len() as _, flags, ::core::mem::transmute(from.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(fromlen.unwrap_or(::std::ptr::null_mut()))) + recvfrom(s.into_param().abi(), ::core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap(), flags, ::core::mem::transmute(from.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(fromlen.unwrap_or(::std::ptr::null_mut()))) } #[inline] pub unsafe fn select(nfds: i32, readfds: ::core::option::Option<*mut FD_SET>, writefds: ::core::option::Option<*mut FD_SET>, exceptfds: ::core::option::Option<*mut FD_SET>, timeout: ::core::option::Option<*const TIMEVAL>) -> i32 { @@ -1570,7 +1578,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ws2_32.dll" "system" fn send(s : SOCKET, buf : ::windows_core::PCSTR, len : i32, flags : SEND_RECV_FLAGS) -> i32); - send(s.into_param().abi(), ::core::mem::transmute(buf.as_ptr()), buf.len() as _, flags) + send(s.into_param().abi(), ::core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap(), flags) } #[inline] pub unsafe fn sendto(s: P0, buf: &[u8], flags: i32, to: *const SOCKADDR, tolen: i32) -> i32 @@ -1578,7 +1586,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ws2_32.dll" "system" fn sendto(s : SOCKET, buf : ::windows_core::PCSTR, len : i32, flags : i32, to : *const SOCKADDR, tolen : i32) -> i32); - sendto(s.into_param().abi(), ::core::mem::transmute(buf.as_ptr()), buf.len() as _, flags, to, tolen) + sendto(s.into_param().abi(), ::core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap(), flags, to, tolen) } #[inline] pub unsafe fn setsockopt(s: P0, level: i32, optname: i32, optval: ::core::option::Option<&[u8]>) -> i32 @@ -1586,7 +1594,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ws2_32.dll" "system" fn setsockopt(s : SOCKET, level : i32, optname : i32, optval : ::windows_core::PCSTR, optlen : i32) -> i32); - setsockopt(s.into_param().abi(), level, optname, ::core::mem::transmute(optval.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), optval.as_deref().map_or(0, |slice| slice.len() as _)) + setsockopt(s.into_param().abi(), level, optname, ::core::mem::transmute(optval.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), optval.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn shutdown(s: P0, how: WINSOCK_SHUTDOWN_HOW) -> i32 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 6360f222ff..42eb324c55 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/WindowsWebServices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/WindowsWebServices/mod.rs @@ -29,7 +29,7 @@ pub unsafe fn WebAuthNCancelCurrentOperation(pcancellationid: *const ::windows_c #[inline] pub unsafe fn WebAuthNDeletePlatformCredential(pbcredentialid: &[u8]) -> ::windows_core::Result<()> { ::windows_targets::link!("webauthn.dll" "system" fn WebAuthNDeletePlatformCredential(cbcredentialid : u32, pbcredentialid : *const u8) -> ::windows_core::HRESULT); - WebAuthNDeletePlatformCredential(pbcredentialid.len() as _, ::core::mem::transmute(pbcredentialid.as_ptr())).ok() + WebAuthNDeletePlatformCredential(pbcredentialid.len().try_into().unwrap(), ::core::mem::transmute(pbcredentialid.as_ptr())).ok() } #[inline] pub unsafe fn WebAuthNFreeAssertion(pwebauthnassertion: *const WEBAUTHN_ASSERTION) { @@ -161,7 +161,7 @@ pub unsafe fn WsAsyncExecute(asyncstate: *const WS_ASYNC_STATE, operation: WS_AS #[inline] pub unsafe fn WsCall(serviceproxy: *const WS_SERVICE_PROXY, operation: *const WS_OPERATION_DESCRIPTION, arguments: ::core::option::Option<*const *const ::core::ffi::c_void>, heap: *const WS_HEAP, callproperties: ::core::option::Option<&[WS_CALL_PROPERTY]>, asynccontext: ::core::option::Option<*const WS_ASYNC_CONTEXT>, error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { ::windows_targets::link!("webservices.dll" "system" fn WsCall(serviceproxy : *const WS_SERVICE_PROXY, operation : *const WS_OPERATION_DESCRIPTION, arguments : *const *const ::core::ffi::c_void, heap : *const WS_HEAP, callproperties : *const WS_CALL_PROPERTY, callpropertycount : u32, asynccontext : *const WS_ASYNC_CONTEXT, error : *const WS_ERROR) -> ::windows_core::HRESULT); - WsCall(serviceproxy, operation, ::core::mem::transmute(arguments.unwrap_or(::std::ptr::null())), heap, ::core::mem::transmute(callproperties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), callproperties.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(asynccontext.unwrap_or(::std::ptr::null())), ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() + WsCall(serviceproxy, operation, ::core::mem::transmute(arguments.unwrap_or(::std::ptr::null())), heap, ::core::mem::transmute(callproperties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), callproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(asynccontext.unwrap_or(::std::ptr::null())), ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() } #[inline] pub unsafe fn WsCheckMustUnderstandHeaders(message: *const WS_MESSAGE, error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { @@ -206,18 +206,18 @@ pub unsafe fn WsCopyNode(writer: *const WS_XML_WRITER, reader: *const WS_XML_REA #[inline] pub unsafe fn WsCreateChannel(channeltype: WS_CHANNEL_TYPE, channelbinding: WS_CHANNEL_BINDING, properties: ::core::option::Option<&[WS_CHANNEL_PROPERTY]>, securitydescription: ::core::option::Option<*const WS_SECURITY_DESCRIPTION>, channel: *mut *mut WS_CHANNEL, error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { ::windows_targets::link!("webservices.dll" "system" fn WsCreateChannel(channeltype : WS_CHANNEL_TYPE, channelbinding : WS_CHANNEL_BINDING, properties : *const WS_CHANNEL_PROPERTY, propertycount : u32, securitydescription : *const WS_SECURITY_DESCRIPTION, channel : *mut *mut WS_CHANNEL, error : *const WS_ERROR) -> ::windows_core::HRESULT); - WsCreateChannel(channeltype, channelbinding, ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(securitydescription.unwrap_or(::std::ptr::null())), channel, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() + WsCreateChannel(channeltype, channelbinding, ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(securitydescription.unwrap_or(::std::ptr::null())), channel, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() } #[inline] pub unsafe fn WsCreateChannelForListener(listener: *const WS_LISTENER, properties: ::core::option::Option<&[WS_CHANNEL_PROPERTY]>, channel: *mut *mut WS_CHANNEL, error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { ::windows_targets::link!("webservices.dll" "system" fn WsCreateChannelForListener(listener : *const WS_LISTENER, properties : *const WS_CHANNEL_PROPERTY, propertycount : u32, channel : *mut *mut WS_CHANNEL, error : *const WS_ERROR) -> ::windows_core::HRESULT); - WsCreateChannelForListener(listener, ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len() as _), channel, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() + WsCreateChannelForListener(listener, ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), channel, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() } #[inline] pub unsafe fn WsCreateError(properties: ::core::option::Option<&[WS_ERROR_PROPERTY]>) -> ::windows_core::Result<*mut WS_ERROR> { ::windows_targets::link!("webservices.dll" "system" fn WsCreateError(properties : *const WS_ERROR_PROPERTY, propertycount : u32, error : *mut *mut WS_ERROR) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - WsCreateError(::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + WsCreateError(::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()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -234,27 +234,27 @@ pub unsafe fn WsCreateHeap(maxsize: usize, trimsize: usize, properties: ::core:: #[inline] pub unsafe fn WsCreateListener(channeltype: WS_CHANNEL_TYPE, channelbinding: WS_CHANNEL_BINDING, properties: ::core::option::Option<&[WS_LISTENER_PROPERTY]>, securitydescription: ::core::option::Option<*const WS_SECURITY_DESCRIPTION>, listener: *mut *mut WS_LISTENER, error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { ::windows_targets::link!("webservices.dll" "system" fn WsCreateListener(channeltype : WS_CHANNEL_TYPE, channelbinding : WS_CHANNEL_BINDING, properties : *const WS_LISTENER_PROPERTY, propertycount : u32, securitydescription : *const WS_SECURITY_DESCRIPTION, listener : *mut *mut WS_LISTENER, error : *const WS_ERROR) -> ::windows_core::HRESULT); - WsCreateListener(channeltype, channelbinding, ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(securitydescription.unwrap_or(::std::ptr::null())), listener, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() + WsCreateListener(channeltype, channelbinding, ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(securitydescription.unwrap_or(::std::ptr::null())), listener, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() } #[inline] pub unsafe fn WsCreateMessage(envelopeversion: WS_ENVELOPE_VERSION, addressingversion: WS_ADDRESSING_VERSION, properties: ::core::option::Option<&[WS_MESSAGE_PROPERTY]>, message: *mut *mut WS_MESSAGE, error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { ::windows_targets::link!("webservices.dll" "system" fn WsCreateMessage(envelopeversion : WS_ENVELOPE_VERSION, addressingversion : WS_ADDRESSING_VERSION, properties : *const WS_MESSAGE_PROPERTY, propertycount : u32, message : *mut *mut WS_MESSAGE, error : *const WS_ERROR) -> ::windows_core::HRESULT); - WsCreateMessage(envelopeversion, addressingversion, ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len() as _), message, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() + WsCreateMessage(envelopeversion, addressingversion, ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), message, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() } #[inline] pub unsafe fn WsCreateMessageForChannel(channel: *const WS_CHANNEL, properties: ::core::option::Option<&[WS_MESSAGE_PROPERTY]>, message: *mut *mut WS_MESSAGE, error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { ::windows_targets::link!("webservices.dll" "system" fn WsCreateMessageForChannel(channel : *const WS_CHANNEL, properties : *const WS_MESSAGE_PROPERTY, propertycount : u32, message : *mut *mut WS_MESSAGE, error : *const WS_ERROR) -> ::windows_core::HRESULT); - WsCreateMessageForChannel(channel, ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len() as _), message, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() + WsCreateMessageForChannel(channel, ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), message, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() } #[inline] pub unsafe fn WsCreateMetadata(properties: ::core::option::Option<&[WS_METADATA_PROPERTY]>, metadata: *mut *mut WS_METADATA, error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { ::windows_targets::link!("webservices.dll" "system" fn WsCreateMetadata(properties : *const WS_METADATA_PROPERTY, propertycount : u32, metadata : *mut *mut WS_METADATA, error : *const WS_ERROR) -> ::windows_core::HRESULT); - WsCreateMetadata(::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len() as _), metadata, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() + WsCreateMetadata(::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), metadata, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() } #[inline] pub unsafe fn WsCreateReader(properties: ::core::option::Option<&[WS_XML_READER_PROPERTY]>, reader: *mut *mut WS_XML_READER, error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { ::windows_targets::link!("webservices.dll" "system" fn WsCreateReader(properties : *const WS_XML_READER_PROPERTY, propertycount : u32, reader : *mut *mut WS_XML_READER, error : *const WS_ERROR) -> ::windows_core::HRESULT); - WsCreateReader(::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len() as _), reader, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() + WsCreateReader(::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), reader, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -264,7 +264,7 @@ pub unsafe fn WsCreateServiceEndpointFromTemplate(channeltype: WS_CHANNEL_TYPE, WsCreateServiceEndpointFromTemplate( 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() as _), + properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(addressurl.unwrap_or(::std::ptr::null())), contract, authorizationcallback, @@ -284,7 +284,7 @@ pub unsafe fn WsCreateServiceEndpointFromTemplate(channeltype: WS_CHANNEL_TYPE, #[inline] pub unsafe fn WsCreateServiceHost(endpoints: ::core::option::Option<&[*const WS_SERVICE_ENDPOINT]>, serviceproperties: ::core::option::Option<&[WS_SERVICE_PROPERTY]>, servicehost: *mut *mut WS_SERVICE_HOST, error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { ::windows_targets::link!("webservices.dll" "system" fn WsCreateServiceHost(endpoints : *const *const WS_SERVICE_ENDPOINT, endpointcount : u16, serviceproperties : *const WS_SERVICE_PROPERTY, servicepropertycount : u32, servicehost : *mut *mut WS_SERVICE_HOST, error : *const WS_ERROR) -> ::windows_core::HRESULT); - WsCreateServiceHost(::core::mem::transmute(endpoints.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), endpoints.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(serviceproperties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), serviceproperties.as_deref().map_or(0, |slice| slice.len() as _), servicehost, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() + WsCreateServiceHost(::core::mem::transmute(endpoints.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), endpoints.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(serviceproperties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), serviceproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), servicehost, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() } #[inline] pub unsafe fn WsCreateServiceProxy(channeltype: WS_CHANNEL_TYPE, channelbinding: WS_CHANNEL_BINDING, securitydescription: ::core::option::Option<*const WS_SECURITY_DESCRIPTION>, properties: ::core::option::Option<&[WS_PROXY_PROPERTY]>, channelproperties: ::core::option::Option<&[WS_CHANNEL_PROPERTY]>, serviceproxy: *mut *mut WS_SERVICE_PROXY, error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { @@ -294,9 +294,9 @@ pub unsafe fn WsCreateServiceProxy(channeltype: WS_CHANNEL_TYPE, channelbinding: channelbinding, ::core::mem::transmute(securitydescription.unwrap_or(::std::ptr::null())), ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - properties.as_deref().map_or(0, |slice| slice.len() as _), + 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() as _), + channelproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), serviceproxy, ::core::mem::transmute(error.unwrap_or(::std::ptr::null())), ) @@ -305,22 +305,22 @@ pub unsafe fn WsCreateServiceProxy(channeltype: WS_CHANNEL_TYPE, channelbinding: #[inline] pub unsafe fn WsCreateServiceProxyFromTemplate(channeltype: WS_CHANNEL_TYPE, properties: ::core::option::Option<&[WS_PROXY_PROPERTY]>, templatetype: WS_BINDING_TEMPLATE_TYPE, templatevalue: ::core::option::Option<*const ::core::ffi::c_void>, templatesize: u32, templatedescription: *const ::core::ffi::c_void, templatedescriptionsize: u32, serviceproxy: *mut *mut WS_SERVICE_PROXY, error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { ::windows_targets::link!("webservices.dll" "system" fn WsCreateServiceProxyFromTemplate(channeltype : WS_CHANNEL_TYPE, properties : *const WS_PROXY_PROPERTY, propertycount : u32, templatetype : WS_BINDING_TEMPLATE_TYPE, templatevalue : *const ::core::ffi::c_void, templatesize : u32, templatedescription : *const ::core::ffi::c_void, templatedescriptionsize : u32, serviceproxy : *mut *mut WS_SERVICE_PROXY, error : *const WS_ERROR) -> ::windows_core::HRESULT); - WsCreateServiceProxyFromTemplate(channeltype, ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len() as _), templatetype, ::core::mem::transmute(templatevalue.unwrap_or(::std::ptr::null())), templatesize, templatedescription, templatedescriptionsize, serviceproxy, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() + WsCreateServiceProxyFromTemplate(channeltype, ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), templatetype, ::core::mem::transmute(templatevalue.unwrap_or(::std::ptr::null())), templatesize, templatedescription, templatedescriptionsize, serviceproxy, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() } #[inline] pub unsafe fn WsCreateWriter(properties: ::core::option::Option<&[WS_XML_WRITER_PROPERTY]>, writer: *mut *mut WS_XML_WRITER, error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { ::windows_targets::link!("webservices.dll" "system" fn WsCreateWriter(properties : *const WS_XML_WRITER_PROPERTY, propertycount : u32, writer : *mut *mut WS_XML_WRITER, error : *const WS_ERROR) -> ::windows_core::HRESULT); - WsCreateWriter(::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len() as _), writer, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() + WsCreateWriter(::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), writer, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() } #[inline] pub unsafe fn WsCreateXmlBuffer(heap: *const WS_HEAP, properties: ::core::option::Option<&[WS_XML_BUFFER_PROPERTY]>, buffer: *mut *mut WS_XML_BUFFER, error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { ::windows_targets::link!("webservices.dll" "system" fn WsCreateXmlBuffer(heap : *const WS_HEAP, properties : *const WS_XML_BUFFER_PROPERTY, propertycount : u32, buffer : *mut *mut WS_XML_BUFFER, error : *const WS_ERROR) -> ::windows_core::HRESULT); - WsCreateXmlBuffer(heap, ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len() as _), buffer, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() + WsCreateXmlBuffer(heap, ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), buffer, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() } #[inline] pub unsafe fn WsCreateXmlSecurityToken(tokenxml: ::core::option::Option<*const WS_XML_BUFFER>, tokenkey: ::core::option::Option<*const WS_SECURITY_KEY_HANDLE>, properties: ::core::option::Option<&[WS_XML_SECURITY_TOKEN_PROPERTY]>, token: *mut *mut WS_SECURITY_TOKEN, error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { ::windows_targets::link!("webservices.dll" "system" fn WsCreateXmlSecurityToken(tokenxml : *const WS_XML_BUFFER, tokenkey : *const WS_SECURITY_KEY_HANDLE, properties : *const WS_XML_SECURITY_TOKEN_PROPERTY, propertycount : u32, token : *mut *mut WS_SECURITY_TOKEN, error : *const WS_ERROR) -> ::windows_core::HRESULT); - WsCreateXmlSecurityToken(::core::mem::transmute(tokenxml.unwrap_or(::std::ptr::null())), ::core::mem::transmute(tokenkey.unwrap_or(::std::ptr::null())), ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len() as _), token, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() + WsCreateXmlSecurityToken(::core::mem::transmute(tokenxml.unwrap_or(::std::ptr::null())), ::core::mem::transmute(tokenkey.unwrap_or(::std::ptr::null())), ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), token, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -712,12 +712,12 @@ pub unsafe fn WsReadBytes(reader: *const WS_XML_READER, bytes: *mut ::core::ffi: #[inline] pub unsafe fn WsReadChars(reader: *const WS_XML_READER, chars: &mut [u16], actualcharcount: *mut u32, error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { ::windows_targets::link!("webservices.dll" "system" fn WsReadChars(reader : *const WS_XML_READER, chars : ::windows_core::PWSTR, maxcharcount : u32, actualcharcount : *mut u32, error : *const WS_ERROR) -> ::windows_core::HRESULT); - WsReadChars(reader, ::core::mem::transmute(chars.as_ptr()), chars.len() as _, actualcharcount, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() + WsReadChars(reader, ::core::mem::transmute(chars.as_ptr()), chars.len().try_into().unwrap(), actualcharcount, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() } #[inline] pub unsafe fn WsReadCharsUtf8(reader: *const WS_XML_READER, bytes: &mut [u8], actualbytecount: *mut u32, error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { ::windows_targets::link!("webservices.dll" "system" fn WsReadCharsUtf8(reader : *const WS_XML_READER, bytes : *mut u8, maxbytecount : u32, actualbytecount : *mut u32, error : *const WS_ERROR) -> ::windows_core::HRESULT); - WsReadCharsUtf8(reader, ::core::mem::transmute(bytes.as_ptr()), bytes.len() as _, actualbytecount, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() + WsReadCharsUtf8(reader, ::core::mem::transmute(bytes.as_ptr()), bytes.len().try_into().unwrap(), actualbytecount, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -813,14 +813,14 @@ pub unsafe fn WsReadXmlBuffer(reader: *const WS_XML_READER, heap: *const WS_HEAP #[inline] pub unsafe fn WsReadXmlBufferFromBytes(reader: *const WS_XML_READER, encoding: ::core::option::Option<*const WS_XML_READER_ENCODING>, properties: ::core::option::Option<&[WS_XML_READER_PROPERTY]>, bytes: *const ::core::ffi::c_void, bytecount: u32, heap: *const WS_HEAP, xmlbuffer: *mut *mut WS_XML_BUFFER, error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { ::windows_targets::link!("webservices.dll" "system" fn WsReadXmlBufferFromBytes(reader : *const WS_XML_READER, encoding : *const WS_XML_READER_ENCODING, properties : *const WS_XML_READER_PROPERTY, propertycount : u32, bytes : *const ::core::ffi::c_void, bytecount : u32, heap : *const WS_HEAP, xmlbuffer : *mut *mut WS_XML_BUFFER, error : *const WS_ERROR) -> ::windows_core::HRESULT); - WsReadXmlBufferFromBytes(reader, ::core::mem::transmute(encoding.unwrap_or(::std::ptr::null())), ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len() as _), bytes, bytecount, heap, xmlbuffer, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() + WsReadXmlBufferFromBytes(reader, ::core::mem::transmute(encoding.unwrap_or(::std::ptr::null())), ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), bytes, bytecount, heap, xmlbuffer, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[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: ::core::option::Option<*const WS_HEAP>, value: *mut ::core::ffi::c_void, valuesize: u32, index: ::core::option::Option<*mut u32>, asynccontext: ::core::option::Option<*const WS_ASYNC_CONTEXT>, error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { ::windows_targets::link!("webservices.dll" "system" fn WsReceiveMessage(channel : *const WS_CHANNEL, message : *const WS_MESSAGE, messagedescriptions : *const *const WS_MESSAGE_DESCRIPTION, messagedescriptioncount : u32, receiveoption : WS_RECEIVE_OPTION, readbodyoption : WS_READ_OPTION, heap : *const WS_HEAP, value : *mut ::core::ffi::c_void, valuesize : u32, index : *mut u32, asynccontext : *const WS_ASYNC_CONTEXT, error : *const WS_ERROR) -> ::windows_core::HRESULT); - WsReceiveMessage(channel, message, ::core::mem::transmute(messagedescriptions.as_ptr()), messagedescriptions.len() as _, receiveoption, readbodyoption, ::core::mem::transmute(heap.unwrap_or(::std::ptr::null())), value, valuesize, ::core::mem::transmute(index.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(asynccontext.unwrap_or(::std::ptr::null())), ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() + WsReceiveMessage(channel, message, ::core::mem::transmute(messagedescriptions.as_ptr()), messagedescriptions.len().try_into().unwrap(), receiveoption, readbodyoption, ::core::mem::transmute(heap.unwrap_or(::std::ptr::null())), value, valuesize, ::core::mem::transmute(index.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(asynccontext.unwrap_or(::std::ptr::null())), ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() } #[inline] pub unsafe fn WsRegisterOperationForCancel(context: *const WS_OPERATION_CONTEXT, cancelcallback: WS_OPERATION_CANCEL_CALLBACK, freestatecallback: WS_OPERATION_FREE_STATE_CALLBACK, userstate: ::core::option::Option<*const ::core::ffi::c_void>, error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { @@ -861,7 +861,7 @@ pub unsafe fn WsRequestReply(channel: *const WS_CHANNEL, requestmessage: *const #[inline] pub unsafe fn WsRequestSecurityToken(channel: *const WS_CHANNEL, properties: ::core::option::Option<&[WS_REQUEST_SECURITY_TOKEN_PROPERTY]>, token: *mut *mut WS_SECURITY_TOKEN, asynccontext: ::core::option::Option<*const WS_ASYNC_CONTEXT>, error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { ::windows_targets::link!("webservices.dll" "system" fn WsRequestSecurityToken(channel : *const WS_CHANNEL, properties : *const WS_REQUEST_SECURITY_TOKEN_PROPERTY, propertycount : u32, token : *mut *mut WS_SECURITY_TOKEN, asynccontext : *const WS_ASYNC_CONTEXT, error : *const WS_ERROR) -> ::windows_core::HRESULT); - WsRequestSecurityToken(channel, ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len() as _), token, ::core::mem::transmute(asynccontext.unwrap_or(::std::ptr::null())), ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() + WsRequestSecurityToken(channel, ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), token, ::core::mem::transmute(asynccontext.unwrap_or(::std::ptr::null())), ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() } #[inline] pub unsafe fn WsResetChannel(channel: *const WS_CHANNEL, error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { @@ -957,12 +957,12 @@ pub unsafe fn WsSetHeader(message: *const WS_MESSAGE, headertype: WS_HEADER_TYPE #[inline] pub unsafe fn WsSetInput(reader: *const WS_XML_READER, encoding: ::core::option::Option<*const WS_XML_READER_ENCODING>, input: ::core::option::Option<*const WS_XML_READER_INPUT>, properties: ::core::option::Option<&[WS_XML_READER_PROPERTY]>, error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { ::windows_targets::link!("webservices.dll" "system" fn WsSetInput(reader : *const WS_XML_READER, encoding : *const WS_XML_READER_ENCODING, input : *const WS_XML_READER_INPUT, properties : *const WS_XML_READER_PROPERTY, propertycount : u32, error : *const WS_ERROR) -> ::windows_core::HRESULT); - WsSetInput(reader, ::core::mem::transmute(encoding.unwrap_or(::std::ptr::null())), ::core::mem::transmute(input.unwrap_or(::std::ptr::null())), ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() + WsSetInput(reader, ::core::mem::transmute(encoding.unwrap_or(::std::ptr::null())), ::core::mem::transmute(input.unwrap_or(::std::ptr::null())), ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() } #[inline] pub unsafe fn WsSetInputToBuffer(reader: *const WS_XML_READER, buffer: *const WS_XML_BUFFER, properties: ::core::option::Option<&[WS_XML_READER_PROPERTY]>, error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { ::windows_targets::link!("webservices.dll" "system" fn WsSetInputToBuffer(reader : *const WS_XML_READER, buffer : *const WS_XML_BUFFER, properties : *const WS_XML_READER_PROPERTY, propertycount : u32, error : *const WS_ERROR) -> ::windows_core::HRESULT); - WsSetInputToBuffer(reader, buffer, ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() + WsSetInputToBuffer(reader, buffer, ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() } #[inline] pub unsafe fn WsSetListenerProperty(listener: *const WS_LISTENER, id: WS_LISTENER_PROPERTY_ID, value: *const ::core::ffi::c_void, valuesize: u32, error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { @@ -977,12 +977,12 @@ pub unsafe fn WsSetMessageProperty(message: *const WS_MESSAGE, id: WS_MESSAGE_PR #[inline] pub unsafe fn WsSetOutput(writer: *const WS_XML_WRITER, encoding: ::core::option::Option<*const WS_XML_WRITER_ENCODING>, output: ::core::option::Option<*const WS_XML_WRITER_OUTPUT>, properties: ::core::option::Option<&[WS_XML_WRITER_PROPERTY]>, error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { ::windows_targets::link!("webservices.dll" "system" fn WsSetOutput(writer : *const WS_XML_WRITER, encoding : *const WS_XML_WRITER_ENCODING, output : *const WS_XML_WRITER_OUTPUT, properties : *const WS_XML_WRITER_PROPERTY, propertycount : u32, error : *const WS_ERROR) -> ::windows_core::HRESULT); - WsSetOutput(writer, ::core::mem::transmute(encoding.unwrap_or(::std::ptr::null())), ::core::mem::transmute(output.unwrap_or(::std::ptr::null())), ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() + WsSetOutput(writer, ::core::mem::transmute(encoding.unwrap_or(::std::ptr::null())), ::core::mem::transmute(output.unwrap_or(::std::ptr::null())), ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() } #[inline] pub unsafe fn WsSetOutputToBuffer(writer: *const WS_XML_WRITER, buffer: *const WS_XML_BUFFER, properties: ::core::option::Option<&[WS_XML_WRITER_PROPERTY]>, error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { ::windows_targets::link!("webservices.dll" "system" fn WsSetOutputToBuffer(writer : *const WS_XML_WRITER, buffer : *const WS_XML_BUFFER, properties : *const WS_XML_WRITER_PROPERTY, propertycount : u32, error : *const WS_ERROR) -> ::windows_core::HRESULT); - WsSetOutputToBuffer(writer, buffer, ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() + WsSetOutputToBuffer(writer, buffer, ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() } #[inline] pub unsafe fn WsSetReaderPosition(reader: *const WS_XML_READER, nodeposition: *const WS_XML_NODE_POSITION, error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { @@ -1007,22 +1007,22 @@ pub unsafe fn WsSkipNode(reader: *const WS_XML_READER, error: ::core::option::Op #[inline] pub unsafe fn WsStartReaderCanonicalization(reader: *const WS_XML_READER, writecallback: WS_WRITE_CALLBACK, writecallbackstate: ::core::option::Option<*const ::core::ffi::c_void>, properties: ::core::option::Option<&[WS_XML_CANONICALIZATION_PROPERTY]>, error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { ::windows_targets::link!("webservices.dll" "system" fn WsStartReaderCanonicalization(reader : *const WS_XML_READER, writecallback : WS_WRITE_CALLBACK, writecallbackstate : *const ::core::ffi::c_void, properties : *const WS_XML_CANONICALIZATION_PROPERTY, propertycount : u32, error : *const WS_ERROR) -> ::windows_core::HRESULT); - WsStartReaderCanonicalization(reader, writecallback, ::core::mem::transmute(writecallbackstate.unwrap_or(::std::ptr::null())), ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() + WsStartReaderCanonicalization(reader, writecallback, ::core::mem::transmute(writecallbackstate.unwrap_or(::std::ptr::null())), ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() } #[inline] pub unsafe fn WsStartWriterCanonicalization(writer: *const WS_XML_WRITER, writecallback: WS_WRITE_CALLBACK, writecallbackstate: ::core::option::Option<*const ::core::ffi::c_void>, properties: ::core::option::Option<&[WS_XML_CANONICALIZATION_PROPERTY]>, error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { ::windows_targets::link!("webservices.dll" "system" fn WsStartWriterCanonicalization(writer : *const WS_XML_WRITER, writecallback : WS_WRITE_CALLBACK, writecallbackstate : *const ::core::ffi::c_void, properties : *const WS_XML_CANONICALIZATION_PROPERTY, propertycount : u32, error : *const WS_ERROR) -> ::windows_core::HRESULT); - WsStartWriterCanonicalization(writer, writecallback, ::core::mem::transmute(writecallbackstate.unwrap_or(::std::ptr::null())), ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() + WsStartWriterCanonicalization(writer, writecallback, ::core::mem::transmute(writecallbackstate.unwrap_or(::std::ptr::null())), ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() } #[inline] pub unsafe fn WsTrimXmlWhitespace(chars: &[u16], trimmedchars: *mut *mut u16, trimmedcount: *mut u32, error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { ::windows_targets::link!("webservices.dll" "system" fn WsTrimXmlWhitespace(chars : ::windows_core::PCWSTR, charcount : u32, trimmedchars : *mut *mut u16, trimmedcount : *mut u32, error : *const WS_ERROR) -> ::windows_core::HRESULT); - WsTrimXmlWhitespace(::core::mem::transmute(chars.as_ptr()), chars.len() as _, trimmedchars, trimmedcount, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() + WsTrimXmlWhitespace(::core::mem::transmute(chars.as_ptr()), chars.len().try_into().unwrap(), trimmedchars, trimmedcount, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() } #[inline] pub unsafe fn WsVerifyXmlNCName(ncnamechars: &[u16], error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { ::windows_targets::link!("webservices.dll" "system" fn WsVerifyXmlNCName(ncnamechars : ::windows_core::PCWSTR, ncnamecharcount : u32, error : *const WS_ERROR) -> ::windows_core::HRESULT); - WsVerifyXmlNCName(::core::mem::transmute(ncnamechars.as_ptr()), ncnamechars.len() as _, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() + WsVerifyXmlNCName(::core::mem::transmute(ncnamechars.as_ptr()), ncnamechars.len().try_into().unwrap(), ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1053,12 +1053,12 @@ pub unsafe fn WsWriteBytes(writer: *const WS_XML_WRITER, bytes: *const ::core::f #[inline] pub unsafe fn WsWriteChars(writer: *const WS_XML_WRITER, chars: &[u16], error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { ::windows_targets::link!("webservices.dll" "system" fn WsWriteChars(writer : *const WS_XML_WRITER, chars : ::windows_core::PCWSTR, charcount : u32, error : *const WS_ERROR) -> ::windows_core::HRESULT); - WsWriteChars(writer, ::core::mem::transmute(chars.as_ptr()), chars.len() as _, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() + WsWriteChars(writer, ::core::mem::transmute(chars.as_ptr()), chars.len().try_into().unwrap(), ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() } #[inline] pub unsafe fn WsWriteCharsUtf8(writer: *const WS_XML_WRITER, bytes: &[u8], error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { ::windows_targets::link!("webservices.dll" "system" fn WsWriteCharsUtf8(writer : *const WS_XML_WRITER, bytes : *const u8, bytecount : u32, error : *const WS_ERROR) -> ::windows_core::HRESULT); - WsWriteCharsUtf8(writer, ::core::mem::transmute(bytes.as_ptr()), bytes.len() as _, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() + WsWriteCharsUtf8(writer, ::core::mem::transmute(bytes.as_ptr()), bytes.len().try_into().unwrap(), ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1164,7 +1164,7 @@ pub unsafe fn WsWriteXmlBuffer(writer: *const WS_XML_WRITER, xmlbuffer: *const W #[inline] pub unsafe fn WsWriteXmlBufferToBytes(writer: *const WS_XML_WRITER, xmlbuffer: *const WS_XML_BUFFER, encoding: ::core::option::Option<*const WS_XML_WRITER_ENCODING>, properties: ::core::option::Option<&[WS_XML_WRITER_PROPERTY]>, heap: *const WS_HEAP, bytes: *mut *mut ::core::ffi::c_void, bytecount: *mut u32, error: ::core::option::Option<*const WS_ERROR>) -> ::windows_core::Result<()> { ::windows_targets::link!("webservices.dll" "system" fn WsWriteXmlBufferToBytes(writer : *const WS_XML_WRITER, xmlbuffer : *const WS_XML_BUFFER, encoding : *const WS_XML_WRITER_ENCODING, properties : *const WS_XML_WRITER_PROPERTY, propertycount : u32, heap : *const WS_HEAP, bytes : *mut *mut ::core::ffi::c_void, bytecount : *mut u32, error : *const WS_ERROR) -> ::windows_core::HRESULT); - WsWriteXmlBufferToBytes(writer, xmlbuffer, ::core::mem::transmute(encoding.unwrap_or(::std::ptr::null())), ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len() as _), heap, bytes, bytecount, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() + WsWriteXmlBufferToBytes(writer, xmlbuffer, ::core::mem::transmute(encoding.unwrap_or(::std::ptr::null())), ::core::mem::transmute(properties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), heap, bytes, bytecount, ::core::mem::transmute(error.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] diff --git a/crates/libs/windows/src/Windows/Win32/Security/AppLocker/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/AppLocker/mod.rs index b37fbf33fd..76372008af 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/AppLocker/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/AppLocker/mod.rs @@ -48,7 +48,7 @@ pub unsafe fn SaferGetPolicyInformation(dwscopeid: u32, saferpolicyinfoclass: SA #[inline] pub unsafe fn SaferIdentifyLevel(pcodeproperties: ::core::option::Option<&[SAFER_CODE_PROPERTIES_V2]>, plevelhandle: *mut super::SAFER_LEVEL_HANDLE, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn SaferIdentifyLevel(dwnumproperties : u32, pcodeproperties : *const SAFER_CODE_PROPERTIES_V2, plevelhandle : *mut super:: SAFER_LEVEL_HANDLE, lpreserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SaferIdentifyLevel(pcodeproperties.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcodeproperties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), plevelhandle, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))).ok() + SaferIdentifyLevel(pcodeproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcodeproperties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), plevelhandle, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 f900056daf..3e8b92b9c7 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 @@ -76,7 +76,7 @@ pub struct AsyncIAssociatedIdentityProvider_Vtbl { pub struct AsyncIConnectedIdentityProvider(::windows_core::IUnknown); impl AsyncIConnectedIdentityProvider { pub unsafe fn Begin_ConnectIdentity(&self, authbuffer: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Begin_ConnectIdentity)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(authbuffer.as_ptr()), authbuffer.len() as _).ok() + (::windows_core::Interface::vtable(self).Begin_ConnectIdentity)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(authbuffer.as_ptr()), authbuffer.len().try_into().unwrap()).ok() } pub unsafe fn Finish_ConnectIdentity(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Finish_ConnectIdentity)(::windows_core::Interface::as_raw(self)).ok() @@ -181,7 +181,7 @@ pub struct AsyncIIdentityAdvise_Vtbl { pub struct AsyncIIdentityAuthentication(::windows_core::IUnknown); impl AsyncIIdentityAuthentication { pub unsafe fn Begin_SetIdentityCredential(&self, credbuffer: ::core::option::Option<&[u8]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Begin_SetIdentityCredential)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(credbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), credbuffer.as_deref().map_or(0, |slice| slice.len() as _)).ok() + (::windows_core::Interface::vtable(self).Begin_SetIdentityCredential)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(credbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), credbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } pub unsafe fn Finish_SetIdentityCredential(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Finish_SetIdentityCredential)(::windows_core::Interface::as_raw(self)).ok() @@ -189,7 +189,7 @@ impl AsyncIIdentityAuthentication { #[doc = "Required features: `\"Win32_UI_Shell_PropertiesSystem\"`"] #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe fn Begin_ValidateIdentityCredential(&self, credbuffer: &[u8], ppidentityproperties: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Begin_ValidateIdentityCredential)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(credbuffer.as_ptr()), credbuffer.len() as _, ::core::mem::transmute(ppidentityproperties.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Begin_ValidateIdentityCredential)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(credbuffer.as_ptr()), credbuffer.len().try_into().unwrap(), ::core::mem::transmute(ppidentityproperties.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_UI_Shell_PropertiesSystem\"`"] #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] @@ -544,7 +544,7 @@ pub struct IAssociatedIdentityProvider_Vtbl { pub struct IConnectedIdentityProvider(::windows_core::IUnknown); impl IConnectedIdentityProvider { pub unsafe fn ConnectIdentity(&self, authbuffer: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).ConnectIdentity)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(authbuffer.as_ptr()), authbuffer.len() as _).ok() + (::windows_core::Interface::vtable(self).ConnectIdentity)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(authbuffer.as_ptr()), authbuffer.len().try_into().unwrap()).ok() } pub unsafe fn DisconnectIdentity(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).DisconnectIdentity)(::windows_core::Interface::as_raw(self)).ok() @@ -620,12 +620,12 @@ pub struct IIdentityAdvise_Vtbl { pub struct IIdentityAuthentication(::windows_core::IUnknown); impl IIdentityAuthentication { pub unsafe fn SetIdentityCredential(&self, credbuffer: ::core::option::Option<&[u8]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetIdentityCredential)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(credbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), credbuffer.as_deref().map_or(0, |slice| slice.len() as _)).ok() + (::windows_core::Interface::vtable(self).SetIdentityCredential)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(credbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), credbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } #[doc = "Required features: `\"Win32_UI_Shell_PropertiesSystem\"`"] #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe fn ValidateIdentityCredential(&self, credbuffer: &[u8], ppidentityproperties: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).ValidateIdentityCredential)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(credbuffer.as_ptr()), credbuffer.len() as _, ::core::mem::transmute(ppidentityproperties.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).ValidateIdentityCredential)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(credbuffer.as_ptr()), credbuffer.len().try_into().unwrap(), ::core::mem::transmute(ppidentityproperties.unwrap_or(::std::ptr::null_mut()))).ok() } } ::windows_core::imp::interface_hierarchy!(IIdentityAuthentication, ::windows_core::IUnknown); @@ -764,7 +764,7 @@ impl IIdentityStore { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).ConvertToSid)(::windows_core::Interface::as_raw(self), lpszuniqueid.into_param().abi(), providerguid, psid.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(psid.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pcbrequiredsid).ok() + (::windows_core::Interface::vtable(self).ConvertToSid)(::windows_core::Interface::as_raw(self), lpszuniqueid.into_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).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"Win32_System_Variant\"`, `\"Win32_UI_Shell_PropertiesSystem\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant", feature = "Win32_UI_Shell_PropertiesSystem"))] 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 f9a77aaddd..12487c773e 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 @@ -83,7 +83,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn AuditComputeEffectivePolicyBySid(psid : super::super::super::Foundation:: PSID, psubcategoryguids : *const ::windows_core::GUID, dwpolicycount : u32, ppauditpolicy : *mut *mut AUDIT_POLICY_INFORMATION) -> super::super::super::Foundation:: BOOLEAN); - AuditComputeEffectivePolicyBySid(psid.into_param().abi(), ::core::mem::transmute(psubcategoryguids.as_ptr()), psubcategoryguids.len() as _, ppauditpolicy) + AuditComputeEffectivePolicyBySid(psid.into_param().abi(), ::core::mem::transmute(psubcategoryguids.as_ptr()), psubcategoryguids.len().try_into().unwrap(), ppauditpolicy) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -93,7 +93,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn AuditComputeEffectivePolicyByToken(htokenhandle : super::super::super::Foundation:: HANDLE, psubcategoryguids : *const ::windows_core::GUID, dwpolicycount : u32, ppauditpolicy : *mut *mut AUDIT_POLICY_INFORMATION) -> super::super::super::Foundation:: BOOLEAN); - AuditComputeEffectivePolicyByToken(htokenhandle.into_param().abi(), ::core::mem::transmute(psubcategoryguids.as_ptr()), psubcategoryguids.len() as _, ppauditpolicy) + AuditComputeEffectivePolicyByToken(htokenhandle.into_param().abi(), ::core::mem::transmute(psubcategoryguids.as_ptr()), psubcategoryguids.len().try_into().unwrap(), ppauditpolicy) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -194,7 +194,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn AuditQueryPerUserPolicy(psid : super::super::super::Foundation:: PSID, psubcategoryguids : *const ::windows_core::GUID, dwpolicycount : u32, ppauditpolicy : *mut *mut AUDIT_POLICY_INFORMATION) -> super::super::super::Foundation:: BOOLEAN); - AuditQueryPerUserPolicy(psid.into_param().abi(), ::core::mem::transmute(psubcategoryguids.as_ptr()), psubcategoryguids.len() as _, ppauditpolicy) + AuditQueryPerUserPolicy(psid.into_param().abi(), ::core::mem::transmute(psubcategoryguids.as_ptr()), psubcategoryguids.len().try_into().unwrap(), ppauditpolicy) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -208,7 +208,7 @@ pub unsafe fn AuditQuerySecurity(securityinformation: super::super::OBJECT_SECUR #[inline] pub unsafe fn AuditQuerySystemPolicy(psubcategoryguids: &[::windows_core::GUID], ppauditpolicy: *mut *mut AUDIT_POLICY_INFORMATION) -> super::super::super::Foundation::BOOLEAN { ::windows_targets::link!("advapi32.dll" "system" fn AuditQuerySystemPolicy(psubcategoryguids : *const ::windows_core::GUID, dwpolicycount : u32, ppauditpolicy : *mut *mut AUDIT_POLICY_INFORMATION) -> super::super::super::Foundation:: BOOLEAN); - AuditQuerySystemPolicy(::core::mem::transmute(psubcategoryguids.as_ptr()), psubcategoryguids.len() as _, ppauditpolicy) + AuditQuerySystemPolicy(::core::mem::transmute(psubcategoryguids.as_ptr()), psubcategoryguids.len().try_into().unwrap(), ppauditpolicy) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -238,7 +238,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn AuditSetPerUserPolicy(psid : super::super::super::Foundation:: PSID, pauditpolicy : *const AUDIT_POLICY_INFORMATION, dwpolicycount : u32) -> super::super::super::Foundation:: BOOLEAN); - AuditSetPerUserPolicy(psid.into_param().abi(), ::core::mem::transmute(pauditpolicy.as_ptr()), pauditpolicy.len() as _) + AuditSetPerUserPolicy(psid.into_param().abi(), ::core::mem::transmute(pauditpolicy.as_ptr()), pauditpolicy.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -255,7 +255,7 @@ where #[inline] pub unsafe fn AuditSetSystemPolicy(pauditpolicy: &[AUDIT_POLICY_INFORMATION]) -> super::super::super::Foundation::BOOLEAN { ::windows_targets::link!("advapi32.dll" "system" fn AuditSetSystemPolicy(pauditpolicy : *const AUDIT_POLICY_INFORMATION, dwpolicycount : u32) -> super::super::super::Foundation:: BOOLEAN); - AuditSetSystemPolicy(::core::mem::transmute(pauditpolicy.as_ptr()), pauditpolicy.len() as _) + AuditSetSystemPolicy(::core::mem::transmute(pauditpolicy.as_ptr()), pauditpolicy.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -484,7 +484,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn LsaAddAccountRights(policyhandle : LSA_HANDLE, accountsid : super::super::super::Foundation:: PSID, userrights : *const LSA_UNICODE_STRING, countofrights : u32) -> super::super::super::Foundation:: NTSTATUS); - LsaAddAccountRights(policyhandle.into_param().abi(), accountsid.into_param().abi(), ::core::mem::transmute(userrights.as_ptr()), userrights.len() as _) + LsaAddAccountRights(policyhandle.into_param().abi(), accountsid.into_param().abi(), ::core::mem::transmute(userrights.as_ptr()), userrights.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -712,7 +712,7 @@ where #[inline] pub unsafe fn LsaQueryCAPs(capids: ::core::option::Option<&[super::super::super::Foundation::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::super::Foundation:: PSID, capidcount : u32, caps : *mut *mut CENTRAL_ACCESS_POLICY, capcount : *mut u32) -> super::super::super::Foundation:: NTSTATUS); - 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() as _), caps, capcount) + 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, capcount) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -802,7 +802,7 @@ where P2: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn LsaRemoveAccountRights(policyhandle : LSA_HANDLE, accountsid : super::super::super::Foundation:: PSID, allrights : super::super::super::Foundation:: BOOLEAN, userrights : *const LSA_UNICODE_STRING, countofrights : u32) -> super::super::super::Foundation:: NTSTATUS); - LsaRemoveAccountRights(policyhandle.into_param().abi(), accountsid.into_param().abi(), allrights.into_param().abi(), ::core::mem::transmute(userrights.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), userrights.as_deref().map_or(0, |slice| slice.len() as _)) + LsaRemoveAccountRights(policyhandle.into_param().abi(), accountsid.into_param().abi(), allrights.into_param().abi(), ::core::mem::transmute(userrights.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), userrights.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -819,7 +819,7 @@ where #[inline] pub unsafe fn LsaSetCAPs(capdns: ::core::option::Option<&[LSA_UNICODE_STRING]>, flags: u32) -> super::super::super::Foundation::NTSTATUS { ::windows_targets::link!("advapi32.dll" "system" fn LsaSetCAPs(capdns : *const LSA_UNICODE_STRING, capdncount : u32, flags : u32) -> super::super::super::Foundation:: NTSTATUS); - LsaSetCAPs(::core::mem::transmute(capdns.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), capdns.as_deref().map_or(0, |slice| slice.len() as _), flags) + LsaSetCAPs(::core::mem::transmute(capdns.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), capdns.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), flags) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1119,7 +1119,7 @@ pub unsafe fn SLGetLicense(hslc: *const ::core::ffi::c_void, plicensefileid: *co pub unsafe fn SLGetLicenseFileId(hslc: *const ::core::ffi::c_void, pblicenseblob: &[u8]) -> ::windows_core::Result<::windows_core::GUID> { ::windows_targets::link!("slc.dll" "system" fn SLGetLicenseFileId(hslc : *const ::core::ffi::c_void, cblicenseblob : u32, pblicenseblob : *const u8, plicensefileid : *mut ::windows_core::GUID) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - SLGetLicenseFileId(hslc, pblicenseblob.len() as _, ::core::mem::transmute(pblicenseblob.as_ptr()), &mut result__).from_abi(result__) + SLGetLicenseFileId(hslc, pblicenseblob.len().try_into().unwrap(), ::core::mem::transmute(pblicenseblob.as_ptr()), &mut result__).from_abi(result__) } #[inline] pub unsafe fn SLGetLicenseInformation(hslc: *const ::core::ffi::c_void, psllicenseid: *const ::windows_core::GUID, pwszvaluename: P0, pedatatype: ::core::option::Option<*mut SLDATATYPE>, pcbvalue: *mut u32, ppbvalue: *mut *mut u8) -> ::windows_core::Result<()> @@ -1145,7 +1145,7 @@ where { ::windows_targets::link!("slc.dll" "system" fn SLGetPKeyId(hslc : *const ::core::ffi::c_void, pwszpkeyalgorithm : ::windows_core::PCWSTR, pwszpkeystring : ::windows_core::PCWSTR, cbpkeyspecificdata : u32, pbpkeyspecificdata : *const u8, ppkeyid : *mut ::windows_core::GUID) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - SLGetPKeyId(hslc, pwszpkeyalgorithm.into_param().abi(), pwszpkeystring.into_param().abi(), pbpkeyspecificdata.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pbpkeyspecificdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), &mut result__).from_abi(result__) + SLGetPKeyId(hslc, pwszpkeyalgorithm.into_param().abi(), pwszpkeystring.into_param().abi(), pbpkeyspecificdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pbpkeyspecificdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), &mut result__).from_abi(result__) } #[inline] pub unsafe fn SLGetPKeyInformation(hslc: *const ::core::ffi::c_void, ppkeyid: *const ::windows_core::GUID, pwszvaluename: P0, pedatatype: ::core::option::Option<*mut SLDATATYPE>, pcbvalue: *mut u32, ppbvalue: *mut *mut u8) -> ::windows_core::Result<()> @@ -1234,7 +1234,7 @@ where pub unsafe fn SLInstallLicense(hslc: *const ::core::ffi::c_void, pblicenseblob: &[u8]) -> ::windows_core::Result<::windows_core::GUID> { ::windows_targets::link!("slc.dll" "system" fn SLInstallLicense(hslc : *const ::core::ffi::c_void, cblicenseblob : u32, pblicenseblob : *const u8, plicensefileid : *mut ::windows_core::GUID) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - SLInstallLicense(hslc, pblicenseblob.len() as _, ::core::mem::transmute(pblicenseblob.as_ptr()), &mut result__).from_abi(result__) + SLInstallLicense(hslc, pblicenseblob.len().try_into().unwrap(), ::core::mem::transmute(pblicenseblob.as_ptr()), &mut result__).from_abi(result__) } #[inline] pub unsafe fn SLInstallProofOfPurchase(hslc: *const ::core::ffi::c_void, pwszpkeyalgorithm: P0, pwszpkeystring: P1, pbpkeyspecificdata: ::core::option::Option<&[u8]>) -> ::windows_core::Result<::windows_core::GUID> @@ -1244,7 +1244,7 @@ where { ::windows_targets::link!("slc.dll" "system" fn SLInstallProofOfPurchase(hslc : *const ::core::ffi::c_void, pwszpkeyalgorithm : ::windows_core::PCWSTR, pwszpkeystring : ::windows_core::PCWSTR, cbpkeyspecificdata : u32, pbpkeyspecificdata : *const u8, ppkeyid : *mut ::windows_core::GUID) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - SLInstallProofOfPurchase(hslc, pwszpkeyalgorithm.into_param().abi(), pwszpkeystring.into_param().abi(), pbpkeyspecificdata.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pbpkeyspecificdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), &mut result__).from_abi(result__) + SLInstallProofOfPurchase(hslc, pwszpkeyalgorithm.into_param().abi(), pwszpkeystring.into_param().abi(), pbpkeyspecificdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pbpkeyspecificdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), &mut result__).from_abi(result__) } #[inline] pub unsafe fn SLIsGenuineLocal(pappid: *const ::windows_core::GUID, pgenuinestate: *mut SL_GENUINE_STATE, puioptions: ::core::option::Option<*mut SL_NONGENUINE_UI_OPTIONS>) -> ::windows_core::Result<()> { @@ -1286,7 +1286,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("slc.dll" "system" fn SLSetGenuineInformation(pqueryid : *const ::windows_core::GUID, pwszvaluename : ::windows_core::PCWSTR, edatatype : SLDATATYPE, cbvalue : u32, pbvalue : *const u8) -> ::windows_core::HRESULT); - SLSetGenuineInformation(pqueryid, pwszvaluename.into_param().abi(), edatatype, pbvalue.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pbvalue.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + SLSetGenuineInformation(pqueryid, pwszvaluename.into_param().abi(), edatatype, pbvalue.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pbvalue.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() } #[inline] pub unsafe fn SLUninstallLicense(hslc: *const ::core::ffi::c_void, plicensefileid: *const ::windows_core::GUID) -> ::windows_core::Result<()> { @@ -1504,7 +1504,7 @@ pub unsafe fn SslGenerateRandomBits(prandomdata: *mut u8, crandomdata: i32) { #[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); - SslGetExtensions(::core::mem::transmute(clienthello.as_ptr()), clienthello.len() as _, ::core::mem::transmute(genericextensions.as_ptr()), genericextensions.len() as _, bytestoread, flags).ok() + SslGetExtensions(::core::mem::transmute(clienthello.as_ptr()), clienthello.len().try_into().unwrap(), ::core::mem::transmute(genericextensions.as_ptr()), genericextensions.len().try_into().unwrap(), bytestoread, flags).ok() } #[inline] pub unsafe fn SslGetMaximumKeySize(reserved: u32) -> u32 { @@ -1514,7 +1514,7 @@ 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); - SslGetServerIdentity(::core::mem::transmute(clienthello.as_ptr()), clienthello.len() as _, serveridentity, serveridentitysize, flags).ok() + SslGetServerIdentity(::core::mem::transmute(clienthello.as_ptr()), clienthello.len().try_into().unwrap(), serveridentity, serveridentitysize, flags).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1646,7 +1646,7 @@ where #[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); - SspiUnmarshalAuthIdentity(authidentitybytearray.len() as _, ::core::mem::transmute(authidentitybytearray.as_ptr()), ppauthidentity).ok() + SspiUnmarshalAuthIdentity(authidentitybytearray.len().try_into().unwrap(), ::core::mem::transmute(authidentitybytearray.as_ptr()), ppauthidentity).ok() } #[inline] pub unsafe fn SspiValidateAuthIdentity(authdata: *const ::core::ffi::c_void) -> ::windows_core::Result<()> { 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 943aaea4d3..4366bf9b49 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Authorization/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Authorization/mod.rs @@ -11,7 +11,7 @@ where P2: ::windows_core::IntoParam, { ::windows_targets::link!("authz.dll" "system" fn AuthzAccessCheck(flags : AUTHZ_ACCESS_CHECK_FLAGS, hauthzclientcontext : AUTHZ_CLIENT_CONTEXT_HANDLE, prequest : *const AUTHZ_ACCESS_REQUEST, hauditevent : AUTHZ_AUDIT_EVENT_HANDLE, psecuritydescriptor : super:: PSECURITY_DESCRIPTOR, optionalsecuritydescriptorarray : *const super:: PSECURITY_DESCRIPTOR, optionalsecuritydescriptorcount : u32, preply : *mut AUTHZ_ACCESS_REPLY, phaccesscheckresults : *mut AUTHZ_ACCESS_CHECK_RESULTS_HANDLE) -> super::super::Foundation:: BOOL); - AuthzAccessCheck(flags, hauthzclientcontext.into_param().abi(), prequest, hauditevent.into_param().abi(), psecuritydescriptor.into_param().abi(), ::core::mem::transmute(optionalsecuritydescriptorarray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), optionalsecuritydescriptorarray.as_deref().map_or(0, |slice| slice.len() as _), preply, ::core::mem::transmute(phaccesscheckresults.unwrap_or(::std::ptr::null_mut()))).ok() + AuthzAccessCheck(flags, hauthzclientcontext.into_param().abi(), prequest, hauditevent.into_param().abi(), psecuritydescriptor.into_param().abi(), ::core::mem::transmute(optionalsecuritydescriptorarray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), optionalsecuritydescriptorarray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), preply, ::core::mem::transmute(phaccesscheckresults.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -252,7 +252,7 @@ where P2: ::windows_core::IntoParam, { ::windows_targets::link!("authz.dll" "system" fn AuthzOpenObjectAudit(flags : u32, hauthzclientcontext : AUTHZ_CLIENT_CONTEXT_HANDLE, prequest : *const AUTHZ_ACCESS_REQUEST, hauditevent : AUTHZ_AUDIT_EVENT_HANDLE, psecuritydescriptor : super:: PSECURITY_DESCRIPTOR, optionalsecuritydescriptorarray : *const super:: PSECURITY_DESCRIPTOR, optionalsecuritydescriptorcount : u32, preply : *const AUTHZ_ACCESS_REPLY) -> super::super::Foundation:: BOOL); - AuthzOpenObjectAudit(flags, hauthzclientcontext.into_param().abi(), prequest, hauditevent.into_param().abi(), psecuritydescriptor.into_param().abi(), ::core::mem::transmute(optionalsecuritydescriptorarray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), optionalsecuritydescriptorarray.as_deref().map_or(0, |slice| slice.len() as _), preply).ok() + AuthzOpenObjectAudit(flags, hauthzclientcontext.into_param().abi(), prequest, hauditevent.into_param().abi(), psecuritydescriptor.into_param().abi(), ::core::mem::transmute(optionalsecuritydescriptorarray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), optionalsecuritydescriptorarray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), preply).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Threading\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Threading"))] @@ -302,7 +302,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("authz.dll" "system" fn AuthzSetAppContainerInformation(hauthzclientcontext : AUTHZ_CLIENT_CONTEXT_HANDLE, pappcontainersid : super::super::Foundation:: PSID, capabilitycount : u32, pcapabilitysids : *const super:: SID_AND_ATTRIBUTES) -> super::super::Foundation:: BOOL); - AuthzSetAppContainerInformation(hauthzclientcontext.into_param().abi(), pappcontainersid.into_param().abi(), pcapabilitysids.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcapabilitysids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + AuthzSetAppContainerInformation(hauthzclientcontext.into_param().abi(), pappcontainersid.into_param().abi(), pcapabilitysids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcapabilitysids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -384,9 +384,9 @@ where BuildSecurityDescriptorA( ::core::mem::transmute(powner.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pgroup.unwrap_or(::std::ptr::null())), - plistofaccessentries.as_deref().map_or(0, |slice| slice.len() 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() as _), + plistofauditentries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(plistofauditentries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), poldsd.into_param().abi(), psizenewsd, @@ -405,9 +405,9 @@ where BuildSecurityDescriptorW( ::core::mem::transmute(powner.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pgroup.unwrap_or(::std::ptr::null())), - plistofaccessentries.as_deref().map_or(0, |slice| slice.len() 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() as _), + plistofauditentries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(plistofauditentries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), poldsd.into_param().abi(), psizenewsd, @@ -576,7 +576,7 @@ where #[inline] pub unsafe fn FreeInheritedFromArray(pinheritarray: &[INHERITED_FROMW], pfnarray: ::core::option::Option<*const FN_OBJECT_MGR_FUNCTS>) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn FreeInheritedFromArray(pinheritarray : *const INHERITED_FROMW, acecnt : u16, pfnarray : *const FN_OBJECT_MGR_FUNCTS) -> super::super::Foundation:: WIN32_ERROR); - FreeInheritedFromArray(::core::mem::transmute(pinheritarray.as_ptr()), pinheritarray.len() as _, ::core::mem::transmute(pfnarray.unwrap_or(::std::ptr::null()))).ok() + FreeInheritedFromArray(::core::mem::transmute(pinheritarray.as_ptr()), pinheritarray.len().try_into().unwrap(), ::core::mem::transmute(pfnarray.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -629,7 +629,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn GetInheritanceSourceA(pobjectname : ::windows_core::PCSTR, objecttype : SE_OBJECT_TYPE, securityinfo : super:: OBJECT_SECURITY_INFORMATION, container : super::super::Foundation:: BOOL, pobjectclassguids : *const *const ::windows_core::GUID, guidcount : u32, pacl : *const super:: ACL, pfnarray : *const FN_OBJECT_MGR_FUNCTS, pgenericmapping : *const super:: GENERIC_MAPPING, pinheritarray : *mut INHERITED_FROMA) -> super::super::Foundation:: WIN32_ERROR); - GetInheritanceSourceA(pobjectname.into_param().abi(), objecttype, securityinfo, container.into_param().abi(), ::core::mem::transmute(pobjectclassguids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pobjectclassguids.as_deref().map_or(0, |slice| slice.len() as _), pacl, ::core::mem::transmute(pfnarray.unwrap_or(::std::ptr::null())), pgenericmapping, pinheritarray).ok() + GetInheritanceSourceA(pobjectname.into_param().abi(), objecttype, securityinfo, container.into_param().abi(), ::core::mem::transmute(pobjectclassguids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pobjectclassguids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pacl, ::core::mem::transmute(pfnarray.unwrap_or(::std::ptr::null())), pgenericmapping, pinheritarray).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -640,7 +640,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn GetInheritanceSourceW(pobjectname : ::windows_core::PCWSTR, objecttype : SE_OBJECT_TYPE, securityinfo : super:: OBJECT_SECURITY_INFORMATION, container : super::super::Foundation:: BOOL, pobjectclassguids : *const *const ::windows_core::GUID, guidcount : u32, pacl : *const super:: ACL, pfnarray : *const FN_OBJECT_MGR_FUNCTS, pgenericmapping : *const super:: GENERIC_MAPPING, pinheritarray : *mut INHERITED_FROMW) -> super::super::Foundation:: WIN32_ERROR); - GetInheritanceSourceW(pobjectname.into_param().abi(), objecttype, securityinfo, container.into_param().abi(), ::core::mem::transmute(pobjectclassguids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pobjectclassguids.as_deref().map_or(0, |slice| slice.len() as _), pacl, ::core::mem::transmute(pfnarray.unwrap_or(::std::ptr::null())), pgenericmapping, pinheritarray).ok() + GetInheritanceSourceW(pobjectname.into_param().abi(), objecttype, securityinfo, container.into_param().abi(), ::core::mem::transmute(pobjectclassguids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pobjectclassguids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pacl, ::core::mem::transmute(pfnarray.unwrap_or(::std::ptr::null())), pgenericmapping, pinheritarray).ok() } #[inline] pub unsafe fn GetMultipleTrusteeA(ptrustee: ::core::option::Option<*const TRUSTEE_A>) -> *mut TRUSTEE_A { @@ -747,14 +747,14 @@ where #[inline] pub unsafe fn SetEntriesInAclA(plistofexplicitentries: ::core::option::Option<&[EXPLICIT_ACCESS_A]>, oldacl: ::core::option::Option<*const super::ACL>, newacl: *mut *mut super::ACL) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn SetEntriesInAclA(ccountofexplicitentries : u32, plistofexplicitentries : *const EXPLICIT_ACCESS_A, oldacl : *const super:: ACL, newacl : *mut *mut super:: ACL) -> super::super::Foundation:: WIN32_ERROR); - SetEntriesInAclA(plistofexplicitentries.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(plistofexplicitentries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(oldacl.unwrap_or(::std::ptr::null())), newacl).ok() + SetEntriesInAclA(plistofexplicitentries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(plistofexplicitentries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(oldacl.unwrap_or(::std::ptr::null())), newacl).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn SetEntriesInAclW(plistofexplicitentries: ::core::option::Option<&[EXPLICIT_ACCESS_W]>, oldacl: ::core::option::Option<*const super::ACL>, newacl: *mut *mut super::ACL) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn SetEntriesInAclW(ccountofexplicitentries : u32, plistofexplicitentries : *const EXPLICIT_ACCESS_W, oldacl : *const super:: ACL, newacl : *mut *mut super:: ACL) -> super::super::Foundation:: WIN32_ERROR); - SetEntriesInAclW(plistofexplicitentries.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(plistofexplicitentries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(oldacl.unwrap_or(::std::ptr::null())), newacl).ok() + SetEntriesInAclW(plistofexplicitentries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(plistofexplicitentries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(oldacl.unwrap_or(::std::ptr::null())), newacl).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 9b63950c0d..d48865c9e0 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Credentials/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Credentials/mod.rs @@ -68,7 +68,7 @@ pub unsafe fn CredFree(buffer: *const ::core::ffi::c_void) { #[inline] pub unsafe fn CredGetSessionTypes(maximumpersist: &mut [u32]) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CredGetSessionTypes(maximumpersistcount : u32, maximumpersist : *mut u32) -> super::super::Foundation:: BOOL); - CredGetSessionTypes(maximumpersist.len() as _, ::core::mem::transmute(maximumpersist.as_ptr())).ok() + CredGetSessionTypes(maximumpersist.len().try_into().unwrap(), ::core::mem::transmute(maximumpersist.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -174,7 +174,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn CredProtectA(fasself : super::super::Foundation:: BOOL, pszcredentials : ::windows_core::PCSTR, cchcredentials : u32, pszprotectedcredentials : ::windows_core::PSTR, pcchmaxchars : *mut u32, protectiontype : *mut CRED_PROTECTION_TYPE) -> super::super::Foundation:: BOOL); - CredProtectA(fasself.into_param().abi(), ::core::mem::transmute(pszcredentials.as_ptr()), pszcredentials.len() as _, ::core::mem::transmute(pszprotectedcredentials), pcchmaxchars, ::core::mem::transmute(protectiontype.unwrap_or(::std::ptr::null_mut()))).ok() + CredProtectA(fasself.into_param().abi(), ::core::mem::transmute(pszcredentials.as_ptr()), pszcredentials.len().try_into().unwrap(), ::core::mem::transmute(pszprotectedcredentials), pcchmaxchars, ::core::mem::transmute(protectiontype.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -184,7 +184,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn CredProtectW(fasself : super::super::Foundation:: BOOL, pszcredentials : ::windows_core::PCWSTR, cchcredentials : u32, pszprotectedcredentials : ::windows_core::PWSTR, pcchmaxchars : *mut u32, protectiontype : *mut CRED_PROTECTION_TYPE) -> super::super::Foundation:: BOOL); - CredProtectW(fasself.into_param().abi(), ::core::mem::transmute(pszcredentials.as_ptr()), pszcredentials.len() as _, ::core::mem::transmute(pszprotectedcredentials), pcchmaxchars, ::core::mem::transmute(protectiontype.unwrap_or(::std::ptr::null_mut()))).ok() + CredProtectW(fasself.into_param().abi(), ::core::mem::transmute(pszcredentials.as_ptr()), pszcredentials.len().try_into().unwrap(), ::core::mem::transmute(pszprotectedcredentials), pcchmaxchars, ::core::mem::transmute(protectiontype.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -250,7 +250,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("credui.dll" "system" fn CredUICmdLinePromptForCredentialsA(psztargetname : ::windows_core::PCSTR, pcontext : *const SecHandle, dwautherror : u32, username : ::windows_core::PSTR, uluserbuffersize : u32, pszpassword : ::windows_core::PSTR, ulpasswordbuffersize : u32, pfsave : *mut super::super::Foundation:: BOOL, dwflags : CREDUI_FLAGS) -> u32); - CredUICmdLinePromptForCredentialsA(psztargetname.into_param().abi(), ::core::mem::transmute(pcontext.unwrap_or(::std::ptr::null())), dwautherror, ::core::mem::transmute(username.as_ptr()), username.len() as _, ::core::mem::transmute(pszpassword.as_ptr()), pszpassword.len() as _, ::core::mem::transmute(pfsave.unwrap_or(::std::ptr::null_mut())), dwflags) + CredUICmdLinePromptForCredentialsA(psztargetname.into_param().abi(), ::core::mem::transmute(pcontext.unwrap_or(::std::ptr::null())), dwautherror, ::core::mem::transmute(username.as_ptr()), username.len().try_into().unwrap(), ::core::mem::transmute(pszpassword.as_ptr()), pszpassword.len().try_into().unwrap(), ::core::mem::transmute(pfsave.unwrap_or(::std::ptr::null_mut())), dwflags) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -260,7 +260,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("credui.dll" "system" fn CredUICmdLinePromptForCredentialsW(psztargetname : ::windows_core::PCWSTR, pcontext : *const SecHandle, dwautherror : u32, username : ::windows_core::PWSTR, uluserbuffersize : u32, pszpassword : ::windows_core::PWSTR, ulpasswordbuffersize : u32, pfsave : *mut super::super::Foundation:: BOOL, dwflags : CREDUI_FLAGS) -> u32); - CredUICmdLinePromptForCredentialsW(psztargetname.into_param().abi(), ::core::mem::transmute(pcontext.unwrap_or(::std::ptr::null())), dwautherror, ::core::mem::transmute(username.as_ptr()), username.len() as _, ::core::mem::transmute(pszpassword.as_ptr()), pszpassword.len() as _, ::core::mem::transmute(pfsave.unwrap_or(::std::ptr::null_mut())), dwflags) + CredUICmdLinePromptForCredentialsW(psztargetname.into_param().abi(), ::core::mem::transmute(pcontext.unwrap_or(::std::ptr::null())), dwautherror, ::core::mem::transmute(username.as_ptr()), username.len().try_into().unwrap(), ::core::mem::transmute(pszpassword.as_ptr()), pszpassword.len().try_into().unwrap(), ::core::mem::transmute(pfsave.unwrap_or(::std::ptr::null_mut())), dwflags) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -290,7 +290,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("credui.dll" "system" fn CredUIParseUserNameA(username : ::windows_core::PCSTR, user : ::windows_core::PSTR, userbuffersize : u32, domain : ::windows_core::PSTR, domainbuffersize : u32) -> u32); - CredUIParseUserNameA(username.into_param().abi(), ::core::mem::transmute(user.as_ptr()), user.len() as _, ::core::mem::transmute(domain.as_ptr()), domain.len() as _) + CredUIParseUserNameA(username.into_param().abi(), ::core::mem::transmute(user.as_ptr()), user.len().try_into().unwrap(), ::core::mem::transmute(domain.as_ptr()), domain.len().try_into().unwrap()) } #[inline] pub unsafe fn CredUIParseUserNameW(username: P0, user: &mut [u16], domain: &mut [u16]) -> u32 @@ -298,7 +298,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("credui.dll" "system" fn CredUIParseUserNameW(username : ::windows_core::PCWSTR, user : ::windows_core::PWSTR, userbuffersize : u32, domain : ::windows_core::PWSTR, domainbuffersize : u32) -> u32); - CredUIParseUserNameW(username.into_param().abi(), ::core::mem::transmute(user.as_ptr()), user.len() as _, ::core::mem::transmute(domain.as_ptr()), domain.len() as _) + CredUIParseUserNameW(username.into_param().abi(), ::core::mem::transmute(user.as_ptr()), user.len().try_into().unwrap(), ::core::mem::transmute(domain.as_ptr()), domain.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] @@ -308,7 +308,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::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) -> u32); - CredUIPromptForCredentialsA(::core::mem::transmute(puiinfo.unwrap_or(::std::ptr::null())), psztargetname.into_param().abi(), ::core::mem::transmute(pcontext.unwrap_or(::std::ptr::null())), dwautherror, ::core::mem::transmute(pszusername.as_ptr()), pszusername.len() as _, ::core::mem::transmute(pszpassword.as_ptr()), pszpassword.len() as _, ::core::mem::transmute(save.unwrap_or(::std::ptr::null_mut())), dwflags) + CredUIPromptForCredentialsA(::core::mem::transmute(puiinfo.unwrap_or(::std::ptr::null())), psztargetname.into_param().abi(), ::core::mem::transmute(pcontext.unwrap_or(::std::ptr::null())), dwautherror, ::core::mem::transmute(pszusername.as_ptr()), pszusername.len().try_into().unwrap(), ::core::mem::transmute(pszpassword.as_ptr()), pszpassword.len().try_into().unwrap(), ::core::mem::transmute(save.unwrap_or(::std::ptr::null_mut())), dwflags) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] @@ -318,7 +318,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::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) -> u32); - CredUIPromptForCredentialsW(::core::mem::transmute(puiinfo.unwrap_or(::std::ptr::null())), psztargetname.into_param().abi(), ::core::mem::transmute(pcontext.unwrap_or(::std::ptr::null())), dwautherror, ::core::mem::transmute(pszusername.as_ptr()), pszusername.len() as _, ::core::mem::transmute(pszpassword.as_ptr()), pszpassword.len() as _, ::core::mem::transmute(save.unwrap_or(::std::ptr::null_mut())), dwflags) + CredUIPromptForCredentialsW(::core::mem::transmute(puiinfo.unwrap_or(::std::ptr::null())), psztargetname.into_param().abi(), ::core::mem::transmute(pcontext.unwrap_or(::std::ptr::null())), dwautherror, ::core::mem::transmute(pszusername.as_ptr()), pszusername.len().try_into().unwrap(), ::core::mem::transmute(pszpassword.as_ptr()), pszpassword.len().try_into().unwrap(), ::core::mem::transmute(save.unwrap_or(::std::ptr::null_mut())), dwflags) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] @@ -397,7 +397,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn CredUnprotectA(fasself : super::super::Foundation:: BOOL, pszprotectedcredentials : ::windows_core::PCSTR, cchprotectedcredentials : u32, pszcredentials : ::windows_core::PSTR, pcchmaxchars : *mut u32) -> super::super::Foundation:: BOOL); - CredUnprotectA(fasself.into_param().abi(), ::core::mem::transmute(pszprotectedcredentials.as_ptr()), pszprotectedcredentials.len() as _, ::core::mem::transmute(pszcredentials), pcchmaxchars).ok() + CredUnprotectA(fasself.into_param().abi(), ::core::mem::transmute(pszprotectedcredentials.as_ptr()), pszprotectedcredentials.len().try_into().unwrap(), ::core::mem::transmute(pszcredentials), pcchmaxchars).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -407,7 +407,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn CredUnprotectW(fasself : super::super::Foundation:: BOOL, pszprotectedcredentials : ::windows_core::PCWSTR, cchprotectedcredentials : u32, pszcredentials : ::windows_core::PWSTR, pcchmaxchars : *mut u32) -> super::super::Foundation:: BOOL); - CredUnprotectW(fasself.into_param().abi(), ::core::mem::transmute(pszprotectedcredentials.as_ptr()), pszprotectedcredentials.len() as _, ::core::mem::transmute(pszcredentials), pcchmaxchars).ok() + CredUnprotectW(fasself.into_param().abi(), ::core::mem::transmute(pszprotectedcredentials.as_ptr()), pszprotectedcredentials.len().try_into().unwrap(), ::core::mem::transmute(pszcredentials), pcchmaxchars).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -772,12 +772,12 @@ pub unsafe fn SCardIsValidContext(hcontext: usize) -> i32 { #[inline] pub unsafe fn SCardListCardsA(hcontext: usize, pbatr: ::core::option::Option<*const u8>, rgquidinterfaces: ::core::option::Option<&[::windows_core::GUID]>, mszcards: ::windows_core::PSTR, pcchcards: *mut u32) -> i32 { ::windows_targets::link!("winscard.dll" "system" fn SCardListCardsA(hcontext : usize, pbatr : *const u8, rgquidinterfaces : *const ::windows_core::GUID, cguidinterfacecount : u32, mszcards : ::windows_core::PSTR, pcchcards : *mut u32) -> i32); - SCardListCardsA(hcontext, ::core::mem::transmute(pbatr.unwrap_or(::std::ptr::null())), ::core::mem::transmute(rgquidinterfaces.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), rgquidinterfaces.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(mszcards), pcchcards) + SCardListCardsA(hcontext, ::core::mem::transmute(pbatr.unwrap_or(::std::ptr::null())), ::core::mem::transmute(rgquidinterfaces.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), rgquidinterfaces.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(mszcards), pcchcards) } #[inline] pub unsafe fn SCardListCardsW(hcontext: usize, pbatr: ::core::option::Option<*const u8>, rgquidinterfaces: ::core::option::Option<&[::windows_core::GUID]>, mszcards: ::windows_core::PWSTR, pcchcards: *mut u32) -> i32 { ::windows_targets::link!("winscard.dll" "system" fn SCardListCardsW(hcontext : usize, pbatr : *const u8, rgquidinterfaces : *const ::windows_core::GUID, cguidinterfacecount : u32, mszcards : ::windows_core::PWSTR, pcchcards : *mut u32) -> i32); - SCardListCardsW(hcontext, ::core::mem::transmute(pbatr.unwrap_or(::std::ptr::null())), ::core::mem::transmute(rgquidinterfaces.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), rgquidinterfaces.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(mszcards), pcchcards) + SCardListCardsW(hcontext, ::core::mem::transmute(pbatr.unwrap_or(::std::ptr::null())), ::core::mem::transmute(rgquidinterfaces.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), rgquidinterfaces.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(mszcards), pcchcards) } #[inline] pub unsafe fn SCardListInterfacesA(hcontext: usize, szcard: P0, pguidinterfaces: *mut ::windows_core::GUID, pcguidinterfaces: *mut u32) -> i32 @@ -915,7 +915,7 @@ where #[inline] pub unsafe fn SCardSetAttrib(hcard: usize, dwattrid: u32, pbattr: &[u8]) -> i32 { ::windows_targets::link!("winscard.dll" "system" fn SCardSetAttrib(hcard : usize, dwattrid : u32, pbattr : *const u8, cbattrlen : u32) -> i32); - SCardSetAttrib(hcard, dwattrid, ::core::mem::transmute(pbattr.as_ptr()), pbattr.len() as _) + SCardSetAttrib(hcard, dwattrid, ::core::mem::transmute(pbattr.as_ptr()), pbattr.len().try_into().unwrap()) } #[inline] pub unsafe fn SCardSetCardTypeProviderNameA(hcontext: usize, szcardname: P0, dwproviderid: u32, szprovider: P1) -> i32 @@ -953,7 +953,7 @@ pub unsafe fn SCardStatusW(hcard: usize, mszreadernames: ::windows_core::PWSTR, #[inline] pub unsafe fn SCardTransmit(hcard: usize, piosendpci: *const SCARD_IO_REQUEST, pbsendbuffer: &[u8], piorecvpci: ::core::option::Option<*mut SCARD_IO_REQUEST>, pbrecvbuffer: *mut u8, pcbrecvlength: *mut u32) -> i32 { ::windows_targets::link!("winscard.dll" "system" fn SCardTransmit(hcard : usize, piosendpci : *const SCARD_IO_REQUEST, pbsendbuffer : *const u8, cbsendlength : u32, piorecvpci : *mut SCARD_IO_REQUEST, pbrecvbuffer : *mut u8, pcbrecvlength : *mut u32) -> i32); - SCardTransmit(hcard, piosendpci, ::core::mem::transmute(pbsendbuffer.as_ptr()), pbsendbuffer.len() as _, ::core::mem::transmute(piorecvpci.unwrap_or(::std::ptr::null_mut())), pbrecvbuffer, pcbrecvlength) + SCardTransmit(hcard, piosendpci, ::core::mem::transmute(pbsendbuffer.as_ptr()), pbsendbuffer.len().try_into().unwrap(), ::core::mem::transmute(piorecvpci.unwrap_or(::std::ptr::null_mut())), pbrecvbuffer, pcbrecvlength) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] @@ -975,7 +975,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("winscard.dll" "system" fn SCardWriteCacheA(hcontext : usize, cardidentifier : *const ::windows_core::GUID, freshnesscounter : u32, lookupname : ::windows_core::PCSTR, data : *const u8, datalen : u32) -> i32); - SCardWriteCacheA(hcontext, cardidentifier, freshnesscounter, lookupname.into_param().abi(), ::core::mem::transmute(data.as_ptr()), data.len() as _) + SCardWriteCacheA(hcontext, cardidentifier, freshnesscounter, lookupname.into_param().abi(), ::core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap()) } #[inline] pub unsafe fn SCardWriteCacheW(hcontext: usize, cardidentifier: *const ::windows_core::GUID, freshnesscounter: u32, lookupname: P0, data: &[u8]) -> i32 @@ -983,7 +983,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winscard.dll" "system" fn SCardWriteCacheW(hcontext : usize, cardidentifier : *const ::windows_core::GUID, freshnesscounter : u32, lookupname : ::windows_core::PCWSTR, data : *const u8, datalen : u32) -> i32); - SCardWriteCacheW(hcontext, cardidentifier, freshnesscounter, lookupname.into_param().abi(), ::core::mem::transmute(data.as_ptr()), data.len() as _) + SCardWriteCacheW(hcontext, cardidentifier, freshnesscounter, lookupname.into_param().abi(), ::core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap()) } pub const BinaryBlobCredential: CRED_MARSHAL_TYPE = CRED_MARSHAL_TYPE(3i32); pub const BinaryBlobForSystem: CRED_MARSHAL_TYPE = CRED_MARSHAL_TYPE(5i32); 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 7b809883ec..a2d407de08 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 @@ -47,7 +47,7 @@ where #[inline] pub unsafe fn CryptCATAdminEnumCatalogFromHash(hcatadmin: isize, pbhash: &[u8], dwflags: u32, phprevcatinfo: ::core::option::Option<*mut isize>) -> isize { ::windows_targets::link!("wintrust.dll" "system" fn CryptCATAdminEnumCatalogFromHash(hcatadmin : isize, pbhash : *const u8, cbhash : u32, dwflags : u32, phprevcatinfo : *mut isize) -> isize); - CryptCATAdminEnumCatalogFromHash(hcatadmin, ::core::mem::transmute(pbhash.as_ptr()), pbhash.len() as _, dwflags, ::core::mem::transmute(phprevcatinfo.unwrap_or(::std::ptr::null_mut()))) + CryptCATAdminEnumCatalogFromHash(hcatadmin, ::core::mem::transmute(pbhash.as_ptr()), pbhash.len().try_into().unwrap(), dwflags, ::core::mem::transmute(phprevcatinfo.unwrap_or(::std::ptr::null_mut()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 ab4f3028a8..d93e5d0d99 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 @@ -137,21 +137,21 @@ where P0: ::windows_core::IntoParam, { ::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); - PstGetCertificates(ptargetname, rgpcriteria.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rgpcriteria.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), bisclient.into_param().abi(), pdwcertchaincontextcount, ppcertchaincontexts) + 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_param().abi(), pdwcertchaincontextcount, ppcertchaincontexts) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Security_Authentication_Identity\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_Authentication_Identity"))] #[inline] pub unsafe fn PstGetTrustAnchors(ptargetname: *const super::super::super::Foundation::UNICODE_STRING, rgpcriteria: ::core::option::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); - PstGetTrustAnchors(ptargetname, rgpcriteria.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rgpcriteria.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pptrustedissuers) + 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) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Security_Authentication_Identity\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_Authentication_Identity"))] #[inline] pub unsafe fn PstGetTrustAnchorsEx(ptargetname: *const super::super::super::Foundation::UNICODE_STRING, rgpcriteria: ::core::option::Option<&[super::CERT_SELECT_CRITERIA]>, pcertcontext: ::core::option::Option<*const super::CERT_CONTEXT>, pptrustedissuers: *mut *mut super::super::Authentication::Identity::SecPkgContext_IssuerListInfoEx) -> super::super::super::Foundation::NTSTATUS { ::windows_targets::link!("certpoleng.dll" "system" fn PstGetTrustAnchorsEx(ptargetname : *const super::super::super::Foundation:: UNICODE_STRING, ccriteria : u32, rgpcriteria : *const super:: CERT_SELECT_CRITERIA, pcertcontext : *const super:: CERT_CONTEXT, pptrustedissuers : *mut *mut super::super::Authentication::Identity:: SecPkgContext_IssuerListInfoEx) -> super::super::super::Foundation:: NTSTATUS); - PstGetTrustAnchorsEx(ptargetname, rgpcriteria.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rgpcriteria.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(pcertcontext.unwrap_or(::std::ptr::null())), pptrustedissuers) + PstGetTrustAnchorsEx(ptargetname, rgpcriteria.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(rgpcriteria.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(pcertcontext.unwrap_or(::std::ptr::null())), pptrustedissuers) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 61817c82b4..b7029c7cfb 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 @@ -24,7 +24,7 @@ pub unsafe fn CryptSIPGetCaps(psubjinfo: *const SIP_SUBJECTINFO, pcaps: *mut SIP #[inline] pub unsafe fn CryptSIPGetSealedDigest(psubjectinfo: *const SIP_SUBJECTINFO, psig: ::core::option::Option<&[u8]>, pbdigest: ::core::option::Option<*mut u8>, pcbdigest: *mut u32) -> super::super::super::Foundation::BOOL { ::windows_targets::link!("wintrust.dll" "system" fn CryptSIPGetSealedDigest(psubjectinfo : *const SIP_SUBJECTINFO, psig : *const u8, dwsig : u32, pbdigest : *mut u8, pcbdigest : *mut u32) -> super::super::super::Foundation:: BOOL); - CryptSIPGetSealedDigest(psubjectinfo, ::core::mem::transmute(psig.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), psig.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pbdigest.unwrap_or(::std::ptr::null_mut())), pcbdigest) + CryptSIPGetSealedDigest(psubjectinfo, ::core::mem::transmute(psig.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), psig.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pbdigest.unwrap_or(::std::ptr::null_mut())), pcbdigest) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Security_Cryptography_Catalog\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_Cryptography_Catalog"))] 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 2b0151acaf..5dcce88a85 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Cryptography/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Cryptography/mod.rs @@ -64,14 +64,14 @@ where #[inline] pub unsafe fn BCryptCreateHash(halgorithm: BCRYPT_ALG_HANDLE, phhash: *mut BCRYPT_HASH_HANDLE, pbhashobject: ::core::option::Option<&mut [u8]>, pbsecret: ::core::option::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); - BCryptCreateHash(halgorithm, 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() 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() as _), dwflags) + BCryptCreateHash(halgorithm, 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) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptCreateMultiHash(halgorithm: BCRYPT_ALG_HANDLE, phhash: *mut BCRYPT_HASH_HANDLE, nhashes: u32, pbhashobject: ::core::option::Option<&mut [u8]>, pbsecret: ::core::option::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); - BCryptCreateMultiHash(halgorithm, 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() 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() as _), dwflags) + BCryptCreateMultiHash(halgorithm, 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) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -81,12 +81,12 @@ pub unsafe fn BCryptDecrypt(hkey: BCRYPT_KEY_HANDLE, pbinput: ::core::option::Op BCryptDecrypt( 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() as _), + pbinput.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(ppaddinginfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbiv.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - pbiv.as_deref().map_or(0, |slice| slice.len() as _), + 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() as _), + pboutput.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult, dwflags, ) @@ -110,7 +110,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("bcrypt.dll" "system" fn BCryptDeriveKey(hsharedsecret : BCRYPT_SECRET_HANDLE, pwszkdf : ::windows_core::PCWSTR, pparameterlist : *const BCryptBufferDesc, pbderivedkey : *mut u8, cbderivedkey : u32, pcbresult : *mut u32, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - BCryptDeriveKey(hsharedsecret.into_param().abi(), pwszkdf.into_param().abi(), ::core::mem::transmute(pparameterlist.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbderivedkey.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbderivedkey.as_deref().map_or(0, |slice| slice.len() as _), pcbresult, dwflags) + BCryptDeriveKey(hsharedsecret.into_param().abi(), pwszkdf.into_param().abi(), ::core::mem::transmute(pparameterlist.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbderivedkey.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbderivedkey.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult, dwflags) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -121,7 +121,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("bcrypt.dll" "system" fn BCryptDeriveKeyCapi(hhash : BCRYPT_HASH_HANDLE, htargetalg : BCRYPT_ALG_HANDLE, pbderivedkey : *mut u8, cbderivedkey : u32, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - BCryptDeriveKeyCapi(hhash.into_param().abi(), htargetalg.into_param().abi(), ::core::mem::transmute(pbderivedkey.as_ptr()), pbderivedkey.len() as _, dwflags) + BCryptDeriveKeyCapi(hhash.into_param().abi(), htargetalg.into_param().abi(), ::core::mem::transmute(pbderivedkey.as_ptr()), pbderivedkey.len().try_into().unwrap(), dwflags) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -131,7 +131,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("bcrypt.dll" "system" fn BCryptDeriveKeyPBKDF2(hprf : BCRYPT_ALG_HANDLE, pbpassword : *const u8, cbpassword : u32, pbsalt : *const u8, cbsalt : u32, citerations : u64, pbderivedkey : *mut u8, cbderivedkey : u32, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - BCryptDeriveKeyPBKDF2(hprf.into_param().abi(), ::core::mem::transmute(pbpassword.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbpassword.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pbsalt.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbsalt.as_deref().map_or(0, |slice| slice.len() as _), citerations, ::core::mem::transmute(pbderivedkey.as_ptr()), pbderivedkey.len() as _, dwflags) + BCryptDeriveKeyPBKDF2(hprf.into_param().abi(), ::core::mem::transmute(pbpassword.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbpassword.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pbsalt.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbsalt.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), citerations, ::core::mem::transmute(pbderivedkey.as_ptr()), pbderivedkey.len().try_into().unwrap(), dwflags) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -162,7 +162,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("bcrypt.dll" "system" fn BCryptDuplicateHash(hhash : BCRYPT_HASH_HANDLE, phnewhash : *mut BCRYPT_HASH_HANDLE, pbhashobject : *mut u8, cbhashobject : u32, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - BCryptDuplicateHash(hhash.into_param().abi(), 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() as _), dwflags) + BCryptDuplicateHash(hhash.into_param().abi(), 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) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -172,7 +172,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("bcrypt.dll" "system" fn BCryptDuplicateKey(hkey : BCRYPT_KEY_HANDLE, phnewkey : *mut BCRYPT_KEY_HANDLE, pbkeyobject : *mut u8, cbkeyobject : u32, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - BCryptDuplicateKey(hkey.into_param().abi(), 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() as _), dwflags) + BCryptDuplicateKey(hkey.into_param().abi(), 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) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -182,12 +182,12 @@ pub unsafe fn BCryptEncrypt(hkey: BCRYPT_KEY_HANDLE, pbinput: ::core::option::Op BCryptEncrypt( 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() as _), + pbinput.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(ppaddinginfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbiv.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - pbiv.as_deref().map_or(0, |slice| slice.len() as _), + 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() as _), + pboutput.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult, dwflags, ) @@ -254,7 +254,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("bcrypt.dll" "system" fn BCryptExportKey(hkey : BCRYPT_KEY_HANDLE, hexportkey : BCRYPT_KEY_HANDLE, pszblobtype : ::windows_core::PCWSTR, pboutput : *mut u8, cboutput : u32, pcbresult : *mut u32, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - BCryptExportKey(hkey.into_param().abi(), hexportkey.into_param().abi(), pszblobtype.into_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() as _), pcbresult, dwflags) + BCryptExportKey(hkey.into_param().abi(), hexportkey.into_param().abi(), pszblobtype.into_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, dwflags) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -268,7 +268,7 @@ pub unsafe fn BCryptFinalizeKeyPair(hkey: BCRYPT_KEY_HANDLE, dwflags: u32) -> su #[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); - BCryptFinishHash(hhash, ::core::mem::transmute(pboutput.as_ptr()), pboutput.len() as _, dwflags) + BCryptFinishHash(hhash, ::core::mem::transmute(pboutput.as_ptr()), pboutput.len().try_into().unwrap(), dwflags) } #[inline] pub unsafe fn BCryptFreeBuffer(pvbuffer: *const ::core::ffi::c_void) { @@ -283,7 +283,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("bcrypt.dll" "system" fn BCryptGenRandom(halgorithm : BCRYPT_ALG_HANDLE, pbbuffer : *mut u8, cbbuffer : u32, dwflags : BCRYPTGENRANDOM_FLAGS) -> super::super::Foundation:: NTSTATUS); - BCryptGenRandom(halgorithm.into_param().abi(), ::core::mem::transmute(pbbuffer.as_ptr()), pbbuffer.len() as _, dwflags) + BCryptGenRandom(halgorithm.into_param().abi(), ::core::mem::transmute(pbbuffer.as_ptr()), pbbuffer.len().try_into().unwrap(), dwflags) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -297,7 +297,7 @@ pub unsafe fn BCryptGenerateKeyPair(halgorithm: BCRYPT_ALG_HANDLE, phkey: *mut B #[inline] pub unsafe fn BCryptGenerateSymmetricKey(halgorithm: BCRYPT_ALG_HANDLE, phkey: *mut BCRYPT_KEY_HANDLE, pbkeyobject: ::core::option::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); - BCryptGenerateSymmetricKey(halgorithm, 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() as _), ::core::mem::transmute(pbsecret.as_ptr()), pbsecret.len() as _, dwflags) + BCryptGenerateSymmetricKey(halgorithm, 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) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -315,21 +315,21 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("bcrypt.dll" "system" fn BCryptGetProperty(hobject : BCRYPT_HANDLE, pszproperty : ::windows_core::PCWSTR, pboutput : *mut u8, cboutput : u32, pcbresult : *mut u32, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - BCryptGetProperty(hobject.into_param().abi(), pszproperty.into_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() as _), pcbresult, dwflags) + BCryptGetProperty(hobject.into_param().abi(), pszproperty.into_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, dwflags) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn BCryptHash(halgorithm: BCRYPT_ALG_HANDLE, pbsecret: ::core::option::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); - BCryptHash(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() as _), ::core::mem::transmute(pbinput.as_ptr()), pbinput.len() as _, ::core::mem::transmute(pboutput.as_ptr()), pboutput.len() as _) + BCryptHash(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()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[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); - BCryptHashData(hhash, ::core::mem::transmute(pbinput.as_ptr()), pbinput.len() as _, dwflags) + BCryptHashData(hhash, ::core::mem::transmute(pbinput.as_ptr()), pbinput.len().try_into().unwrap(), dwflags) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -341,7 +341,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("bcrypt.dll" "system" fn BCryptImportKey(halgorithm : BCRYPT_ALG_HANDLE, himportkey : BCRYPT_KEY_HANDLE, pszblobtype : ::windows_core::PCWSTR, phkey : *mut BCRYPT_KEY_HANDLE, pbkeyobject : *mut u8, cbkeyobject : u32, pbinput : *const u8, cbinput : u32, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - BCryptImportKey(halgorithm.into_param().abi(), himportkey.into_param().abi(), pszblobtype.into_param().abi(), 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() as _), ::core::mem::transmute(pbinput.as_ptr()), pbinput.len() as _, dwflags) + BCryptImportKey(halgorithm.into_param().abi(), himportkey.into_param().abi(), pszblobtype.into_param().abi(), 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) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -353,7 +353,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("bcrypt.dll" "system" fn BCryptImportKeyPair(halgorithm : BCRYPT_ALG_HANDLE, himportkey : BCRYPT_KEY_HANDLE, pszblobtype : ::windows_core::PCWSTR, phkey : *mut BCRYPT_KEY_HANDLE, pbinput : *const u8, cbinput : u32, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - BCryptImportKeyPair(halgorithm.into_param().abi(), himportkey.into_param().abi(), pszblobtype.into_param().abi(), phkey, ::core::mem::transmute(pbinput.as_ptr()), pbinput.len() as _, dwflags) + BCryptImportKeyPair(halgorithm.into_param().abi(), himportkey.into_param().abi(), pszblobtype.into_param().abi(), phkey, ::core::mem::transmute(pbinput.as_ptr()), pbinput.len().try_into().unwrap(), dwflags) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -363,7 +363,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("bcrypt.dll" "system" fn BCryptKeyDerivation(hkey : BCRYPT_KEY_HANDLE, pparameterlist : *const BCryptBufferDesc, pbderivedkey : *mut u8, cbderivedkey : u32, pcbresult : *mut u32, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - BCryptKeyDerivation(hkey.into_param().abi(), ::core::mem::transmute(pparameterlist.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbderivedkey.as_ptr()), pbderivedkey.len() as _, pcbresult, dwflags) + BCryptKeyDerivation(hkey.into_param().abi(), ::core::mem::transmute(pparameterlist.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbderivedkey.as_ptr()), pbderivedkey.len().try_into().unwrap(), pcbresult, dwflags) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -477,7 +477,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("bcrypt.dll" "system" fn BCryptSetContextFunctionProperty(dwtable : BCRYPT_TABLE, pszcontext : ::windows_core::PCWSTR, dwinterface : BCRYPT_INTERFACE, pszfunction : ::windows_core::PCWSTR, pszproperty : ::windows_core::PCWSTR, cbvalue : u32, pbvalue : *const u8) -> super::super::Foundation:: NTSTATUS); - BCryptSetContextFunctionProperty(dwtable, pszcontext.into_param().abi(), dwinterface, pszfunction.into_param().abi(), pszproperty.into_param().abi(), pbvalue.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pbvalue.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + BCryptSetContextFunctionProperty(dwtable, pszcontext.into_param().abi(), dwinterface, pszfunction.into_param().abi(), pszproperty.into_param().abi(), pbvalue.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pbvalue.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -487,7 +487,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::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); - BCryptSetProperty(hobject, pszproperty.into_param().abi(), ::core::mem::transmute(pbinput.as_ptr()), pbinput.len() as _, dwflags) + BCryptSetProperty(hobject, pszproperty.into_param().abi(), ::core::mem::transmute(pbinput.as_ptr()), pbinput.len().try_into().unwrap(), dwflags) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -497,7 +497,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("bcrypt.dll" "system" fn BCryptSignHash(hkey : BCRYPT_KEY_HANDLE, ppaddinginfo : *const ::core::ffi::c_void, pbinput : *const u8, cbinput : u32, pboutput : *mut u8, cboutput : u32, pcbresult : *mut u32, dwflags : BCRYPT_FLAGS) -> super::super::Foundation:: NTSTATUS); - BCryptSignHash(hkey.into_param().abi(), ::core::mem::transmute(ppaddinginfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbinput.as_ptr()), pbinput.len() 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() as _), pcbresult, dwflags) + BCryptSignHash(hkey.into_param().abi(), ::core::mem::transmute(ppaddinginfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbinput.as_ptr()), pbinput.len().try_into().unwrap(), ::core::mem::transmute(pboutput.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pboutput.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult, dwflags) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -517,7 +517,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("bcrypt.dll" "system" fn BCryptVerifySignature(hkey : BCRYPT_KEY_HANDLE, ppaddinginfo : *const ::core::ffi::c_void, pbhash : *const u8, cbhash : u32, pbsignature : *const u8, cbsignature : u32, dwflags : BCRYPT_FLAGS) -> super::super::Foundation:: NTSTATUS); - BCryptVerifySignature(hkey.into_param().abi(), ::core::mem::transmute(ppaddinginfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbhash.as_ptr()), pbhash.len() as _, ::core::mem::transmute(pbsignature.as_ptr()), pbsignature.len() as _, dwflags) + BCryptVerifySignature(hkey.into_param().abi(), ::core::mem::transmute(ppaddinginfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbhash.as_ptr()), pbhash.len().try_into().unwrap(), ::core::mem::transmute(pbsignature.as_ptr()), pbsignature.len().try_into().unwrap(), dwflags) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -587,7 +587,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CertAddEncodedCRLToStore(hcertstore : HCERTSTORE, dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, pbcrlencoded : *const u8, cbcrlencoded : u32, dwadddisposition : u32, ppcrlcontext : *mut *mut CRL_CONTEXT) -> super::super::Foundation:: BOOL); - CertAddEncodedCRLToStore(hcertstore.into_param().abi(), dwcertencodingtype, ::core::mem::transmute(pbcrlencoded.as_ptr()), pbcrlencoded.len() as _, dwadddisposition, ::core::mem::transmute(ppcrlcontext.unwrap_or(::std::ptr::null_mut()))).ok() + CertAddEncodedCRLToStore(hcertstore.into_param().abi(), dwcertencodingtype, ::core::mem::transmute(pbcrlencoded.as_ptr()), pbcrlencoded.len().try_into().unwrap(), dwadddisposition, ::core::mem::transmute(ppcrlcontext.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -597,7 +597,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CertAddEncodedCTLToStore(hcertstore : HCERTSTORE, dwmsgandcertencodingtype : CERT_QUERY_ENCODING_TYPE, pbctlencoded : *const u8, cbctlencoded : u32, dwadddisposition : u32, ppctlcontext : *mut *mut CTL_CONTEXT) -> super::super::Foundation:: BOOL); - CertAddEncodedCTLToStore(hcertstore.into_param().abi(), dwmsgandcertencodingtype, ::core::mem::transmute(pbctlencoded.as_ptr()), pbctlencoded.len() as _, dwadddisposition, ::core::mem::transmute(ppctlcontext.unwrap_or(::std::ptr::null_mut()))).ok() + CertAddEncodedCTLToStore(hcertstore.into_param().abi(), dwmsgandcertencodingtype, ::core::mem::transmute(pbctlencoded.as_ptr()), pbctlencoded.len().try_into().unwrap(), dwadddisposition, ::core::mem::transmute(ppctlcontext.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -607,7 +607,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CertAddEncodedCertificateToStore(hcertstore : HCERTSTORE, dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, pbcertencoded : *const u8, cbcertencoded : u32, dwadddisposition : u32, ppcertcontext : *mut *mut CERT_CONTEXT) -> super::super::Foundation:: BOOL); - CertAddEncodedCertificateToStore(hcertstore.into_param().abi(), dwcertencodingtype, ::core::mem::transmute(pbcertencoded.as_ptr()), pbcertencoded.len() as _, dwadddisposition, ::core::mem::transmute(ppcertcontext.unwrap_or(::std::ptr::null_mut()))).ok() + CertAddEncodedCertificateToStore(hcertstore.into_param().abi(), dwcertencodingtype, ::core::mem::transmute(pbcertencoded.as_ptr()), pbcertencoded.len().try_into().unwrap(), dwadddisposition, ::core::mem::transmute(ppcertcontext.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -617,7 +617,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CertAddEncodedCertificateToSystemStoreA(szcertstorename : ::windows_core::PCSTR, pbcertencoded : *const u8, cbcertencoded : u32) -> super::super::Foundation:: BOOL); - CertAddEncodedCertificateToSystemStoreA(szcertstorename.into_param().abi(), ::core::mem::transmute(pbcertencoded.as_ptr()), pbcertencoded.len() as _).ok() + CertAddEncodedCertificateToSystemStoreA(szcertstorename.into_param().abi(), ::core::mem::transmute(pbcertencoded.as_ptr()), pbcertencoded.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -627,7 +627,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CertAddEncodedCertificateToSystemStoreW(szcertstorename : ::windows_core::PCWSTR, pbcertencoded : *const u8, cbcertencoded : u32) -> super::super::Foundation:: BOOL); - CertAddEncodedCertificateToSystemStoreW(szcertstorename.into_param().abi(), ::core::mem::transmute(pbcertencoded.as_ptr()), pbcertencoded.len() as _).ok() + CertAddEncodedCertificateToSystemStoreW(szcertstorename.into_param().abi(), ::core::mem::transmute(pbcertencoded.as_ptr()), pbcertencoded.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -657,7 +657,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CertAddSerializedElementToStore(hcertstore : HCERTSTORE, pbelement : *const u8, cbelement : u32, dwadddisposition : u32, dwflags : u32, dwcontexttypeflags : u32, pdwcontexttype : *mut u32, ppvcontext : *mut *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - CertAddSerializedElementToStore(hcertstore.into_param().abi(), ::core::mem::transmute(pbelement.as_ptr()), pbelement.len() as _, dwadddisposition, dwflags, dwcontexttypeflags, ::core::mem::transmute(pdwcontexttype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppvcontext.unwrap_or(::std::ptr::null_mut()))).ok() + CertAddSerializedElementToStore(hcertstore.into_param().abi(), ::core::mem::transmute(pbelement.as_ptr()), pbelement.len().try_into().unwrap(), dwadddisposition, dwflags, dwcontexttypeflags, ::core::mem::transmute(pdwcontexttype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppvcontext.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -733,21 +733,21 @@ where #[inline] pub unsafe fn CertCreateCRLContext(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pbcrlencoded: &[u8]) -> *mut CRL_CONTEXT { ::windows_targets::link!("crypt32.dll" "system" fn CertCreateCRLContext(dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, pbcrlencoded : *const u8, cbcrlencoded : u32) -> *mut CRL_CONTEXT); - CertCreateCRLContext(dwcertencodingtype, ::core::mem::transmute(pbcrlencoded.as_ptr()), pbcrlencoded.len() as _) + CertCreateCRLContext(dwcertencodingtype, ::core::mem::transmute(pbcrlencoded.as_ptr()), pbcrlencoded.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertCreateCTLContext(dwmsgandcertencodingtype: u32, pbctlencoded: &[u8]) -> *mut CTL_CONTEXT { ::windows_targets::link!("crypt32.dll" "system" fn CertCreateCTLContext(dwmsgandcertencodingtype : u32, pbctlencoded : *const u8, cbctlencoded : u32) -> *mut CTL_CONTEXT); - CertCreateCTLContext(dwmsgandcertencodingtype, ::core::mem::transmute(pbctlencoded.as_ptr()), pbctlencoded.len() as _) + CertCreateCTLContext(dwmsgandcertencodingtype, ::core::mem::transmute(pbctlencoded.as_ptr()), pbctlencoded.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertCreateCTLEntryFromCertificateContextProperties(pcertcontext: *const CERT_CONTEXT, rgoptattr: ::core::option::Option<&[CRYPT_ATTRIBUTE]>, dwflags: u32, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>, pctlentry: ::core::option::Option<*mut CTL_ENTRY>, pcbctlentry: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CertCreateCTLEntryFromCertificateContextProperties(pcertcontext : *const CERT_CONTEXT, coptattr : u32, rgoptattr : *const CRYPT_ATTRIBUTE, dwflags : u32, pvreserved : *const ::core::ffi::c_void, pctlentry : *mut CTL_ENTRY, pcbctlentry : *mut u32) -> super::super::Foundation:: BOOL); - CertCreateCTLEntryFromCertificateContextProperties(pcertcontext, rgoptattr.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rgoptattr.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dwflags, ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pctlentry.unwrap_or(::std::ptr::null_mut())), pcbctlentry).ok() + CertCreateCTLEntryFromCertificateContextProperties(pcertcontext, rgoptattr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(rgoptattr.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dwflags, ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pctlentry.unwrap_or(::std::ptr::null_mut())), pcbctlentry).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -761,14 +761,14 @@ pub unsafe fn CertCreateCertificateChainEngine(pconfig: *const CERT_CHAIN_ENGINE #[inline] pub unsafe fn CertCreateCertificateContext(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pbcertencoded: &[u8]) -> *mut CERT_CONTEXT { ::windows_targets::link!("crypt32.dll" "system" fn CertCreateCertificateContext(dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, pbcertencoded : *const u8, cbcertencoded : u32) -> *mut CERT_CONTEXT); - CertCreateCertificateContext(dwcertencodingtype, ::core::mem::transmute(pbcertencoded.as_ptr()), pbcertencoded.len() as _) + CertCreateCertificateContext(dwcertencodingtype, ::core::mem::transmute(pbcertencoded.as_ptr()), pbcertencoded.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertCreateContext(dwcontexttype: u32, dwencodingtype: u32, pbencoded: &[u8], dwflags: u32, pcreatepara: ::core::option::Option<*const CERT_CREATE_CONTEXT_PARA>) -> *mut ::core::ffi::c_void { ::windows_targets::link!("crypt32.dll" "system" fn CertCreateContext(dwcontexttype : u32, dwencodingtype : u32, pbencoded : *const u8, cbencoded : u32, dwflags : u32, pcreatepara : *const CERT_CREATE_CONTEXT_PARA) -> *mut ::core::ffi::c_void); - CertCreateContext(dwcontexttype, dwencodingtype, ::core::mem::transmute(pbencoded.as_ptr()), pbencoded.len() as _, dwflags, ::core::mem::transmute(pcreatepara.unwrap_or(::std::ptr::null()))) + CertCreateContext(dwcontexttype, dwencodingtype, ::core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), dwflags, ::core::mem::transmute(pcreatepara.unwrap_or(::std::ptr::null()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -922,7 +922,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CertFindAttribute(pszobjid : ::windows_core::PCSTR, cattr : u32, rgattr : *const CRYPT_ATTRIBUTE) -> *mut CRYPT_ATTRIBUTE); - CertFindAttribute(pszobjid.into_param().abi(), rgattr.len() as _, ::core::mem::transmute(rgattr.as_ptr())) + CertFindAttribute(pszobjid.into_param().abi(), rgattr.len().try_into().unwrap(), ::core::mem::transmute(rgattr.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -979,7 +979,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CertFindExtension(pszobjid : ::windows_core::PCSTR, cextensions : u32, rgextensions : *const CERT_EXTENSION) -> *mut CERT_EXTENSION); - CertFindExtension(pszobjid.into_param().abi(), rgextensions.len() as _, ::core::mem::transmute(rgextensions.as_ptr())) + CertFindExtension(pszobjid.into_param().abi(), rgextensions.len().try_into().unwrap(), ::core::mem::transmute(rgextensions.as_ptr())) } #[inline] pub unsafe fn CertFindRDNAttr(pszobjid: P0, pname: *const CERT_NAME_INFO) -> *mut CERT_RDN_ATTR @@ -1105,7 +1105,7 @@ pub unsafe fn CertGetEnhancedKeyUsage(pcertcontext: *const CERT_CONTEXT, dwflags #[inline] pub unsafe fn CertGetIntendedKeyUsage(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pcertinfo: *const CERT_INFO, pbkeyusage: &mut [u8]) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CertGetIntendedKeyUsage(dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, pcertinfo : *const CERT_INFO, pbkeyusage : *mut u8, cbkeyusage : u32) -> super::super::Foundation:: BOOL); - CertGetIntendedKeyUsage(dwcertencodingtype, pcertinfo, ::core::mem::transmute(pbkeyusage.as_ptr()), pbkeyusage.len() as _).ok() + CertGetIntendedKeyUsage(dwcertencodingtype, pcertinfo, ::core::mem::transmute(pbkeyusage.as_ptr()), pbkeyusage.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1122,14 +1122,14 @@ where #[inline] pub unsafe fn CertGetNameStringA(pcertcontext: *const CERT_CONTEXT, dwtype: u32, dwflags: u32, pvtypepara: ::core::option::Option<*const ::core::ffi::c_void>, psznamestring: ::core::option::Option<&mut [u8]>) -> u32 { ::windows_targets::link!("crypt32.dll" "system" fn CertGetNameStringA(pcertcontext : *const CERT_CONTEXT, dwtype : u32, dwflags : u32, pvtypepara : *const ::core::ffi::c_void, psznamestring : ::windows_core::PSTR, cchnamestring : u32) -> u32); - CertGetNameStringA(pcertcontext, dwtype, dwflags, ::core::mem::transmute(pvtypepara.unwrap_or(::std::ptr::null())), ::core::mem::transmute(psznamestring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), psznamestring.as_deref().map_or(0, |slice| slice.len() as _)) + CertGetNameStringA(pcertcontext, dwtype, dwflags, ::core::mem::transmute(pvtypepara.unwrap_or(::std::ptr::null())), ::core::mem::transmute(psznamestring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), psznamestring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CertGetNameStringW(pcertcontext: *const CERT_CONTEXT, dwtype: u32, dwflags: u32, pvtypepara: ::core::option::Option<*const ::core::ffi::c_void>, psznamestring: ::core::option::Option<&mut [u16]>) -> u32 { ::windows_targets::link!("crypt32.dll" "system" fn CertGetNameStringW(pcertcontext : *const CERT_CONTEXT, dwtype : u32, dwflags : u32, pvtypepara : *const ::core::ffi::c_void, psznamestring : ::windows_core::PWSTR, cchnamestring : u32) -> u32); - CertGetNameStringW(pcertcontext, dwtype, dwflags, ::core::mem::transmute(pvtypepara.unwrap_or(::std::ptr::null())), ::core::mem::transmute(psznamestring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), psznamestring.as_deref().map_or(0, |slice| slice.len() as _)) + CertGetNameStringW(pcertcontext, dwtype, dwflags, ::core::mem::transmute(pvtypepara.unwrap_or(::std::ptr::null())), ::core::mem::transmute(psznamestring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), psznamestring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn CertGetPublicKeyLength(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, ppublickey: *const CERT_PUBLIC_KEY_INFO) -> u32 { @@ -1166,7 +1166,7 @@ where #[inline] pub unsafe fn CertGetValidUsages(rghcerts: &[*const CERT_CONTEXT], cnumoids: *mut i32, rghoids: ::core::option::Option<*mut ::windows_core::PSTR>, pcboids: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CertGetValidUsages(ccerts : u32, rghcerts : *const *const CERT_CONTEXT, cnumoids : *mut i32, rghoids : *mut ::windows_core::PSTR, pcboids : *mut u32) -> super::super::Foundation:: BOOL); - CertGetValidUsages(rghcerts.len() as _, ::core::mem::transmute(rghcerts.as_ptr()), cnumoids, ::core::mem::transmute(rghoids.unwrap_or(::std::ptr::null_mut())), pcboids).ok() + CertGetValidUsages(rghcerts.len().try_into().unwrap(), ::core::mem::transmute(rghcerts.as_ptr()), cnumoids, ::core::mem::transmute(rghoids.unwrap_or(::std::ptr::null_mut())), pcboids).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1206,12 +1206,12 @@ where #[inline] pub unsafe fn CertNameToStrA(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pname: *const CRYPT_INTEGER_BLOB, dwstrtype: CERT_STRING_TYPE, psz: ::core::option::Option<&mut [u8]>) -> u32 { ::windows_targets::link!("crypt32.dll" "system" fn CertNameToStrA(dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, pname : *const CRYPT_INTEGER_BLOB, dwstrtype : CERT_STRING_TYPE, psz : ::windows_core::PSTR, csz : u32) -> u32); - CertNameToStrA(dwcertencodingtype, pname, dwstrtype, ::core::mem::transmute(psz.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), psz.as_deref().map_or(0, |slice| slice.len() as _)) + CertNameToStrA(dwcertencodingtype, pname, dwstrtype, ::core::mem::transmute(psz.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), psz.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn CertNameToStrW(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pname: *const CRYPT_INTEGER_BLOB, dwstrtype: CERT_STRING_TYPE, psz: ::core::option::Option<&mut [u16]>) -> u32 { ::windows_targets::link!("crypt32.dll" "system" fn CertNameToStrW(dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, pname : *const CRYPT_INTEGER_BLOB, dwstrtype : CERT_STRING_TYPE, psz : ::windows_core::PWSTR, csz : u32) -> u32); - CertNameToStrW(dwcertencodingtype, pname, dwstrtype, ::core::mem::transmute(psz.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), psz.as_deref().map_or(0, |slice| slice.len() as _)) + CertNameToStrW(dwcertencodingtype, pname, dwstrtype, ::core::mem::transmute(psz.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), psz.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn CertOIDToAlgId(pszobjid: P0) -> u32 @@ -1261,12 +1261,12 @@ where #[inline] pub unsafe fn CertRDNValueToStrA(dwvaluetype: u32, pvalue: *const CRYPT_INTEGER_BLOB, psz: ::core::option::Option<&mut [u8]>) -> u32 { ::windows_targets::link!("crypt32.dll" "system" fn CertRDNValueToStrA(dwvaluetype : u32, pvalue : *const CRYPT_INTEGER_BLOB, psz : ::windows_core::PSTR, csz : u32) -> u32); - CertRDNValueToStrA(dwvaluetype, pvalue, ::core::mem::transmute(psz.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), psz.as_deref().map_or(0, |slice| slice.len() as _)) + CertRDNValueToStrA(dwvaluetype, pvalue, ::core::mem::transmute(psz.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), psz.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn CertRDNValueToStrW(dwvaluetype: u32, pvalue: *const CRYPT_INTEGER_BLOB, psz: ::core::option::Option<&mut [u16]>) -> u32 { ::windows_targets::link!("crypt32.dll" "system" fn CertRDNValueToStrW(dwvaluetype : u32, pvalue : *const CRYPT_INTEGER_BLOB, psz : ::windows_core::PWSTR, csz : u32) -> u32); - CertRDNValueToStrW(dwvaluetype, pvalue, ::core::mem::transmute(psz.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), psz.as_deref().map_or(0, |slice| slice.len() as _)) + CertRDNValueToStrW(dwvaluetype, pvalue, ::core::mem::transmute(psz.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), psz.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1342,7 +1342,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CertSelectCertificateChains(pselectioncontext : *const ::windows_core::GUID, dwflags : u32, pchainparameters : *const CERT_SELECT_CHAIN_PARA, ccriteria : u32, rgpcriteria : *const CERT_SELECT_CRITERIA, hstore : HCERTSTORE, pcselection : *mut u32, pprgpselection : *mut *mut *mut CERT_CHAIN_CONTEXT) -> super::super::Foundation:: BOOL); - CertSelectCertificateChains(::core::mem::transmute(pselectioncontext.unwrap_or(::std::ptr::null())), dwflags, ::core::mem::transmute(pchainparameters.unwrap_or(::std::ptr::null())), rgpcriteria.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rgpcriteria.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), hstore.into_param().abi(), pcselection, pprgpselection).ok() + CertSelectCertificateChains(::core::mem::transmute(pselectioncontext.unwrap_or(::std::ptr::null())), dwflags, ::core::mem::transmute(pchainparameters.unwrap_or(::std::ptr::null())), rgpcriteria.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(rgpcriteria.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), hstore.into_param().abi(), pcselection, pprgpselection).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1452,7 +1452,7 @@ pub unsafe fn CertUnregisterSystemStore(pvsystemstore: *const ::core::ffi::c_voi #[inline] pub unsafe fn CertVerifyCRLRevocation(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pcertid: *const CERT_INFO, rgpcrlinfo: &[*const CRL_INFO]) -> super::super::Foundation::BOOL { ::windows_targets::link!("crypt32.dll" "system" fn CertVerifyCRLRevocation(dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, pcertid : *const CERT_INFO, ccrlinfo : u32, rgpcrlinfo : *const *const CRL_INFO) -> super::super::Foundation:: BOOL); - CertVerifyCRLRevocation(dwcertencodingtype, pcertid, rgpcrlinfo.len() as _, ::core::mem::transmute(rgpcrlinfo.as_ptr())) + CertVerifyCRLRevocation(dwcertencodingtype, pcertid, rgpcrlinfo.len().try_into().unwrap(), ::core::mem::transmute(rgpcrlinfo.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1483,7 +1483,7 @@ where #[inline] pub unsafe fn CertVerifyRevocation(dwencodingtype: u32, dwrevtype: u32, rgpvcontext: &[*const ::core::ffi::c_void], dwflags: u32, prevpara: ::core::option::Option<*const CERT_REVOCATION_PARA>, prevstatus: *mut CERT_REVOCATION_STATUS) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CertVerifyRevocation(dwencodingtype : u32, dwrevtype : u32, ccontext : u32, rgpvcontext : *const *const ::core::ffi::c_void, dwflags : u32, prevpara : *const CERT_REVOCATION_PARA, prevstatus : *mut CERT_REVOCATION_STATUS) -> super::super::Foundation:: BOOL); - CertVerifyRevocation(dwencodingtype, dwrevtype, rgpvcontext.len() as _, ::core::mem::transmute(rgpvcontext.as_ptr()), dwflags, ::core::mem::transmute(prevpara.unwrap_or(::std::ptr::null())), prevstatus).ok() + CertVerifyRevocation(dwencodingtype, dwrevtype, rgpvcontext.len().try_into().unwrap(), ::core::mem::transmute(rgpvcontext.as_ptr()), dwflags, ::core::mem::transmute(prevpara.unwrap_or(::std::ptr::null())), prevstatus).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1545,14 +1545,14 @@ where #[inline] pub unsafe fn CryptBinaryToStringA(pbbinary: &[u8], dwflags: CRYPT_STRING, pszstring: ::windows_core::PSTR, pcchstring: *mut u32) -> super::super::Foundation::BOOL { ::windows_targets::link!("crypt32.dll" "system" fn CryptBinaryToStringA(pbbinary : *const u8, cbbinary : u32, dwflags : CRYPT_STRING, pszstring : ::windows_core::PSTR, pcchstring : *mut u32) -> super::super::Foundation:: BOOL); - CryptBinaryToStringA(::core::mem::transmute(pbbinary.as_ptr()), pbbinary.len() as _, dwflags, ::core::mem::transmute(pszstring), pcchstring) + CryptBinaryToStringA(::core::mem::transmute(pbbinary.as_ptr()), pbbinary.len().try_into().unwrap(), dwflags, ::core::mem::transmute(pszstring), pcchstring) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptBinaryToStringW(pbbinary: &[u8], dwflags: CRYPT_STRING, pszstring: ::windows_core::PWSTR, pcchstring: *mut u32) -> super::super::Foundation::BOOL { ::windows_targets::link!("crypt32.dll" "system" fn CryptBinaryToStringW(pbbinary : *const u8, cbbinary : u32, dwflags : CRYPT_STRING, pszstring : ::windows_core::PWSTR, pcchstring : *mut u32) -> super::super::Foundation:: BOOL); - CryptBinaryToStringW(::core::mem::transmute(pbbinary.as_ptr()), pbbinary.len() as _, dwflags, ::core::mem::transmute(pszstring), pcchstring) + CryptBinaryToStringW(::core::mem::transmute(pbbinary.as_ptr()), pbbinary.len().try_into().unwrap(), dwflags, ::core::mem::transmute(pszstring), pcchstring) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1606,7 +1606,7 @@ pub unsafe fn CryptDecodeMessage(dwmsgtypeflags: u32, pdecryptpara: ::core::opti ::core::mem::transmute(pverifypara.unwrap_or(::std::ptr::null())), dwsignerindex, ::core::mem::transmute(pbencodedblob.as_ptr()), - pbencodedblob.len() as _, + pbencodedblob.len().try_into().unwrap(), dwprevinnercontenttype, ::core::mem::transmute(pdwmsgtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdwinnercontenttype.unwrap_or(::std::ptr::null_mut())), @@ -1625,7 +1625,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CryptDecodeObject(dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, lpszstructtype : ::windows_core::PCSTR, pbencoded : *const u8, cbencoded : u32, dwflags : u32, pvstructinfo : *mut ::core::ffi::c_void, pcbstructinfo : *mut u32) -> super::super::Foundation:: BOOL); - CryptDecodeObject(dwcertencodingtype, lpszstructtype.into_param().abi(), ::core::mem::transmute(pbencoded.as_ptr()), pbencoded.len() as _, dwflags, ::core::mem::transmute(pvstructinfo.unwrap_or(::std::ptr::null_mut())), pcbstructinfo).ok() + CryptDecodeObject(dwcertencodingtype, lpszstructtype.into_param().abi(), ::core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), dwflags, ::core::mem::transmute(pvstructinfo.unwrap_or(::std::ptr::null_mut())), pcbstructinfo).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1635,7 +1635,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CryptDecodeObjectEx(dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, lpszstructtype : ::windows_core::PCSTR, pbencoded : *const u8, cbencoded : u32, dwflags : u32, pdecodepara : *const CRYPT_DECODE_PARA, pvstructinfo : *mut ::core::ffi::c_void, pcbstructinfo : *mut u32) -> super::super::Foundation:: BOOL); - CryptDecodeObjectEx(dwcertencodingtype, lpszstructtype.into_param().abi(), ::core::mem::transmute(pbencoded.as_ptr()), pbencoded.len() as _, dwflags, ::core::mem::transmute(pdecodepara.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pvstructinfo.unwrap_or(::std::ptr::null_mut())), pcbstructinfo).ok() + CryptDecodeObjectEx(dwcertencodingtype, lpszstructtype.into_param().abi(), ::core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), dwflags, ::core::mem::transmute(pdecodepara.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pvstructinfo.unwrap_or(::std::ptr::null_mut())), pcbstructinfo).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1652,14 +1652,14 @@ where #[inline] pub unsafe fn CryptDecryptAndVerifyMessageSignature(pdecryptpara: *const CRYPT_DECRYPT_MESSAGE_PARA, pverifypara: *const CRYPT_VERIFY_MESSAGE_PARA, dwsignerindex: u32, pbencryptedblob: &[u8], pbdecrypted: ::core::option::Option<*mut u8>, pcbdecrypted: ::core::option::Option<*mut u32>, ppxchgcert: ::core::option::Option<*mut *mut CERT_CONTEXT>, ppsignercert: ::core::option::Option<*mut *mut CERT_CONTEXT>) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptDecryptAndVerifyMessageSignature(pdecryptpara : *const CRYPT_DECRYPT_MESSAGE_PARA, pverifypara : *const CRYPT_VERIFY_MESSAGE_PARA, dwsignerindex : u32, pbencryptedblob : *const u8, cbencryptedblob : u32, pbdecrypted : *mut u8, pcbdecrypted : *mut u32, ppxchgcert : *mut *mut CERT_CONTEXT, ppsignercert : *mut *mut CERT_CONTEXT) -> super::super::Foundation:: BOOL); - CryptDecryptAndVerifyMessageSignature(pdecryptpara, pverifypara, dwsignerindex, ::core::mem::transmute(pbencryptedblob.as_ptr()), pbencryptedblob.len() as _, ::core::mem::transmute(pbdecrypted.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdecrypted.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppxchgcert.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppsignercert.unwrap_or(::std::ptr::null_mut()))).ok() + CryptDecryptAndVerifyMessageSignature(pdecryptpara, pverifypara, dwsignerindex, ::core::mem::transmute(pbencryptedblob.as_ptr()), pbencryptedblob.len().try_into().unwrap(), ::core::mem::transmute(pbdecrypted.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdecrypted.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppxchgcert.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppsignercert.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptDecryptMessage(pdecryptpara: *const CRYPT_DECRYPT_MESSAGE_PARA, pbencryptedblob: &[u8], pbdecrypted: ::core::option::Option<*mut u8>, pcbdecrypted: ::core::option::Option<*mut u32>, ppxchgcert: ::core::option::Option<*mut *mut CERT_CONTEXT>) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptDecryptMessage(pdecryptpara : *const CRYPT_DECRYPT_MESSAGE_PARA, pbencryptedblob : *const u8, cbencryptedblob : u32, pbdecrypted : *mut u8, pcbdecrypted : *mut u32, ppxchgcert : *mut *mut CERT_CONTEXT) -> super::super::Foundation:: BOOL); - CryptDecryptMessage(pdecryptpara, ::core::mem::transmute(pbencryptedblob.as_ptr()), pbencryptedblob.len() as _, ::core::mem::transmute(pbdecrypted.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdecrypted.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppxchgcert.unwrap_or(::std::ptr::null_mut()))).ok() + CryptDecryptMessage(pdecryptpara, ::core::mem::transmute(pbencryptedblob.as_ptr()), pbencryptedblob.len().try_into().unwrap(), ::core::mem::transmute(pbdecrypted.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdecrypted.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppxchgcert.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1724,14 +1724,14 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn CryptEncrypt(hkey : usize, hhash : usize, r#final : super::super::Foundation:: BOOL, dwflags : u32, pbdata : *mut u8, pdwdatalen : *mut u32, dwbuflen : u32) -> super::super::Foundation:: BOOL); - CryptEncrypt(hkey, hhash, r#final.into_param().abi(), dwflags, ::core::mem::transmute(pbdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdwdatalen, pbdata.as_deref().map_or(0, |slice| slice.len() as _)).ok() + CryptEncrypt(hkey, hhash, r#final.into_param().abi(), dwflags, ::core::mem::transmute(pbdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdwdatalen, pbdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptEncryptMessage(pencryptpara: *const CRYPT_ENCRYPT_MESSAGE_PARA, rgprecipientcert: &[*const CERT_CONTEXT], pbtobeencrypted: ::core::option::Option<&[u8]>, pbencryptedblob: ::core::option::Option<*mut u8>, pcbencryptedblob: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptEncryptMessage(pencryptpara : *const CRYPT_ENCRYPT_MESSAGE_PARA, crecipientcert : u32, rgprecipientcert : *const *const CERT_CONTEXT, pbtobeencrypted : *const u8, cbtobeencrypted : u32, pbencryptedblob : *mut u8, pcbencryptedblob : *mut u32) -> super::super::Foundation:: BOOL); - CryptEncryptMessage(pencryptpara, rgprecipientcert.len() as _, ::core::mem::transmute(rgprecipientcert.as_ptr()), ::core::mem::transmute(pbtobeencrypted.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbtobeencrypted.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pbencryptedblob.unwrap_or(::std::ptr::null_mut())), pcbencryptedblob).ok() + CryptEncryptMessage(pencryptpara, rgprecipientcert.len().try_into().unwrap(), ::core::mem::transmute(rgprecipientcert.as_ptr()), ::core::mem::transmute(pbtobeencrypted.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbtobeencrypted.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pbencryptedblob.unwrap_or(::std::ptr::null_mut())), pcbencryptedblob).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1866,7 +1866,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CryptFormatObject(dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, dwformattype : u32, dwformatstrtype : u32, pformatstruct : *const ::core::ffi::c_void, lpszstructtype : ::windows_core::PCSTR, pbencoded : *const u8, cbencoded : u32, pbformat : *mut ::core::ffi::c_void, pcbformat : *mut u32) -> super::super::Foundation:: BOOL); - CryptFormatObject(dwcertencodingtype, dwformattype, dwformatstrtype, ::core::mem::transmute(pformatstruct.unwrap_or(::std::ptr::null())), lpszstructtype.into_param().abi(), ::core::mem::transmute(pbencoded.as_ptr()), pbencoded.len() as _, ::core::mem::transmute(pbformat.unwrap_or(::std::ptr::null_mut())), pcbformat).ok() + CryptFormatObject(dwcertencodingtype, dwformattype, dwformatstrtype, ::core::mem::transmute(pformatstruct.unwrap_or(::std::ptr::null())), lpszstructtype.into_param().abi(), ::core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), ::core::mem::transmute(pbformat.unwrap_or(::std::ptr::null_mut())), pcbformat).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1887,7 +1887,7 @@ pub unsafe fn CryptGenKey(hprov: usize, algid: ALG_ID, dwflags: CRYPT_KEY_FLAGS, #[inline] pub unsafe fn CryptGenRandom(hprov: usize, pbbuffer: &mut [u8]) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CryptGenRandom(hprov : usize, dwlen : u32, pbbuffer : *mut u8) -> super::super::Foundation:: BOOL); - CryptGenRandom(hprov, pbbuffer.len() as _, ::core::mem::transmute(pbbuffer.as_ptr())).ok() + CryptGenRandom(hprov, pbbuffer.len().try_into().unwrap(), ::core::mem::transmute(pbbuffer.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1961,13 +1961,13 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CryptGetMessageCertificates(dwmsgandcertencodingtype : u32, hcryptprov : HCRYPTPROV_LEGACY, dwflags : u32, pbsignedblob : *const u8, cbsignedblob : u32) -> HCERTSTORE); - let result__ = CryptGetMessageCertificates(dwmsgandcertencodingtype, hcryptprov.into_param().abi(), dwflags, ::core::mem::transmute(pbsignedblob.as_ptr()), pbsignedblob.len() as _); + let result__ = CryptGetMessageCertificates(dwmsgandcertencodingtype, hcryptprov.into_param().abi(), dwflags, ::core::mem::transmute(pbsignedblob.as_ptr()), pbsignedblob.len().try_into().unwrap()); (!result__.is_invalid()).then(|| result__).ok_or_else(::windows_core::Error::from_win32) } #[inline] pub unsafe fn CryptGetMessageSignerCount(dwmsgencodingtype: u32, pbsignedblob: &[u8]) -> i32 { ::windows_targets::link!("crypt32.dll" "system" fn CryptGetMessageSignerCount(dwmsgencodingtype : u32, pbsignedblob : *const u8, cbsignedblob : u32) -> i32); - CryptGetMessageSignerCount(dwmsgencodingtype, ::core::mem::transmute(pbsignedblob.as_ptr()), pbsignedblob.len() as _) + CryptGetMessageSignerCount(dwmsgencodingtype, ::core::mem::transmute(pbsignedblob.as_ptr()), pbsignedblob.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2023,7 +2023,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CryptHashCertificate(hcryptprov : HCRYPTPROV_LEGACY, algid : ALG_ID, dwflags : u32, pbencoded : *const u8, cbencoded : u32, pbcomputedhash : *mut u8, pcbcomputedhash : *mut u32) -> super::super::Foundation:: BOOL); - CryptHashCertificate(hcryptprov.into_param().abi(), algid, dwflags, ::core::mem::transmute(pbencoded.as_ptr()), pbencoded.len() as _, ::core::mem::transmute(pbcomputedhash.unwrap_or(::std::ptr::null_mut())), pcbcomputedhash).ok() + CryptHashCertificate(hcryptprov.into_param().abi(), algid, dwflags, ::core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), ::core::mem::transmute(pbcomputedhash.unwrap_or(::std::ptr::null_mut())), pcbcomputedhash).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2033,14 +2033,14 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CryptHashCertificate2(pwszcnghashalgid : ::windows_core::PCWSTR, dwflags : u32, pvreserved : *const ::core::ffi::c_void, pbencoded : *const u8, cbencoded : u32, pbcomputedhash : *mut u8, pcbcomputedhash : *mut u32) -> super::super::Foundation:: BOOL); - CryptHashCertificate2(pwszcnghashalgid.into_param().abi(), dwflags, ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbencoded.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbencoded.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pbcomputedhash.unwrap_or(::std::ptr::null_mut())), pcbcomputedhash).ok() + CryptHashCertificate2(pwszcnghashalgid.into_param().abi(), dwflags, ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbencoded.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbencoded.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pbcomputedhash.unwrap_or(::std::ptr::null_mut())), pcbcomputedhash).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptHashData(hhash: usize, pbdata: &[u8], dwflags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CryptHashData(hhash : usize, pbdata : *const u8, dwdatalen : u32, dwflags : u32) -> super::super::Foundation:: BOOL); - CryptHashData(hhash, ::core::mem::transmute(pbdata.as_ptr()), pbdata.len() as _, dwflags).ok() + CryptHashData(hhash, ::core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), dwflags).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2077,14 +2077,14 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CryptHashToBeSigned(hcryptprov : HCRYPTPROV_LEGACY, dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, pbencoded : *const u8, cbencoded : u32, pbcomputedhash : *mut u8, pcbcomputedhash : *mut u32) -> super::super::Foundation:: BOOL); - CryptHashToBeSigned(hcryptprov.into_param().abi(), dwcertencodingtype, ::core::mem::transmute(pbencoded.as_ptr()), pbencoded.len() as _, ::core::mem::transmute(pbcomputedhash.unwrap_or(::std::ptr::null_mut())), pcbcomputedhash).ok() + CryptHashToBeSigned(hcryptprov.into_param().abi(), dwcertencodingtype, ::core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), ::core::mem::transmute(pbcomputedhash.unwrap_or(::std::ptr::null_mut())), pcbcomputedhash).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[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); - CryptImportKey(hprov, ::core::mem::transmute(pbdata.as_ptr()), pbdata.len() as _, hpubkey, dwflags, phkey).ok() + CryptImportKey(hprov, ::core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), hpubkey, dwflags, phkey).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2145,7 +2145,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CryptInstallOIDFunctionAddress(hmodule : super::super::Foundation:: HMODULE, dwencodingtype : u32, pszfuncname : ::windows_core::PCSTR, cfuncentry : u32, rgfuncentry : *const CRYPT_OID_FUNC_ENTRY, dwflags : u32) -> super::super::Foundation:: BOOL); - CryptInstallOIDFunctionAddress(hmodule.into_param().abi(), dwencodingtype, pszfuncname.into_param().abi(), rgfuncentry.len() as _, ::core::mem::transmute(rgfuncentry.as_ptr()), dwflags) + CryptInstallOIDFunctionAddress(hmodule.into_param().abi(), dwencodingtype, pszfuncname.into_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 { @@ -2189,14 +2189,14 @@ pub unsafe fn CryptMsgControl(hcryptmsg: *const ::core::ffi::c_void, dwflags: u3 #[inline] pub unsafe fn CryptMsgCountersign(hcryptmsg: *const ::core::ffi::c_void, dwindex: u32, rgcountersigners: &[CMSG_SIGNER_ENCODE_INFO]) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptMsgCountersign(hcryptmsg : *const ::core::ffi::c_void, dwindex : u32, ccountersigners : u32, rgcountersigners : *const CMSG_SIGNER_ENCODE_INFO) -> super::super::Foundation:: BOOL); - CryptMsgCountersign(hcryptmsg, dwindex, rgcountersigners.len() as _, ::core::mem::transmute(rgcountersigners.as_ptr())).ok() + CryptMsgCountersign(hcryptmsg, dwindex, rgcountersigners.len().try_into().unwrap(), ::core::mem::transmute(rgcountersigners.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptMsgCountersignEncoded(dwencodingtype: u32, pbsignerinfo: &[u8], rgcountersigners: &[CMSG_SIGNER_ENCODE_INFO], pbcountersignature: ::core::option::Option<*mut u8>, pcbcountersignature: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptMsgCountersignEncoded(dwencodingtype : u32, pbsignerinfo : *const u8, cbsignerinfo : u32, ccountersigners : u32, rgcountersigners : *const CMSG_SIGNER_ENCODE_INFO, pbcountersignature : *mut u8, pcbcountersignature : *mut u32) -> super::super::Foundation:: BOOL); - CryptMsgCountersignEncoded(dwencodingtype, ::core::mem::transmute(pbsignerinfo.as_ptr()), pbsignerinfo.len() as _, rgcountersigners.len() as _, ::core::mem::transmute(rgcountersigners.as_ptr()), ::core::mem::transmute(pbcountersignature.unwrap_or(::std::ptr::null_mut())), pcbcountersignature).ok() + CryptMsgCountersignEncoded(dwencodingtype, ::core::mem::transmute(pbsignerinfo.as_ptr()), pbsignerinfo.len().try_into().unwrap(), rgcountersigners.len().try_into().unwrap(), ::core::mem::transmute(rgcountersigners.as_ptr()), ::core::mem::transmute(pbcountersignature.unwrap_or(::std::ptr::null_mut())), pcbcountersignature).ok() } #[inline] pub unsafe fn CryptMsgDuplicate(hcryptmsg: ::core::option::Option<*const ::core::ffi::c_void>) -> *mut ::core::ffi::c_void { @@ -2215,7 +2215,7 @@ pub unsafe fn CryptMsgEncodeAndSignCTL(dwmsgencodingtype: u32, pctlinfo: *const #[inline] pub unsafe fn CryptMsgGetAndVerifySigner(hcryptmsg: *const ::core::ffi::c_void, rghsignerstore: ::core::option::Option<&[HCERTSTORE]>, dwflags: u32, ppsigner: ::core::option::Option<*mut *mut CERT_CONTEXT>, pdwsignerindex: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptMsgGetAndVerifySigner(hcryptmsg : *const ::core::ffi::c_void, csignerstore : u32, rghsignerstore : *const HCERTSTORE, dwflags : u32, ppsigner : *mut *mut CERT_CONTEXT, pdwsignerindex : *mut u32) -> super::super::Foundation:: BOOL); - CryptMsgGetAndVerifySigner(hcryptmsg, rghsignerstore.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rghsignerstore.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dwflags, ::core::mem::transmute(ppsigner.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdwsignerindex.unwrap_or(::std::ptr::null_mut()))).ok() + CryptMsgGetAndVerifySigner(hcryptmsg, rghsignerstore.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(rghsignerstore.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dwflags, ::core::mem::transmute(ppsigner.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdwsignerindex.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2249,7 +2249,7 @@ where #[inline] pub unsafe fn CryptMsgSignCTL(dwmsgencodingtype: u32, pbctlcontent: &[u8], psigninfo: *const CMSG_SIGNED_ENCODE_INFO, dwflags: u32, pbencoded: ::core::option::Option<*mut u8>, pcbencoded: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptMsgSignCTL(dwmsgencodingtype : u32, pbctlcontent : *const u8, cbctlcontent : u32, psigninfo : *const CMSG_SIGNED_ENCODE_INFO, dwflags : u32, pbencoded : *mut u8, pcbencoded : *mut u32) -> super::super::Foundation:: BOOL); - CryptMsgSignCTL(dwmsgencodingtype, ::core::mem::transmute(pbctlcontent.as_ptr()), pbctlcontent.len() as _, psigninfo, dwflags, ::core::mem::transmute(pbencoded.unwrap_or(::std::ptr::null_mut())), pcbencoded).ok() + CryptMsgSignCTL(dwmsgencodingtype, ::core::mem::transmute(pbctlcontent.as_ptr()), pbctlcontent.len().try_into().unwrap(), psigninfo, dwflags, ::core::mem::transmute(pbencoded.unwrap_or(::std::ptr::null_mut())), pcbencoded).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2259,7 +2259,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CryptMsgUpdate(hcryptmsg : *const ::core::ffi::c_void, pbdata : *const u8, cbdata : u32, ffinal : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - CryptMsgUpdate(hcryptmsg, ::core::mem::transmute(pbdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbdata.as_deref().map_or(0, |slice| slice.len() as _), ffinal.into_param().abi()).ok() + CryptMsgUpdate(hcryptmsg, ::core::mem::transmute(pbdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ffinal.into_param().abi()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2269,7 +2269,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CryptMsgVerifyCountersignatureEncoded(hcryptprov : HCRYPTPROV_LEGACY, dwencodingtype : u32, pbsignerinfo : *const u8, cbsignerinfo : u32, pbsignerinfocountersignature : *const u8, cbsignerinfocountersignature : u32, pcicountersigner : *const CERT_INFO) -> super::super::Foundation:: BOOL); - CryptMsgVerifyCountersignatureEncoded(hcryptprov.into_param().abi(), dwencodingtype, ::core::mem::transmute(pbsignerinfo.as_ptr()), pbsignerinfo.len() as _, ::core::mem::transmute(pbsignerinfocountersignature.as_ptr()), pbsignerinfocountersignature.len() as _, pcicountersigner).ok() + CryptMsgVerifyCountersignatureEncoded(hcryptprov.into_param().abi(), dwencodingtype, ::core::mem::transmute(pbsignerinfo.as_ptr()), pbsignerinfo.len().try_into().unwrap(), ::core::mem::transmute(pbsignerinfocountersignature.as_ptr()), pbsignerinfocountersignature.len().try_into().unwrap(), pcicountersigner).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2279,7 +2279,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CryptMsgVerifyCountersignatureEncodedEx(hcryptprov : HCRYPTPROV_LEGACY, dwencodingtype : u32, pbsignerinfo : *const u8, cbsignerinfo : u32, pbsignerinfocountersignature : *const u8, cbsignerinfocountersignature : u32, dwsignertype : u32, pvsigner : *const ::core::ffi::c_void, dwflags : u32, pvextra : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - CryptMsgVerifyCountersignatureEncodedEx(hcryptprov.into_param().abi(), dwencodingtype, ::core::mem::transmute(pbsignerinfo.as_ptr()), pbsignerinfo.len() as _, ::core::mem::transmute(pbsignerinfocountersignature.as_ptr()), pbsignerinfocountersignature.len() as _, dwsignertype, pvsigner, dwflags, ::core::mem::transmute(pvextra.unwrap_or(::std::ptr::null_mut()))).ok() + CryptMsgVerifyCountersignatureEncodedEx(hcryptprov.into_param().abi(), dwencodingtype, ::core::mem::transmute(pbsignerinfo.as_ptr()), pbsignerinfo.len().try_into().unwrap(), ::core::mem::transmute(pbsignerinfocountersignature.as_ptr()), pbsignerinfocountersignature.len().try_into().unwrap(), dwsignertype, pvsigner, dwflags, ::core::mem::transmute(pvextra.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2389,7 +2389,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CryptRetrieveTimeStamp(wszurl : ::windows_core::PCWSTR, dwretrievalflags : u32, dwtimeout : u32, pszhashid : ::windows_core::PCSTR, ppara : *const CRYPT_TIMESTAMP_PARA, pbdata : *const u8, cbdata : u32, pptscontext : *mut *mut CRYPT_TIMESTAMP_CONTEXT, pptssigner : *mut *mut CERT_CONTEXT, phstore : *mut HCERTSTORE) -> super::super::Foundation:: BOOL); - CryptRetrieveTimeStamp(wszurl.into_param().abi(), dwretrievalflags, dwtimeout, pszhashid.into_param().abi(), ::core::mem::transmute(ppara.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbdata.as_ptr()), pbdata.len() as _, pptscontext, pptssigner, ::core::mem::transmute(phstore.unwrap_or(::std::ptr::null_mut()))).ok() + CryptRetrieveTimeStamp(wszurl.into_param().abi(), dwretrievalflags, dwtimeout, pszhashid.into_param().abi(), ::core::mem::transmute(ppara.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), pptscontext, pptssigner, ::core::mem::transmute(phstore.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2436,7 +2436,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CryptSetOIDFunctionValue(dwencodingtype : u32, pszfuncname : ::windows_core::PCSTR, pszoid : ::windows_core::PCSTR, pwszvaluename : ::windows_core::PCWSTR, dwvaluetype : super::super::System::Registry:: REG_VALUE_TYPE, pbvaluedata : *const u8, cbvaluedata : u32) -> super::super::Foundation:: BOOL); - CryptSetOIDFunctionValue(dwencodingtype, pszfuncname.into_param().abi(), pszoid.into_param().abi(), pwszvaluename.into_param().abi(), dwvaluetype, ::core::mem::transmute(pbvaluedata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbvaluedata.as_deref().map_or(0, |slice| slice.len() as _)) + CryptSetOIDFunctionValue(dwencodingtype, pszfuncname.into_param().abi(), pszoid.into_param().abi(), pwszvaluename.into_param().abi(), dwvaluetype, ::core::mem::transmute(pbvaluedata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbvaluedata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2501,7 +2501,7 @@ where #[inline] pub unsafe fn CryptSignAndEncryptMessage(psignpara: *const CRYPT_SIGN_MESSAGE_PARA, pencryptpara: *const CRYPT_ENCRYPT_MESSAGE_PARA, rgprecipientcert: &[*const CERT_CONTEXT], pbtobesignedandencrypted: &[u8], pbsignedandencryptedblob: ::core::option::Option<*mut u8>, pcbsignedandencryptedblob: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptSignAndEncryptMessage(psignpara : *const CRYPT_SIGN_MESSAGE_PARA, pencryptpara : *const CRYPT_ENCRYPT_MESSAGE_PARA, crecipientcert : u32, rgprecipientcert : *const *const CERT_CONTEXT, pbtobesignedandencrypted : *const u8, cbtobesignedandencrypted : u32, pbsignedandencryptedblob : *mut u8, pcbsignedandencryptedblob : *mut u32) -> super::super::Foundation:: BOOL); - CryptSignAndEncryptMessage(psignpara, pencryptpara, rgprecipientcert.len() as _, ::core::mem::transmute(rgprecipientcert.as_ptr()), ::core::mem::transmute(pbtobesignedandencrypted.as_ptr()), pbtobesignedandencrypted.len() as _, ::core::mem::transmute(pbsignedandencryptedblob.unwrap_or(::std::ptr::null_mut())), pcbsignedandencryptedblob).ok() + CryptSignAndEncryptMessage(psignpara, pencryptpara, rgprecipientcert.len().try_into().unwrap(), ::core::mem::transmute(rgprecipientcert.as_ptr()), ::core::mem::transmute(pbtobesignedandencrypted.as_ptr()), pbtobesignedandencrypted.len().try_into().unwrap(), ::core::mem::transmute(pbsignedandencryptedblob.unwrap_or(::std::ptr::null_mut())), pcbsignedandencryptedblob).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2511,7 +2511,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CryptSignCertificate(hcryptprovorncryptkey : HCRYPTPROV_OR_NCRYPT_KEY_HANDLE, dwkeyspec : u32, dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, pbencodedtobesigned : *const u8, cbencodedtobesigned : u32, psignaturealgorithm : *const CRYPT_ALGORITHM_IDENTIFIER, pvhashauxinfo : *const ::core::ffi::c_void, pbsignature : *mut u8, pcbsignature : *mut u32) -> super::super::Foundation:: BOOL); - CryptSignCertificate(hcryptprovorncryptkey.into_param().abi(), dwkeyspec, dwcertencodingtype, ::core::mem::transmute(pbencodedtobesigned.as_ptr()), pbencodedtobesigned.len() as _, psignaturealgorithm, ::core::mem::transmute(pvhashauxinfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbsignature.unwrap_or(::std::ptr::null_mut())), pcbsignature).ok() + CryptSignCertificate(hcryptprovorncryptkey.into_param().abi(), dwkeyspec, dwcertencodingtype, ::core::mem::transmute(pbencodedtobesigned.as_ptr()), pbencodedtobesigned.len().try_into().unwrap(), psignaturealgorithm, ::core::mem::transmute(pvhashauxinfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbsignature.unwrap_or(::std::ptr::null_mut())), pcbsignature).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2548,21 +2548,21 @@ where #[inline] pub unsafe fn CryptSignMessageWithKey(psignpara: *const CRYPT_KEY_SIGN_MESSAGE_PARA, pbtobesigned: &[u8], pbsignedblob: ::core::option::Option<*mut u8>, pcbsignedblob: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptSignMessageWithKey(psignpara : *const CRYPT_KEY_SIGN_MESSAGE_PARA, pbtobesigned : *const u8, cbtobesigned : u32, pbsignedblob : *mut u8, pcbsignedblob : *mut u32) -> super::super::Foundation:: BOOL); - CryptSignMessageWithKey(psignpara, ::core::mem::transmute(pbtobesigned.as_ptr()), pbtobesigned.len() as _, ::core::mem::transmute(pbsignedblob.unwrap_or(::std::ptr::null_mut())), pcbsignedblob).ok() + CryptSignMessageWithKey(psignpara, ::core::mem::transmute(pbtobesigned.as_ptr()), pbtobesigned.len().try_into().unwrap(), ::core::mem::transmute(pbsignedblob.unwrap_or(::std::ptr::null_mut())), pcbsignedblob).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptStringToBinaryA(pszstring: &[u8], dwflags: CRYPT_STRING, pbbinary: ::core::option::Option<*mut u8>, pcbbinary: *mut u32, pdwskip: ::core::option::Option<*mut u32>, pdwflags: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptStringToBinaryA(pszstring : ::windows_core::PCSTR, cchstring : u32, dwflags : CRYPT_STRING, pbbinary : *mut u8, pcbbinary : *mut u32, pdwskip : *mut u32, pdwflags : *mut u32) -> super::super::Foundation:: BOOL); - CryptStringToBinaryA(::core::mem::transmute(pszstring.as_ptr()), pszstring.len() as _, dwflags, ::core::mem::transmute(pbbinary.unwrap_or(::std::ptr::null_mut())), pcbbinary, ::core::mem::transmute(pdwskip.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdwflags.unwrap_or(::std::ptr::null_mut()))).ok() + CryptStringToBinaryA(::core::mem::transmute(pszstring.as_ptr()), pszstring.len().try_into().unwrap(), dwflags, ::core::mem::transmute(pbbinary.unwrap_or(::std::ptr::null_mut())), pcbbinary, ::core::mem::transmute(pdwskip.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdwflags.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptStringToBinaryW(pszstring: &[u16], dwflags: CRYPT_STRING, pbbinary: ::core::option::Option<*mut u8>, pcbbinary: *mut u32, pdwskip: ::core::option::Option<*mut u32>, pdwflags: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptStringToBinaryW(pszstring : ::windows_core::PCWSTR, cchstring : u32, dwflags : CRYPT_STRING, pbbinary : *mut u8, pcbbinary : *mut u32, pdwskip : *mut u32, pdwflags : *mut u32) -> super::super::Foundation:: BOOL); - CryptStringToBinaryW(::core::mem::transmute(pszstring.as_ptr()), pszstring.len() as _, dwflags, ::core::mem::transmute(pbbinary.unwrap_or(::std::ptr::null_mut())), pcbbinary, ::core::mem::transmute(pdwskip.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdwflags.unwrap_or(::std::ptr::null_mut()))).ok() + CryptStringToBinaryW(::core::mem::transmute(pszstring.as_ptr()), pszstring.len().try_into().unwrap(), dwflags, ::core::mem::transmute(pbbinary.unwrap_or(::std::ptr::null_mut())), pcbbinary, ::core::mem::transmute(pdwskip.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdwflags.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2640,7 +2640,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CryptVerifyCertificateSignature(hcryptprov : HCRYPTPROV_LEGACY, dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, pbencoded : *const u8, cbencoded : u32, ppublickey : *const CERT_PUBLIC_KEY_INFO) -> super::super::Foundation:: BOOL); - CryptVerifyCertificateSignature(hcryptprov.into_param().abi(), dwcertencodingtype, ::core::mem::transmute(pbencoded.as_ptr()), pbencoded.len() as _, ppublickey).ok() + CryptVerifyCertificateSignature(hcryptprov.into_param().abi(), dwcertencodingtype, ::core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), ppublickey).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2657,35 +2657,35 @@ where #[inline] pub unsafe fn CryptVerifyDetachedMessageHash(phashpara: *const CRYPT_HASH_MESSAGE_PARA, pbdetachedhashblob: &[u8], ctobehashed: u32, rgpbtobehashed: *const *const u8, rgcbtobehashed: *const u32, pbcomputedhash: ::core::option::Option<*mut u8>, pcbcomputedhash: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptVerifyDetachedMessageHash(phashpara : *const CRYPT_HASH_MESSAGE_PARA, pbdetachedhashblob : *const u8, cbdetachedhashblob : u32, ctobehashed : u32, rgpbtobehashed : *const *const u8, rgcbtobehashed : *const u32, pbcomputedhash : *mut u8, pcbcomputedhash : *mut u32) -> super::super::Foundation:: BOOL); - CryptVerifyDetachedMessageHash(phashpara, ::core::mem::transmute(pbdetachedhashblob.as_ptr()), pbdetachedhashblob.len() as _, ctobehashed, rgpbtobehashed, rgcbtobehashed, ::core::mem::transmute(pbcomputedhash.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbcomputedhash.unwrap_or(::std::ptr::null_mut()))).ok() + CryptVerifyDetachedMessageHash(phashpara, ::core::mem::transmute(pbdetachedhashblob.as_ptr()), pbdetachedhashblob.len().try_into().unwrap(), ctobehashed, rgpbtobehashed, rgcbtobehashed, ::core::mem::transmute(pbcomputedhash.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbcomputedhash.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptVerifyDetachedMessageSignature(pverifypara: *const CRYPT_VERIFY_MESSAGE_PARA, dwsignerindex: u32, pbdetachedsignblob: &[u8], ctobesigned: u32, rgpbtobesigned: *const *const u8, rgcbtobesigned: *const u32, ppsignercert: ::core::option::Option<*mut *mut CERT_CONTEXT>) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptVerifyDetachedMessageSignature(pverifypara : *const CRYPT_VERIFY_MESSAGE_PARA, dwsignerindex : u32, pbdetachedsignblob : *const u8, cbdetachedsignblob : u32, ctobesigned : u32, rgpbtobesigned : *const *const u8, rgcbtobesigned : *const u32, ppsignercert : *mut *mut CERT_CONTEXT) -> super::super::Foundation:: BOOL); - CryptVerifyDetachedMessageSignature(pverifypara, dwsignerindex, ::core::mem::transmute(pbdetachedsignblob.as_ptr()), pbdetachedsignblob.len() as _, ctobesigned, rgpbtobesigned, rgcbtobesigned, ::core::mem::transmute(ppsignercert.unwrap_or(::std::ptr::null_mut()))).ok() + CryptVerifyDetachedMessageSignature(pverifypara, dwsignerindex, ::core::mem::transmute(pbdetachedsignblob.as_ptr()), pbdetachedsignblob.len().try_into().unwrap(), ctobesigned, rgpbtobesigned, rgcbtobesigned, ::core::mem::transmute(ppsignercert.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptVerifyMessageHash(phashpara: *const CRYPT_HASH_MESSAGE_PARA, pbhashedblob: &[u8], pbtobehashed: ::core::option::Option<*mut u8>, pcbtobehashed: ::core::option::Option<*mut u32>, pbcomputedhash: ::core::option::Option<*mut u8>, pcbcomputedhash: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptVerifyMessageHash(phashpara : *const CRYPT_HASH_MESSAGE_PARA, pbhashedblob : *const u8, cbhashedblob : u32, pbtobehashed : *mut u8, pcbtobehashed : *mut u32, pbcomputedhash : *mut u8, pcbcomputedhash : *mut u32) -> super::super::Foundation:: BOOL); - CryptVerifyMessageHash(phashpara, ::core::mem::transmute(pbhashedblob.as_ptr()), pbhashedblob.len() as _, ::core::mem::transmute(pbtobehashed.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbtobehashed.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pbcomputedhash.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbcomputedhash.unwrap_or(::std::ptr::null_mut()))).ok() + CryptVerifyMessageHash(phashpara, ::core::mem::transmute(pbhashedblob.as_ptr()), pbhashedblob.len().try_into().unwrap(), ::core::mem::transmute(pbtobehashed.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbtobehashed.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pbcomputedhash.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbcomputedhash.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptVerifyMessageSignature(pverifypara: *const CRYPT_VERIFY_MESSAGE_PARA, dwsignerindex: u32, pbsignedblob: &[u8], pbdecoded: ::core::option::Option<*mut u8>, pcbdecoded: ::core::option::Option<*mut u32>, ppsignercert: ::core::option::Option<*mut *mut CERT_CONTEXT>) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptVerifyMessageSignature(pverifypara : *const CRYPT_VERIFY_MESSAGE_PARA, dwsignerindex : u32, pbsignedblob : *const u8, cbsignedblob : u32, pbdecoded : *mut u8, pcbdecoded : *mut u32, ppsignercert : *mut *mut CERT_CONTEXT) -> super::super::Foundation:: BOOL); - CryptVerifyMessageSignature(pverifypara, dwsignerindex, ::core::mem::transmute(pbsignedblob.as_ptr()), pbsignedblob.len() as _, ::core::mem::transmute(pbdecoded.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdecoded.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppsignercert.unwrap_or(::std::ptr::null_mut()))).ok() + CryptVerifyMessageSignature(pverifypara, dwsignerindex, ::core::mem::transmute(pbsignedblob.as_ptr()), pbsignedblob.len().try_into().unwrap(), ::core::mem::transmute(pbdecoded.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdecoded.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppsignercert.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn CryptVerifyMessageSignatureWithKey(pverifypara: *const CRYPT_KEY_VERIFY_MESSAGE_PARA, ppublickeyinfo: ::core::option::Option<*const CERT_PUBLIC_KEY_INFO>, pbsignedblob: &[u8], pbdecoded: ::core::option::Option<*mut u8>, pcbdecoded: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptVerifyMessageSignatureWithKey(pverifypara : *const CRYPT_KEY_VERIFY_MESSAGE_PARA, ppublickeyinfo : *const CERT_PUBLIC_KEY_INFO, pbsignedblob : *const u8, cbsignedblob : u32, pbdecoded : *mut u8, pcbdecoded : *mut u32) -> super::super::Foundation:: BOOL); - CryptVerifyMessageSignatureWithKey(pverifypara, ::core::mem::transmute(ppublickeyinfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbsignedblob.as_ptr()), pbsignedblob.len() as _, ::core::mem::transmute(pbdecoded.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdecoded.unwrap_or(::std::ptr::null_mut()))).ok() + CryptVerifyMessageSignatureWithKey(pverifypara, ::core::mem::transmute(ppublickeyinfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbsignedblob.as_ptr()), pbsignedblob.len().try_into().unwrap(), ::core::mem::transmute(pbdecoded.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdecoded.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2695,7 +2695,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn CryptVerifySignatureA(hhash : usize, pbsignature : *const u8, dwsiglen : u32, hpubkey : usize, szdescription : ::windows_core::PCSTR, dwflags : u32) -> super::super::Foundation:: BOOL); - CryptVerifySignatureA(hhash, ::core::mem::transmute(pbsignature.as_ptr()), pbsignature.len() as _, hpubkey, szdescription.into_param().abi(), dwflags).ok() + CryptVerifySignatureA(hhash, ::core::mem::transmute(pbsignature.as_ptr()), pbsignature.len().try_into().unwrap(), hpubkey, szdescription.into_param().abi(), dwflags).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2705,7 +2705,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn CryptVerifySignatureW(hhash : usize, pbsignature : *const u8, dwsiglen : u32, hpubkey : usize, szdescription : ::windows_core::PCWSTR, dwflags : u32) -> super::super::Foundation:: BOOL); - CryptVerifySignatureW(hhash, ::core::mem::transmute(pbsignature.as_ptr()), pbsignature.len() as _, hpubkey, szdescription.into_param().abi(), dwflags).ok() + CryptVerifySignatureW(hhash, ::core::mem::transmute(pbsignature.as_ptr()), pbsignature.len().try_into().unwrap(), hpubkey, szdescription.into_param().abi(), dwflags).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2715,13 +2715,13 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CryptVerifyTimeStampSignature(pbtscontentinfo : *const u8, cbtscontentinfo : u32, pbdata : *const u8, cbdata : u32, hadditionalstore : HCERTSTORE, pptscontext : *mut *mut CRYPT_TIMESTAMP_CONTEXT, pptssigner : *mut *mut CERT_CONTEXT, phstore : *mut HCERTSTORE) -> super::super::Foundation:: BOOL); - CryptVerifyTimeStampSignature(::core::mem::transmute(pbtscontentinfo.as_ptr()), pbtscontentinfo.len() as _, ::core::mem::transmute(pbdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbdata.as_deref().map_or(0, |slice| slice.len() as _), hadditionalstore.into_param().abi(), pptscontext, pptssigner, ::core::mem::transmute(phstore.unwrap_or(::std::ptr::null_mut()))).ok() + CryptVerifyTimeStampSignature(::core::mem::transmute(pbtscontentinfo.as_ptr()), pbtscontentinfo.len().try_into().unwrap(), ::core::mem::transmute(pbdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), hadditionalstore.into_param().abi(), pptscontext, pptssigner, ::core::mem::transmute(phstore.unwrap_or(::std::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CryptXmlAddObject(hsignatureorobject: *const ::core::ffi::c_void, dwflags: u32, rgproperty: ::core::option::Option<&[CRYPT_XML_PROPERTY]>, pencoded: *const CRYPT_XML_BLOB) -> ::windows_core::Result<*mut CRYPT_XML_OBJECT> { ::windows_targets::link!("cryptxml.dll" "system" fn CryptXmlAddObject(hsignatureorobject : *const ::core::ffi::c_void, dwflags : u32, rgproperty : *const CRYPT_XML_PROPERTY, cproperty : u32, pencoded : *const CRYPT_XML_BLOB, ppobject : *mut *mut CRYPT_XML_OBJECT) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - CryptXmlAddObject(hsignatureorobject, 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() as _), pencoded, &mut result__).from_abi(result__) + CryptXmlAddObject(hsignatureorobject, 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, &mut result__).from_abi(result__) } #[inline] pub unsafe fn CryptXmlClose(hcryptxml: *const ::core::ffi::c_void) -> ::windows_core::Result<()> { @@ -2736,7 +2736,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::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); - CryptXmlCreateReference(hcryptxml, dwflags, wszid.into_param().abi(), wszuri.into_param().abi(), wsztype.into_param().abi(), pdigestmethod, rgtransform.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rgtransform.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), phreference).ok() + CryptXmlCreateReference(hcryptxml, dwflags, wszid.into_param().abi(), wszuri.into_param().abi(), wsztype.into_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).ok() } #[inline] pub unsafe fn CryptXmlDigestReference(hreference: *const ::core::ffi::c_void, dwflags: u32, pdataproviderin: *const CRYPT_XML_DATA_PROVIDER) -> ::windows_core::Result<()> { @@ -2746,7 +2746,7 @@ pub unsafe fn CryptXmlDigestReference(hreference: *const ::core::ffi::c_void, dw #[inline] pub unsafe fn CryptXmlEncode(hcryptxml: *const ::core::ffi::c_void, dwcharset: CRYPT_XML_CHARSET, rgproperty: ::core::option::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); - 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() as _), pvcallbackstate, pfnwrite).ok() + 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, pfnwrite).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2805,7 +2805,7 @@ pub unsafe fn CryptXmlImportPublicKey(dwflags: CRYPT_XML_FLAGS, pkeyvalue: *cons #[inline] pub unsafe fn CryptXmlOpenToDecode(pconfig: ::core::option::Option<*const CRYPT_XML_TRANSFORM_CHAIN_CONFIG>, dwflags: CRYPT_XML_FLAGS, rgproperty: ::core::option::Option<&[CRYPT_XML_PROPERTY]>, pencoded: *const CRYPT_XML_BLOB, phcryptxml: *mut *mut ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("cryptxml.dll" "system" fn CryptXmlOpenToDecode(pconfig : *const CRYPT_XML_TRANSFORM_CHAIN_CONFIG, dwflags : CRYPT_XML_FLAGS, rgproperty : *const CRYPT_XML_PROPERTY, cproperty : u32, pencoded : *const CRYPT_XML_BLOB, phcryptxml : *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT); - CryptXmlOpenToDecode(::core::mem::transmute(pconfig.unwrap_or(::std::ptr::null())), dwflags, ::core::mem::transmute(rgproperty.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), rgproperty.as_deref().map_or(0, |slice| slice.len() as _), pencoded, phcryptxml).ok() + CryptXmlOpenToDecode(::core::mem::transmute(pconfig.unwrap_or(::std::ptr::null())), dwflags, ::core::mem::transmute(rgproperty.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), rgproperty.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pencoded, phcryptxml).ok() } #[inline] pub unsafe fn CryptXmlOpenToEncode(pconfig: ::core::option::Option<*const CRYPT_XML_TRANSFORM_CHAIN_CONFIG>, dwflags: CRYPT_XML_FLAGS, wszid: P0, rgproperty: ::core::option::Option<&[CRYPT_XML_PROPERTY]>, pencoded: ::core::option::Option<*const CRYPT_XML_BLOB>, phsignature: *mut *mut ::core::ffi::c_void) -> ::windows_core::Result<()> @@ -2813,12 +2813,12 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("cryptxml.dll" "system" fn CryptXmlOpenToEncode(pconfig : *const CRYPT_XML_TRANSFORM_CHAIN_CONFIG, dwflags : CRYPT_XML_FLAGS, wszid : ::windows_core::PCWSTR, rgproperty : *const CRYPT_XML_PROPERTY, cproperty : u32, pencoded : *const CRYPT_XML_BLOB, phsignature : *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT); - CryptXmlOpenToEncode(::core::mem::transmute(pconfig.unwrap_or(::std::ptr::null())), dwflags, wszid.into_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() as _), ::core::mem::transmute(pencoded.unwrap_or(::std::ptr::null())), phsignature).ok() + CryptXmlOpenToEncode(::core::mem::transmute(pconfig.unwrap_or(::std::ptr::null())), dwflags, wszid.into_param().abi(), ::core::mem::transmute(rgproperty.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), rgproperty.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pencoded.unwrap_or(::std::ptr::null())), phsignature).ok() } #[inline] pub unsafe fn CryptXmlSetHMACSecret(hsignature: *const ::core::ffi::c_void, pbsecret: &[u8]) -> ::windows_core::Result<()> { ::windows_targets::link!("cryptxml.dll" "system" fn CryptXmlSetHMACSecret(hsignature : *const ::core::ffi::c_void, pbsecret : *const u8, cbsecret : u32) -> ::windows_core::HRESULT); - CryptXmlSetHMACSecret(hsignature, ::core::mem::transmute(pbsecret.as_ptr()), pbsecret.len() as _).ok() + CryptXmlSetHMACSecret(hsignature, ::core::mem::transmute(pbsecret.as_ptr()), pbsecret.len().try_into().unwrap()).ok() } #[inline] pub unsafe fn CryptXmlSign(hsignature: *const ::core::ffi::c_void, hkey: P0, dwkeyspec: CERT_KEY_SPEC, dwflags: CRYPT_XML_FLAGS, dwkeyinfospec: CRYPT_XML_KEYINFO_SPEC, pvkeyinfospec: ::core::option::Option<*const ::core::ffi::c_void>, psignaturemethod: *const CRYPT_XML_ALGORITHM, pcanonicalization: *const CRYPT_XML_ALGORITHM) -> ::windows_core::Result<()> @@ -2844,7 +2844,7 @@ where P0: ::windows_core::IntoParam, { ::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); - Decrypt(hcrypto, foaep.into_param().abi(), pindata.len() as _, ::core::mem::transmute(pindata.as_ptr()), pcboutdata, ppoutdata).ok() + Decrypt(hcrypto, foaep.into_param().abi(), pindata.len().try_into().unwrap(), ::core::mem::transmute(pindata.as_ptr()), pcboutdata, ppoutdata).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2854,7 +2854,7 @@ where P0: ::windows_core::IntoParam, { ::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); - Encrypt(hcrypto, foaep.into_param().abi(), pindata.len() as _, ::core::mem::transmute(pindata.as_ptr()), pcboutdata, ppoutdata).ok() + Encrypt(hcrypto, foaep.into_param().abi(), pindata.len().try_into().unwrap(), ::core::mem::transmute(pindata.as_ptr()), pcboutdata, ppoutdata).ok() } #[inline] pub unsafe fn FindCertsByIssuer(pcertchains: ::core::option::Option<*mut CERT_CHAIN>, pcbcertchains: *mut u32, pccertchains: *mut u32, pbencodedissuername: ::core::option::Option<&[u8]>, pwszpurpose: P0, dwkeyspec: u32) -> ::windows_core::Result<()> @@ -2862,7 +2862,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wintrust.dll" "system" fn FindCertsByIssuer(pcertchains : *mut CERT_CHAIN, pcbcertchains : *mut u32, pccertchains : *mut u32, pbencodedissuername : *const u8, cbencodedissuername : u32, pwszpurpose : ::windows_core::PCWSTR, dwkeyspec : u32) -> ::windows_core::HRESULT); - FindCertsByIssuer(::core::mem::transmute(pcertchains.unwrap_or(::std::ptr::null_mut())), pcbcertchains, pccertchains, ::core::mem::transmute(pbencodedissuername.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbencodedissuername.as_deref().map_or(0, |slice| slice.len() as _), pwszpurpose.into_param().abi(), dwkeyspec).ok() + FindCertsByIssuer(::core::mem::transmute(pcertchains.unwrap_or(::std::ptr::null_mut())), pcbcertchains, pccertchains, ::core::mem::transmute(pbencodedissuername.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbencodedissuername.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pwszpurpose.into_param().abi(), dwkeyspec).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2877,7 +2877,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::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); - GenerateDerivedKey(hcrypto, plabel.len() as _, ::core::mem::transmute(plabel.as_ptr()), pnonce.len() as _, ::core::mem::transmute(pnonce.as_ptr()), derivedkeylength, offset, algid.into_param().abi(), pcbkey, ppkey).ok() + 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.into_param().abi(), pcbkey, ppkey).ok() } #[inline] pub unsafe fn GetBrowserToken(dwparamtype: u32, pparam: *const ::core::ffi::c_void, pcbtoken: ::core::option::Option<*mut u32>, pptoken: ::core::option::Option<*mut *mut u8>) -> ::windows_core::Result<()> { @@ -2888,7 +2888,7 @@ pub unsafe fn GetBrowserToken(dwparamtype: u32, pparam: *const ::core::ffi::c_vo 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> { ::windows_targets::link!("infocardapi.dll" "system" fn GetCryptoTransform(hsymmetriccrypto : *const INFORMATIONCARD_CRYPTO_HANDLE, mode : u32, padding : PaddingMode, feedbacksize : u32, direction : Direction, cbiv : u32, piv : *const u8, pphtransform : *mut *mut INFORMATIONCARD_CRYPTO_HANDLE) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - GetCryptoTransform(hsymmetriccrypto, mode, padding, feedbacksize, direction, piv.len() as _, ::core::mem::transmute(piv.as_ptr()), &mut result__).from_abi(result__) + GetCryptoTransform(hsymmetriccrypto, mode, padding, feedbacksize, direction, piv.len().try_into().unwrap(), ::core::mem::transmute(piv.as_ptr()), &mut result__).from_abi(result__) } #[inline] pub unsafe fn GetKeyedHash(hsymmetriccrypto: *const INFORMATIONCARD_CRYPTO_HANDLE) -> ::windows_core::Result<*mut INFORMATIONCARD_CRYPTO_HANDLE> { @@ -2901,17 +2901,17 @@ pub unsafe fn GetKeyedHash(hsymmetriccrypto: *const INFORMATIONCARD_CRYPTO_HANDL #[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); - GetToken(ppolicychain.len() as _, ::core::mem::transmute(ppolicychain.as_ptr()), securitytoken, phprooftokencrypto).ok() + GetToken(ppolicychain.len().try_into().unwrap(), ::core::mem::transmute(ppolicychain.as_ptr()), securitytoken, phprooftokencrypto).ok() } #[inline] pub unsafe fn HashCore(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, pindata: &[u8]) -> ::windows_core::Result<()> { ::windows_targets::link!("infocardapi.dll" "system" fn HashCore(hcrypto : *const INFORMATIONCARD_CRYPTO_HANDLE, cbindata : u32, pindata : *const u8) -> ::windows_core::HRESULT); - HashCore(hcrypto, pindata.len() as _, ::core::mem::transmute(pindata.as_ptr())).ok() + HashCore(hcrypto, pindata.len().try_into().unwrap(), ::core::mem::transmute(pindata.as_ptr())).ok() } #[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); - HashFinal(hcrypto, pindata.len() as _, ::core::mem::transmute(pindata.as_ptr()), pcboutdata, ppoutdata).ok() + HashFinal(hcrypto, pindata.len().try_into().unwrap(), ::core::mem::transmute(pindata.as_ptr()), pcboutdata, ppoutdata).ok() } #[inline] pub unsafe fn ImportInformationCard(filename: P0) -> ::windows_core::Result<()> @@ -2941,7 +2941,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("ncrypt.dll" "system" fn NCryptCreateClaim(hsubjectkey : NCRYPT_KEY_HANDLE, hauthoritykey : NCRYPT_KEY_HANDLE, dwclaimtype : u32, pparameterlist : *const BCryptBufferDesc, pbclaimblob : *mut u8, cbclaimblob : u32, pcbresult : *mut u32, dwflags : u32) -> ::windows_core::HRESULT); - NCryptCreateClaim(hsubjectkey.into_param().abi(), hauthoritykey.into_param().abi(), dwclaimtype, ::core::mem::transmute(pparameterlist.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbclaimblob.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbclaimblob.as_deref().map_or(0, |slice| slice.len() as _), pcbresult, dwflags).ok() + NCryptCreateClaim(hsubjectkey.into_param().abi(), hauthoritykey.into_param().abi(), dwclaimtype, ::core::mem::transmute(pparameterlist.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbclaimblob.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbclaimblob.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult, dwflags).ok() } #[inline] pub unsafe fn NCryptCreatePersistedKey(hprovider: P0, phkey: *mut NCRYPT_KEY_HANDLE, pszalgid: P1, pszkeyname: P2, dwlegacykeyspec: CERT_KEY_SPEC, dwflags: NCRYPT_FLAGS) -> ::windows_core::Result<()> @@ -2968,7 +2968,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ncrypt.dll" "system" fn NCryptDecrypt(hkey : NCRYPT_KEY_HANDLE, pbinput : *const u8, cbinput : u32, ppaddinginfo : *const ::core::ffi::c_void, pboutput : *mut u8, cboutput : u32, pcbresult : *mut u32, dwflags : NCRYPT_FLAGS) -> ::windows_core::HRESULT); - NCryptDecrypt(hkey.into_param().abi(), ::core::mem::transmute(pbinput.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbinput.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppaddinginfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pboutput.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pboutput.as_deref().map_or(0, |slice| slice.len() as _), pcbresult, dwflags).ok() + NCryptDecrypt(hkey.into_param().abi(), ::core::mem::transmute(pbinput.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbinput.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(ppaddinginfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pboutput.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pboutput.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult, dwflags).ok() } #[inline] pub unsafe fn NCryptDeleteKey(hkey: P0, dwflags: u32) -> ::windows_core::Result<()> @@ -2985,7 +2985,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("ncrypt.dll" "system" fn NCryptDeriveKey(hsharedsecret : NCRYPT_SECRET_HANDLE, pwszkdf : ::windows_core::PCWSTR, pparameterlist : *const BCryptBufferDesc, pbderivedkey : *mut u8, cbderivedkey : u32, pcbresult : *mut u32, dwflags : u32) -> ::windows_core::HRESULT); - NCryptDeriveKey(hsharedsecret.into_param().abi(), pwszkdf.into_param().abi(), ::core::mem::transmute(pparameterlist.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbderivedkey.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbderivedkey.as_deref().map_or(0, |slice| slice.len() as _), pcbresult, dwflags).ok() + NCryptDeriveKey(hsharedsecret.into_param().abi(), pwszkdf.into_param().abi(), ::core::mem::transmute(pparameterlist.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbderivedkey.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbderivedkey.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult, dwflags).ok() } #[inline] pub unsafe fn NCryptEncrypt(hkey: P0, pbinput: ::core::option::Option<&[u8]>, ppaddinginfo: ::core::option::Option<*const ::core::ffi::c_void>, pboutput: ::core::option::Option<&mut [u8]>, pcbresult: *mut u32, dwflags: NCRYPT_FLAGS) -> ::windows_core::Result<()> @@ -2993,7 +2993,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ncrypt.dll" "system" fn NCryptEncrypt(hkey : NCRYPT_KEY_HANDLE, pbinput : *const u8, cbinput : u32, ppaddinginfo : *const ::core::ffi::c_void, pboutput : *mut u8, cboutput : u32, pcbresult : *mut u32, dwflags : NCRYPT_FLAGS) -> ::windows_core::HRESULT); - NCryptEncrypt(hkey.into_param().abi(), ::core::mem::transmute(pbinput.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbinput.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppaddinginfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pboutput.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pboutput.as_deref().map_or(0, |slice| slice.len() as _), pcbresult, dwflags).ok() + NCryptEncrypt(hkey.into_param().abi(), ::core::mem::transmute(pbinput.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbinput.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(ppaddinginfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pboutput.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pboutput.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult, dwflags).ok() } #[inline] pub unsafe fn NCryptEnumAlgorithms(hprovider: P0, dwalgoperations: NCRYPT_OPERATION, pdwalgcount: *mut u32, ppalglist: *mut *mut NCryptAlgorithmName, dwflags: u32) -> ::windows_core::Result<()> @@ -3025,7 +3025,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("ncrypt.dll" "system" fn NCryptExportKey(hkey : NCRYPT_KEY_HANDLE, hexportkey : NCRYPT_KEY_HANDLE, pszblobtype : ::windows_core::PCWSTR, pparameterlist : *const BCryptBufferDesc, pboutput : *mut u8, cboutput : u32, pcbresult : *mut u32, dwflags : NCRYPT_FLAGS) -> ::windows_core::HRESULT); - NCryptExportKey(hkey.into_param().abi(), hexportkey.into_param().abi(), pszblobtype.into_param().abi(), ::core::mem::transmute(pparameterlist.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pboutput.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pboutput.as_deref().map_or(0, |slice| slice.len() as _), pcbresult, dwflags).ok() + NCryptExportKey(hkey.into_param().abi(), hexportkey.into_param().abi(), pszblobtype.into_param().abi(), ::core::mem::transmute(pparameterlist.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pboutput.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pboutput.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult, dwflags).ok() } #[inline] pub unsafe fn NCryptFinalizeKey(hkey: P0, dwflags: NCRYPT_FLAGS) -> ::windows_core::Result<()> @@ -3055,7 +3055,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("ncrypt.dll" "system" fn NCryptGetProperty(hobject : NCRYPT_HANDLE, pszproperty : ::windows_core::PCWSTR, pboutput : *mut u8, cboutput : u32, pcbresult : *mut u32, dwflags : super:: OBJECT_SECURITY_INFORMATION) -> ::windows_core::HRESULT); - NCryptGetProperty(hobject.into_param().abi(), pszproperty.into_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() as _), pcbresult, dwflags).ok() + NCryptGetProperty(hobject.into_param().abi(), pszproperty.into_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, dwflags).ok() } #[inline] pub unsafe fn NCryptGetProtectionDescriptorInfo(hdescriptor: P0, pmempara: ::core::option::Option<*const NCRYPT_ALLOC_PARA>, dwinfotype: u32, ppvinfo: *mut *mut ::core::ffi::c_void) -> ::windows_core::Result<()> @@ -3073,7 +3073,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("ncrypt.dll" "system" fn NCryptImportKey(hprovider : NCRYPT_PROV_HANDLE, himportkey : NCRYPT_KEY_HANDLE, pszblobtype : ::windows_core::PCWSTR, pparameterlist : *const BCryptBufferDesc, phkey : *mut NCRYPT_KEY_HANDLE, pbdata : *const u8, cbdata : u32, dwflags : NCRYPT_FLAGS) -> ::windows_core::HRESULT); - NCryptImportKey(hprovider.into_param().abi(), himportkey.into_param().abi(), pszblobtype.into_param().abi(), ::core::mem::transmute(pparameterlist.unwrap_or(::std::ptr::null())), phkey, ::core::mem::transmute(pbdata.as_ptr()), pbdata.len() as _, dwflags).ok() + NCryptImportKey(hprovider.into_param().abi(), himportkey.into_param().abi(), pszblobtype.into_param().abi(), ::core::mem::transmute(pparameterlist.unwrap_or(::std::ptr::null())), phkey, ::core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), dwflags).ok() } #[inline] pub unsafe fn NCryptIsAlgSupported(hprovider: P0, pszalgid: P1, dwflags: u32) -> ::windows_core::Result<()> @@ -3100,7 +3100,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ncrypt.dll" "system" fn NCryptKeyDerivation(hkey : NCRYPT_KEY_HANDLE, pparameterlist : *const BCryptBufferDesc, pbderivedkey : *mut u8, cbderivedkey : u32, pcbresult : *mut u32, dwflags : u32) -> ::windows_core::HRESULT); - NCryptKeyDerivation(hkey.into_param().abi(), ::core::mem::transmute(pparameterlist.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbderivedkey.as_ptr()), pbderivedkey.len() as _, pcbresult, dwflags).ok() + NCryptKeyDerivation(hkey.into_param().abi(), ::core::mem::transmute(pparameterlist.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbderivedkey.as_ptr()), pbderivedkey.len().try_into().unwrap(), pcbresult, dwflags).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3138,7 +3138,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("ncrypt.dll" "system" fn NCryptProtectSecret(hdescriptor : super:: NCRYPT_DESCRIPTOR_HANDLE, dwflags : u32, pbdata : *const u8, cbdata : u32, pmempara : *const NCRYPT_ALLOC_PARA, hwnd : super::super::Foundation:: HWND, ppbprotectedblob : *mut *mut u8, pcbprotectedblob : *mut u32) -> ::windows_core::HRESULT); - NCryptProtectSecret(hdescriptor.into_param().abi(), dwflags, ::core::mem::transmute(pbdata.as_ptr()), pbdata.len() as _, ::core::mem::transmute(pmempara.unwrap_or(::std::ptr::null())), hwnd.into_param().abi(), ppbprotectedblob, pcbprotectedblob).ok() + NCryptProtectSecret(hdescriptor.into_param().abi(), dwflags, ::core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), ::core::mem::transmute(pmempara.unwrap_or(::std::ptr::null())), hwnd.into_param().abi(), ppbprotectedblob, pcbprotectedblob).ok() } #[inline] pub unsafe fn NCryptQueryProtectionDescriptorName(pwszname: P0, pwszdescriptorstring: ::windows_core::PWSTR, pcdescriptorstring: *mut usize, dwflags: u32) -> ::windows_core::Result<()> @@ -3173,7 +3173,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("ncrypt.dll" "system" fn NCryptSetProperty(hobject : NCRYPT_HANDLE, pszproperty : ::windows_core::PCWSTR, pbinput : *const u8, cbinput : u32, dwflags : NCRYPT_FLAGS) -> ::windows_core::HRESULT); - NCryptSetProperty(hobject.into_param().abi(), pszproperty.into_param().abi(), ::core::mem::transmute(pbinput.as_ptr()), pbinput.len() as _, dwflags).ok() + NCryptSetProperty(hobject.into_param().abi(), pszproperty.into_param().abi(), ::core::mem::transmute(pbinput.as_ptr()), pbinput.len().try_into().unwrap(), dwflags).ok() } #[inline] pub unsafe fn NCryptSignHash(hkey: P0, ppaddinginfo: ::core::option::Option<*const ::core::ffi::c_void>, pbhashvalue: &[u8], pbsignature: ::core::option::Option<&mut [u8]>, pcbresult: *mut u32, dwflags: NCRYPT_FLAGS) -> ::windows_core::Result<()> @@ -3181,7 +3181,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ncrypt.dll" "system" fn NCryptSignHash(hkey : NCRYPT_KEY_HANDLE, ppaddinginfo : *const ::core::ffi::c_void, pbhashvalue : *const u8, cbhashvalue : u32, pbsignature : *mut u8, cbsignature : u32, pcbresult : *mut u32, dwflags : NCRYPT_FLAGS) -> ::windows_core::HRESULT); - NCryptSignHash(hkey.into_param().abi(), ::core::mem::transmute(ppaddinginfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbhashvalue.as_ptr()), pbhashvalue.len() as _, ::core::mem::transmute(pbsignature.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbsignature.as_deref().map_or(0, |slice| slice.len() as _), pcbresult, dwflags).ok() + NCryptSignHash(hkey.into_param().abi(), ::core::mem::transmute(ppaddinginfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbhashvalue.as_ptr()), pbhashvalue.len().try_into().unwrap(), ::core::mem::transmute(pbsignature.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbsignature.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult, dwflags).ok() } #[inline] pub unsafe fn NCryptStreamClose(hstream: P0) -> ::windows_core::Result<()> @@ -3234,7 +3234,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("ncrypt.dll" "system" fn NCryptStreamUpdate(hstream : super:: NCRYPT_STREAM_HANDLE, pbdata : *const u8, cbdata : usize, ffinal : super::super::Foundation:: BOOL) -> ::windows_core::HRESULT); - NCryptStreamUpdate(hstream.into_param().abi(), ::core::mem::transmute(pbdata.as_ptr()), pbdata.len() as _, ffinal.into_param().abi()).ok() + NCryptStreamUpdate(hstream.into_param().abi(), ::core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), ffinal.into_param().abi()).ok() } #[inline] pub unsafe fn NCryptTranslateHandle(phprovider: ::core::option::Option<*mut NCRYPT_PROV_HANDLE>, phkey: *mut NCRYPT_KEY_HANDLE, hlegacyprov: usize, hlegacykey: usize, dwlegacykeyspec: CERT_KEY_SPEC, dwflags: u32) -> ::windows_core::Result<()> { @@ -3249,7 +3249,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ncrypt.dll" "system" fn NCryptUnprotectSecret(phdescriptor : *mut super:: NCRYPT_DESCRIPTOR_HANDLE, dwflags : NCRYPT_FLAGS, pbprotectedblob : *const u8, cbprotectedblob : u32, pmempara : *const NCRYPT_ALLOC_PARA, hwnd : super::super::Foundation:: HWND, ppbdata : *mut *mut u8, pcbdata : *mut u32) -> ::windows_core::HRESULT); - NCryptUnprotectSecret(::core::mem::transmute(phdescriptor.unwrap_or(::std::ptr::null_mut())), dwflags, ::core::mem::transmute(pbprotectedblob.as_ptr()), pbprotectedblob.len() as _, ::core::mem::transmute(pmempara.unwrap_or(::std::ptr::null())), hwnd.into_param().abi(), ppbdata, pcbdata).ok() + NCryptUnprotectSecret(::core::mem::transmute(phdescriptor.unwrap_or(::std::ptr::null_mut())), dwflags, ::core::mem::transmute(pbprotectedblob.as_ptr()), pbprotectedblob.len().try_into().unwrap(), ::core::mem::transmute(pmempara.unwrap_or(::std::ptr::null())), hwnd.into_param().abi(), ppbdata, pcbdata).ok() } #[inline] pub unsafe fn NCryptVerifyClaim(hsubjectkey: P0, hauthoritykey: P1, dwclaimtype: u32, pparameterlist: ::core::option::Option<*const BCryptBufferDesc>, pbclaimblob: &[u8], poutput: *mut BCryptBufferDesc, dwflags: u32) -> ::windows_core::Result<()> @@ -3258,7 +3258,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("ncrypt.dll" "system" fn NCryptVerifyClaim(hsubjectkey : NCRYPT_KEY_HANDLE, hauthoritykey : NCRYPT_KEY_HANDLE, dwclaimtype : u32, pparameterlist : *const BCryptBufferDesc, pbclaimblob : *const u8, cbclaimblob : u32, poutput : *mut BCryptBufferDesc, dwflags : u32) -> ::windows_core::HRESULT); - NCryptVerifyClaim(hsubjectkey.into_param().abi(), hauthoritykey.into_param().abi(), dwclaimtype, ::core::mem::transmute(pparameterlist.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbclaimblob.as_ptr()), pbclaimblob.len() as _, poutput, dwflags).ok() + NCryptVerifyClaim(hsubjectkey.into_param().abi(), hauthoritykey.into_param().abi(), dwclaimtype, ::core::mem::transmute(pparameterlist.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbclaimblob.as_ptr()), pbclaimblob.len().try_into().unwrap(), poutput, dwflags).ok() } #[inline] pub unsafe fn NCryptVerifySignature(hkey: P0, ppaddinginfo: ::core::option::Option<*const ::core::ffi::c_void>, pbhashvalue: &[u8], pbsignature: &[u8], dwflags: NCRYPT_FLAGS) -> ::windows_core::Result<()> @@ -3266,7 +3266,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ncrypt.dll" "system" fn NCryptVerifySignature(hkey : NCRYPT_KEY_HANDLE, ppaddinginfo : *const ::core::ffi::c_void, pbhashvalue : *const u8, cbhashvalue : u32, pbsignature : *const u8, cbsignature : u32, dwflags : NCRYPT_FLAGS) -> ::windows_core::HRESULT); - NCryptVerifySignature(hkey.into_param().abi(), ::core::mem::transmute(ppaddinginfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbhashvalue.as_ptr()), pbhashvalue.len() as _, ::core::mem::transmute(pbsignature.as_ptr()), pbsignature.len() as _, dwflags).ok() + NCryptVerifySignature(hkey.into_param().abi(), ::core::mem::transmute(ppaddinginfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbhashvalue.as_ptr()), pbhashvalue.len().try_into().unwrap(), ::core::mem::transmute(pbsignature.as_ptr()), pbsignature.len().try_into().unwrap(), dwflags).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3321,7 +3321,7 @@ where #[inline] pub unsafe fn ProcessPrng(pbdata: &mut [u8]) -> super::super::Foundation::BOOL { ::windows_targets::link!("bcryptprimitives.dll" "system" fn ProcessPrng(pbdata : *mut u8, cbdata : usize) -> super::super::Foundation:: BOOL); - ProcessPrng(::core::mem::transmute(pbdata.as_ptr()), pbdata.len() as _) + ProcessPrng(::core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap()) } #[inline] pub unsafe fn SignError() -> ::windows_core::Result<()> { @@ -3334,7 +3334,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::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); - SignHash(hcrypto, phash.len() as _, ::core::mem::transmute(phash.as_ptr()), hashalgoid.into_param().abi(), pcbsig, ppsig).ok() + SignHash(hcrypto, phash.len().try_into().unwrap(), ::core::mem::transmute(phash.as_ptr()), hashalgoid.into_param().abi(), pcbsig, ppsig).ok() } #[inline] pub unsafe fn SignerFreeSignerContext(psignercontext: *const SIGNER_CONTEXT) -> ::windows_core::Result<()> { @@ -3463,17 +3463,17 @@ where #[inline] pub unsafe fn SystemPrng(pbrandomdata: &mut [u8]) -> super::super::Foundation::BOOL { ::windows_targets::link!("bcryptprimitives.dll" "system" fn SystemPrng(pbrandomdata : *mut u8, cbrandomdata : usize) -> super::super::Foundation:: BOOL); - SystemPrng(::core::mem::transmute(pbrandomdata.as_ptr()), pbrandomdata.len() as _) + SystemPrng(::core::mem::transmute(pbrandomdata.as_ptr()), pbrandomdata.len().try_into().unwrap()) } #[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); - TransformBlock(hcrypto, pindata.len() as _, ::core::mem::transmute(pindata.as_ptr()), pcboutdata, ppoutdata).ok() + TransformBlock(hcrypto, pindata.len().try_into().unwrap(), ::core::mem::transmute(pindata.as_ptr()), pcboutdata, ppoutdata).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); - TransformFinalBlock(hcrypto, pindata.len() as _, ::core::mem::transmute(pindata.as_ptr()), pcboutdata, ppoutdata).ok() + TransformFinalBlock(hcrypto, pindata.len().try_into().unwrap(), ::core::mem::transmute(pindata.as_ptr()), pcboutdata, ppoutdata).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3484,7 +3484,7 @@ where { ::windows_targets::link!("infocardapi.dll" "system" fn VerifyHash(hcrypto : *const INFORMATIONCARD_CRYPTO_HANDLE, cbhash : u32, phash : *const u8, hashalgoid : ::windows_core::PCWSTR, cbsig : u32, psig : *const u8, pfverified : *mut super::super::Foundation:: BOOL) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - VerifyHash(hcrypto, phash.len() as _, ::core::mem::transmute(phash.as_ptr()), hashalgoid.into_param().abi(), psig.len() as _, ::core::mem::transmute(psig.as_ptr()), &mut result__).from_abi(result__) + VerifyHash(hcrypto, phash.len().try_into().unwrap(), ::core::mem::transmute(phash.as_ptr()), hashalgoid.into_param().abi(), psig.len().try_into().unwrap(), ::core::mem::transmute(psig.as_ptr()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] 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 0f4ee674dd..261d26b52f 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/DiagnosticDataQuery/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/DiagnosticDataQuery/mod.rs @@ -92,7 +92,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqGetDiagnosticRecordBinaryDistribution(hsession : super:: HDIAGNOSTIC_DATA_QUERY_SESSION, producernames : *const ::windows_core::PCWSTR, producernamecount : u32, topnbinaries : u32, binarystats : *mut *mut DIAGNOSTIC_DATA_EVENT_BINARY_STATS, statcount : *mut u32) -> ::windows_core::HRESULT); - DdqGetDiagnosticRecordBinaryDistribution(hsession.into_param().abi(), ::core::mem::transmute(producernames.as_ptr()), producernames.len() as _, topnbinaries, binarystats, statcount).ok() + DdqGetDiagnosticRecordBinaryDistribution(hsession.into_param().abi(), ::core::mem::transmute(producernames.as_ptr()), producernames.len().try_into().unwrap(), topnbinaries, binarystats, statcount).ok() } #[inline] pub unsafe fn DdqGetDiagnosticRecordCategoryAtIndex(hcategorydescription: P0, index: u32) -> ::windows_core::Result @@ -222,7 +222,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqGetDiagnosticRecordSummary(hsession : super:: HDIAGNOSTIC_DATA_QUERY_SESSION, producernames : *const ::windows_core::PCWSTR, producernamecount : u32, generalstats : *mut DIAGNOSTIC_DATA_GENERAL_STATS) -> ::windows_core::HRESULT); - DdqGetDiagnosticRecordSummary(hsession.into_param().abi(), ::core::mem::transmute(producernames.as_ptr()), producernames.len() as _, generalstats).ok() + DdqGetDiagnosticRecordSummary(hsession.into_param().abi(), ::core::mem::transmute(producernames.as_ptr()), producernames.len().try_into().unwrap(), generalstats).ok() } #[inline] pub unsafe fn DdqGetDiagnosticRecordTagDistribution(hsession: P0, producernames: &[::windows_core::PCWSTR], tagstats: *mut *mut DIAGNOSTIC_DATA_EVENT_TAG_STATS, statcount: *mut u32) -> ::windows_core::Result<()> @@ -230,7 +230,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqGetDiagnosticRecordTagDistribution(hsession : super:: HDIAGNOSTIC_DATA_QUERY_SESSION, producernames : *const ::windows_core::PCWSTR, producernamecount : u32, tagstats : *mut *mut DIAGNOSTIC_DATA_EVENT_TAG_STATS, statcount : *mut u32) -> ::windows_core::HRESULT); - DdqGetDiagnosticRecordTagDistribution(hsession.into_param().abi(), ::core::mem::transmute(producernames.as_ptr()), producernames.len() as _, tagstats, statcount).ok() + DdqGetDiagnosticRecordTagDistribution(hsession.into_param().abi(), ::core::mem::transmute(producernames.as_ptr()), producernames.len().try_into().unwrap(), tagstats, statcount).ok() } #[inline] pub unsafe fn DdqGetDiagnosticReport(hsession: P0, reportstoretype: u32) -> ::windows_core::Result 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 47ee10e9c6..fc32b19a85 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/ExtensibleAuthenticationProtocol/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/ExtensibleAuthenticationProtocol/mod.rs @@ -18,7 +18,7 @@ pub unsafe fn EapHostPeerClearConnection(pconnectionid: *mut ::windows_core::GUI #[inline] pub unsafe fn EapHostPeerConfigBlob2Xml(dwflags: u32, eapmethodtype: EAP_METHOD_TYPE, pconfigin: &[u8], ppconfigdoc: *mut ::core::option::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); - EapHostPeerConfigBlob2Xml(dwflags, ::core::mem::transmute(eapmethodtype), pconfigin.len() as _, ::core::mem::transmute(pconfigin.as_ptr()), ::core::mem::transmute(ppconfigdoc), ppeaperror) + EapHostPeerConfigBlob2Xml(dwflags, ::core::mem::transmute(eapmethodtype), pconfigin.len().try_into().unwrap(), ::core::mem::transmute(pconfigin.as_ptr()), ::core::mem::transmute(ppconfigdoc), ppeaperror) } #[doc = "Required features: `\"Win32_Data_Xml_MsXml\"`, `\"Win32_System_Com\"`"] #[cfg(all(feature = "Win32_Data_Xml_MsXml", feature = "Win32_System_Com"))] @@ -38,7 +38,7 @@ where P0: ::windows_core::IntoParam, { ::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); - EapHostPeerCredentialsXml2Blob(dwflags, pcredentialsdoc.into_param().abi(), pconfigin.len() as _, ::core::mem::transmute(pconfigin.as_ptr()), pdwsizeofcredentialsout, ppcredentialsout, peapmethodtype, ppeaperror) + EapHostPeerCredentialsXml2Blob(dwflags, pcredentialsdoc.into_param().abi(), pconfigin.len().try_into().unwrap(), ::core::mem::transmute(pconfigin.as_ptr()), pdwsizeofcredentialsout, ppcredentialsout, peapmethodtype, ppeaperror) } #[inline] pub unsafe fn EapHostPeerEndSession(sessionhandle: u32, ppeaperror: *mut *mut EAP_ERROR) -> u32 { @@ -93,7 +93,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("eappprxy.dll" "system" fn EapHostPeerGetIdentity(dwversion : u32, dwflags : u32, eapmethodtype : EAP_METHOD_TYPE, dwsizeofconnectiondata : u32, pconnectiondata : *const u8, dwsizeofuserdata : u32, puserdata : *const u8, htokenimpersonateuser : super::super::Foundation:: HANDLE, pfinvokeui : *mut super::super::Foundation:: BOOL, pdwsizeofuserdataout : *mut u32, ppuserdataout : *mut *mut u8, ppwszidentity : *mut ::windows_core::PWSTR, ppeaperror : *mut *mut EAP_ERROR, ppvreserved : *mut *mut u8) -> u32); - EapHostPeerGetIdentity(dwversion, dwflags, ::core::mem::transmute(eapmethodtype), pconnectiondata.len() as _, ::core::mem::transmute(pconnectiondata.as_ptr()), puserdata.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(puserdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), htokenimpersonateuser.into_param().abi(), pfinvokeui, pdwsizeofuserdataout, ppuserdataout, ppwszidentity, ppeaperror, ppvreserved) + 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.into_param().abi(), pfinvokeui, pdwsizeofuserdataout, ppuserdataout, ppwszidentity, ppeaperror, ppvreserved) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -103,7 +103,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("eappcfg.dll" "system" fn EapHostPeerGetMethodProperties(dwversion : u32, dwflags : u32, eapmethodtype : EAP_METHOD_TYPE, huserimpersonationtoken : super::super::Foundation:: HANDLE, dweapconndatasize : u32, pbeapconndata : *const u8, dwuserdatasize : u32, pbuserdata : *const u8, pmethodpropertyarray : *mut EAP_METHOD_PROPERTY_ARRAY, ppeaperror : *mut *mut EAP_ERROR) -> u32); - EapHostPeerGetMethodProperties(dwversion, dwflags, ::core::mem::transmute(eapmethodtype), huserimpersonationtoken.into_param().abi(), pbeapconndata.len() as _, ::core::mem::transmute(pbeapconndata.as_ptr()), pbuserdata.len() as _, ::core::mem::transmute(pbuserdata.as_ptr()), pmethodpropertyarray, ppeaperror) + EapHostPeerGetMethodProperties(dwversion, dwflags, ::core::mem::transmute(eapmethodtype), huserimpersonationtoken.into_param().abi(), pbeapconndata.len().try_into().unwrap(), ::core::mem::transmute(pbeapconndata.as_ptr()), pbuserdata.len().try_into().unwrap(), ::core::mem::transmute(pbuserdata.as_ptr()), pmethodpropertyarray, ppeaperror) } #[inline] pub unsafe fn EapHostPeerGetMethods(peapmethodinfoarray: *mut EAP_METHOD_INFO_ARRAY, ppeaperror: *mut *mut EAP_ERROR) -> u32 { @@ -145,7 +145,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("eappcfg.dll" "system" fn EapHostPeerInvokeConfigUI(hwndparent : super::super::Foundation:: HWND, dwflags : u32, eapmethodtype : EAP_METHOD_TYPE, dwsizeofconfigin : u32, pconfigin : *const u8, pdwsizeofconfigout : *mut u32, ppconfigout : *mut *mut u8, ppeaperror : *mut *mut EAP_ERROR) -> u32); - EapHostPeerInvokeConfigUI(hwndparent.into_param().abi(), dwflags, ::core::mem::transmute(eapmethodtype), pconfigin.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pconfigin.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdwsizeofconfigout, ppconfigout, ppeaperror) + EapHostPeerInvokeConfigUI(hwndparent.into_param().abi(), 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, ppconfigout, ppeaperror) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -155,7 +155,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("eappcfg.dll" "system" fn EapHostPeerInvokeIdentityUI(dwversion : u32, eapmethodtype : EAP_METHOD_TYPE, dwflags : u32, hwndparent : super::super::Foundation:: HWND, dwsizeofconnectiondata : u32, pconnectiondata : *const u8, dwsizeofuserdata : u32, puserdata : *const u8, pdwsizeofuserdataout : *mut u32, ppuserdataout : *mut *mut u8, ppwszidentity : *mut ::windows_core::PWSTR, ppeaperror : *mut *mut EAP_ERROR, ppvreserved : *mut *mut ::core::ffi::c_void) -> u32); - EapHostPeerInvokeIdentityUI(dwversion, ::core::mem::transmute(eapmethodtype), dwflags, hwndparent.into_param().abi(), pconnectiondata.len() as _, ::core::mem::transmute(pconnectiondata.as_ptr()), puserdata.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(puserdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdwsizeofuserdataout, ppuserdataout, ppwszidentity, ppeaperror, ppvreserved) + EapHostPeerInvokeIdentityUI(dwversion, ::core::mem::transmute(eapmethodtype), dwflags, hwndparent.into_param().abi(), 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, ppuserdataout, ppwszidentity, ppeaperror, ppvreserved) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -165,7 +165,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("eappcfg.dll" "system" fn EapHostPeerInvokeInteractiveUI(hwndparent : super::super::Foundation:: HWND, dwsizeofuicontextdata : u32, puicontextdata : *const u8, pdwsizeofdatafrominteractiveui : *mut u32, ppdatafrominteractiveui : *mut *mut u8, ppeaperror : *mut *mut EAP_ERROR) -> u32); - EapHostPeerInvokeInteractiveUI(hwndparent.into_param().abi(), puicontextdata.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(puicontextdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdwsizeofdatafrominteractiveui, ppdatafrominteractiveui, ppeaperror) + EapHostPeerInvokeInteractiveUI(hwndparent.into_param().abi(), puicontextdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(puicontextdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdwsizeofdatafrominteractiveui, ppdatafrominteractiveui, ppeaperror) } #[inline] pub unsafe fn EapHostPeerProcessReceivedPacket(sessionhandle: u32, cbreceivepacket: u32, preceivepacket: *const u8, peapoutput: *mut EapHostPeerResponseAction, ppeaperror: *mut *mut EAP_ERROR) -> u32 { @@ -180,17 +180,17 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("eappcfg.dll" "system" fn EapHostPeerQueryCredentialInputFields(huserimpersonationtoken : super::super::Foundation:: HANDLE, eapmethodtype : EAP_METHOD_TYPE, dwflags : u32, dweapconndatasize : u32, pbeapconndata : *const u8, peapconfiginputfieldarray : *mut EAP_CONFIG_INPUT_FIELD_ARRAY, ppeaperror : *mut *mut EAP_ERROR) -> u32); - EapHostPeerQueryCredentialInputFields(huserimpersonationtoken.into_param().abi(), ::core::mem::transmute(eapmethodtype), dwflags, pbeapconndata.len() as _, ::core::mem::transmute(pbeapconndata.as_ptr()), peapconfiginputfieldarray, ppeaperror) + EapHostPeerQueryCredentialInputFields(huserimpersonationtoken.into_param().abi(), ::core::mem::transmute(eapmethodtype), dwflags, pbeapconndata.len().try_into().unwrap(), ::core::mem::transmute(pbeapconndata.as_ptr()), peapconfiginputfieldarray, ppeaperror) } #[inline] pub unsafe fn EapHostPeerQueryInteractiveUIInputFields(dwversion: u32, dwflags: u32, puicontextdata: &[u8], peapinteractiveuidata: *mut EAP_INTERACTIVE_UI_DATA, ppeaperror: *mut *mut EAP_ERROR, ppvreserved: *mut *mut ::core::ffi::c_void) -> u32 { ::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); - EapHostPeerQueryInteractiveUIInputFields(dwversion, dwflags, puicontextdata.len() as _, ::core::mem::transmute(puicontextdata.as_ptr()), peapinteractiveuidata, ppeaperror, ppvreserved) + EapHostPeerQueryInteractiveUIInputFields(dwversion, dwflags, puicontextdata.len().try_into().unwrap(), ::core::mem::transmute(puicontextdata.as_ptr()), peapinteractiveuidata, ppeaperror, ppvreserved) } #[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); - EapHostPeerQueryUIBlobFromInteractiveUIInputFields(dwversion, dwflags, puicontextdata.len() as _, ::core::mem::transmute(puicontextdata.as_ptr()), peapinteractiveuidata, pdwsizeofdatafrominteractiveui, ppdatafrominteractiveui, ppeaperror, ppvreserved) + EapHostPeerQueryUIBlobFromInteractiveUIInputFields(dwversion, dwflags, puicontextdata.len().try_into().unwrap(), ::core::mem::transmute(puicontextdata.as_ptr()), peapinteractiveuidata, pdwsizeofdatafrominteractiveui, ppdatafrominteractiveui, ppeaperror, ppvreserved) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -200,7 +200,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("eappcfg.dll" "system" fn EapHostPeerQueryUserBlobFromCredentialInputFields(huserimpersonationtoken : super::super::Foundation:: HANDLE, eapmethodtype : EAP_METHOD_TYPE, dwflags : u32, dweapconndatasize : u32, pbeapconndata : *const u8, peapconfiginputfieldarray : *const EAP_CONFIG_INPUT_FIELD_ARRAY, pdwuserblobsize : *mut u32, ppbuserblob : *mut *mut u8, ppeaperror : *mut *mut EAP_ERROR) -> u32); - EapHostPeerQueryUserBlobFromCredentialInputFields(huserimpersonationtoken.into_param().abi(), ::core::mem::transmute(eapmethodtype), dwflags, pbeapconndata.len() as _, ::core::mem::transmute(pbeapconndata.as_ptr()), peapconfiginputfieldarray, pdwuserblobsize, ppbuserblob, ppeaperror) + EapHostPeerQueryUserBlobFromCredentialInputFields(huserimpersonationtoken.into_param().abi(), ::core::mem::transmute(eapmethodtype), dwflags, pbeapconndata.len().try_into().unwrap(), ::core::mem::transmute(pbeapconndata.as_ptr()), peapconfiginputfieldarray, pdwuserblobsize, ppbuserblob, ppeaperror) } #[inline] pub unsafe fn EapHostPeerSetResponseAttributes(sessionhandle: u32, pattribs: *const EAP_ATTRIBUTES, peapoutput: *mut EapHostPeerResponseAction, ppeaperror: *mut *mut EAP_ERROR) -> u32 { @@ -343,7 +343,7 @@ impl IEAPProviderConfig { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).RouterInvokeConfigUI)(::windows_core::Interface::as_raw(self), dweaptypeid, uconnectionparam, hwndparent.into_param().abi(), dwflags, ::core::mem::transmute(pconnectiondatain.as_ptr()), pconnectiondatain.len() as _, ppconnectiondataout, pdwsizeofconnectiondataout).ok() + (::windows_core::Interface::vtable(self).RouterInvokeConfigUI)(::windows_core::Interface::as_raw(self), dweaptypeid, uconnectionparam, hwndparent.into_param().abi(), dwflags, ::core::mem::transmute(pconnectiondatain.as_ptr()), pconnectiondatain.len().try_into().unwrap(), ppconnectiondataout, pdwsizeofconnectiondataout).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -351,7 +351,7 @@ impl IEAPProviderConfig { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).RouterInvokeCredentialsUI)(::windows_core::Interface::as_raw(self), dweaptypeid, uconnectionparam, hwndparent.into_param().abi(), dwflags, ::core::mem::transmute(pconnectiondatain.as_ptr()), pconnectiondatain.len() as _, ::core::mem::transmute(puserdatain.as_ptr()), puserdatain.len() as _, ppuserdataout, pdwsizeofuserdataout).ok() + (::windows_core::Interface::vtable(self).RouterInvokeCredentialsUI)(::windows_core::Interface::as_raw(self), dweaptypeid, uconnectionparam, hwndparent.into_param().abi(), dwflags, ::core::mem::transmute(pconnectiondatain.as_ptr()), pconnectiondatain.len().try_into().unwrap(), ::core::mem::transmute(puserdatain.as_ptr()), puserdatain.len().try_into().unwrap(), ppuserdataout, pdwsizeofuserdataout).ok() } } ::windows_core::imp::interface_hierarchy!(IEAPProviderConfig, ::windows_core::IUnknown); @@ -408,7 +408,7 @@ impl IEAPProviderConfig2 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.RouterInvokeConfigUI)(::windows_core::Interface::as_raw(self), dweaptypeid, uconnectionparam, hwndparent.into_param().abi(), dwflags, ::core::mem::transmute(pconnectiondatain.as_ptr()), pconnectiondatain.len() as _, ppconnectiondataout, pdwsizeofconnectiondataout).ok() + (::windows_core::Interface::vtable(self).base__.RouterInvokeConfigUI)(::windows_core::Interface::as_raw(self), dweaptypeid, uconnectionparam, hwndparent.into_param().abi(), dwflags, ::core::mem::transmute(pconnectiondatain.as_ptr()), pconnectiondatain.len().try_into().unwrap(), ppconnectiondataout, pdwsizeofconnectiondataout).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -416,7 +416,7 @@ impl IEAPProviderConfig2 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.RouterInvokeCredentialsUI)(::windows_core::Interface::as_raw(self), dweaptypeid, uconnectionparam, hwndparent.into_param().abi(), dwflags, ::core::mem::transmute(pconnectiondatain.as_ptr()), pconnectiondatain.len() as _, ::core::mem::transmute(puserdatain.as_ptr()), puserdatain.len() as _, ppuserdataout, pdwsizeofuserdataout).ok() + (::windows_core::Interface::vtable(self).base__.RouterInvokeCredentialsUI)(::windows_core::Interface::as_raw(self), dweaptypeid, uconnectionparam, hwndparent.into_param().abi(), dwflags, ::core::mem::transmute(pconnectiondatain.as_ptr()), pconnectiondatain.len().try_into().unwrap(), ::core::mem::transmute(puserdatain.as_ptr()), puserdatain.len().try_into().unwrap(), ppuserdataout, pdwsizeofuserdataout).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -475,7 +475,7 @@ impl IEAPProviderConfig3 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.RouterInvokeConfigUI)(::windows_core::Interface::as_raw(self), dweaptypeid, uconnectionparam, hwndparent.into_param().abi(), dwflags, ::core::mem::transmute(pconnectiondatain.as_ptr()), pconnectiondatain.len() as _, ppconnectiondataout, pdwsizeofconnectiondataout).ok() + (::windows_core::Interface::vtable(self).base__.base__.RouterInvokeConfigUI)(::windows_core::Interface::as_raw(self), dweaptypeid, uconnectionparam, hwndparent.into_param().abi(), dwflags, ::core::mem::transmute(pconnectiondatain.as_ptr()), pconnectiondatain.len().try_into().unwrap(), ppconnectiondataout, pdwsizeofconnectiondataout).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -483,7 +483,7 @@ impl IEAPProviderConfig3 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.RouterInvokeCredentialsUI)(::windows_core::Interface::as_raw(self), dweaptypeid, uconnectionparam, hwndparent.into_param().abi(), dwflags, ::core::mem::transmute(pconnectiondatain.as_ptr()), pconnectiondatain.len() as _, ::core::mem::transmute(puserdatain.as_ptr()), puserdatain.len() as _, ppuserdataout, pdwsizeofuserdataout).ok() + (::windows_core::Interface::vtable(self).base__.base__.RouterInvokeCredentialsUI)(::windows_core::Interface::as_raw(self), dweaptypeid, uconnectionparam, hwndparent.into_param().abi(), dwflags, ::core::mem::transmute(pconnectiondatain.as_ptr()), pconnectiondatain.len().try_into().unwrap(), ::core::mem::transmute(puserdatain.as_ptr()), puserdatain.len().try_into().unwrap(), ppuserdataout, pdwsizeofuserdataout).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 bf22bfef35..b0181b820f 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Isolation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Isolation/mod.rs @@ -9,7 +9,7 @@ where { ::windows_targets::link!("userenv.dll" "system" fn CreateAppContainerProfile(pszappcontainername : ::windows_core::PCWSTR, pszdisplayname : ::windows_core::PCWSTR, pszdescription : ::windows_core::PCWSTR, pcapabilities : *const super:: SID_AND_ATTRIBUTES, dwcapabilitycount : u32, ppsidappcontainersid : *mut super::super::Foundation:: PSID) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - CreateAppContainerProfile(pszappcontainername.into_param().abi(), pszdisplayname.into_param().abi(), pszdescription.into_param().abi(), ::core::mem::transmute(pcapabilities.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pcapabilities.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + CreateAppContainerProfile(pszappcontainername.into_param().abi(), pszdisplayname.into_param().abi(), pszdescription.into_param().abi(), ::core::mem::transmute(pcapabilities.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pcapabilities.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } #[inline] pub unsafe fn DeleteAppContainerProfile(pszappcontainername: P0) -> ::windows_core::Result<()> @@ -60,7 +60,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetAppContainerNamedObjectPath(token : super::super::Foundation:: HANDLE, appcontainersid : super::super::Foundation:: PSID, objectpathlength : u32, objectpath : ::windows_core::PWSTR, returnlength : *mut u32) -> super::super::Foundation:: BOOL); - GetAppContainerNamedObjectPath(token.into_param().abi(), appcontainersid.into_param().abi(), objectpath.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(objectpath.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnlength).ok() + GetAppContainerNamedObjectPath(token.into_param().abi(), appcontainersid.into_param().abi(), objectpath.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(objectpath.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnlength).ok() } #[doc = "Required features: `\"Win32_System_Registry\"`"] #[cfg(feature = "Win32_System_Registry")] 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 61f7e2abbf..c703a45608 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Tpm/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Tpm/mod.rs @@ -10,7 +10,24 @@ impl ITpmVirtualSmartCardManager { P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).CreateVirtualSmartCard)(::windows_core::Interface::as_raw(self), pszfriendlyname.into_param().abi(), badminalgid, ::core::mem::transmute(pbadminkey.as_ptr()), pbadminkey.len() as _, ::core::mem::transmute(pbadminkcv.as_ptr()), pbadminkcv.len() as _, ::core::mem::transmute(pbpuk.as_ptr()), pbpuk.len() as _, ::core::mem::transmute(pbpin.as_ptr()), pbpin.len() as _, fgenerate.into_param().abi(), pstatuscallback.into_param().abi(), ppszinstanceid, pfneedreboot).ok() + (::windows_core::Interface::vtable(self).CreateVirtualSmartCard)( + ::windows_core::Interface::as_raw(self), + pszfriendlyname.into_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_param().abi(), + pstatuscallback.into_param().abi(), + ppszinstanceid, + pfneedreboot, + ) + .ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -55,7 +72,24 @@ impl ITpmVirtualSmartCardManager2 { P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.CreateVirtualSmartCard)(::windows_core::Interface::as_raw(self), pszfriendlyname.into_param().abi(), badminalgid, ::core::mem::transmute(pbadminkey.as_ptr()), pbadminkey.len() as _, ::core::mem::transmute(pbadminkcv.as_ptr()), pbadminkcv.len() as _, ::core::mem::transmute(pbpuk.as_ptr()), pbpuk.len() as _, ::core::mem::transmute(pbpin.as_ptr()), pbpin.len() as _, fgenerate.into_param().abi(), pstatuscallback.into_param().abi(), ppszinstanceid, pfneedreboot).ok() + (::windows_core::Interface::vtable(self).base__.CreateVirtualSmartCard)( + ::windows_core::Interface::as_raw(self), + pszfriendlyname.into_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_param().abi(), + pstatuscallback.into_param().abi(), + ppszinstanceid, + pfneedreboot, + ) + .ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -80,15 +114,15 @@ impl ITpmVirtualSmartCardManager2 { pszfriendlyname.into_param().abi(), badminalgid, ::core::mem::transmute(pbadminkey.as_ptr()), - pbadminkey.len() as _, + pbadminkey.len().try_into().unwrap(), ::core::mem::transmute(pbadminkcv.as_ptr()), - pbadminkcv.len() as _, + pbadminkcv.len().try_into().unwrap(), ::core::mem::transmute(pbpuk.as_ptr()), - pbpuk.len() as _, + pbpuk.len().try_into().unwrap(), ::core::mem::transmute(pbpin.as_ptr()), - pbpin.len() as _, + pbpin.len().try_into().unwrap(), ::core::mem::transmute(pbpinpolicy.as_ptr()), - pbpinpolicy.len() as _, + pbpinpolicy.len().try_into().unwrap(), fgenerate.into_param().abi(), pstatuscallback.into_param().abi(), ppszinstanceid, @@ -125,7 +159,24 @@ impl ITpmVirtualSmartCardManager3 { P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.CreateVirtualSmartCard)(::windows_core::Interface::as_raw(self), pszfriendlyname.into_param().abi(), badminalgid, ::core::mem::transmute(pbadminkey.as_ptr()), pbadminkey.len() as _, ::core::mem::transmute(pbadminkcv.as_ptr()), pbadminkcv.len() as _, ::core::mem::transmute(pbpuk.as_ptr()), pbpuk.len() as _, ::core::mem::transmute(pbpin.as_ptr()), pbpin.len() as _, fgenerate.into_param().abi(), pstatuscallback.into_param().abi(), ppszinstanceid, pfneedreboot).ok() + (::windows_core::Interface::vtable(self).base__.base__.CreateVirtualSmartCard)( + ::windows_core::Interface::as_raw(self), + pszfriendlyname.into_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_param().abi(), + pstatuscallback.into_param().abi(), + ppszinstanceid, + pfneedreboot, + ) + .ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -150,15 +201,15 @@ impl ITpmVirtualSmartCardManager3 { pszfriendlyname.into_param().abi(), badminalgid, ::core::mem::transmute(pbadminkey.as_ptr()), - pbadminkey.len() as _, + pbadminkey.len().try_into().unwrap(), ::core::mem::transmute(pbadminkcv.as_ptr()), - pbadminkcv.len() as _, + pbadminkcv.len().try_into().unwrap(), ::core::mem::transmute(pbpuk.as_ptr()), - pbpuk.len() as _, + pbpuk.len().try_into().unwrap(), ::core::mem::transmute(pbpin.as_ptr()), - pbpin.len() as _, + pbpin.len().try_into().unwrap(), ::core::mem::transmute(pbpinpolicy.as_ptr()), - pbpinpolicy.len() as _, + pbpinpolicy.len().try_into().unwrap(), fgenerate.into_param().abi(), pstatuscallback.into_param().abi(), ppszinstanceid, @@ -180,15 +231,15 @@ impl ITpmVirtualSmartCardManager3 { pszfriendlyname.into_param().abi(), badminalgid, ::core::mem::transmute(pbadminkey.as_ptr()), - pbadminkey.len() as _, + pbadminkey.len().try_into().unwrap(), ::core::mem::transmute(pbadminkcv.as_ptr()), - pbadminkcv.len() as _, + pbadminkcv.len().try_into().unwrap(), ::core::mem::transmute(pbpuk.as_ptr()), - pbpuk.len() as _, + pbpuk.len().try_into().unwrap(), ::core::mem::transmute(pbpin.as_ptr()), - pbpin.len() as _, + pbpin.len().try_into().unwrap(), ::core::mem::transmute(pbpinpolicy.as_ptr()), - pbpinpolicy.len() as _, + pbpinpolicy.len().try_into().unwrap(), attestationtype, fgenerate.into_param().abi(), pstatuscallback.into_param().abi(), diff --git a/crates/libs/windows/src/Windows/Win32/Security/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/mod.rs index 1658687823..9ad6aee720 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/mod.rs @@ -95,7 +95,7 @@ where P2: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn AccessCheckByType(psecuritydescriptor : PSECURITY_DESCRIPTOR, principalselfsid : super::Foundation:: PSID, clienttoken : super::Foundation:: HANDLE, desiredaccess : u32, objecttypelist : *mut OBJECT_TYPE_LIST, objecttypelistlength : u32, genericmapping : *const GENERIC_MAPPING, privilegeset : *mut PRIVILEGE_SET, privilegesetlength : *mut u32, grantedaccess : *mut u32, accessstatus : *mut super::Foundation:: BOOL) -> super::Foundation:: BOOL); - AccessCheckByType(psecuritydescriptor.into_param().abi(), principalselfsid.into_param().abi(), clienttoken.into_param().abi(), desiredaccess, ::core::mem::transmute(objecttypelist.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), objecttypelist.as_deref().map_or(0, |slice| slice.len() as _), genericmapping, ::core::mem::transmute(privilegeset.unwrap_or(::std::ptr::null_mut())), privilegesetlength, grantedaccess, accessstatus).ok() + AccessCheckByType(psecuritydescriptor.into_param().abi(), principalselfsid.into_param().abi(), clienttoken.into_param().abi(), desiredaccess, ::core::mem::transmute(objecttypelist.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), objecttypelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), genericmapping, ::core::mem::transmute(privilegeset.unwrap_or(::std::ptr::null_mut())), privilegesetlength, grantedaccess, accessstatus).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -121,7 +121,7 @@ where 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() as _), + objecttypelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), genericmapping, objectcreation.into_param().abi(), grantedaccess, @@ -154,7 +154,7 @@ where 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() as _), + objecttypelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), genericmapping, objectcreation.into_param().abi(), grantedaccess, @@ -522,7 +522,7 @@ where P3: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn CreatePrivateObjectSecurityWithMultipleInheritance(parentdescriptor : PSECURITY_DESCRIPTOR, creatordescriptor : PSECURITY_DESCRIPTOR, newdescriptor : *mut PSECURITY_DESCRIPTOR, objecttypes : *const *const ::windows_core::GUID, guidcount : u32, iscontainerobject : super::Foundation:: BOOL, autoinheritflags : SECURITY_AUTO_INHERIT_FLAGS, token : super::Foundation:: HANDLE, genericmapping : *const GENERIC_MAPPING) -> super::Foundation:: BOOL); - CreatePrivateObjectSecurityWithMultipleInheritance(parentdescriptor.into_param().abi(), creatordescriptor.into_param().abi(), newdescriptor, ::core::mem::transmute(objecttypes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), objecttypes.as_deref().map_or(0, |slice| slice.len() as _), iscontainerobject.into_param().abi(), autoinheritflags, token.into_param().abi(), genericmapping).ok() + CreatePrivateObjectSecurityWithMultipleInheritance(parentdescriptor.into_param().abi(), creatordescriptor.into_param().abi(), newdescriptor, ::core::mem::transmute(objecttypes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), objecttypes.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), iscontainerobject.into_param().abi(), autoinheritflags, token.into_param().abi(), genericmapping).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -535,11 +535,11 @@ where CreateRestrictedToken( existingtokenhandle.into_param().abi(), flags, - sidstodisable.as_deref().map_or(0, |slice| slice.len() as _), + sidstodisable.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(sidstodisable.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - privilegestodelete.as_deref().map_or(0, |slice| slice.len() as _), + privilegestodelete.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(privilegestodelete.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - sidstorestrict.as_deref().map_or(0, |slice| slice.len() as _), + 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())), newtokenhandle, ) @@ -1344,7 +1344,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetCachedSigningLevel(sourcefiles : *const super::Foundation:: HANDLE, sourcefilecount : u32, flags : u32, targetfile : super::Foundation:: HANDLE) -> super::Foundation:: BOOL); - SetCachedSigningLevel(::core::mem::transmute(sourcefiles.as_ptr()), sourcefiles.len() as _, flags, targetfile.into_param().abi()) + SetCachedSigningLevel(::core::mem::transmute(sourcefiles.as_ptr()), sourcefiles.len().try_into().unwrap(), flags, targetfile.into_param().abi()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 1795ae8d9e..5b9c2bb8b2 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/CloudFilters/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/CloudFilters/mod.rs @@ -37,7 +37,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("cldapi.dll" "system" fn CfCreatePlaceholders(basedirectorypath : ::windows_core::PCWSTR, placeholderarray : *mut CF_PLACEHOLDER_CREATE_INFO, placeholdercount : u32, createflags : CF_CREATE_FLAGS, entriesprocessed : *mut u32) -> ::windows_core::HRESULT); - CfCreatePlaceholders(basedirectorypath.into_param().abi(), ::core::mem::transmute(placeholderarray.as_ptr()), placeholderarray.len() as _, createflags, ::core::mem::transmute(entriesprocessed.unwrap_or(::std::ptr::null_mut()))).ok() + CfCreatePlaceholders(basedirectorypath.into_param().abi(), ::core::mem::transmute(placeholderarray.as_ptr()), placeholderarray.len().try_into().unwrap(), createflags, ::core::mem::transmute(entriesprocessed.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_IO\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] @@ -320,7 +320,7 @@ where ::core::mem::transmute(fileidentity.unwrap_or(::std::ptr::null())), fileidentitylength, ::core::mem::transmute(dehydraterangearray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - dehydraterangearray.as_deref().map_or(0, |slice| slice.len() as _), + dehydraterangearray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), updateflags, ::core::mem::transmute(updateusn.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null_mut())), 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 606cb9d726..39ed603127 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/DataDeduplication/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/DataDeduplication/mod.rs @@ -70,11 +70,11 @@ impl IDedupDataPort { } pub unsafe fn LookupChunks(&self, phashes: &[DedupHash]) -> ::windows_core::Result<::windows_core::GUID> { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).LookupChunks)(::windows_core::Interface::as_raw(self), phashes.len() as _, ::core::mem::transmute(phashes.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).LookupChunks)(::windows_core::Interface::as_raw(self), phashes.len().try_into().unwrap(), ::core::mem::transmute(phashes.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn InsertChunks(&self, pchunkmetadata: &[DedupChunk], pchunkdata: &[u8]) -> ::windows_core::Result<::windows_core::GUID> { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).InsertChunks)(::windows_core::Interface::as_raw(self), pchunkmetadata.len() as _, ::core::mem::transmute(pchunkmetadata.as_ptr()), pchunkdata.len() as _, ::core::mem::transmute(pchunkdata.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).InsertChunks)(::windows_core::Interface::as_raw(self), pchunkmetadata.len().try_into().unwrap(), ::core::mem::transmute(pchunkmetadata.as_ptr()), pchunkdata.len().try_into().unwrap(), ::core::mem::transmute(pchunkdata.as_ptr()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -83,11 +83,11 @@ impl IDedupDataPort { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).InsertChunksWithStream)(::windows_core::Interface::as_raw(self), pchunkmetadata.len() as _, ::core::mem::transmute(pchunkmetadata.as_ptr()), databytecount, pchunkdatastream.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).InsertChunksWithStream)(::windows_core::Interface::as_raw(self), pchunkmetadata.len().try_into().unwrap(), ::core::mem::transmute(pchunkmetadata.as_ptr()), databytecount, pchunkdatastream.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn CommitStreams(&self, pstreams: &[DedupStream], pentries: &[DedupStreamEntry]) -> ::windows_core::Result<::windows_core::GUID> { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CommitStreams)(::windows_core::Interface::as_raw(self), pstreams.len() as _, ::core::mem::transmute(pstreams.as_ptr()), pentries.len() as _, ::core::mem::transmute(pentries.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CommitStreams)(::windows_core::Interface::as_raw(self), pstreams.len().try_into().unwrap(), ::core::mem::transmute(pstreams.as_ptr()), pentries.len().try_into().unwrap(), ::core::mem::transmute(pentries.as_ptr()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -96,18 +96,18 @@ impl IDedupDataPort { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CommitStreamsWithStream)(::windows_core::Interface::as_raw(self), pstreams.len() as _, ::core::mem::transmute(pstreams.as_ptr()), entrycount, pentriesstream.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CommitStreamsWithStream)(::windows_core::Interface::as_raw(self), pstreams.len().try_into().unwrap(), ::core::mem::transmute(pstreams.as_ptr()), entrycount, pentriesstream.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn GetStreams(&self, pstreampaths: &[::windows_core::BSTR]) -> ::windows_core::Result<::windows_core::GUID> { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).GetStreams)(::windows_core::Interface::as_raw(self), pstreampaths.len() as _, ::core::mem::transmute(pstreampaths.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).GetStreams)(::windows_core::Interface::as_raw(self), pstreampaths.len().try_into().unwrap(), ::core::mem::transmute(pstreampaths.as_ptr()), &mut result__).from_abi(result__) } 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<()> { (::windows_core::Interface::vtable(self).GetStreamsResults)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(requestid), maxwaitms, streamentryindex, pstreamcount, ppstreams, pentrycount, ppentries, pstatus, ppitemresults).ok() } pub unsafe fn GetChunks(&self, phashes: &[DedupHash]) -> ::windows_core::Result<::windows_core::GUID> { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).GetChunks)(::windows_core::Interface::as_raw(self), phashes.len() as _, ::core::mem::transmute(phashes.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).GetChunks)(::windows_core::Interface::as_raw(self), phashes.len().try_into().unwrap(), ::core::mem::transmute(phashes.as_ptr()), &mut result__).from_abi(result__) } 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<()> { (::windows_core::Interface::vtable(self).GetChunksResults)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(requestid), maxwaitms, chunkindex, pchunkcount, ppchunkmetadata, pdatabytecount, ppchunkdata, pstatus, ppitemresults).ok() @@ -192,10 +192,10 @@ pub struct IDedupDataPortManager_Vtbl { pub struct IDedupIterateChunksHash32(::windows_core::IUnknown); impl IDedupIterateChunksHash32 { pub unsafe fn PushBuffer(&self, pbuffer: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).PushBuffer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len() as _).ok() + (::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<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), parrchunks.len() as _, ::core::mem::transmute(parrchunks.as_ptr()), pulfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), parrchunks.len().try_into().unwrap(), ::core::mem::transmute(parrchunks.as_ptr()), pulfetched).ok() } pub unsafe fn Drain(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Drain)(::windows_core::Interface::as_raw(self)).ok() @@ -228,16 +228,16 @@ impl IDedupReadFileCallback { where P0: ::windows_core::IntoParam<::windows_core::BSTR>, { - (::windows_core::Interface::vtable(self).ReadBackupFile)(::windows_core::Interface::as_raw(self), filefullpath.into_param().abi(), fileoffset, filebuffer.len() as _, ::core::mem::transmute(filebuffer.as_ptr()), returnedsize, flags).ok() + (::windows_core::Interface::vtable(self).ReadBackupFile)(::windows_core::Interface::as_raw(self), filefullpath.into_param().abi(), fileoffset, filebuffer.len().try_into().unwrap(), ::core::mem::transmute(filebuffer.as_ptr()), returnedsize, flags).ok() } pub unsafe fn OrderContainersRestore(&self, containerpaths: &[::windows_core::BSTR], readplanentries: *mut u32, readplan: *mut *mut DEDUP_CONTAINER_EXTENT) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).OrderContainersRestore)(::windows_core::Interface::as_raw(self), containerpaths.len() as _, ::core::mem::transmute(containerpaths.as_ptr()), readplanentries, readplan).ok() + (::windows_core::Interface::vtable(self).OrderContainersRestore)(::windows_core::Interface::as_raw(self), containerpaths.len().try_into().unwrap(), ::core::mem::transmute(containerpaths.as_ptr()), readplanentries, readplan).ok() } pub unsafe fn PreviewContainerRead(&self, filefullpath: P0, readoffsets: &[DDP_FILE_EXTENT]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::BSTR>, { - (::windows_core::Interface::vtable(self).PreviewContainerRead)(::windows_core::Interface::as_raw(self), filefullpath.into_param().abi(), readoffsets.len() as _, ::core::mem::transmute(readoffsets.as_ptr())).ok() + (::windows_core::Interface::vtable(self).PreviewContainerRead)(::windows_core::Interface::as_raw(self), filefullpath.into_param().abi(), readoffsets.len().try_into().unwrap(), ::core::mem::transmute(readoffsets.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IDedupReadFileCallback, ::windows_core::IUnknown); 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 04d06d4927..8d153b0779 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/EnhancedStorage/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/EnhancedStorage/mod.rs @@ -179,7 +179,7 @@ impl IEnhancedStorageSilo { (::windows_core::Interface::vtable(self).GetActions)(::windows_core::Interface::as_raw(self), pppienhancedstoragesiloactions, pcenhancedstoragesiloactions).ok() } pub unsafe fn SendCommand(&self, command: u8, pbcommandbuffer: &[u8], pbresponsebuffer: *mut u8, pcbresponsebuffer: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SendCommand)(::windows_core::Interface::as_raw(self), command, ::core::mem::transmute(pbcommandbuffer.as_ptr()), pbcommandbuffer.len() as _, pbresponsebuffer, pcbresponsebuffer).ok() + (::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, pcbresponsebuffer).ok() } #[doc = "Required features: `\"Win32_Devices_PortableDevices\"`"] #[cfg(feature = "Win32_Devices_PortableDevices")] 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 5d067f0436..8fe508cc99 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/FileSystem/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/FileSystem/mod.rs @@ -17,7 +17,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("clfsw32.dll" "system" fn AddLogContainerSet(hlog : super::super::Foundation:: HANDLE, ccontainer : u16, pcbcontainer : *const u64, rgwszcontainerpath : *const ::windows_core::PCWSTR, preserved : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - AddLogContainerSet(hlog.into_param().abi(), rgwszcontainerpath.len() as _, ::core::mem::transmute(pcbcontainer.unwrap_or(::std::ptr::null())), ::core::mem::transmute(rgwszcontainerpath.as_ptr()), ::core::mem::transmute(preserved.unwrap_or(::std::ptr::null_mut()))).ok() + AddLogContainerSet(hlog.into_param().abi(), rgwszcontainerpath.len().try_into().unwrap(), ::core::mem::transmute(pcbcontainer.unwrap_or(::std::ptr::null())), ::core::mem::transmute(rgwszcontainerpath.as_ptr()), ::core::mem::transmute(preserved.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Security\"`"] #[cfg(feature = "Win32_Security")] @@ -77,7 +77,7 @@ where P2: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn BackupRead(hfile : super::super::Foundation:: HANDLE, lpbuffer : *mut u8, nnumberofbytestoread : u32, lpnumberofbytesread : *mut u32, babort : super::super::Foundation:: BOOL, bprocesssecurity : super::super::Foundation:: BOOL, lpcontext : *mut *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - BackupRead(hfile.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, lpnumberofbytesread, babort.into_param().abi(), bprocesssecurity.into_param().abi(), lpcontext).ok() + BackupRead(hfile.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), lpnumberofbytesread, babort.into_param().abi(), bprocesssecurity.into_param().abi(), lpcontext).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -99,7 +99,7 @@ where P2: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn BackupWrite(hfile : super::super::Foundation:: HANDLE, lpbuffer : *const u8, nnumberofbytestowrite : u32, lpnumberofbyteswritten : *mut u32, babort : super::super::Foundation:: BOOL, bprocesssecurity : super::super::Foundation:: BOOL, lpcontext : *mut *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - BackupWrite(hfile.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, lpnumberofbyteswritten, babort.into_param().abi(), bprocesssecurity.into_param().abi(), lpcontext).ok() + BackupWrite(hfile.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), lpnumberofbyteswritten, babort.into_param().abi(), bprocesssecurity.into_param().abi(), lpcontext).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -137,7 +137,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("api-ms-win-core-ioring-l1-1-0.dll" "system" fn BuildIoRingRegisterBuffers(ioring : HIORING, count : u32, buffers : *const IORING_BUFFER_INFO, userdata : usize) -> ::windows_core::HRESULT); - BuildIoRingRegisterBuffers(ioring.into_param().abi(), buffers.len() as _, ::core::mem::transmute(buffers.as_ptr()), userdata).ok() + BuildIoRingRegisterBuffers(ioring.into_param().abi(), buffers.len().try_into().unwrap(), ::core::mem::transmute(buffers.as_ptr()), userdata).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -147,7 +147,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("api-ms-win-core-ioring-l1-1-0.dll" "system" fn BuildIoRingRegisterFileHandles(ioring : HIORING, count : u32, handles : *const super::super::Foundation:: HANDLE, userdata : usize) -> ::windows_core::HRESULT); - BuildIoRingRegisterFileHandles(ioring.into_param().abi(), handles.len() as _, ::core::mem::transmute(handles.as_ptr()), userdata).ok() + BuildIoRingRegisterFileHandles(ioring.into_param().abi(), handles.len().try_into().unwrap(), ::core::mem::transmute(handles.as_ptr()), userdata).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -167,7 +167,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn CheckNameLegalDOS8Dot3A(lpname : ::windows_core::PCSTR, lpoemname : ::windows_core::PSTR, oemnamesize : u32, pbnamecontainsspaces : *mut super::super::Foundation:: BOOL, pbnamelegal : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - CheckNameLegalDOS8Dot3A(lpname.into_param().abi(), ::core::mem::transmute(lpoemname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpoemname.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pbnamecontainsspaces.unwrap_or(::std::ptr::null_mut())), pbnamelegal).ok() + CheckNameLegalDOS8Dot3A(lpname.into_param().abi(), ::core::mem::transmute(lpoemname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpoemname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pbnamecontainsspaces.unwrap_or(::std::ptr::null_mut())), pbnamelegal).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -177,7 +177,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn CheckNameLegalDOS8Dot3W(lpname : ::windows_core::PCWSTR, lpoemname : ::windows_core::PSTR, oemnamesize : u32, pbnamecontainsspaces : *mut super::super::Foundation:: BOOL, pbnamelegal : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - CheckNameLegalDOS8Dot3W(lpname.into_param().abi(), ::core::mem::transmute(lpoemname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpoemname.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pbnamecontainsspaces.unwrap_or(::std::ptr::null_mut())), pbnamelegal).ok() + CheckNameLegalDOS8Dot3W(lpname.into_param().abi(), ::core::mem::transmute(lpoemname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpoemname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pbnamecontainsspaces.unwrap_or(::std::ptr::null_mut())), pbnamelegal).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1094,7 +1094,7 @@ where #[inline] pub unsafe fn FindFirstVolumeA(lpszvolumename: &mut [u8]) -> ::windows_core::Result { ::windows_targets::link!("kernel32.dll" "system" fn FindFirstVolumeA(lpszvolumename : ::windows_core::PSTR, cchbufferlength : u32) -> super::super::Foundation:: HANDLE); - let result__ = FindFirstVolumeA(::core::mem::transmute(lpszvolumename.as_ptr()), lpszvolumename.len() as _); + let result__ = FindFirstVolumeA(::core::mem::transmute(lpszvolumename.as_ptr()), lpszvolumename.len().try_into().unwrap()); (!result__.is_invalid()).then(|| result__).ok_or_else(::windows_core::Error::from_win32) } #[doc = "Required features: `\"Win32_Foundation\"`"] @@ -1105,7 +1105,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn FindFirstVolumeMountPointA(lpszrootpathname : ::windows_core::PCSTR, lpszvolumemountpoint : ::windows_core::PSTR, cchbufferlength : u32) -> super::super::Foundation:: HANDLE); - let result__ = FindFirstVolumeMountPointA(lpszrootpathname.into_param().abi(), ::core::mem::transmute(lpszvolumemountpoint.as_ptr()), lpszvolumemountpoint.len() as _); + let result__ = FindFirstVolumeMountPointA(lpszrootpathname.into_param().abi(), ::core::mem::transmute(lpszvolumemountpoint.as_ptr()), lpszvolumemountpoint.len().try_into().unwrap()); (!result__.is_invalid()).then(|| result__).ok_or_else(::windows_core::Error::from_win32) } #[doc = "Required features: `\"Win32_Foundation\"`"] @@ -1116,7 +1116,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn FindFirstVolumeMountPointW(lpszrootpathname : ::windows_core::PCWSTR, lpszvolumemountpoint : ::windows_core::PWSTR, cchbufferlength : u32) -> super::super::Foundation:: HANDLE); - let result__ = FindFirstVolumeMountPointW(lpszrootpathname.into_param().abi(), ::core::mem::transmute(lpszvolumemountpoint.as_ptr()), lpszvolumemountpoint.len() as _); + let result__ = FindFirstVolumeMountPointW(lpszrootpathname.into_param().abi(), ::core::mem::transmute(lpszvolumemountpoint.as_ptr()), lpszvolumemountpoint.len().try_into().unwrap()); (!result__.is_invalid()).then(|| result__).ok_or_else(::windows_core::Error::from_win32) } #[doc = "Required features: `\"Win32_Foundation\"`"] @@ -1124,7 +1124,7 @@ where #[inline] pub unsafe fn FindFirstVolumeW(lpszvolumename: &mut [u16]) -> ::windows_core::Result { ::windows_targets::link!("kernel32.dll" "system" fn FindFirstVolumeW(lpszvolumename : ::windows_core::PWSTR, cchbufferlength : u32) -> super::super::Foundation:: HANDLE); - let result__ = FindFirstVolumeW(::core::mem::transmute(lpszvolumename.as_ptr()), lpszvolumename.len() as _); + let result__ = FindFirstVolumeW(::core::mem::transmute(lpszvolumename.as_ptr()), lpszvolumename.len().try_into().unwrap()); (!result__.is_invalid()).then(|| result__).ok_or_else(::windows_core::Error::from_win32) } #[doc = "Required features: `\"Win32_Foundation\"`"] @@ -1185,7 +1185,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn FindNextVolumeA(hfindvolume : super::super::Foundation:: HANDLE, lpszvolumename : ::windows_core::PSTR, cchbufferlength : u32) -> super::super::Foundation:: BOOL); - FindNextVolumeA(hfindvolume.into_param().abi(), ::core::mem::transmute(lpszvolumename.as_ptr()), lpszvolumename.len() as _).ok() + FindNextVolumeA(hfindvolume.into_param().abi(), ::core::mem::transmute(lpszvolumename.as_ptr()), lpszvolumename.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1195,7 +1195,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn FindNextVolumeMountPointA(hfindvolumemountpoint : super::super::Foundation:: HANDLE, lpszvolumemountpoint : ::windows_core::PSTR, cchbufferlength : u32) -> super::super::Foundation:: BOOL); - FindNextVolumeMountPointA(hfindvolumemountpoint.into_param().abi(), ::core::mem::transmute(lpszvolumemountpoint.as_ptr()), lpszvolumemountpoint.len() as _).ok() + FindNextVolumeMountPointA(hfindvolumemountpoint.into_param().abi(), ::core::mem::transmute(lpszvolumemountpoint.as_ptr()), lpszvolumemountpoint.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1205,7 +1205,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn FindNextVolumeMountPointW(hfindvolumemountpoint : super::super::Foundation:: HANDLE, lpszvolumemountpoint : ::windows_core::PWSTR, cchbufferlength : u32) -> super::super::Foundation:: BOOL); - FindNextVolumeMountPointW(hfindvolumemountpoint.into_param().abi(), ::core::mem::transmute(lpszvolumemountpoint.as_ptr()), lpszvolumemountpoint.len() as _).ok() + FindNextVolumeMountPointW(hfindvolumemountpoint.into_param().abi(), ::core::mem::transmute(lpszvolumemountpoint.as_ptr()), lpszvolumemountpoint.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1215,7 +1215,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn FindNextVolumeW(hfindvolume : super::super::Foundation:: HANDLE, lpszvolumename : ::windows_core::PWSTR, cchbufferlength : u32) -> super::super::Foundation:: BOOL); - FindNextVolumeW(hfindvolume.into_param().abi(), ::core::mem::transmute(lpszvolumename.as_ptr()), lpszvolumename.len() as _).ok() + FindNextVolumeW(hfindvolume.into_param().abi(), ::core::mem::transmute(lpszvolumename.as_ptr()), lpszvolumename.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1682,7 +1682,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetFinalPathNameByHandleA(hfile : super::super::Foundation:: HANDLE, lpszfilepath : ::windows_core::PSTR, cchfilepath : u32, dwflags : GETFINALPATHNAMEBYHANDLE_FLAGS) -> u32); - GetFinalPathNameByHandleA(hfile.into_param().abi(), ::core::mem::transmute(lpszfilepath.as_ptr()), lpszfilepath.len() as _, dwflags) + GetFinalPathNameByHandleA(hfile.into_param().abi(), ::core::mem::transmute(lpszfilepath.as_ptr()), lpszfilepath.len().try_into().unwrap(), dwflags) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1692,7 +1692,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetFinalPathNameByHandleW(hfile : super::super::Foundation:: HANDLE, lpszfilepath : ::windows_core::PWSTR, cchfilepath : u32, dwflags : GETFINALPATHNAMEBYHANDLE_FLAGS) -> u32); - GetFinalPathNameByHandleW(hfile.into_param().abi(), ::core::mem::transmute(lpszfilepath.as_ptr()), lpszfilepath.len() as _, dwflags) + GetFinalPathNameByHandleW(hfile.into_param().abi(), ::core::mem::transmute(lpszfilepath.as_ptr()), lpszfilepath.len().try_into().unwrap(), dwflags) } #[inline] pub unsafe fn GetFullPathNameA(lpfilename: P0, lpbuffer: ::core::option::Option<&mut [u8]>, lpfilepart: ::core::option::Option<*mut ::windows_core::PSTR>) -> u32 @@ -1700,7 +1700,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetFullPathNameA(lpfilename : ::windows_core::PCSTR, nbufferlength : u32, lpbuffer : ::windows_core::PSTR, lpfilepart : *mut ::windows_core::PSTR) -> u32); - GetFullPathNameA(lpfilename.into_param().abi(), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(lpfilepart.unwrap_or(::std::ptr::null_mut()))) + GetFullPathNameA(lpfilename.into_param().abi(), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(lpfilepart.unwrap_or(::std::ptr::null_mut()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1711,7 +1711,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetFullPathNameTransactedA(lpfilename : ::windows_core::PCSTR, nbufferlength : u32, lpbuffer : ::windows_core::PSTR, lpfilepart : *mut ::windows_core::PSTR, htransaction : super::super::Foundation:: HANDLE) -> u32); - GetFullPathNameTransactedA(lpfilename.into_param().abi(), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(lpfilepart.unwrap_or(::std::ptr::null_mut())), htransaction.into_param().abi()) + GetFullPathNameTransactedA(lpfilename.into_param().abi(), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(lpfilepart.unwrap_or(::std::ptr::null_mut())), htransaction.into_param().abi()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1722,7 +1722,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetFullPathNameTransactedW(lpfilename : ::windows_core::PCWSTR, nbufferlength : u32, lpbuffer : ::windows_core::PWSTR, lpfilepart : *mut ::windows_core::PWSTR, htransaction : super::super::Foundation:: HANDLE) -> u32); - GetFullPathNameTransactedW(lpfilename.into_param().abi(), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(lpfilepart.unwrap_or(::std::ptr::null_mut())), htransaction.into_param().abi()) + GetFullPathNameTransactedW(lpfilename.into_param().abi(), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(lpfilepart.unwrap_or(::std::ptr::null_mut())), htransaction.into_param().abi()) } #[inline] pub unsafe fn GetFullPathNameW(lpfilename: P0, lpbuffer: ::core::option::Option<&mut [u16]>, lpfilepart: ::core::option::Option<*mut ::windows_core::PWSTR>) -> u32 @@ -1730,7 +1730,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetFullPathNameW(lpfilename : ::windows_core::PCWSTR, nbufferlength : u32, lpbuffer : ::windows_core::PWSTR, lpfilepart : *mut ::windows_core::PWSTR) -> u32); - GetFullPathNameW(lpfilename.into_param().abi(), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(lpfilepart.unwrap_or(::std::ptr::null_mut()))) + GetFullPathNameW(lpfilename.into_param().abi(), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(lpfilepart.unwrap_or(::std::ptr::null_mut()))) } #[inline] pub unsafe fn GetIoRingInfo(ioring: P0, info: *mut IORING_INFO) -> ::windows_core::Result<()> @@ -1781,12 +1781,12 @@ pub unsafe fn GetLogReservationInfo(pvmarshal: *const ::core::ffi::c_void, pcbre #[inline] pub unsafe fn GetLogicalDriveStringsA(lpbuffer: ::core::option::Option<&mut [u8]>) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn GetLogicalDriveStringsA(nbufferlength : u32, lpbuffer : ::windows_core::PSTR) -> u32); - GetLogicalDriveStringsA(lpbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + GetLogicalDriveStringsA(lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] pub unsafe fn GetLogicalDriveStringsW(lpbuffer: ::core::option::Option<&mut [u16]>) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn GetLogicalDriveStringsW(nbufferlength : u32, lpbuffer : ::windows_core::PWSTR) -> u32); - GetLogicalDriveStringsW(lpbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + GetLogicalDriveStringsW(lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] pub unsafe fn GetLogicalDrives() -> u32 { @@ -1799,7 +1799,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetLongPathNameA(lpszshortpath : ::windows_core::PCSTR, lpszlongpath : ::windows_core::PSTR, cchbuffer : u32) -> u32); - GetLongPathNameA(lpszshortpath.into_param().abi(), ::core::mem::transmute(lpszlongpath.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszlongpath.as_deref().map_or(0, |slice| slice.len() as _)) + GetLongPathNameA(lpszshortpath.into_param().abi(), ::core::mem::transmute(lpszlongpath.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszlongpath.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1810,7 +1810,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetLongPathNameTransactedA(lpszshortpath : ::windows_core::PCSTR, lpszlongpath : ::windows_core::PSTR, cchbuffer : u32, htransaction : super::super::Foundation:: HANDLE) -> u32); - GetLongPathNameTransactedA(lpszshortpath.into_param().abi(), ::core::mem::transmute(lpszlongpath.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszlongpath.as_deref().map_or(0, |slice| slice.len() as _), htransaction.into_param().abi()) + GetLongPathNameTransactedA(lpszshortpath.into_param().abi(), ::core::mem::transmute(lpszlongpath.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszlongpath.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), htransaction.into_param().abi()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1821,7 +1821,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetLongPathNameTransactedW(lpszshortpath : ::windows_core::PCWSTR, lpszlongpath : ::windows_core::PWSTR, cchbuffer : u32, htransaction : super::super::Foundation:: HANDLE) -> u32); - GetLongPathNameTransactedW(lpszshortpath.into_param().abi(), ::core::mem::transmute(lpszlongpath.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszlongpath.as_deref().map_or(0, |slice| slice.len() as _), htransaction.into_param().abi()) + GetLongPathNameTransactedW(lpszshortpath.into_param().abi(), ::core::mem::transmute(lpszlongpath.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszlongpath.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), htransaction.into_param().abi()) } #[inline] pub unsafe fn GetLongPathNameW(lpszshortpath: P0, lpszlongpath: ::core::option::Option<&mut [u16]>) -> u32 @@ -1829,7 +1829,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetLongPathNameW(lpszshortpath : ::windows_core::PCWSTR, lpszlongpath : ::windows_core::PWSTR, cchbuffer : u32) -> u32); - GetLongPathNameW(lpszshortpath.into_param().abi(), ::core::mem::transmute(lpszlongpath.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszlongpath.as_deref().map_or(0, |slice| slice.len() as _)) + GetLongPathNameW(lpszshortpath.into_param().abi(), ::core::mem::transmute(lpszlongpath.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszlongpath.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1864,7 +1864,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetShortPathNameA(lpszlongpath : ::windows_core::PCSTR, lpszshortpath : ::windows_core::PSTR, cchbuffer : u32) -> u32); - GetShortPathNameA(lpszlongpath.into_param().abi(), ::core::mem::transmute(lpszshortpath.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszshortpath.as_deref().map_or(0, |slice| slice.len() as _)) + GetShortPathNameA(lpszlongpath.into_param().abi(), ::core::mem::transmute(lpszshortpath.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszshortpath.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetShortPathNameW(lpszlongpath: P0, lpszshortpath: ::core::option::Option<&mut [u16]>) -> u32 @@ -1872,7 +1872,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetShortPathNameW(lpszlongpath : ::windows_core::PCWSTR, lpszshortpath : ::windows_core::PWSTR, cchbuffer : u32) -> u32); - GetShortPathNameW(lpszlongpath.into_param().abi(), ::core::mem::transmute(lpszshortpath.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszshortpath.as_deref().map_or(0, |slice| slice.len() as _)) + GetShortPathNameW(lpszlongpath.into_param().abi(), ::core::mem::transmute(lpszshortpath.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszshortpath.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1925,22 +1925,22 @@ where #[inline] pub unsafe fn GetTempPath2A(buffer: ::core::option::Option<&mut [u8]>) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn GetTempPath2A(bufferlength : u32, buffer : ::windows_core::PSTR) -> u32); - GetTempPath2A(buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + GetTempPath2A(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()))) } #[inline] pub unsafe fn GetTempPath2W(buffer: ::core::option::Option<&mut [u16]>) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn GetTempPath2W(bufferlength : u32, buffer : ::windows_core::PWSTR) -> u32); - GetTempPath2W(buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + GetTempPath2W(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()))) } #[inline] pub unsafe fn GetTempPathA(lpbuffer: ::core::option::Option<&mut [u8]>) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn GetTempPathA(nbufferlength : u32, lpbuffer : ::windows_core::PSTR) -> u32); - GetTempPathA(lpbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + GetTempPathA(lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] pub unsafe fn GetTempPathW(lpbuffer: ::core::option::Option<&mut [u16]>) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn GetTempPathW(nbufferlength : u32, lpbuffer : ::windows_core::PWSTR) -> u32); - GetTempPathW(lpbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + GetTempPathW(lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1960,7 +1960,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ktmw32.dll" "system" fn GetTransactionInformation(transactionhandle : super::super::Foundation:: HANDLE, outcome : *mut u32, isolationlevel : *mut u32, isolationflags : *mut u32, timeout : *mut u32, bufferlength : u32, description : ::windows_core::PWSTR) -> super::super::Foundation:: BOOL); - GetTransactionInformation(transactionhandle.into_param().abi(), outcome, isolationlevel, isolationflags, timeout, description.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(description.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + GetTransactionInformation(transactionhandle.into_param().abi(), outcome, isolationlevel, isolationflags, 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() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1983,12 +1983,12 @@ where GetVolumeInformationA( lprootpathname.into_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() as _), + lpvolumenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpvolumeserialnumber.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpmaximumcomponentlength.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpfilesystemflags.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpfilesystemnamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - lpfilesystemnamebuffer.as_deref().map_or(0, |slice| slice.len() as _), + lpfilesystemnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ) .ok() } @@ -2003,12 +2003,12 @@ where GetVolumeInformationByHandleW( hfile.into_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() as _), + lpvolumenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpvolumeserialnumber.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpmaximumcomponentlength.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpfilesystemflags.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpfilesystemnamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - lpfilesystemnamebuffer.as_deref().map_or(0, |slice| slice.len() as _), + lpfilesystemnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ) .ok() } @@ -2023,12 +2023,12 @@ where GetVolumeInformationW( lprootpathname.into_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() as _), + lpvolumenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpvolumeserialnumber.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpmaximumcomponentlength.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpfilesystemflags.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpfilesystemnamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - lpfilesystemnamebuffer.as_deref().map_or(0, |slice| slice.len() as _), + lpfilesystemnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ) .ok() } @@ -2040,7 +2040,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetVolumeNameForVolumeMountPointA(lpszvolumemountpoint : ::windows_core::PCSTR, lpszvolumename : ::windows_core::PSTR, cchbufferlength : u32) -> super::super::Foundation:: BOOL); - GetVolumeNameForVolumeMountPointA(lpszvolumemountpoint.into_param().abi(), ::core::mem::transmute(lpszvolumename.as_ptr()), lpszvolumename.len() as _).ok() + GetVolumeNameForVolumeMountPointA(lpszvolumemountpoint.into_param().abi(), ::core::mem::transmute(lpszvolumename.as_ptr()), lpszvolumename.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2050,7 +2050,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetVolumeNameForVolumeMountPointW(lpszvolumemountpoint : ::windows_core::PCWSTR, lpszvolumename : ::windows_core::PWSTR, cchbufferlength : u32) -> super::super::Foundation:: BOOL); - GetVolumeNameForVolumeMountPointW(lpszvolumemountpoint.into_param().abi(), ::core::mem::transmute(lpszvolumename.as_ptr()), lpszvolumename.len() as _).ok() + GetVolumeNameForVolumeMountPointW(lpszvolumemountpoint.into_param().abi(), ::core::mem::transmute(lpszvolumename.as_ptr()), lpszvolumename.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2060,7 +2060,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetVolumePathNameA(lpszfilename : ::windows_core::PCSTR, lpszvolumepathname : ::windows_core::PSTR, cchbufferlength : u32) -> super::super::Foundation:: BOOL); - GetVolumePathNameA(lpszfilename.into_param().abi(), ::core::mem::transmute(lpszvolumepathname.as_ptr()), lpszvolumepathname.len() as _).ok() + GetVolumePathNameA(lpszfilename.into_param().abi(), ::core::mem::transmute(lpszvolumepathname.as_ptr()), lpszvolumepathname.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2070,7 +2070,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetVolumePathNameW(lpszfilename : ::windows_core::PCWSTR, lpszvolumepathname : ::windows_core::PWSTR, cchbufferlength : u32) -> super::super::Foundation:: BOOL); - GetVolumePathNameW(lpszfilename.into_param().abi(), ::core::mem::transmute(lpszvolumepathname.as_ptr()), lpszvolumepathname.len() as _).ok() + GetVolumePathNameW(lpszfilename.into_param().abi(), ::core::mem::transmute(lpszvolumepathname.as_ptr()), lpszvolumepathname.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2080,7 +2080,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetVolumePathNamesForVolumeNameA(lpszvolumename : ::windows_core::PCSTR, lpszvolumepathnames : ::windows_core::PSTR, cchbufferlength : u32, lpcchreturnlength : *mut u32) -> super::super::Foundation:: BOOL); - GetVolumePathNamesForVolumeNameA(lpszvolumename.into_param().abi(), ::core::mem::transmute(lpszvolumepathnames.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszvolumepathnames.as_deref().map_or(0, |slice| slice.len() as _), lpcchreturnlength).ok() + GetVolumePathNamesForVolumeNameA(lpszvolumename.into_param().abi(), ::core::mem::transmute(lpszvolumepathnames.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszvolumepathnames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpcchreturnlength).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2090,7 +2090,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetVolumePathNamesForVolumeNameW(lpszvolumename : ::windows_core::PCWSTR, lpszvolumepathnames : ::windows_core::PWSTR, cchbufferlength : u32, lpcchreturnlength : *mut u32) -> super::super::Foundation:: BOOL); - GetVolumePathNamesForVolumeNameW(lpszvolumename.into_param().abi(), ::core::mem::transmute(lpszvolumepathnames.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszvolumepathnames.as_deref().map_or(0, |slice| slice.len() as _), lpcchreturnlength).ok() + GetVolumePathNamesForVolumeNameW(lpszvolumename.into_param().abi(), ::core::mem::transmute(lpszvolumepathnames.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszvolumepathnames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpcchreturnlength).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2161,7 +2161,7 @@ where #[inline] pub unsafe fn LZRead(hfile: i32, lpbuffer: &mut [u8]) -> i32 { ::windows_targets::link!("kernel32.dll" "system" fn LZRead(hfile : i32, lpbuffer : ::windows_core::PSTR, cbread : i32) -> i32); - LZRead(hfile, ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _) + LZRead(hfile, ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap()) } #[inline] pub unsafe fn LZSeek(hfile: i32, loffset: i32, iorigin: i32) -> i32 { @@ -2683,7 +2683,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("clfsw32.dll" "system" fn PrepareLogArchive(hlog : super::super::Foundation:: HANDLE, pszbaselogfilename : ::windows_core::PWSTR, clen : u32, plsnlow : *const CLS_LSN, plsnhigh : *const CLS_LSN, pcactuallength : *mut u32, poffbaselogfiledata : *mut u64, pcbbaselogfilelength : *mut u64, plsnbase : *mut CLS_LSN, plsnlast : *mut CLS_LSN, plsncurrentarchivetail : *mut CLS_LSN, ppvarchivecontext : *mut *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - PrepareLogArchive(hlog.into_param().abi(), ::core::mem::transmute(pszbaselogfilename.as_ptr()), pszbaselogfilename.len() as _, ::core::mem::transmute(plsnlow.unwrap_or(::std::ptr::null())), ::core::mem::transmute(plsnhigh.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pcactuallength.unwrap_or(::std::ptr::null_mut())), poffbaselogfiledata, pcbbaselogfilelength, plsnbase, plsnlast, plsncurrentarchivetail, ppvarchivecontext).ok() + PrepareLogArchive(hlog.into_param().abi(), ::core::mem::transmute(pszbaselogfilename.as_ptr()), pszbaselogfilename.len().try_into().unwrap(), ::core::mem::transmute(plsnlow.unwrap_or(::std::ptr::null())), ::core::mem::transmute(plsnhigh.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pcactuallength.unwrap_or(::std::ptr::null_mut())), poffbaselogfiledata, pcbbaselogfilelength, plsnbase, plsnlast, plsncurrentarchivetail, ppvarchivecontext).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2702,7 +2702,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn QueryDosDeviceA(lpdevicename : ::windows_core::PCSTR, lptargetpath : ::windows_core::PSTR, ucchmax : u32) -> u32); - QueryDosDeviceA(lpdevicename.into_param().abi(), ::core::mem::transmute(lptargetpath.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lptargetpath.as_deref().map_or(0, |slice| slice.len() as _)) + QueryDosDeviceA(lpdevicename.into_param().abi(), ::core::mem::transmute(lptargetpath.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lptargetpath.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn QueryDosDeviceW(lpdevicename: P0, lptargetpath: ::core::option::Option<&mut [u16]>) -> u32 @@ -2710,7 +2710,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn QueryDosDeviceW(lpdevicename : ::windows_core::PCWSTR, lptargetpath : ::windows_core::PWSTR, ucchmax : u32) -> u32); - QueryDosDeviceW(lpdevicename.into_param().abi(), ::core::mem::transmute(lptargetpath.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lptargetpath.as_deref().map_or(0, |slice| slice.len() as _)) + QueryDosDeviceW(lpdevicename.into_param().abi(), ::core::mem::transmute(lptargetpath.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lptargetpath.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn QueryIoRingCapabilities() -> ::windows_core::Result { @@ -2794,7 +2794,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn ReadFile(hfile : super::super::Foundation:: HANDLE, lpbuffer : *mut u8, nnumberofbytestoread : u32, lpnumberofbytesread : *mut u32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - ReadFile(hfile.into_param().abi(), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpnumberofbytesread.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpoverlapped.unwrap_or(::std::ptr::null_mut()))).ok() + ReadFile(hfile.into_param().abi(), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpnumberofbytesread.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpoverlapped.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_IO\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] @@ -2804,7 +2804,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn ReadFileEx(hfile : super::super::Foundation:: HANDLE, lpbuffer : *mut u8, nnumberofbytestoread : u32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED, lpcompletionroutine : super::super::System::IO:: LPOVERLAPPED_COMPLETION_ROUTINE) -> super::super::Foundation:: BOOL); - ReadFileEx(hfile.into_param().abi(), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _), lpoverlapped, lpcompletionroutine).ok() + ReadFileEx(hfile.into_param().abi(), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpoverlapped, lpcompletionroutine).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_IO\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] @@ -2995,7 +2995,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("clfsw32.dll" "system" fn RemoveLogContainerSet(hlog : super::super::Foundation:: HANDLE, ccontainer : u16, rgwszcontainerpath : *const ::windows_core::PCWSTR, fforce : super::super::Foundation:: BOOL, preserved : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - RemoveLogContainerSet(hlog.into_param().abi(), rgwszcontainerpath.len() as _, ::core::mem::transmute(rgwszcontainerpath.as_ptr()), fforce.into_param().abi(), ::core::mem::transmute(preserved.unwrap_or(::std::ptr::null_mut()))).ok() + RemoveLogContainerSet(hlog.into_param().abi(), rgwszcontainerpath.len().try_into().unwrap(), ::core::mem::transmute(rgwszcontainerpath.as_ptr()), fforce.into_param().abi(), ::core::mem::transmute(preserved.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3142,7 +3142,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn SearchPathA(lppath : ::windows_core::PCSTR, lpfilename : ::windows_core::PCSTR, lpextension : ::windows_core::PCSTR, nbufferlength : u32, lpbuffer : ::windows_core::PSTR, lpfilepart : *mut ::windows_core::PSTR) -> u32); - SearchPathA(lppath.into_param().abi(), lpfilename.into_param().abi(), lpextension.into_param().abi(), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(lpfilepart.unwrap_or(::std::ptr::null_mut()))) + SearchPathA(lppath.into_param().abi(), lpfilename.into_param().abi(), lpextension.into_param().abi(), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(lpfilepart.unwrap_or(::std::ptr::null_mut()))) } #[inline] pub unsafe fn SearchPathW(lppath: P0, lpfilename: P1, lpextension: P2, lpbuffer: ::core::option::Option<&mut [u16]>, lpfilepart: ::core::option::Option<*mut ::windows_core::PWSTR>) -> u32 @@ -3152,7 +3152,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn SearchPathW(lppath : ::windows_core::PCWSTR, lpfilename : ::windows_core::PCWSTR, lpextension : ::windows_core::PCWSTR, nbufferlength : u32, lpbuffer : ::windows_core::PWSTR, lpfilepart : *mut ::windows_core::PWSTR) -> u32); - SearchPathW(lppath.into_param().abi(), lpfilename.into_param().abi(), lpextension.into_param().abi(), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(lpfilepart.unwrap_or(::std::ptr::null_mut()))) + SearchPathW(lppath.into_param().abi(), lpfilename.into_param().abi(), lpextension.into_param().abi(), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(lpfilepart.unwrap_or(::std::ptr::null_mut()))) } #[doc = "Required features: `\"Win32_Security\"`"] #[cfg(feature = "Win32_Security")] @@ -3694,12 +3694,12 @@ where #[inline] pub unsafe fn VerLanguageNameA(wlang: u32, szlang: &mut [u8]) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn VerLanguageNameA(wlang : u32, szlang : ::windows_core::PSTR, cchlang : u32) -> u32); - VerLanguageNameA(wlang, ::core::mem::transmute(szlang.as_ptr()), szlang.len() as _) + VerLanguageNameA(wlang, ::core::mem::transmute(szlang.as_ptr()), szlang.len().try_into().unwrap()) } #[inline] pub unsafe fn VerLanguageNameW(wlang: u32, szlang: &mut [u16]) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn VerLanguageNameW(wlang : u32, szlang : ::windows_core::PWSTR, cchlang : u32) -> u32); - VerLanguageNameW(wlang, ::core::mem::transmute(szlang.as_ptr()), szlang.len() as _) + VerLanguageNameW(wlang, ::core::mem::transmute(szlang.as_ptr()), szlang.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3864,7 +3864,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn WriteFile(hfile : super::super::Foundation:: HANDLE, lpbuffer : *const u8, nnumberofbytestowrite : u32, lpnumberofbyteswritten : *mut u32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - WriteFile(hfile.into_param().abi(), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpnumberofbyteswritten.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpoverlapped.unwrap_or(::std::ptr::null_mut()))).ok() + WriteFile(hfile.into_param().abi(), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpnumberofbyteswritten.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpoverlapped.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_IO\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] @@ -3874,7 +3874,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn WriteFileEx(hfile : super::super::Foundation:: HANDLE, lpbuffer : *const u8, nnumberofbytestowrite : u32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED, lpcompletionroutine : super::super::System::IO:: LPOVERLAPPED_COMPLETION_ROUTINE) -> super::super::Foundation:: BOOL); - WriteFileEx(hfile.into_param().abi(), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _), lpoverlapped, lpcompletionroutine).ok() + WriteFileEx(hfile.into_param().abi(), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpoverlapped, lpcompletionroutine).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_IO\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] 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 34379ce3c8..ae016d8490 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Imapi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Imapi/mod.rs @@ -1974,10 +1974,10 @@ pub struct IDiscMasterProgressEvents_Vtbl { pub struct IDiscRecorder(::windows_core::IUnknown); impl IDiscRecorder { pub unsafe fn Init(&self, pbyuniqueid: &[u8], nuldrivenumber: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Init)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbyuniqueid.as_ptr()), pbyuniqueid.len() as _, nuldrivenumber).ok() + (::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: ::core::option::Option<&mut [u8]>, pulreturnsizerequired: *mut u32) -> ::windows_core::Result<()> { - (::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() as _), pulreturnsizerequired).ok() + (::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).ok() } pub unsafe fn GetRecorderType(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -2238,19 +2238,19 @@ pub struct IDiscRecorder2_Vtbl { pub struct IDiscRecorder2Ex(::windows_core::IUnknown); impl IDiscRecorder2Ex { pub unsafe fn SendCommandNoData(&self, cdb: &[u8], sensebuffer: &mut [u8; 18], timeout: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SendCommandNoData)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(cdb.as_ptr()), cdb.len() as _, ::core::mem::transmute(sensebuffer.as_ptr()), timeout).ok() + (::windows_core::Interface::vtable(self).SendCommandNoData)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(cdb.as_ptr()), cdb.len().try_into().unwrap(), ::core::mem::transmute(sensebuffer.as_ptr()), timeout).ok() } pub unsafe fn SendCommandSendDataToDevice(&self, cdb: &[u8], sensebuffer: &mut [u8; 18], timeout: u32, buffer: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SendCommandSendDataToDevice)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(cdb.as_ptr()), cdb.len() as _, ::core::mem::transmute(sensebuffer.as_ptr()), timeout, ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _).ok() + (::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<()> { - (::windows_core::Interface::vtable(self).SendCommandGetDataFromDevice)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(cdb.as_ptr()), cdb.len() as _, ::core::mem::transmute(sensebuffer.as_ptr()), timeout, ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, bufferfetched).ok() + (::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).ok() } pub unsafe fn ReadDvdStructure(&self, format: u32, address: u32, layer: u32, agid: u32, data: *mut *mut u8, count: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).ReadDvdStructure)(::windows_core::Interface::as_raw(self), format, address, layer, agid, data, count).ok() } pub unsafe fn SendDvdStructure(&self, format: u32, data: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SendDvdStructure)(::windows_core::Interface::as_raw(self), format, ::core::mem::transmute(data.as_ptr()), data.len() as _).ok() + (::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<()> { (::windows_core::Interface::vtable(self).GetAdapterDescriptor)(::windows_core::Interface::as_raw(self), data, bytesize).ok() @@ -2276,7 +2276,7 @@ impl IDiscRecorder2Ex { (::windows_core::Interface::vtable(self).GetModePage)(::windows_core::Interface::as_raw(self), requestedmodepage, requesttype, modepagedata, bytesize).ok() } pub unsafe fn SetModePage(&self, requesttype: IMAPI_MODE_PAGE_REQUEST_TYPE, data: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetModePage)(::windows_core::Interface::as_raw(self), requesttype, ::core::mem::transmute(data.as_ptr()), data.len() as _).ok() + (::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() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2354,7 +2354,7 @@ pub struct IDiscRecorder2Ex_Vtbl { pub struct IEnumDiscMasterFormats(::windows_core::IUnknown); impl IEnumDiscMasterFormats { pub unsafe fn Next(&self, lpiidformatid: &mut [::windows_core::GUID], pcfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), lpiidformatid.len() as _, ::core::mem::transmute(lpiidformatid.as_ptr()), pcfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), lpiidformatid.len().try_into().unwrap(), ::core::mem::transmute(lpiidformatid.as_ptr()), pcfetched).ok() } pub unsafe fn Skip(&self, cformats: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), cformats).ok() @@ -2388,7 +2388,7 @@ pub struct IEnumDiscMasterFormats_Vtbl { pub struct IEnumDiscRecorders(::windows_core::IUnknown); impl IEnumDiscRecorders { pub unsafe fn Next(&self, pprecorder: &mut [::core::option::Option], pcfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), pprecorder.len() as _, ::core::mem::transmute(pprecorder.as_ptr()), pcfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), pprecorder.len().try_into().unwrap(), ::core::mem::transmute(pprecorder.as_ptr()), pcfetched).ok() } pub unsafe fn Skip(&self, crecorders: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), crecorders).ok() @@ -2424,7 +2424,7 @@ impl IEnumFsiItems { #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, rgelt: &mut [::core::option::Option], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -2463,7 +2463,7 @@ impl IEnumProgressItems { #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, rgelt: &mut [::core::option::Option], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -5202,7 +5202,7 @@ impl IRedbookDiscMaster { (::windows_core::Interface::vtable(self).CreateAudioTrack)(::windows_core::Interface::as_raw(self), nblocks).ok() } pub unsafe fn AddAudioTrackBlocks(&self, pby: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).AddAudioTrackBlocks)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pby.as_ptr()), pby.len() as _).ok() + (::windows_core::Interface::vtable(self).AddAudioTrackBlocks)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pby.as_ptr()), pby.len().try_into().unwrap()).ok() } pub unsafe fn CloseAudioTrack(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).CloseAudioTrack)(::windows_core::Interface::as_raw(self)).ok() @@ -5306,7 +5306,7 @@ impl IStreamConcatenate { #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] pub unsafe fn Initialize2(&self, streams: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Initialize2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(streams.as_ptr()), streams.len() as _).ok() + (::windows_core::Interface::vtable(self).Initialize2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(streams.as_ptr()), streams.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -5319,7 +5319,7 @@ impl IStreamConcatenate { #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] pub unsafe fn Append2(&self, streams: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Append2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(streams.as_ptr()), streams.len() as _).ok() + (::windows_core::Interface::vtable(self).Append2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(streams.as_ptr()), streams.len().try_into().unwrap()).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -5520,7 +5520,7 @@ impl IStreamPseudoRandomBased { (::windows_core::Interface::vtable(self).Seed)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn put_ExtendedSeed(&self, values: &[u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).put_ExtendedSeed)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(values.as_ptr()), values.len() as _).ok() + (::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<()> { (::windows_core::Interface::vtable(self).get_ExtendedSeed)(::windows_core::Interface::as_raw(self), values, ecount).ok() 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 de328940a4..bd16033124 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/IndexServer/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/IndexServer/mod.rs @@ -44,7 +44,7 @@ impl IFilter { #[doc = "Required features: `\"Win32_System_Com_StructuredStorage\"`"] #[cfg(feature = "Win32_System_Com_StructuredStorage")] pub unsafe fn Init(&self, grfflags: u32, aattributes: &[FULLPROPSPEC], pflags: *mut u32) -> i32 { - (::windows_core::Interface::vtable(self).Init)(::windows_core::Interface::as_raw(self), grfflags, aattributes.len() as _, ::core::mem::transmute(aattributes.as_ptr()), pflags) + (::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) } #[doc = "Required features: `\"Win32_System_Com_StructuredStorage\"`"] #[cfg(feature = "Win32_System_Com_StructuredStorage")] 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 fd5cc70cd2..22293285ae 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/InstallableFileSystems/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/InstallableFileSystems/mod.rs @@ -90,7 +90,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("fltlib.dll" "system" fn FilterGetDosName(lpvolumename : ::windows_core::PCWSTR, lpdosname : ::windows_core::PWSTR, dwdosnamebuffersize : u32) -> ::windows_core::HRESULT); - FilterGetDosName(lpvolumename.into_param().abi(), ::core::mem::transmute(lpdosname.as_ptr()), lpdosname.len() as _).ok() + FilterGetDosName(lpvolumename.into_param().abi(), ::core::mem::transmute(lpdosname.as_ptr()), lpdosname.len().try_into().unwrap()).ok() } #[inline] pub unsafe fn FilterGetInformation(hfilter: P0, dwinformationclass: FILTER_INFORMATION_CLASS, lpbuffer: *mut ::core::ffi::c_void, dwbuffersize: u32, lpbytesreturned: *mut u32) -> ::windows_core::Result<()> 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 d90963bd3e..3563e5ed0b 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: ::core::option::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); - AddIScsiConnectionA(uniquesessionid, reserved, initiatorportnumber, targetportal, securityflags, loginoptions, key.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(key.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), connectionid) + AddIScsiConnectionA(uniquesessionid, reserved, initiatorportnumber, targetportal, securityflags, 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())), connectionid) } #[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: ::core::option::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); - AddIScsiConnectionW(uniquesessionid, reserved, initiatorportnumber, targetportal, securityflags, loginoptions, key.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(key.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), connectionid) + AddIScsiConnectionW(uniquesessionid, reserved, initiatorportnumber, targetportal, securityflags, 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())), connectionid) } #[inline] pub unsafe fn AddIScsiSendTargetPortalA(initiatorinstance: P0, initiatorportnumber: u32, loginoptions: *mut ISCSI_LOGIN_OPTIONS, securityflags: u64, portal: *mut ISCSI_TARGET_PORTALA) -> u32 @@ -192,7 +192,7 @@ where P3: ::windows_core::IntoParam, { ::windows_targets::link!("iscsidsc.dll" "system" fn LoginIScsiTargetA(targetname : ::windows_core::PCSTR, isinformationalsession : super::super::Foundation:: BOOLEAN, 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 : super::super::Foundation:: BOOLEAN, uniquesessionid : *mut ISCSI_UNIQUE_SESSION_ID, uniqueconnectionid : *mut ISCSI_UNIQUE_SESSION_ID) -> u32); - LoginIScsiTargetA(targetname.into_param().abi(), isinformationalsession.into_param().abi(), initiatorinstance.into_param().abi(), initiatorportnumber, targetportal, securityflags, mappings, loginoptions, key.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(key.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ispersistent.into_param().abi(), uniquesessionid, uniqueconnectionid) + LoginIScsiTargetA(targetname.into_param().abi(), isinformationalsession.into_param().abi(), initiatorinstance.into_param().abi(), initiatorportnumber, targetportal, securityflags, mappings, 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.into_param().abi(), uniquesessionid, uniqueconnectionid) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -205,7 +205,7 @@ where P3: ::windows_core::IntoParam, { ::windows_targets::link!("iscsidsc.dll" "system" fn LoginIScsiTargetW(targetname : ::windows_core::PCWSTR, isinformationalsession : super::super::Foundation:: BOOLEAN, 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 : super::super::Foundation:: BOOLEAN, uniquesessionid : *mut ISCSI_UNIQUE_SESSION_ID, uniqueconnectionid : *mut ISCSI_UNIQUE_SESSION_ID) -> u32); - LoginIScsiTargetW(targetname.into_param().abi(), isinformationalsession.into_param().abi(), initiatorinstance.into_param().abi(), initiatorportnumber, targetportal, securityflags, mappings, loginoptions, key.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(key.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ispersistent.into_param().abi(), uniquesessionid, uniqueconnectionid) + LoginIScsiTargetW(targetname.into_param().abi(), isinformationalsession.into_param().abi(), initiatorinstance.into_param().abi(), initiatorportnumber, targetportal, securityflags, mappings, 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.into_param().abi(), uniquesessionid, uniqueconnectionid) } #[inline] pub unsafe fn LogoutIScsiTarget(uniquesessionid: *mut ISCSI_UNIQUE_SESSION_ID) -> 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 040fe65604..0e21689b11 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Jet/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Jet/mod.rs @@ -306,7 +306,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("esent.dll" "system" fn JetCreateIndex2A(sesid : super::StructuredStorage:: JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, pindexcreate : *const JET_INDEXCREATE_A, cindexcreate : u32) -> i32); - JetCreateIndex2A(sesid.into_param().abi(), tableid.into_param().abi(), ::core::mem::transmute(pindexcreate.as_ptr()), pindexcreate.len() as _) + JetCreateIndex2A(sesid.into_param().abi(), tableid.into_param().abi(), ::core::mem::transmute(pindexcreate.as_ptr()), pindexcreate.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Storage_StructuredStorage\"`"] #[cfg(feature = "Win32_Storage_StructuredStorage")] @@ -317,7 +317,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("esent.dll" "system" fn JetCreateIndex2W(sesid : super::StructuredStorage:: JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, pindexcreate : *const JET_INDEXCREATE_W, cindexcreate : u32) -> i32); - JetCreateIndex2W(sesid.into_param().abi(), tableid.into_param().abi(), ::core::mem::transmute(pindexcreate.as_ptr()), pindexcreate.len() as _) + JetCreateIndex2W(sesid.into_param().abi(), tableid.into_param().abi(), ::core::mem::transmute(pindexcreate.as_ptr()), pindexcreate.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Storage_StructuredStorage\"`"] #[cfg(feature = "Win32_Storage_StructuredStorage")] @@ -328,7 +328,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("esent.dll" "system" fn JetCreateIndex3A(sesid : super::StructuredStorage:: JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, pindexcreate : *const JET_INDEXCREATE2_A, cindexcreate : u32) -> i32); - JetCreateIndex3A(sesid.into_param().abi(), tableid.into_param().abi(), ::core::mem::transmute(pindexcreate.as_ptr()), pindexcreate.len() as _) + JetCreateIndex3A(sesid.into_param().abi(), tableid.into_param().abi(), ::core::mem::transmute(pindexcreate.as_ptr()), pindexcreate.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Storage_StructuredStorage\"`"] #[cfg(feature = "Win32_Storage_StructuredStorage")] @@ -339,7 +339,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("esent.dll" "system" fn JetCreateIndex3W(sesid : super::StructuredStorage:: JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, pindexcreate : *const JET_INDEXCREATE2_W, cindexcreate : u32) -> i32); - JetCreateIndex3W(sesid.into_param().abi(), tableid.into_param().abi(), ::core::mem::transmute(pindexcreate.as_ptr()), pindexcreate.len() as _) + JetCreateIndex3W(sesid.into_param().abi(), tableid.into_param().abi(), ::core::mem::transmute(pindexcreate.as_ptr()), pindexcreate.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Storage_StructuredStorage\"`"] #[cfg(feature = "Win32_Storage_StructuredStorage")] @@ -350,7 +350,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("esent.dll" "system" fn JetCreateIndex4A(sesid : super::StructuredStorage:: JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, pindexcreate : *const JET_INDEXCREATE3_A, cindexcreate : u32) -> i32); - JetCreateIndex4A(sesid.into_param().abi(), tableid.into_param().abi(), ::core::mem::transmute(pindexcreate.as_ptr()), pindexcreate.len() as _) + JetCreateIndex4A(sesid.into_param().abi(), tableid.into_param().abi(), ::core::mem::transmute(pindexcreate.as_ptr()), pindexcreate.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Storage_StructuredStorage\"`"] #[cfg(feature = "Win32_Storage_StructuredStorage")] @@ -361,7 +361,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("esent.dll" "system" fn JetCreateIndex4W(sesid : super::StructuredStorage:: JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, pindexcreate : *const JET_INDEXCREATE3_W, cindexcreate : u32) -> i32); - JetCreateIndex4W(sesid.into_param().abi(), tableid.into_param().abi(), ::core::mem::transmute(pindexcreate.as_ptr()), pindexcreate.len() as _) + JetCreateIndex4W(sesid.into_param().abi(), tableid.into_param().abi(), ::core::mem::transmute(pindexcreate.as_ptr()), pindexcreate.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Storage_StructuredStorage\"`"] #[cfg(feature = "Win32_Storage_StructuredStorage")] @@ -372,7 +372,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("esent.dll" "system" fn JetCreateIndexA(sesid : super::StructuredStorage:: JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, szindexname : *const i8, grbit : u32, szkey : ::windows_core::PCSTR, cbkey : u32, ldensity : u32) -> i32); - JetCreateIndexA(sesid.into_param().abi(), tableid.into_param().abi(), szindexname, grbit, ::core::mem::transmute(szkey.as_ptr()), szkey.len() as _, ldensity) + JetCreateIndexA(sesid.into_param().abi(), tableid.into_param().abi(), szindexname, grbit, ::core::mem::transmute(szkey.as_ptr()), szkey.len().try_into().unwrap(), ldensity) } #[doc = "Required features: `\"Win32_Storage_StructuredStorage\"`"] #[cfg(feature = "Win32_Storage_StructuredStorage")] @@ -737,14 +737,14 @@ where #[inline] pub unsafe fn JetEnableMultiInstanceA(psetsysparam: ::core::option::Option<&[JET_SETSYSPARAM_A]>, pcsetsucceed: ::core::option::Option<*mut u32>) -> i32 { ::windows_targets::link!("esent.dll" "system" fn JetEnableMultiInstanceA(psetsysparam : *const JET_SETSYSPARAM_A, csetsysparam : u32, pcsetsucceed : *mut u32) -> i32); - JetEnableMultiInstanceA(::core::mem::transmute(psetsysparam.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), psetsysparam.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcsetsucceed.unwrap_or(::std::ptr::null_mut()))) + JetEnableMultiInstanceA(::core::mem::transmute(psetsysparam.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), psetsysparam.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcsetsucceed.unwrap_or(::std::ptr::null_mut()))) } #[doc = "Required features: `\"Win32_Storage_StructuredStorage\"`"] #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] pub unsafe fn JetEnableMultiInstanceW(psetsysparam: ::core::option::Option<&[JET_SETSYSPARAM_W]>, pcsetsucceed: ::core::option::Option<*mut u32>) -> i32 { ::windows_targets::link!("esent.dll" "system" fn JetEnableMultiInstanceW(psetsysparam : *const JET_SETSYSPARAM_W, csetsysparam : u32, pcsetsucceed : *mut u32) -> i32); - JetEnableMultiInstanceW(::core::mem::transmute(psetsysparam.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), psetsysparam.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcsetsucceed.unwrap_or(::std::ptr::null_mut()))) + JetEnableMultiInstanceW(::core::mem::transmute(psetsysparam.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), psetsysparam.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcsetsucceed.unwrap_or(::std::ptr::null_mut()))) } #[inline] pub unsafe fn JetEndExternalBackup() -> i32 { @@ -790,7 +790,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("esent.dll" "system" fn JetEnumerateColumns(sesid : super::StructuredStorage:: JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, cenumcolumnid : u32, rgenumcolumnid : *const JET_ENUMCOLUMNID, pcenumcolumn : *mut u32, prgenumcolumn : *mut *mut JET_ENUMCOLUMN, pfnrealloc : JET_PFNREALLOC, pvrealloccontext : *const ::core::ffi::c_void, cbdatamost : u32, grbit : u32) -> i32); - JetEnumerateColumns(sesid.into_param().abi(), tableid.into_param().abi(), rgenumcolumnid.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rgenumcolumnid.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pcenumcolumn, prgenumcolumn, pfnrealloc, ::core::mem::transmute(pvrealloccontext.unwrap_or(::std::ptr::null())), cbdatamost, grbit) + JetEnumerateColumns(sesid.into_param().abi(), tableid.into_param().abi(), rgenumcolumnid.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(rgenumcolumnid.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pcenumcolumn, prgenumcolumn, pfnrealloc, ::core::mem::transmute(pvrealloccontext.unwrap_or(::std::ptr::null())), cbdatamost, grbit) } #[doc = "Required features: `\"Win32_Storage_StructuredStorage\"`"] #[cfg(feature = "Win32_Storage_StructuredStorage")] @@ -808,28 +808,28 @@ where #[inline] pub unsafe fn JetExternalRestore2A(szcheckpointfilepath: *const i8, szlogpath: *const i8, rgrstmap: ::core::option::Option<&[JET_RSTMAP_A]>, szbackuplogpath: *const i8, ploginfo: *mut JET_LOGINFO_A, sztargetinstancename: ::core::option::Option<*const i8>, sztargetinstancelogpath: ::core::option::Option<*const i8>, sztargetinstancecheckpointpath: ::core::option::Option<*const i8>, pfn: JET_PFNSTATUS) -> i32 { ::windows_targets::link!("esent.dll" "system" fn JetExternalRestore2A(szcheckpointfilepath : *const i8, szlogpath : *const i8, rgrstmap : *const JET_RSTMAP_A, crstfilemap : i32, szbackuplogpath : *const i8, ploginfo : *mut JET_LOGINFO_A, sztargetinstancename : *const i8, sztargetinstancelogpath : *const i8, sztargetinstancecheckpointpath : *const i8, pfn : JET_PFNSTATUS) -> i32); - JetExternalRestore2A(szcheckpointfilepath, szlogpath, ::core::mem::transmute(rgrstmap.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), rgrstmap.as_deref().map_or(0, |slice| slice.len() as _), szbackuplogpath, ploginfo, ::core::mem::transmute(sztargetinstancename.unwrap_or(::std::ptr::null())), ::core::mem::transmute(sztargetinstancelogpath.unwrap_or(::std::ptr::null())), ::core::mem::transmute(sztargetinstancecheckpointpath.unwrap_or(::std::ptr::null())), pfn) + JetExternalRestore2A(szcheckpointfilepath, szlogpath, ::core::mem::transmute(rgrstmap.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), rgrstmap.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), szbackuplogpath, ploginfo, ::core::mem::transmute(sztargetinstancename.unwrap_or(::std::ptr::null())), ::core::mem::transmute(sztargetinstancelogpath.unwrap_or(::std::ptr::null())), ::core::mem::transmute(sztargetinstancecheckpointpath.unwrap_or(::std::ptr::null())), pfn) } #[doc = "Required features: `\"Win32_Storage_StructuredStorage\"`"] #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] pub unsafe fn JetExternalRestore2W(szcheckpointfilepath: *const u16, szlogpath: *const u16, rgrstmap: ::core::option::Option<&[JET_RSTMAP_W]>, szbackuplogpath: *const u16, ploginfo: *mut JET_LOGINFO_W, sztargetinstancename: ::core::option::Option<*const u16>, sztargetinstancelogpath: ::core::option::Option<*const u16>, sztargetinstancecheckpointpath: ::core::option::Option<*const u16>, pfn: JET_PFNSTATUS) -> i32 { ::windows_targets::link!("esent.dll" "system" fn JetExternalRestore2W(szcheckpointfilepath : *const u16, szlogpath : *const u16, rgrstmap : *const JET_RSTMAP_W, crstfilemap : i32, szbackuplogpath : *const u16, ploginfo : *mut JET_LOGINFO_W, sztargetinstancename : *const u16, sztargetinstancelogpath : *const u16, sztargetinstancecheckpointpath : *const u16, pfn : JET_PFNSTATUS) -> i32); - JetExternalRestore2W(szcheckpointfilepath, szlogpath, ::core::mem::transmute(rgrstmap.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), rgrstmap.as_deref().map_or(0, |slice| slice.len() as _), szbackuplogpath, ploginfo, ::core::mem::transmute(sztargetinstancename.unwrap_or(::std::ptr::null())), ::core::mem::transmute(sztargetinstancelogpath.unwrap_or(::std::ptr::null())), ::core::mem::transmute(sztargetinstancecheckpointpath.unwrap_or(::std::ptr::null())), pfn) + JetExternalRestore2W(szcheckpointfilepath, szlogpath, ::core::mem::transmute(rgrstmap.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), rgrstmap.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), szbackuplogpath, ploginfo, ::core::mem::transmute(sztargetinstancename.unwrap_or(::std::ptr::null())), ::core::mem::transmute(sztargetinstancelogpath.unwrap_or(::std::ptr::null())), ::core::mem::transmute(sztargetinstancecheckpointpath.unwrap_or(::std::ptr::null())), pfn) } #[doc = "Required features: `\"Win32_Storage_StructuredStorage\"`"] #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] pub unsafe fn JetExternalRestoreA(szcheckpointfilepath: *const i8, szlogpath: *const i8, rgrstmap: ::core::option::Option<&[JET_RSTMAP_A]>, szbackuplogpath: *const i8, genlow: i32, genhigh: i32, pfn: JET_PFNSTATUS) -> i32 { ::windows_targets::link!("esent.dll" "system" fn JetExternalRestoreA(szcheckpointfilepath : *const i8, szlogpath : *const i8, rgrstmap : *const JET_RSTMAP_A, crstfilemap : i32, szbackuplogpath : *const i8, genlow : i32, genhigh : i32, pfn : JET_PFNSTATUS) -> i32); - JetExternalRestoreA(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() as _), szbackuplogpath, genlow, genhigh, pfn) + JetExternalRestoreA(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, genlow, genhigh, pfn) } #[doc = "Required features: `\"Win32_Storage_StructuredStorage\"`"] #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] pub unsafe fn JetExternalRestoreW(szcheckpointfilepath: *const u16, szlogpath: *const u16, rgrstmap: ::core::option::Option<&[JET_RSTMAP_W]>, szbackuplogpath: *const u16, genlow: i32, genhigh: i32, pfn: JET_PFNSTATUS) -> i32 { ::windows_targets::link!("esent.dll" "system" fn JetExternalRestoreW(szcheckpointfilepath : *const u16, szlogpath : *const u16, rgrstmap : *const JET_RSTMAP_W, crstfilemap : i32, szbackuplogpath : *const u16, genlow : i32, genhigh : i32, pfn : JET_PFNSTATUS) -> i32); - JetExternalRestoreW(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() as _), szbackuplogpath, genlow, genhigh, pfn) + JetExternalRestoreW(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, genlow, genhigh, pfn) } #[inline] pub unsafe fn JetFreeBuffer(pbbuf: P0) -> i32 @@ -842,7 +842,7 @@ where #[inline] pub unsafe fn JetGetAttachInfoA(szzdatabases: ::core::option::Option<&mut [u8]>, pcbactual: ::core::option::Option<*mut u32>) -> i32 { ::windows_targets::link!("esent.dll" "system" fn JetGetAttachInfoA(szzdatabases : *mut i8, cbmax : u32, pcbactual : *mut u32) -> i32); - JetGetAttachInfoA(::core::mem::transmute(szzdatabases.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), szzdatabases.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcbactual.unwrap_or(::std::ptr::null_mut()))) + JetGetAttachInfoA(::core::mem::transmute(szzdatabases.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), szzdatabases.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcbactual.unwrap_or(::std::ptr::null_mut()))) } #[doc = "Required features: `\"Win32_Storage_StructuredStorage\"`"] #[cfg(feature = "Win32_Storage_StructuredStorage")] @@ -852,7 +852,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("esent.dll" "system" fn JetGetAttachInfoInstanceA(instance : super::StructuredStorage:: JET_INSTANCE, szzdatabases : *mut i8, cbmax : u32, pcbactual : *mut u32) -> i32); - JetGetAttachInfoInstanceA(instance.into_param().abi(), ::core::mem::transmute(szzdatabases.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), szzdatabases.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcbactual.unwrap_or(::std::ptr::null_mut()))) + JetGetAttachInfoInstanceA(instance.into_param().abi(), ::core::mem::transmute(szzdatabases.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), szzdatabases.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcbactual.unwrap_or(::std::ptr::null_mut()))) } #[doc = "Required features: `\"Win32_Storage_StructuredStorage\"`"] #[cfg(feature = "Win32_Storage_StructuredStorage")] @@ -909,7 +909,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("esent.dll" "system" fn JetGetCurrentIndexA(sesid : super::StructuredStorage:: JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, szindexname : *mut i8, cbindexname : u32) -> i32); - JetGetCurrentIndexA(sesid.into_param().abi(), tableid.into_param().abi(), ::core::mem::transmute(szindexname.as_ptr()), szindexname.len() as _) + JetGetCurrentIndexA(sesid.into_param().abi(), tableid.into_param().abi(), ::core::mem::transmute(szindexname.as_ptr()), szindexname.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Storage_StructuredStorage\"`"] #[cfg(feature = "Win32_Storage_StructuredStorage")] @@ -1037,7 +1037,7 @@ where #[inline] pub unsafe fn JetGetLogInfoA(szzlogs: ::core::option::Option<&mut [u8]>, pcbactual: ::core::option::Option<*mut u32>) -> i32 { ::windows_targets::link!("esent.dll" "system" fn JetGetLogInfoA(szzlogs : *mut i8, cbmax : u32, pcbactual : *mut u32) -> i32); - JetGetLogInfoA(::core::mem::transmute(szzlogs.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), szzlogs.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcbactual.unwrap_or(::std::ptr::null_mut()))) + JetGetLogInfoA(::core::mem::transmute(szzlogs.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), szzlogs.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcbactual.unwrap_or(::std::ptr::null_mut()))) } #[doc = "Required features: `\"Win32_Storage_StructuredStorage\"`"] #[cfg(feature = "Win32_Storage_StructuredStorage")] @@ -1047,7 +1047,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("esent.dll" "system" fn JetGetLogInfoInstance2A(instance : super::StructuredStorage:: JET_INSTANCE, szzlogs : *mut i8, cbmax : u32, pcbactual : *mut u32, ploginfo : *mut JET_LOGINFO_A) -> i32); - JetGetLogInfoInstance2A(instance.into_param().abi(), ::core::mem::transmute(szzlogs.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), szzlogs.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcbactual.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ploginfo.unwrap_or(::std::ptr::null_mut()))) + JetGetLogInfoInstance2A(instance.into_param().abi(), ::core::mem::transmute(szzlogs.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), szzlogs.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcbactual.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ploginfo.unwrap_or(::std::ptr::null_mut()))) } #[doc = "Required features: `\"Win32_Storage_StructuredStorage\"`"] #[cfg(feature = "Win32_Storage_StructuredStorage")] @@ -1067,7 +1067,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("esent.dll" "system" fn JetGetLogInfoInstanceA(instance : super::StructuredStorage:: JET_INSTANCE, szzlogs : *mut i8, cbmax : u32, pcbactual : *mut u32) -> i32); - JetGetLogInfoInstanceA(instance.into_param().abi(), ::core::mem::transmute(szzlogs.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), szzlogs.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcbactual.unwrap_or(::std::ptr::null_mut()))) + JetGetLogInfoInstanceA(instance.into_param().abi(), ::core::mem::transmute(szzlogs.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), szzlogs.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcbactual.unwrap_or(::std::ptr::null_mut()))) } #[doc = "Required features: `\"Win32_Storage_StructuredStorage\"`"] #[cfg(feature = "Win32_Storage_StructuredStorage")] @@ -1156,7 +1156,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("esent.dll" "system" fn JetGetSessionParameter(sesid : super::StructuredStorage:: JET_SESID, sesparamid : u32, pvparam : *mut ::core::ffi::c_void, cbparammax : u32, pcbparamactual : *mut u32) -> i32); - JetGetSessionParameter(sesid.into_param().abi(), sesparamid, ::core::mem::transmute(pvparam.as_ptr()), pvparam.len() as _, ::core::mem::transmute(pcbparamactual.unwrap_or(::std::ptr::null_mut()))) + JetGetSessionParameter(sesid.into_param().abi(), sesparamid, ::core::mem::transmute(pvparam.as_ptr()), pvparam.len().try_into().unwrap(), ::core::mem::transmute(pcbparamactual.unwrap_or(::std::ptr::null_mut()))) } #[doc = "Required features: `\"Win32_Storage_StructuredStorage\"`"] #[cfg(feature = "Win32_Storage_StructuredStorage")] @@ -1167,7 +1167,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("esent.dll" "system" fn JetGetSystemParameterA(instance : super::StructuredStorage:: JET_INSTANCE, sesid : super::StructuredStorage:: JET_SESID, paramid : u32, plparam : *mut super::StructuredStorage:: JET_API_PTR, szparam : *mut i8, cbmax : u32) -> i32); - JetGetSystemParameterA(instance.into_param().abi(), sesid.into_param().abi(), paramid, ::core::mem::transmute(plparam.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(szparam.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), szparam.as_deref().map_or(0, |slice| slice.len() as _)) + JetGetSystemParameterA(instance.into_param().abi(), sesid.into_param().abi(), paramid, ::core::mem::transmute(plparam.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(szparam.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), szparam.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Storage_StructuredStorage\"`"] #[cfg(feature = "Win32_Storage_StructuredStorage")] @@ -1259,7 +1259,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("esent.dll" "system" fn JetGetTruncateLogInfoInstanceA(instance : super::StructuredStorage:: JET_INSTANCE, szzlogs : *mut i8, cbmax : u32, pcbactual : *mut u32) -> i32); - JetGetTruncateLogInfoInstanceA(instance.into_param().abi(), ::core::mem::transmute(szzlogs.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), szzlogs.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcbactual.unwrap_or(::std::ptr::null_mut()))) + JetGetTruncateLogInfoInstanceA(instance.into_param().abi(), ::core::mem::transmute(szzlogs.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), szzlogs.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcbactual.unwrap_or(::std::ptr::null_mut()))) } #[doc = "Required features: `\"Win32_Storage_StructuredStorage\"`"] #[cfg(feature = "Win32_Storage_StructuredStorage")] @@ -1381,7 +1381,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("esent.dll" "system" fn JetIntersectIndexes(sesid : super::StructuredStorage:: JET_SESID, rgindexrange : *const JET_INDEXRANGE, cindexrange : u32, precordlist : *mut JET_RECORDLIST, grbit : u32) -> i32); - JetIntersectIndexes(sesid.into_param().abi(), ::core::mem::transmute(rgindexrange.as_ptr()), rgindexrange.len() as _, precordlist, grbit) + JetIntersectIndexes(sesid.into_param().abi(), ::core::mem::transmute(rgindexrange.as_ptr()), rgindexrange.len().try_into().unwrap(), precordlist, grbit) } #[doc = "Required features: `\"Win32_Storage_StructuredStorage\"`"] #[cfg(feature = "Win32_Storage_StructuredStorage")] @@ -1648,7 +1648,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("esent.dll" "system" fn JetPrereadIndexRanges(sesid : super::StructuredStorage:: JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, rgindexranges : *const JET_INDEX_RANGE, cindexranges : u32, pcrangespreread : *mut u32, rgcolumnidpreread : *const u32, ccolumnidpreread : u32, grbit : u32) -> i32); - JetPrereadIndexRanges(sesid.into_param().abi(), tableid.into_param().abi(), ::core::mem::transmute(rgindexranges.as_ptr()), rgindexranges.len() as _, ::core::mem::transmute(pcrangespreread.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(rgcolumnidpreread.as_ptr()), rgcolumnidpreread.len() as _, grbit) + JetPrereadIndexRanges(sesid.into_param().abi(), tableid.into_param().abi(), ::core::mem::transmute(rgindexranges.as_ptr()), rgindexranges.len().try_into().unwrap(), ::core::mem::transmute(pcrangespreread.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(rgcolumnidpreread.as_ptr()), rgcolumnidpreread.len().try_into().unwrap(), grbit) } #[doc = "Required features: `\"Win32_Storage_StructuredStorage\"`"] #[cfg(feature = "Win32_Storage_StructuredStorage")] @@ -1834,7 +1834,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("esent.dll" "system" fn JetRetrieveColumns(sesid : super::StructuredStorage:: JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, pretrievecolumn : *mut JET_RETRIEVECOLUMN, cretrievecolumn : u32) -> i32); - JetRetrieveColumns(sesid.into_param().abi(), tableid.into_param().abi(), ::core::mem::transmute(pretrievecolumn.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pretrievecolumn.as_deref().map_or(0, |slice| slice.len() as _)) + JetRetrieveColumns(sesid.into_param().abi(), tableid.into_param().abi(), ::core::mem::transmute(pretrievecolumn.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pretrievecolumn.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Storage_StructuredStorage\"`"] #[cfg(feature = "Win32_Storage_StructuredStorage")] @@ -1908,7 +1908,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("esent.dll" "system" fn JetSetColumns(sesid : super::StructuredStorage:: JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, psetcolumn : *const JET_SETCOLUMN, csetcolumn : u32) -> i32); - JetSetColumns(sesid.into_param().abi(), tableid.into_param().abi(), ::core::mem::transmute(psetcolumn.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), psetcolumn.as_deref().map_or(0, |slice| slice.len() as _)) + JetSetColumns(sesid.into_param().abi(), tableid.into_param().abi(), ::core::mem::transmute(psetcolumn.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), psetcolumn.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Storage_StructuredStorage\"`"] #[cfg(feature = "Win32_Storage_StructuredStorage")] @@ -2007,7 +2007,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("esent.dll" "system" fn JetSetCursorFilter(sesid : super::StructuredStorage:: JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, rgcolumnfilters : *const JET_INDEX_COLUMN, ccolumnfilters : u32, grbit : u32) -> i32); - JetSetCursorFilter(sesid.into_param().abi(), tableid.into_param().abi(), ::core::mem::transmute(rgcolumnfilters.as_ptr()), rgcolumnfilters.len() as _, grbit) + JetSetCursorFilter(sesid.into_param().abi(), tableid.into_param().abi(), ::core::mem::transmute(rgcolumnfilters.as_ptr()), rgcolumnfilters.len().try_into().unwrap(), grbit) } #[doc = "Required features: `\"Win32_Storage_StructuredStorage\"`"] #[cfg(feature = "Win32_Storage_StructuredStorage")] 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 a72a520f4d..aa18ae815e 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/OfflineFiles/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/OfflineFiles/mod.rs @@ -32,7 +32,7 @@ pub unsafe fn OfflineFilesStart() -> u32 { pub struct IEnumOfflineFilesItems(::windows_core::IUnknown); impl IEnumOfflineFilesItems { pub unsafe fn Next(&self, rgelt: &mut [::core::option::Option], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -66,7 +66,7 @@ pub struct IEnumOfflineFilesItems_Vtbl { pub struct IEnumOfflineFilesSettings(::windows_core::IUnknown); impl IEnumOfflineFilesSettings { pub unsafe fn Next(&self, rgelt: &mut [::core::option::Option], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -108,7 +108,7 @@ impl IOfflineFilesCache { P2: ::windows_core::IntoParam, P3: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).Synchronize)(::windows_core::Interface::as_raw(self), hwndparent.into_param().abi(), ::core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len() as _, basync.into_param().abi(), dwsynccontrol, pisyncconflicthandler.into_param().abi(), piprogress.into_param().abi(), ::core::mem::transmute(psyncid.unwrap_or(::std::ptr::null()))).ok() + (::windows_core::Interface::vtable(self).Synchronize)(::windows_core::Interface::as_raw(self), hwndparent.into_param().abi(), ::core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len().try_into().unwrap(), basync.into_param().abi(), dwsynccontrol, pisyncconflicthandler.into_param().abi(), piprogress.into_param().abi(), ::core::mem::transmute(psyncid.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -117,7 +117,7 @@ impl IOfflineFilesCache { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).DeleteItems)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len() as _, dwflags, basync.into_param().abi(), piprogress.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).DeleteItems)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len().try_into().unwrap(), dwflags, basync.into_param().abi(), piprogress.into_param().abi()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -127,7 +127,7 @@ impl IOfflineFilesCache { P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).DeleteItemsForUser)(::windows_core::Interface::as_raw(self), pszuser.into_param().abi(), ::core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len() as _, dwflags, basync.into_param().abi(), piprogress.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).DeleteItemsForUser)(::windows_core::Interface::as_raw(self), pszuser.into_param().abi(), ::core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len().try_into().unwrap(), dwflags, basync.into_param().abi(), piprogress.into_param().abi()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -138,7 +138,7 @@ impl IOfflineFilesCache { P2: ::windows_core::IntoParam, P3: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).Pin)(::windows_core::Interface::as_raw(self), hwndparent.into_param().abi(), ::core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len() as _, bdeep.into_param().abi(), basync.into_param().abi(), dwpincontrolflags, piprogress.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).Pin)(::windows_core::Interface::as_raw(self), hwndparent.into_param().abi(), ::core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len().try_into().unwrap(), bdeep.into_param().abi(), basync.into_param().abi(), dwpincontrolflags, piprogress.into_param().abi()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -149,7 +149,7 @@ impl IOfflineFilesCache { P2: ::windows_core::IntoParam, P3: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).Unpin)(::windows_core::Interface::as_raw(self), hwndparent.into_param().abi(), ::core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len() as _, bdeep.into_param().abi(), basync.into_param().abi(), dwpincontrolflags, piprogress.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).Unpin)(::windows_core::Interface::as_raw(self), hwndparent.into_param().abi(), ::core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len().try_into().unwrap(), bdeep.into_param().abi(), basync.into_param().abi(), dwpincontrolflags, piprogress.into_param().abi()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -301,7 +301,7 @@ impl IOfflineFilesCache2 { P2: ::windows_core::IntoParam, P3: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.Synchronize)(::windows_core::Interface::as_raw(self), hwndparent.into_param().abi(), ::core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len() as _, basync.into_param().abi(), dwsynccontrol, pisyncconflicthandler.into_param().abi(), piprogress.into_param().abi(), ::core::mem::transmute(psyncid.unwrap_or(::std::ptr::null()))).ok() + (::windows_core::Interface::vtable(self).base__.Synchronize)(::windows_core::Interface::as_raw(self), hwndparent.into_param().abi(), ::core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len().try_into().unwrap(), basync.into_param().abi(), dwsynccontrol, pisyncconflicthandler.into_param().abi(), piprogress.into_param().abi(), ::core::mem::transmute(psyncid.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -310,7 +310,7 @@ impl IOfflineFilesCache2 { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.DeleteItems)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len() as _, dwflags, basync.into_param().abi(), piprogress.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).base__.DeleteItems)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len().try_into().unwrap(), dwflags, basync.into_param().abi(), piprogress.into_param().abi()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -320,7 +320,7 @@ impl IOfflineFilesCache2 { P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.DeleteItemsForUser)(::windows_core::Interface::as_raw(self), pszuser.into_param().abi(), ::core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len() as _, dwflags, basync.into_param().abi(), piprogress.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).base__.DeleteItemsForUser)(::windows_core::Interface::as_raw(self), pszuser.into_param().abi(), ::core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len().try_into().unwrap(), dwflags, basync.into_param().abi(), piprogress.into_param().abi()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -331,7 +331,7 @@ impl IOfflineFilesCache2 { P2: ::windows_core::IntoParam, P3: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.Pin)(::windows_core::Interface::as_raw(self), hwndparent.into_param().abi(), ::core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len() as _, bdeep.into_param().abi(), basync.into_param().abi(), dwpincontrolflags, piprogress.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).base__.Pin)(::windows_core::Interface::as_raw(self), hwndparent.into_param().abi(), ::core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len().try_into().unwrap(), bdeep.into_param().abi(), basync.into_param().abi(), dwpincontrolflags, piprogress.into_param().abi()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -342,7 +342,7 @@ impl IOfflineFilesCache2 { P2: ::windows_core::IntoParam, P3: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.Unpin)(::windows_core::Interface::as_raw(self), hwndparent.into_param().abi(), ::core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len() as _, bdeep.into_param().abi(), basync.into_param().abi(), dwpincontrolflags, piprogress.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).base__.Unpin)(::windows_core::Interface::as_raw(self), hwndparent.into_param().abi(), ::core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len().try_into().unwrap(), bdeep.into_param().abi(), basync.into_param().abi(), dwpincontrolflags, piprogress.into_param().abi()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1532,10 +1532,10 @@ impl IOfflineFilesEventsFilter { (::windows_core::Interface::vtable(self).GetPathFilter)(::windows_core::Interface::as_raw(self), ppszfilter, pmatch).ok() } pub unsafe fn GetIncludedEvents(&self, prgevents: &mut [OFFLINEFILES_EVENTS], pcevents: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetIncludedEvents)(::windows_core::Interface::as_raw(self), prgevents.len() as _, ::core::mem::transmute(prgevents.as_ptr()), pcevents).ok() + (::windows_core::Interface::vtable(self).GetIncludedEvents)(::windows_core::Interface::as_raw(self), prgevents.len().try_into().unwrap(), ::core::mem::transmute(prgevents.as_ptr()), pcevents).ok() } pub unsafe fn GetExcludedEvents(&self, prgevents: &mut [OFFLINEFILES_EVENTS], pcevents: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetExcludedEvents)(::windows_core::Interface::as_raw(self), prgevents.len() as _, ::core::mem::transmute(prgevents.as_ptr()), pcevents).ok() + (::windows_core::Interface::vtable(self).GetExcludedEvents)(::windows_core::Interface::as_raw(self), prgevents.len().try_into().unwrap(), ::core::mem::transmute(prgevents.as_ptr()), pcevents).ok() } } ::windows_core::imp::interface_hierarchy!(IOfflineFilesEventsFilter, ::windows_core::IUnknown); @@ -1766,7 +1766,7 @@ impl IOfflineFilesItemFilter { (::windows_core::Interface::vtable(self).GetTimeFilter)(::windows_core::Interface::as_raw(self), pfttime, pbevaltimeofday, ptimetype, pcompare).ok() } pub unsafe fn GetPatternFilter(&self, pszpattern: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPatternFilter)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszpattern.as_ptr()), pszpattern.len() as _).ok() + (::windows_core::Interface::vtable(self).GetPatternFilter)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszpattern.as_ptr()), pszpattern.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(IOfflineFilesItemFilter, ::windows_core::IUnknown); 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 93be47b745..0ca8aaf057 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 @@ -1760,7 +1760,7 @@ impl IAppxEncryptedPackageWriter2 { #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] pub unsafe fn AddPayloadFilesEncrypted(&self, payloadfiles: &[APPX_PACKAGE_WRITER_PAYLOAD_STREAM], memorylimit: u64) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).AddPayloadFilesEncrypted)(::windows_core::Interface::as_raw(self), payloadfiles.len() as _, ::core::mem::transmute(payloadfiles.as_ptr()), memorylimit).ok() + (::windows_core::Interface::vtable(self).AddPayloadFilesEncrypted)(::windows_core::Interface::as_raw(self), payloadfiles.len().try_into().unwrap(), ::core::mem::transmute(payloadfiles.as_ptr()), memorylimit).ok() } } ::windows_core::imp::interface_hierarchy!(IAppxEncryptedPackageWriter2, ::windows_core::IUnknown); @@ -3997,7 +3997,7 @@ impl IAppxPackageWriter3 { #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] pub unsafe fn AddPayloadFiles(&self, payloadfiles: &[APPX_PACKAGE_WRITER_PAYLOAD_STREAM], memorylimit: u64) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).AddPayloadFiles)(::windows_core::Interface::as_raw(self), payloadfiles.len() as _, ::core::mem::transmute(payloadfiles.as_ptr()), memorylimit).ok() + (::windows_core::Interface::vtable(self).AddPayloadFiles)(::windows_core::Interface::as_raw(self), payloadfiles.len().try_into().unwrap(), ::core::mem::transmute(payloadfiles.as_ptr()), memorylimit).ok() } } ::windows_core::imp::interface_hierarchy!(IAppxPackageWriter3, ::windows_core::IUnknown); 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 e95013bb9e..55b005a187 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 @@ -290,7 +290,7 @@ impl IOpcDigitalSignatureManager { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).ReplaceSignatureXml)(::windows_core::Interface::as_raw(self), signaturepartname.into_param().abi(), ::core::mem::transmute(newsignaturexml.as_ptr()), newsignaturexml.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).ReplaceSignatureXml)(::windows_core::Interface::as_raw(self), signaturepartname.into_param().abi(), ::core::mem::transmute(newsignaturexml.as_ptr()), newsignaturexml.len().try_into().unwrap(), &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IOpcDigitalSignatureManager, ::windows_core::IUnknown); @@ -1221,7 +1221,7 @@ pub struct IOpcSignatureCustomObjectSet(::windows_core::IUnknown); impl IOpcSignatureCustomObjectSet { pub unsafe fn Create(&self, xmlmarkup: &[u8]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).Create)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(xmlmarkup.as_ptr()), xmlmarkup.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).Create)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(xmlmarkup.as_ptr()), xmlmarkup.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn Delete(&self, customobject: P0) -> ::windows_core::Result<()> where 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 726fed1c47..12a675c118 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/VirtualDiskService/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/VirtualDiskService/mod.rs @@ -3,7 +3,7 @@ pub struct IEnumVdsObject(::windows_core::IUnknown); impl IEnumVdsObject { pub unsafe fn Next(&self, ppobjectarray: &mut [::core::option::Option<::windows_core::IUnknown>], pcfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppobjectarray.len() as _, ::core::mem::transmute(ppobjectarray.as_ptr()), pcfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppobjectarray.len().try_into().unwrap(), ::core::mem::transmute(ppobjectarray.as_ptr()), pcfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -232,7 +232,7 @@ pub struct IVdsAdvancedDisk3_Vtbl { pub struct IVdsAdviseSink(::windows_core::IUnknown); impl IVdsAdviseSink { pub unsafe fn OnNotify(&self, pnotificationarray: &[VDS_NOTIFICATION]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).OnNotify)(::windows_core::Interface::as_raw(self), pnotificationarray.len() as _, ::core::mem::transmute(pnotificationarray.as_ptr())).ok() + (::windows_core::Interface::vtable(self).OnNotify)(::windows_core::Interface::as_raw(self), pnotificationarray.len().try_into().unwrap(), ::core::mem::transmute(pnotificationarray.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IVdsAdviseSink, ::windows_core::IUnknown); @@ -1184,7 +1184,7 @@ impl IVdsLun { } pub unsafe fn Extend(&self, ullnumberofbytestoadd: u64, pdriveidarray: &[::windows_core::GUID]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).Extend)(::windows_core::Interface::as_raw(self), ullnumberofbytestoadd, ::core::mem::transmute(pdriveidarray.as_ptr()), pdriveidarray.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).Extend)(::windows_core::Interface::as_raw(self), ullnumberofbytestoadd, ::core::mem::transmute(pdriveidarray.as_ptr()), pdriveidarray.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn Shrink(&self, ullnumberofbytestoremove: u64) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1216,7 +1216,7 @@ impl IVdsLun { (::windows_core::Interface::vtable(self).Delete)(::windows_core::Interface::as_raw(self)).ok() } pub unsafe fn AssociateControllers(&self, pactivecontrolleridarray: &[::windows_core::GUID], pinactivecontrolleridarray: &[::windows_core::GUID]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).AssociateControllers)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pactivecontrolleridarray.as_ptr()), pactivecontrolleridarray.len() as _, ::core::mem::transmute(pinactivecontrolleridarray.as_ptr()), pinactivecontrolleridarray.len() as _).ok() + (::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() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1233,7 +1233,7 @@ impl IVdsLun { } pub unsafe fn QueryMaxLunExtendSize(&self, pdriveidarray: &[::windows_core::GUID]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).QueryMaxLunExtendSize)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdriveidarray.as_ptr()), pdriveidarray.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).QueryMaxLunExtendSize)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdriveidarray.as_ptr()), pdriveidarray.len().try_into().unwrap(), &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IVdsLun, ::windows_core::IUnknown); @@ -1314,7 +1314,7 @@ pub struct IVdsLun2_Vtbl { pub struct IVdsLunControllerPorts(::windows_core::IUnknown); impl IVdsLunControllerPorts { pub unsafe fn AssociateControllerPorts(&self, pactivecontrollerportidarray: &[::windows_core::GUID], pinactivecontrollerportidarray: &[::windows_core::GUID]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).AssociateControllerPorts)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pactivecontrollerportidarray.as_ptr()), pactivecontrollerportidarray.len() as _, ::core::mem::transmute(pinactivecontrollerportidarray.as_ptr()), pinactivecontrollerportidarray.len() as _).ok() + (::windows_core::Interface::vtable(self).AssociateControllerPorts)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pactivecontrollerportidarray.as_ptr()), pactivecontrollerportidarray.len().try_into().unwrap(), ::core::mem::transmute(pinactivecontrollerportidarray.as_ptr()), pinactivecontrollerportidarray.len().try_into().unwrap()).ok() } pub unsafe fn QueryActiveControllerPorts(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1340,7 +1340,7 @@ pub struct IVdsLunControllerPorts_Vtbl { pub struct IVdsLunIscsi(::windows_core::IUnknown); impl IVdsLunIscsi { pub unsafe fn AssociateTargets(&self, ptargetidarray: &[::windows_core::GUID]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).AssociateTargets)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ptargetidarray.as_ptr()), ptargetidarray.len() as _).ok() + (::windows_core::Interface::vtable(self).AssociateTargets)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ptargetidarray.as_ptr()), ptargetidarray.len().try_into().unwrap()).ok() } pub unsafe fn QueryAssociatedTargets(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1376,7 +1376,7 @@ impl IVdsLunMpio { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetLoadBalancePolicy(&self, policy: VDS_LOADBALANCE_POLICY_ENUM, ppaths: &[VDS_PATH_POLICY]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetLoadBalancePolicy)(::windows_core::Interface::as_raw(self), policy, ::core::mem::transmute(ppaths.as_ptr()), ppaths.len() as _).ok() + (::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() } pub unsafe fn GetSupportedLbPolicies(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1632,7 +1632,7 @@ impl IVdsPack { } pub unsafe fn CreateVolume(&self, r#type: VDS_VOLUME_TYPE, pinputdiskarray: &[VDS_INPUT_DISK], ulstripesize: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateVolume)(::windows_core::Interface::as_raw(self), r#type, ::core::mem::transmute(pinputdiskarray.as_ptr()), pinputdiskarray.len() as _, ulstripesize, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateVolume)(::windows_core::Interface::as_raw(self), r#type, ::core::mem::transmute(pinputdiskarray.as_ptr()), pinputdiskarray.len().try_into().unwrap(), ulstripesize, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1697,7 +1697,7 @@ pub struct IVdsPack2(::windows_core::IUnknown); impl IVdsPack2 { pub unsafe fn CreateVolume2(&self, r#type: VDS_VOLUME_TYPE, pinputdiskarray: &[VDS_INPUT_DISK], ulstripesize: u32, ulalign: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateVolume2)(::windows_core::Interface::as_raw(self), r#type, ::core::mem::transmute(pinputdiskarray.as_ptr()), pinputdiskarray.len() as _, ulstripesize, ulalign, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateVolume2)(::windows_core::Interface::as_raw(self), r#type, ::core::mem::transmute(pinputdiskarray.as_ptr()), pinputdiskarray.len().try_into().unwrap(), ulstripesize, ulalign, &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IVdsPack2, ::windows_core::IUnknown); @@ -1856,7 +1856,7 @@ impl IVdsService { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn QueryDriveLetters(&self, wcfirstletter: u16, pdriveletterproparray: &mut [VDS_DRIVE_LETTER_PROP]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).QueryDriveLetters)(::windows_core::Interface::as_raw(self), wcfirstletter, pdriveletterproparray.len() as _, ::core::mem::transmute(pdriveletterproparray.as_ptr())).ok() + (::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<()> { (::windows_core::Interface::vtable(self).QueryFileSystemTypes)(::windows_core::Interface::as_raw(self), ppfilesystemtypeprops, plnumberoffilesystems).ok() @@ -2215,7 +2215,7 @@ impl IVdsSubSystem { (::windows_core::Interface::vtable(self).Reenumerate)(::windows_core::Interface::as_raw(self)).ok() } pub unsafe fn SetControllerStatus(&self, ponlinecontrolleridarray: &[::windows_core::GUID], pofflinecontrolleridarray: &[::windows_core::GUID]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetControllerStatus)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ponlinecontrolleridarray.as_ptr()), ponlinecontrolleridarray.len() as _, ::core::mem::transmute(pofflinecontrolleridarray.as_ptr()), pofflinecontrolleridarray.len() as _).ok() + (::windows_core::Interface::vtable(self).SetControllerStatus)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ponlinecontrolleridarray.as_ptr()), ponlinecontrolleridarray.len().try_into().unwrap(), ::core::mem::transmute(pofflinecontrolleridarray.as_ptr()), pofflinecontrolleridarray.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2224,7 +2224,7 @@ impl IVdsSubSystem { P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateLun)(::windows_core::Interface::as_raw(self), r#type, ullsizeinbytes, ::core::mem::transmute(pdriveidarray.as_ptr()), pdriveidarray.len() as _, pwszunmaskinglist.into_param().abi(), phints, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateLun)(::windows_core::Interface::as_raw(self), r#type, ullsizeinbytes, ::core::mem::transmute(pdriveidarray.as_ptr()), pdriveidarray.len().try_into().unwrap(), pwszunmaskinglist.into_param().abi(), phints, &mut result__).from_abi(result__) } pub unsafe fn ReplaceDrive(&self, drivetobereplaced: ::windows_core::GUID, replacementdrive: ::windows_core::GUID) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).ReplaceDrive)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(drivetobereplaced), ::core::mem::transmute(replacementdrive)).ok() @@ -2236,7 +2236,7 @@ impl IVdsSubSystem { #[cfg(feature = "Win32_Foundation")] pub unsafe fn QueryMaxLunCreateSize(&self, r#type: VDS_LUN_TYPE, pdriveidarray: &[::windows_core::GUID], phints: *const VDS_HINTS) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).QueryMaxLunCreateSize)(::windows_core::Interface::as_raw(self), r#type, ::core::mem::transmute(pdriveidarray.as_ptr()), pdriveidarray.len() as _, phints, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).QueryMaxLunCreateSize)(::windows_core::Interface::as_raw(self), r#type, ::core::mem::transmute(pdriveidarray.as_ptr()), pdriveidarray.len().try_into().unwrap(), phints, &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IVdsSubSystem, ::windows_core::IUnknown); @@ -2287,13 +2287,13 @@ impl IVdsSubSystem2 { P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateLun2)(::windows_core::Interface::as_raw(self), r#type, ullsizeinbytes, ::core::mem::transmute(pdriveidarray.as_ptr()), pdriveidarray.len() as _, pwszunmaskinglist.into_param().abi(), phints2, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateLun2)(::windows_core::Interface::as_raw(self), r#type, ullsizeinbytes, ::core::mem::transmute(pdriveidarray.as_ptr()), pdriveidarray.len().try_into().unwrap(), pwszunmaskinglist.into_param().abi(), phints2, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn QueryMaxLunCreateSize2(&self, r#type: VDS_LUN_TYPE, pdriveidarray: &[::windows_core::GUID], phints2: *const VDS_HINTS2) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).QueryMaxLunCreateSize2)(::windows_core::Interface::as_raw(self), r#type, ::core::mem::transmute(pdriveidarray.as_ptr()), pdriveidarray.len() as _, phints2, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).QueryMaxLunCreateSize2)(::windows_core::Interface::as_raw(self), r#type, ::core::mem::transmute(pdriveidarray.as_ptr()), pdriveidarray.len().try_into().unwrap(), phints2, &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IVdsSubSystem2, ::windows_core::IUnknown); @@ -2586,7 +2586,7 @@ impl IVdsVolume { } pub unsafe fn Extend(&self, pinputdiskarray: &[VDS_INPUT_DISK]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).Extend)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pinputdiskarray.as_ptr()), pinputdiskarray.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).Extend)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pinputdiskarray.as_ptr()), pinputdiskarray.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn Shrink(&self, ullnumberofbytestoremove: u64) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -2878,7 +2878,7 @@ impl IVdsVolumePlex { } pub unsafe fn Repair(&self, pinputdiskarray: &[VDS_INPUT_DISK]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).Repair)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pinputdiskarray.as_ptr()), pinputdiskarray.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).Repair)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pinputdiskarray.as_ptr()), pinputdiskarray.len().try_into().unwrap(), &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IVdsVolumePlex, ::windows_core::IUnknown); 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 47ac6fda19..afd753d669 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Vss/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Vss/mod.rs @@ -1157,7 +1157,7 @@ pub struct IVssDifferentialSoftwareSnapshotMgmt3_Vtbl { pub struct IVssEnumMgmtObject(::windows_core::IUnknown); impl IVssEnumMgmtObject { pub unsafe fn Next(&self, rgelt: &mut [VSS_MGMT_OBJECT_PROP], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -1190,7 +1190,7 @@ pub struct IVssEnumMgmtObject_Vtbl { pub struct IVssEnumObject(::windows_core::IUnknown); impl IVssEnumObject { pub unsafe fn Next(&self, rgelt: &mut [VSS_OBJECT_PROP], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -1359,7 +1359,7 @@ impl IVssHardwareSnapshotProvider { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Storage_VirtualDiskService\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Storage_VirtualDiskService"))] pub unsafe fn LocateLuns(&self, rgsourceluns: &[super::VirtualDiskService::VDS_LUN_INFORMATION]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).LocateLuns)(::windows_core::Interface::as_raw(self), rgsourceluns.len() as _, ::core::mem::transmute(rgsourceluns.as_ptr())).ok() + (::windows_core::Interface::vtable(self).LocateLuns)(::windows_core::Interface::as_raw(self), rgsourceluns.len().try_into().unwrap(), ::core::mem::transmute(rgsourceluns.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Storage_VirtualDiskService\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Storage_VirtualDiskService"))] @@ -1430,7 +1430,7 @@ impl IVssHardwareSnapshotProviderEx { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Storage_VirtualDiskService\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Storage_VirtualDiskService"))] pub unsafe fn LocateLuns(&self, rgsourceluns: &[super::VirtualDiskService::VDS_LUN_INFORMATION]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.LocateLuns)(::windows_core::Interface::as_raw(self), rgsourceluns.len() as _, ::core::mem::transmute(rgsourceluns.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.LocateLuns)(::windows_core::Interface::as_raw(self), rgsourceluns.len().try_into().unwrap(), ::core::mem::transmute(rgsourceluns.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Storage_VirtualDiskService\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Storage_VirtualDiskService"))] 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 d6b7859fd5..d69b703c26 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 @@ -10,7 +10,7 @@ where P4: ::windows_core::IntoParam, { ::windows_targets::link!("xpsprint.dll" "system" fn StartXpsPrintJob(printername : ::windows_core::PCWSTR, jobname : ::windows_core::PCWSTR, outputfilename : ::windows_core::PCWSTR, progressevent : super::super::super::Foundation:: HANDLE, completionevent : super::super::super::Foundation:: HANDLE, printablepageson : *const u8, printablepagesoncount : u32, xpsprintjob : *mut * mut::core::ffi::c_void, documentstream : *mut * mut::core::ffi::c_void, printticketstream : *mut * mut::core::ffi::c_void) -> ::windows_core::HRESULT); - StartXpsPrintJob(printername.into_param().abi(), jobname.into_param().abi(), outputfilename.into_param().abi(), progressevent.into_param().abi(), completionevent.into_param().abi(), ::core::mem::transmute(printablepageson.as_ptr()), printablepageson.len() as _, ::core::mem::transmute(xpsprintjob), ::core::mem::transmute(documentstream), ::core::mem::transmute(printticketstream)).ok() + StartXpsPrintJob(printername.into_param().abi(), jobname.into_param().abi(), outputfilename.into_param().abi(), progressevent.into_param().abi(), completionevent.into_param().abi(), ::core::mem::transmute(printablepageson.as_ptr()), printablepageson.len().try_into().unwrap(), ::core::mem::transmute(xpsprintjob), ::core::mem::transmute(documentstream), ::core::mem::transmute(printticketstream)).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 db9d830649..1edced1d96 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Xps/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Xps/mod.rs @@ -61,7 +61,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn Escape(hdc : super::super::Graphics::Gdi:: HDC, iescape : i32, cjin : i32, pvin : ::windows_core::PCSTR, pvout : *mut ::core::ffi::c_void) -> i32); - Escape(hdc.into_param().abi(), iescape, pvin.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pvin.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(pvout.unwrap_or(::std::ptr::null_mut()))) + Escape(hdc.into_param().abi(), iescape, pvin.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pvin.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(pvout.unwrap_or(::std::ptr::null_mut()))) } #[doc = "Required features: `\"Win32_Graphics_Gdi\"`"] #[cfg(feature = "Win32_Graphics_Gdi")] @@ -71,7 +71,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn ExtEscape(hdc : super::super::Graphics::Gdi:: HDC, iescape : i32, cjinput : i32, lpindata : ::windows_core::PCSTR, cjoutput : i32, lpoutdata : ::windows_core::PSTR) -> i32); - ExtEscape(hdc.into_param().abi(), iescape, lpindata.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpindata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpoutdata.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpoutdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + ExtEscape(hdc.into_param().abi(), iescape, lpindata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpindata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpoutdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpoutdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] @@ -5966,7 +5966,7 @@ impl IXpsSignature { (::windows_core::Interface::vtable(self).GetSignatureXml)(::windows_core::Interface::as_raw(self), signaturexml, count).ok() } pub unsafe fn SetSignatureXml(&self, signaturexml: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetSignatureXml)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(signaturexml.as_ptr()), signaturexml.len() as _).ok() + (::windows_core::Interface::vtable(self).SetSignatureXml)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(signaturexml.as_ptr()), signaturexml.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(IXpsSignature, ::windows_core::IUnknown); 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 623506a585..955992530b 100644 --- a/crates/libs/windows/src/Windows/Win32/System/AddressBook/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/AddressBook/mod.rs @@ -324,7 +324,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("mapi32.dll" "system" fn ScLocalPathFromUNC(lpszunc : ::windows_core::PCSTR, lpszlocal : ::windows_core::PCSTR, cchlocal : u32) -> i32); - ScLocalPathFromUNC(lpszunc.into_param().abi(), ::core::mem::transmute(lpszlocal.as_ptr()), lpszlocal.len() as _) + ScLocalPathFromUNC(lpszunc.into_param().abi(), ::core::mem::transmute(lpszlocal.as_ptr()), lpszlocal.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] @@ -346,7 +346,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("mapi32.dll" "system" fn ScUNCFromLocalPath(lpszlocal : ::windows_core::PCSTR, lpszunc : ::windows_core::PCSTR, cchunc : u32) -> i32); - ScUNCFromLocalPath(lpszlocal.into_param().abi(), ::core::mem::transmute(lpszunc.as_ptr()), lpszunc.len() as _) + ScUNCFromLocalPath(lpszlocal.into_param().abi(), ::core::mem::transmute(lpszunc.as_ptr()), lpszunc.len().try_into().unwrap()) } #[inline] pub unsafe fn SzFindCh(lpsz: *mut i8, ch: u16) -> *mut i8 { @@ -1310,7 +1310,7 @@ impl IMAPIStatus { (::windows_core::Interface::vtable(self).ChangePassword)(::windows_core::Interface::as_raw(self), lpoldpass, lpnewpass, ulflags).ok() } pub unsafe fn FlushQueues(&self, uluiparam: usize, lptargettransport: ::core::option::Option<&[ENTRYID]>, ulflags: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).FlushQueues)(::windows_core::Interface::as_raw(self), uluiparam, lptargettransport.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lptargettransport.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ulflags).ok() + (::windows_core::Interface::vtable(self).FlushQueues)(::windows_core::Interface::as_raw(self), uluiparam, lptargettransport.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lptargettransport.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ulflags).ok() } } ::windows_core::imp::interface_hierarchy!(IMAPIStatus, ::windows_core::IUnknown, IMAPIProp); @@ -1903,7 +1903,7 @@ impl IProviderAdmin { #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] pub unsafe fn CreateProvider(&self, lpszprovider: *const i8, lpprops: &[SPropValue], uluiparam: usize, ulflags: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateProvider)(::windows_core::Interface::as_raw(self), lpszprovider, lpprops.len() as _, ::core::mem::transmute(lpprops.as_ptr()), uluiparam, ulflags, &mut result__).from_abi(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, ulflags, &mut result__).from_abi(result__) } pub unsafe fn DeleteProvider(&self, lpuid: *const MAPIUID) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).DeleteProvider)(::windows_core::Interface::as_raw(self), lpuid).ok() 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 deab79be20..271aa45968 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Antimalware/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Antimalware/mod.rs @@ -81,10 +81,10 @@ where pub struct IAmsiStream(::windows_core::IUnknown); impl IAmsiStream { pub unsafe fn GetAttribute(&self, attribute: AMSI_ATTRIBUTE, data: &mut [u8], retdata: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetAttribute)(::windows_core::Interface::as_raw(self), attribute, data.len() as _, ::core::mem::transmute(data.as_ptr()), retdata).ok() + (::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).ok() } pub unsafe fn Read(&self, position: u64, buffer: &mut [u8], readsize: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Read)(::windows_core::Interface::as_raw(self), position, buffer.len() as _, ::core::mem::transmute(buffer.as_ptr()), readsize).ok() + (::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).ok() } } ::windows_core::imp::interface_hierarchy!(IAmsiStream, ::windows_core::IUnknown); 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 f558d11800..841bb246b4 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ApplicationInstallationAndServicing/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ApplicationInstallationAndServicing/mod.rs @@ -82,11 +82,11 @@ pub unsafe fn ApplyPatchToFileByBuffers(patchfilemapped: &[u8], oldfilemapped: : ::windows_targets::link!("mspatcha.dll" "system" fn ApplyPatchToFileByBuffers(patchfilemapped : *const u8, patchfilesize : u32, oldfilemapped : *const u8, oldfilesize : u32, newfilebuffer : *mut *mut u8, newfilebuffersize : u32, newfileactualsize : *mut u32, newfiletime : *mut super::super::Foundation:: FILETIME, applyoptionflags : u32, progresscallback : PPATCH_PROGRESS_CALLBACK, callbackcontext : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); ApplyPatchToFileByBuffers( ::core::mem::transmute(patchfilemapped.as_ptr()), - patchfilemapped.len() as _, + patchfilemapped.len().try_into().unwrap(), ::core::mem::transmute(oldfilemapped.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - oldfilemapped.as_deref().map_or(0, |slice| slice.len() as _), + oldfilemapped.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(newfilebuffer.as_ptr()), - newfilebuffer.len() as _, + newfilebuffer.len().try_into().unwrap(), ::core::mem::transmute(newfileactualsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(newfiletime.unwrap_or(::std::ptr::null_mut())), applyoptionflags, @@ -238,7 +238,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("mspatchc.dll" "system" fn CreatePatchFileByHandlesEx(oldfilecount : u32, oldfileinfoarray : *const PATCH_OLD_FILE_INFO_H, newfilehandle : super::super::Foundation:: HANDLE, patchfilehandle : super::super::Foundation:: HANDLE, optionflags : u32, optiondata : *const PATCH_OPTION_DATA, progresscallback : PPATCH_PROGRESS_CALLBACK, callbackcontext : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - CreatePatchFileByHandlesEx(oldfileinfoarray.len() as _, ::core::mem::transmute(oldfileinfoarray.as_ptr()), newfilehandle.into_param().abi(), patchfilehandle.into_param().abi(), optionflags, ::core::mem::transmute(optiondata.unwrap_or(::std::ptr::null())), progresscallback, ::core::mem::transmute(callbackcontext.unwrap_or(::std::ptr::null()))) + CreatePatchFileByHandlesEx(oldfileinfoarray.len().try_into().unwrap(), ::core::mem::transmute(oldfileinfoarray.as_ptr()), newfilehandle.into_param().abi(), patchfilehandle.into_param().abi(), optionflags, ::core::mem::transmute(optiondata.unwrap_or(::std::ptr::null())), progresscallback, ::core::mem::transmute(callbackcontext.unwrap_or(::std::ptr::null()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -249,7 +249,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("mspatchc.dll" "system" fn CreatePatchFileExA(oldfilecount : u32, oldfileinfoarray : *const PATCH_OLD_FILE_INFO_A, newfilename : ::windows_core::PCSTR, patchfilename : ::windows_core::PCSTR, optionflags : u32, optiondata : *const PATCH_OPTION_DATA, progresscallback : PPATCH_PROGRESS_CALLBACK, callbackcontext : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - CreatePatchFileExA(oldfileinfoarray.len() as _, ::core::mem::transmute(oldfileinfoarray.as_ptr()), newfilename.into_param().abi(), patchfilename.into_param().abi(), optionflags, ::core::mem::transmute(optiondata.unwrap_or(::std::ptr::null())), progresscallback, ::core::mem::transmute(callbackcontext.unwrap_or(::std::ptr::null()))) + CreatePatchFileExA(oldfileinfoarray.len().try_into().unwrap(), ::core::mem::transmute(oldfileinfoarray.as_ptr()), newfilename.into_param().abi(), patchfilename.into_param().abi(), optionflags, ::core::mem::transmute(optiondata.unwrap_or(::std::ptr::null())), progresscallback, ::core::mem::transmute(callbackcontext.unwrap_or(::std::ptr::null()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -260,7 +260,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("mspatchc.dll" "system" fn CreatePatchFileExW(oldfilecount : u32, oldfileinfoarray : *const PATCH_OLD_FILE_INFO_W, newfilename : ::windows_core::PCWSTR, patchfilename : ::windows_core::PCWSTR, optionflags : u32, optiondata : *const PATCH_OPTION_DATA, progresscallback : PPATCH_PROGRESS_CALLBACK, callbackcontext : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - CreatePatchFileExW(oldfileinfoarray.len() as _, ::core::mem::transmute(oldfileinfoarray.as_ptr()), newfilename.into_param().abi(), patchfilename.into_param().abi(), optionflags, ::core::mem::transmute(optiondata.unwrap_or(::std::ptr::null())), progresscallback, ::core::mem::transmute(callbackcontext.unwrap_or(::std::ptr::null()))) + CreatePatchFileExW(oldfileinfoarray.len().try_into().unwrap(), ::core::mem::transmute(oldfileinfoarray.as_ptr()), newfilename.into_param().abi(), patchfilename.into_param().abi(), optionflags, ::core::mem::transmute(optiondata.unwrap_or(::std::ptr::null())), progresscallback, ::core::mem::transmute(callbackcontext.unwrap_or(::std::ptr::null()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -428,11 +428,11 @@ where filename.into_param().abi(), optionflags, ::core::mem::transmute(optiondata.unwrap_or(::std::ptr::null())), - ignorerangearray.as_deref().map_or(0, |slice| slice.len() 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() as _), + retainrangearray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(retainrangearray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - signaturebuffer.len() as _, + signaturebuffer.len().try_into().unwrap(), ::core::mem::transmute(signaturebuffer.as_ptr()), ) } @@ -443,14 +443,14 @@ pub unsafe fn GetFilePatchSignatureByBuffer(filebufferwritable: &mut [u8], optio ::windows_targets::link!("mspatcha.dll" "system" fn GetFilePatchSignatureByBuffer(filebufferwritable : *mut u8, filesize : u32, optionflags : u32, optiondata : *const ::core::ffi::c_void, ignorerangecount : u32, ignorerangearray : *const PATCH_IGNORE_RANGE, retainrangecount : u32, retainrangearray : *const PATCH_RETAIN_RANGE, signaturebuffersize : u32, signaturebuffer : ::windows_core::PSTR) -> super::super::Foundation:: BOOL); GetFilePatchSignatureByBuffer( ::core::mem::transmute(filebufferwritable.as_ptr()), - filebufferwritable.len() as _, + filebufferwritable.len().try_into().unwrap(), optionflags, ::core::mem::transmute(optiondata.unwrap_or(::std::ptr::null())), - ignorerangearray.as_deref().map_or(0, |slice| slice.len() 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() as _), + retainrangearray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(retainrangearray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - signaturebuffer.len() as _, + signaturebuffer.len().try_into().unwrap(), ::core::mem::transmute(signaturebuffer.as_ptr()), ) } @@ -466,11 +466,11 @@ where filehandle.into_param().abi(), optionflags, ::core::mem::transmute(optiondata.unwrap_or(::std::ptr::null())), - ignorerangearray.as_deref().map_or(0, |slice| slice.len() 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() as _), + retainrangearray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(retainrangearray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - signaturebuffer.len() as _, + signaturebuffer.len().try_into().unwrap(), ::core::mem::transmute(signaturebuffer.as_ptr()), ) } @@ -486,9 +486,9 @@ where filename.into_param().abi(), optionflags, ::core::mem::transmute(optiondata.unwrap_or(::std::ptr::null())), - ignorerangearray.as_deref().map_or(0, |slice| slice.len() 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() as _), + retainrangearray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(retainrangearray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), signaturebuffersize, ::core::mem::transmute(signaturebuffer), @@ -890,7 +890,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("msi.dll" "system" fn MsiDetermineApplicablePatchesA(szproductpackagepath : ::windows_core::PCSTR, cpatchinfo : u32, ppatchinfo : *mut MSIPATCHSEQUENCEINFOA) -> u32); - MsiDetermineApplicablePatchesA(szproductpackagepath.into_param().abi(), ppatchinfo.len() as _, ::core::mem::transmute(ppatchinfo.as_ptr())) + MsiDetermineApplicablePatchesA(szproductpackagepath.into_param().abi(), ppatchinfo.len().try_into().unwrap(), ::core::mem::transmute(ppatchinfo.as_ptr())) } #[inline] pub unsafe fn MsiDetermineApplicablePatchesW(szproductpackagepath: P0, ppatchinfo: &mut [MSIPATCHSEQUENCEINFOW]) -> u32 @@ -898,7 +898,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("msi.dll" "system" fn MsiDetermineApplicablePatchesW(szproductpackagepath : ::windows_core::PCWSTR, cpatchinfo : u32, ppatchinfo : *mut MSIPATCHSEQUENCEINFOW) -> u32); - MsiDetermineApplicablePatchesW(szproductpackagepath.into_param().abi(), ppatchinfo.len() as _, ::core::mem::transmute(ppatchinfo.as_ptr())) + MsiDetermineApplicablePatchesW(szproductpackagepath.into_param().abi(), ppatchinfo.len().try_into().unwrap(), ::core::mem::transmute(ppatchinfo.as_ptr())) } #[inline] pub unsafe fn MsiDeterminePatchSequenceA(szproductcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, ppatchinfo: &mut [MSIPATCHSEQUENCEINFOA]) -> u32 @@ -907,7 +907,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("msi.dll" "system" fn MsiDeterminePatchSequenceA(szproductcode : ::windows_core::PCSTR, szusersid : ::windows_core::PCSTR, dwcontext : MSIINSTALLCONTEXT, cpatchinfo : u32, ppatchinfo : *mut MSIPATCHSEQUENCEINFOA) -> u32); - MsiDeterminePatchSequenceA(szproductcode.into_param().abi(), szusersid.into_param().abi(), dwcontext, ppatchinfo.len() as _, ::core::mem::transmute(ppatchinfo.as_ptr())) + MsiDeterminePatchSequenceA(szproductcode.into_param().abi(), szusersid.into_param().abi(), dwcontext, ppatchinfo.len().try_into().unwrap(), ::core::mem::transmute(ppatchinfo.as_ptr())) } #[inline] pub unsafe fn MsiDeterminePatchSequenceW(szproductcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, ppatchinfo: &mut [MSIPATCHSEQUENCEINFOW]) -> u32 @@ -916,7 +916,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("msi.dll" "system" fn MsiDeterminePatchSequenceW(szproductcode : ::windows_core::PCWSTR, szusersid : ::windows_core::PCWSTR, dwcontext : MSIINSTALLCONTEXT, cpatchinfo : u32, ppatchinfo : *mut MSIPATCHSEQUENCEINFOW) -> u32); - MsiDeterminePatchSequenceW(szproductcode.into_param().abi(), szusersid.into_param().abi(), dwcontext, ppatchinfo.len() as _, ::core::mem::transmute(ppatchinfo.as_ptr())) + MsiDeterminePatchSequenceW(szproductcode.into_param().abi(), szusersid.into_param().abi(), dwcontext, ppatchinfo.len().try_into().unwrap(), ::core::mem::transmute(ppatchinfo.as_ptr())) } #[inline] pub unsafe fn MsiDoActionA(hinstall: P0, szaction: P1) -> u32 @@ -2871,7 +2871,18 @@ where #[inline] pub unsafe fn NormalizeFileForPatchSignature(filebuffer: *mut ::core::ffi::c_void, filesize: u32, optionflags: u32, optiondata: ::core::option::Option<*const PATCH_OPTION_DATA>, newfilecoffbase: u32, newfilecofftime: u32, ignorerangearray: ::core::option::Option<&[PATCH_IGNORE_RANGE]>, retainrangearray: ::core::option::Option<&[PATCH_RETAIN_RANGE]>) -> i32 { ::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); - NormalizeFileForPatchSignature(filebuffer, filesize, optionflags, ::core::mem::transmute(optiondata.unwrap_or(::std::ptr::null())), newfilecoffbase, newfilecofftime, ignorerangearray.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ignorerangearray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), retainrangearray.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(retainrangearray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + NormalizeFileForPatchSignature( + filebuffer, + filesize, + optionflags, + ::core::mem::transmute(optiondata.unwrap_or(::std::ptr::null())), + newfilecoffbase, + newfilecofftime, + 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()), + ::core::mem::transmute(retainrangearray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), + ) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2945,7 +2956,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("sfc.dll" "system" fn SfpVerifyFile(pszfilename : ::windows_core::PCSTR, pszerror : ::windows_core::PCSTR, dwerrsize : u32) -> super::super::Foundation:: BOOL); - SfpVerifyFile(pszfilename.into_param().abi(), ::core::mem::transmute(pszerror.as_ptr()), pszerror.len() as _) + SfpVerifyFile(pszfilename.into_param().abi(), ::core::mem::transmute(pszerror.as_ptr()), pszerror.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2963,7 +2974,7 @@ where #[inline] pub unsafe fn TestApplyPatchToFileByBuffers(patchfilebuffer: &[u8], oldfilebuffer: ::core::option::Option<&[u8]>, newfilesize: ::core::option::Option<*mut u32>, applyoptionflags: u32) -> super::super::Foundation::BOOL { ::windows_targets::link!("mspatcha.dll" "system" fn TestApplyPatchToFileByBuffers(patchfilebuffer : *const u8, patchfilesize : u32, oldfilebuffer : *const u8, oldfilesize : u32, newfilesize : *mut u32, applyoptionflags : u32) -> super::super::Foundation:: BOOL); - TestApplyPatchToFileByBuffers(::core::mem::transmute(patchfilebuffer.as_ptr()), patchfilebuffer.len() as _, ::core::mem::transmute(oldfilebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), oldfilebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(newfilesize.unwrap_or(::std::ptr::null_mut())), applyoptionflags) + TestApplyPatchToFileByBuffers(::core::mem::transmute(patchfilebuffer.as_ptr()), patchfilebuffer.len().try_into().unwrap(), ::core::mem::transmute(oldfilebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), oldfilebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(newfilesize.unwrap_or(::std::ptr::null_mut())), applyoptionflags) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -4349,7 +4360,7 @@ impl IPMDeploymentManager { (::windows_core::Interface::vtable(self).BeginEnterpriseAppUpdate)(::windows_core::Interface::as_raw(self), pupdateinfo).ok() } pub unsafe fn BeginUpdateLicense(&self, productid: ::windows_core::GUID, offerid: ::windows_core::GUID, pblicense: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).BeginUpdateLicense)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(productid), ::core::mem::transmute(offerid), ::core::mem::transmute(pblicense.as_ptr()), pblicense.len() as _).ok() + (::windows_core::Interface::vtable(self).BeginUpdateLicense)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(productid), ::core::mem::transmute(offerid), ::core::mem::transmute(pblicense.as_ptr()), pblicense.len().try_into().unwrap()).ok() } pub unsafe fn GetLicenseChallenge(&self, packagepath: P0, ppbchallenge: *mut *mut u8, pcbchallenge: *mut u32, ppbkid: ::core::option::Option<*mut *mut u8>, pcbkid: ::core::option::Option<*mut u32>, ppbdeviceid: ::core::option::Option<*mut *mut u8>, pcbdeviceid: ::core::option::Option<*mut u32>, ppbsaltvalue: ::core::option::Option<*mut *mut u8>, pcbsaltvalue: ::core::option::Option<*mut u32>, ppbkgvvalue: ::core::option::Option<*mut *mut u8>, pcbkgvvalue: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where @@ -4469,7 +4480,7 @@ impl IPMDeploymentManager { (::windows_core::Interface::vtable(self).GenerateXamlLightupXbfForCurrentLocale)(::windows_core::Interface::as_raw(self), packagefamilyname.into_param().abi()).ok() } pub unsafe fn AddLicenseForAppx(&self, productid: ::windows_core::GUID, pblicense: &[u8], pbplayreadyheader: ::core::option::Option<&[u8]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).AddLicenseForAppx)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(productid), ::core::mem::transmute(pblicense.as_ptr()), pblicense.len() as _, ::core::mem::transmute(pbplayreadyheader.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbplayreadyheader.as_deref().map_or(0, |slice| slice.len() as _)).ok() + (::windows_core::Interface::vtable(self).AddLicenseForAppx)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(productid), ::core::mem::transmute(pblicense.as_ptr()), pblicense.len().try_into().unwrap(), ::core::mem::transmute(pbplayreadyheader.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbplayreadyheader.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } pub unsafe fn FixJunctionsForAppsOnSDCard(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).FixJunctionsForAppsOnSDCard)(::windows_core::Interface::as_raw(self)).ok() @@ -5031,13 +5042,13 @@ impl IPMLiveTileJobInfo { (::windows_core::Interface::vtable(self).get_TileXML)(::windows_core::Interface::as_raw(self), ptilexml, pcbtilexml).ok() } pub unsafe fn set_TileXML(&self, ptilexml: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).set_TileXML)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ptilexml.as_ptr()), ptilexml.len() as _).ok() + (::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<()> { (::windows_core::Interface::vtable(self).get_UrlXML)(::windows_core::Interface::as_raw(self), purlxml, pcburlxml).ok() } pub unsafe fn set_UrlXML(&self, purlxml: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).set_UrlXML)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(purlxml.as_ptr()), purlxml.len() as _).ok() + (::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() } pub unsafe fn AttemptCount(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); 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 72b1d9a8ae..1a068ee238 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ClrHosting/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ClrHosting/mod.rs @@ -109,17 +109,17 @@ pub unsafe fn GetCLRIdentityManager(riid: *const ::windows_core::GUID) -> ::wind #[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); - GetCORRequiredVersion(::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len() as _, dwlength).ok() + GetCORRequiredVersion(::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap(), dwlength).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); - GetCORSystemDirectory(::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len() as _, dwlength).ok() + GetCORSystemDirectory(::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap(), dwlength).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); - GetCORVersion(::core::mem::transmute(pbbuffer.as_ptr()), pbbuffer.len() as _, dwlength).ok() + GetCORVersion(::core::mem::transmute(pbbuffer.as_ptr()), pbbuffer.len().try_into().unwrap(), dwlength).ok() } #[inline] pub unsafe fn GetFileVersion(szfilename: P0, szbuffer: ::core::option::Option<&mut [u16]>, dwlength: *mut u32) -> ::windows_core::Result<()> @@ -127,7 +127,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("mscoree.dll" "system" fn GetFileVersion(szfilename : ::windows_core::PCWSTR, szbuffer : ::windows_core::PWSTR, cchbuffer : u32, dwlength : *mut u32) -> ::windows_core::HRESULT); - GetFileVersion(szfilename.into_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() as _), dwlength).ok() + GetFileVersion(szfilename.into_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).ok() } #[inline] pub unsafe fn GetRealProcAddress(pwszprocname: P0, ppv: *mut *mut ::core::ffi::c_void) -> ::windows_core::Result<()> @@ -152,10 +152,10 @@ where startupflags, 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() as _), + pdirectory.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(dwdirectorylength.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pversion.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - pversion.as_deref().map_or(0, |slice| slice.len() as _), + pversion.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(dwlength.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -166,12 +166,12 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("mscoree.dll" "system" fn GetRequestedRuntimeVersion(pexe : ::windows_core::PCWSTR, pversion : ::windows_core::PWSTR, cchbuffer : u32, dwlength : *mut u32) -> ::windows_core::HRESULT); - GetRequestedRuntimeVersion(pexe.into_param().abi(), ::core::mem::transmute(pversion.as_ptr()), pversion.len() as _, dwlength).ok() + GetRequestedRuntimeVersion(pexe.into_param().abi(), ::core::mem::transmute(pversion.as_ptr()), pversion.len().try_into().unwrap(), dwlength).ok() } #[inline] pub unsafe fn GetRequestedRuntimeVersionForCLSID(rclsid: *const ::windows_core::GUID, pversion: ::core::option::Option<&mut [u16]>, dwlength: ::core::option::Option<*mut u32>, dwresolutionflags: CLSID_RESOLUTION_FLAGS) -> ::windows_core::Result<()> { ::windows_targets::link!("mscoree.dll" "system" fn GetRequestedRuntimeVersionForCLSID(rclsid : *const ::windows_core::GUID, pversion : ::windows_core::PWSTR, cchbuffer : u32, dwlength : *mut u32, dwresolutionflags : CLSID_RESOLUTION_FLAGS) -> ::windows_core::HRESULT); - GetRequestedRuntimeVersionForCLSID(rclsid, ::core::mem::transmute(pversion.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pversion.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(dwlength.unwrap_or(::std::ptr::null_mut())), dwresolutionflags).ok() + GetRequestedRuntimeVersionForCLSID(rclsid, ::core::mem::transmute(pversion.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pversion.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(dwlength.unwrap_or(::std::ptr::null_mut())), dwresolutionflags).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -181,7 +181,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("mscoree.dll" "system" fn GetVersionFromProcess(hprocess : super::super::Foundation:: HANDLE, pversion : ::windows_core::PWSTR, cchbuffer : u32, dwlength : *mut u32) -> ::windows_core::HRESULT); - GetVersionFromProcess(hprocess.into_param().abi(), ::core::mem::transmute(pversion.as_ptr()), pversion.len() as _, dwlength).ok() + GetVersionFromProcess(hprocess.into_param().abi(), ::core::mem::transmute(pversion.as_ptr()), pversion.len().try_into().unwrap(), dwlength).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -197,12 +197,12 @@ where #[inline] pub unsafe fn LoadStringRC(iresouceid: u32, szbuffer: &mut [u16], bquiet: i32) -> ::windows_core::Result<()> { ::windows_targets::link!("mscoree.dll" "system" fn LoadStringRC(iresouceid : u32, szbuffer : ::windows_core::PWSTR, imax : i32, bquiet : i32) -> ::windows_core::HRESULT); - LoadStringRC(iresouceid, ::core::mem::transmute(szbuffer.as_ptr()), szbuffer.len() as _, bquiet).ok() + LoadStringRC(iresouceid, ::core::mem::transmute(szbuffer.as_ptr()), szbuffer.len().try_into().unwrap(), bquiet).ok() } #[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); - LoadStringRCEx(lcid, iresouceid, ::core::mem::transmute(szbuffer.as_ptr()), szbuffer.len() as _, bquiet, pcwchused).ok() + LoadStringRCEx(lcid, iresouceid, ::core::mem::transmute(szbuffer.as_ptr()), szbuffer.len().try_into().unwrap(), bquiet, pcwchused).ok() } #[inline] pub unsafe fn LockClrVersion(hostcallback: FLockClrVersionCallback, pbeginhostsetup: *mut FLockClrVersionCallback, pendhostsetup: *mut FLockClrVersionCallback) -> ::windows_core::Result<()> { @@ -472,7 +472,7 @@ impl ICLRDebugManager { (::windows_core::Interface::vtable(self).BeginConnection)(::windows_core::Interface::as_raw(self), dwconnectionid, szconnectionname.into_param().abi()).ok() } pub unsafe fn SetConnectionTasks(&self, id: u32, ppclrtask: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetConnectionTasks)(::windows_core::Interface::as_raw(self), id, ppclrtask.len() as _, ::core::mem::transmute(ppclrtask.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetConnectionTasks)(::windows_core::Interface::as_raw(self), id, ppclrtask.len().try_into().unwrap(), ::core::mem::transmute(ppclrtask.as_ptr())).ok() } pub unsafe fn EndConnection(&self, dwconnectionid: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).EndConnection)(::windows_core::Interface::as_raw(self), dwconnectionid).ok() @@ -632,7 +632,7 @@ impl ICLRErrorReportingManager { (::windows_core::Interface::vtable(self).GetBucketParametersForCurrentException)(::windows_core::Interface::as_raw(self), pparams).ok() } pub unsafe fn BeginCustomDump(&self, dwflavor: ECustomDumpFlavor, items: &[CustomDumpItem], dwreserved: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).BeginCustomDump)(::windows_core::Interface::as_raw(self), dwflavor, items.len() as _, ::core::mem::transmute(items.as_ptr()), dwreserved).ok() + (::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() } pub unsafe fn EndCustomDump(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).EndCustomDump)(::windows_core::Interface::as_raw(self)).ok() @@ -1019,7 +1019,7 @@ impl ICLRProfiling { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).AttachProfiler)(::windows_core::Interface::as_raw(self), dwprofileeprocessid, dwmillisecondsmax, pclsidprofiler, wszprofilerpath.into_param().abi(), ::core::mem::transmute(pvclientdata.as_ptr()), pvclientdata.len() as _).ok() + (::windows_core::Interface::vtable(self).AttachProfiler)(::windows_core::Interface::as_raw(self), dwprofileeprocessid, dwmillisecondsmax, pclsidprofiler, wszprofilerpath.into_param().abi(), ::core::mem::transmute(pvclientdata.as_ptr()), pvclientdata.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(ICLRProfiling, ::windows_core::IUnknown); @@ -1246,28 +1246,28 @@ impl ICLRStrongName { where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { - (::windows_core::Interface::vtable(self).GetHashFromAssemblyFile)(::windows_core::Interface::as_raw(self), pszfilepath.into_param().abi(), pihashalg, ::core::mem::transmute(pbhash.as_ptr()), pbhash.len() as _, pchhash).ok() + (::windows_core::Interface::vtable(self).GetHashFromAssemblyFile)(::windows_core::Interface::as_raw(self), pszfilepath.into_param().abi(), pihashalg, ::core::mem::transmute(pbhash.as_ptr()), pbhash.len().try_into().unwrap(), pchhash).ok() } pub unsafe fn GetHashFromAssemblyFileW(&self, pwzfilepath: P0, pihashalg: *mut u32, pbhash: &mut [u8], pchhash: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).GetHashFromAssemblyFileW)(::windows_core::Interface::as_raw(self), pwzfilepath.into_param().abi(), pihashalg, ::core::mem::transmute(pbhash.as_ptr()), pbhash.len() as _, pchhash).ok() + (::windows_core::Interface::vtable(self).GetHashFromAssemblyFileW)(::windows_core::Interface::as_raw(self), pwzfilepath.into_param().abi(), pihashalg, ::core::mem::transmute(pbhash.as_ptr()), pbhash.len().try_into().unwrap(), pchhash).ok() } pub unsafe fn GetHashFromBlob(&self, pbblob: *const u8, cchblob: u32, pihashalg: *mut u32, pbhash: &mut [u8], pchhash: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetHashFromBlob)(::windows_core::Interface::as_raw(self), pbblob, cchblob, pihashalg, ::core::mem::transmute(pbhash.as_ptr()), pbhash.len() as _, pchhash).ok() + (::windows_core::Interface::vtable(self).GetHashFromBlob)(::windows_core::Interface::as_raw(self), pbblob, cchblob, pihashalg, ::core::mem::transmute(pbhash.as_ptr()), pbhash.len().try_into().unwrap(), pchhash).ok() } pub unsafe fn GetHashFromFile(&self, pszfilepath: P0, pihashalg: *mut u32, pbhash: &mut [u8], pchhash: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { - (::windows_core::Interface::vtable(self).GetHashFromFile)(::windows_core::Interface::as_raw(self), pszfilepath.into_param().abi(), pihashalg, ::core::mem::transmute(pbhash.as_ptr()), pbhash.len() as _, pchhash).ok() + (::windows_core::Interface::vtable(self).GetHashFromFile)(::windows_core::Interface::as_raw(self), pszfilepath.into_param().abi(), pihashalg, ::core::mem::transmute(pbhash.as_ptr()), pbhash.len().try_into().unwrap(), pchhash).ok() } pub unsafe fn GetHashFromFileW(&self, pwzfilepath: P0, pihashalg: *mut u32, pbhash: &mut [u8], pchhash: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).GetHashFromFileW)(::windows_core::Interface::as_raw(self), pwzfilepath.into_param().abi(), pihashalg, ::core::mem::transmute(pbhash.as_ptr()), pbhash.len() as _, pchhash).ok() + (::windows_core::Interface::vtable(self).GetHashFromFileW)(::windows_core::Interface::as_raw(self), pwzfilepath.into_param().abi(), pihashalg, ::core::mem::transmute(pbhash.as_ptr()), pbhash.len().try_into().unwrap(), pchhash).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1275,7 +1275,7 @@ impl ICLRStrongName { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).GetHashFromHandle)(::windows_core::Interface::as_raw(self), hfile.into_param().abi(), pihashalg, ::core::mem::transmute(pbhash.as_ptr()), pbhash.len() as _, pchhash).ok() + (::windows_core::Interface::vtable(self).GetHashFromHandle)(::windows_core::Interface::as_raw(self), hfile.into_param().abi(), pihashalg, ::core::mem::transmute(pbhash.as_ptr()), pbhash.len().try_into().unwrap(), pchhash).ok() } pub unsafe fn StrongNameCompareAssemblies(&self, pwzassembly1: P0, pwzassembly2: P1) -> ::windows_core::Result where @@ -1295,7 +1295,7 @@ impl ICLRStrongName { (::windows_core::Interface::vtable(self).StrongNameGetBlob)(::windows_core::Interface::as_raw(self), pwzfilepath.into_param().abi(), pbblob, pcbblob).ok() } pub unsafe fn StrongNameGetBlobFromImage(&self, pbbase: &[u8], pbblob: *mut u8, pcbblob: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).StrongNameGetBlobFromImage)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbbase.as_ptr()), pbbase.len() as _, pbblob, pcbblob).ok() + (::windows_core::Interface::vtable(self).StrongNameGetBlobFromImage)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbbase.as_ptr()), pbbase.len().try_into().unwrap(), pbblob, pcbblob).ok() } pub unsafe fn StrongNameGetPublicKey(&self, pwzkeycontainer: P0, pbkeyblob: *const u8, cbkeyblob: u32, ppbpublickeyblob: *mut *mut u8, pcbpublickeyblob: *mut u32) -> ::windows_core::Result<()> where @@ -1480,13 +1480,13 @@ impl ICLRStrongName3 { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).StrongNameDigestSign)(::windows_core::Interface::as_raw(self), wszkeycontainer.into_param().abi(), ::core::mem::transmute(pbkeyblob.as_ptr()), pbkeyblob.len() as _, ::core::mem::transmute(pbdigestblob.as_ptr()), pbdigestblob.len() as _, hashalgid, ppbsignatureblob, pcbsignatureblob, dwflags).ok() + (::windows_core::Interface::vtable(self).StrongNameDigestSign)(::windows_core::Interface::as_raw(self), wszkeycontainer.into_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, pcbsignatureblob, dwflags).ok() } pub unsafe fn StrongNameDigestEmbed(&self, wszfilepath: P0, pbsignatureblob: &[u8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).StrongNameDigestEmbed)(::windows_core::Interface::as_raw(self), wszfilepath.into_param().abi(), ::core::mem::transmute(pbsignatureblob.as_ptr()), pbsignatureblob.len() as _).ok() + (::windows_core::Interface::vtable(self).StrongNameDigestEmbed)(::windows_core::Interface::as_raw(self), wszfilepath.into_param().abi(), ::core::mem::transmute(pbsignatureblob.as_ptr()), pbsignatureblob.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(ICLRStrongName3, ::windows_core::IUnknown); 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 2c17ab2f1f..31b64762e4 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 @@ -96,18 +96,18 @@ impl ICallFrame { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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<()> { - (::windows_core::Interface::vtable(self).Marshal)(::windows_core::Interface::as_raw(self), pmshlcontext, mshlflags, ::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len() as _, pcbbufferused, pdatarep, prpcflags).ok() + (::windows_core::Interface::vtable(self).Marshal)(::windows_core::Interface::as_raw(self), pmshlcontext, mshlflags, ::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap(), pcbbufferused, pdatarep, prpcflags).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn Unmarshal(&self, pbuffer: &[u8], datarep: u32, pcontext: *const CALLFRAME_MARSHALCONTEXT) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).Unmarshal)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len() as _, datarep, pcontext, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).Unmarshal)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap(), datarep, pcontext, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn ReleaseMarshalData(&self, pbuffer: &[u8], ibfirstrelease: u32, datarep: u32, pcontext: *const CALLFRAME_MARSHALCONTEXT) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).ReleaseMarshalData)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len() as _, ibfirstrelease, datarep, pcontext).ok() + (::windows_core::Interface::vtable(self).ReleaseMarshalData)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap(), ibfirstrelease, datarep, pcontext).ok() } pub unsafe fn Invoke(&self, pvreceiver: *const ::core::ffi::c_void) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Invoke)(::windows_core::Interface::as_raw(self), pvreceiver).ok() @@ -322,12 +322,12 @@ impl ICallUnmarshal { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).Unmarshal)(::windows_core::Interface::as_raw(self), imethod, ::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len() as _, fforcebuffercopy.into_param().abi(), datarep, pcontext, pcbunmarshalled, ::core::mem::transmute(ppframe)).ok() + (::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_param().abi(), datarep, pcontext, pcbunmarshalled, ::core::mem::transmute(ppframe)).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn ReleaseMarshalData(&self, imethod: u32, pbuffer: &[u8], ibfirstrelease: u32, datarep: u32, pcontext: *const CALLFRAME_MARSHALCONTEXT) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).ReleaseMarshalData)(::windows_core::Interface::as_raw(self), imethod, ::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len() as _, ibfirstrelease, datarep, pcontext).ok() + (::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, pcontext).ok() } } ::windows_core::imp::interface_hierarchy!(ICallUnmarshal, ::windows_core::IUnknown); 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 3030713d92..a330f98a53 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 @@ -23,7 +23,7 @@ impl IEnumEventObject { (::windows_core::Interface::vtable(self).Clone)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn Next(&self, ppinterface: &mut [::core::option::Option<::windows_core::IUnknown>], cretelem: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppinterface.len() as _, ::core::mem::transmute(ppinterface.as_ptr()), cretelem).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppinterface.len().try_into().unwrap(), ::core::mem::transmute(ppinterface.as_ptr()), cretelem).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/System/Com/StructuredStorage/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Com/StructuredStorage/mod.rs index 952da24322..286eb578c3 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 @@ -3,7 +3,7 @@ #[inline] pub unsafe fn ClearPropVariantArray(rgpropvar: &mut [PROPVARIANT]) { ::windows_targets::link!("propsys.dll" "system" fn ClearPropVariantArray(rgpropvar : *mut PROPVARIANT, cvars : u32) -> ()); - ClearPropVariantArray(::core::mem::transmute(rgpropvar.as_ptr()), rgpropvar.len() as _) + ClearPropVariantArray(::core::mem::transmute(rgpropvar.as_ptr()), rgpropvar.len().try_into().unwrap()) } #[inline] pub unsafe fn CoGetInstanceFromFile(pserverinfo: ::core::option::Option<*const super::COSERVERINFO>, pclsid: ::core::option::Option<*const ::windows_core::GUID>, punkouter: P0, dwclsctx: super::CLSCTX, grfmode: u32, pwszname: P1, presults: &mut [super::MULTI_QI]) -> ::windows_core::Result<()> @@ -12,7 +12,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("ole32.dll" "system" fn CoGetInstanceFromFile(pserverinfo : *const super:: COSERVERINFO, pclsid : *const ::windows_core::GUID, punkouter : * mut::core::ffi::c_void, dwclsctx : super:: CLSCTX, grfmode : u32, pwszname : ::windows_core::PCWSTR, dwcount : u32, presults : *mut super:: MULTI_QI) -> ::windows_core::HRESULT); - CoGetInstanceFromFile(::core::mem::transmute(pserverinfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pclsid.unwrap_or(::std::ptr::null())), punkouter.into_param().abi(), dwclsctx, grfmode, pwszname.into_param().abi(), presults.len() as _, ::core::mem::transmute(presults.as_ptr())).ok() + CoGetInstanceFromFile(::core::mem::transmute(pserverinfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pclsid.unwrap_or(::std::ptr::null())), punkouter.into_param().abi(), dwclsctx, grfmode, pwszname.into_param().abi(), presults.len().try_into().unwrap(), ::core::mem::transmute(presults.as_ptr())).ok() } #[inline] pub unsafe fn CoGetInstanceFromIStorage(pserverinfo: ::core::option::Option<*const super::COSERVERINFO>, pclsid: ::core::option::Option<*const ::windows_core::GUID>, punkouter: P0, dwclsctx: super::CLSCTX, pstg: P1, presults: &mut [super::MULTI_QI]) -> ::windows_core::Result<()> @@ -21,7 +21,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("ole32.dll" "system" fn CoGetInstanceFromIStorage(pserverinfo : *const super:: COSERVERINFO, pclsid : *const ::windows_core::GUID, punkouter : * mut::core::ffi::c_void, dwclsctx : super:: CLSCTX, pstg : * mut::core::ffi::c_void, dwcount : u32, presults : *mut super:: MULTI_QI) -> ::windows_core::HRESULT); - CoGetInstanceFromIStorage(::core::mem::transmute(pserverinfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pclsid.unwrap_or(::std::ptr::null())), punkouter.into_param().abi(), dwclsctx, pstg.into_param().abi(), presults.len() as _, ::core::mem::transmute(presults.as_ptr())).ok() + CoGetInstanceFromIStorage(::core::mem::transmute(pserverinfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pclsid.unwrap_or(::std::ptr::null())), punkouter.into_param().abi(), dwclsctx, pstg.into_param().abi(), presults.len().try_into().unwrap(), ::core::mem::transmute(presults.as_ptr())).ok() } #[inline] pub unsafe fn CoGetInterfaceAndReleaseStream(pstm: P0) -> ::windows_core::Result @@ -67,7 +67,7 @@ pub unsafe fn FmtIdToPropStgName(pfmtid: *const ::windows_core::GUID, oszname: : #[inline] pub unsafe fn FreePropVariantArray(rgvars: &mut [PROPVARIANT]) -> ::windows_core::Result<()> { ::windows_targets::link!("ole32.dll" "system" fn FreePropVariantArray(cvariants : u32, rgvars : *mut PROPVARIANT) -> ::windows_core::HRESULT); - FreePropVariantArray(rgvars.len() as _, ::core::mem::transmute(rgvars.as_ptr())).ok() + FreePropVariantArray(rgvars.len().try_into().unwrap(), ::core::mem::transmute(rgvars.as_ptr())).ok() } #[inline] pub unsafe fn GetConvertStg(pstg: P0) -> ::windows_core::Result<()> @@ -105,7 +105,7 @@ where pub unsafe fn InitPropVariantFromBooleanVector(prgf: ::core::option::Option<&[super::super::super::Foundation::BOOL]>) -> ::windows_core::Result { ::windows_targets::link!("propsys.dll" "system" fn InitPropVariantFromBooleanVector(prgf : *const super::super::super::Foundation:: BOOL, celems : u32, ppropvar : *mut PROPVARIANT) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - InitPropVariantFromBooleanVector(::core::mem::transmute(prgf.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prgf.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + InitPropVariantFromBooleanVector(::core::mem::transmute(prgf.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prgf.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Variant"))] @@ -129,7 +129,7 @@ pub unsafe fn InitPropVariantFromCLSID(clsid: *const ::windows_core::GUID) -> :: pub unsafe fn InitPropVariantFromDoubleVector(prgn: ::core::option::Option<&[f64]>) -> ::windows_core::Result { ::windows_targets::link!("propsys.dll" "system" fn InitPropVariantFromDoubleVector(prgn : *const f64, celems : u32, ppropvar : *mut PROPVARIANT) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - InitPropVariantFromDoubleVector(::core::mem::transmute(prgn.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prgn.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + InitPropVariantFromDoubleVector(::core::mem::transmute(prgn.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prgn.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Variant"))] @@ -145,7 +145,7 @@ pub unsafe fn InitPropVariantFromFileTime(pftin: *const super::super::super::Fou pub unsafe fn InitPropVariantFromFileTimeVector(prgft: ::core::option::Option<&[super::super::super::Foundation::FILETIME]>) -> ::windows_core::Result { ::windows_targets::link!("propsys.dll" "system" fn InitPropVariantFromFileTimeVector(prgft : *const super::super::super::Foundation:: FILETIME, celems : u32, ppropvar : *mut PROPVARIANT) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - InitPropVariantFromFileTimeVector(::core::mem::transmute(prgft.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prgft.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + InitPropVariantFromFileTimeVector(::core::mem::transmute(prgft.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prgft.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Variant"))] @@ -161,7 +161,7 @@ pub unsafe fn InitPropVariantFromGUIDAsString(guid: *const ::windows_core::GUID) pub unsafe fn InitPropVariantFromInt16Vector(prgn: ::core::option::Option<&[i16]>) -> ::windows_core::Result { ::windows_targets::link!("propsys.dll" "system" fn InitPropVariantFromInt16Vector(prgn : *const i16, celems : u32, ppropvar : *mut PROPVARIANT) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - InitPropVariantFromInt16Vector(::core::mem::transmute(prgn.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prgn.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + InitPropVariantFromInt16Vector(::core::mem::transmute(prgn.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prgn.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Variant"))] @@ -169,7 +169,7 @@ pub unsafe fn InitPropVariantFromInt16Vector(prgn: ::core::option::Option<&[i16] pub unsafe fn InitPropVariantFromInt32Vector(prgn: ::core::option::Option<&[i32]>) -> ::windows_core::Result { ::windows_targets::link!("propsys.dll" "system" fn InitPropVariantFromInt32Vector(prgn : *const i32, celems : u32, ppropvar : *mut PROPVARIANT) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - InitPropVariantFromInt32Vector(::core::mem::transmute(prgn.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prgn.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + InitPropVariantFromInt32Vector(::core::mem::transmute(prgn.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prgn.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Variant"))] @@ -177,7 +177,7 @@ pub unsafe fn InitPropVariantFromInt32Vector(prgn: ::core::option::Option<&[i32] pub unsafe fn InitPropVariantFromInt64Vector(prgn: ::core::option::Option<&[i64]>) -> ::windows_core::Result { ::windows_targets::link!("propsys.dll" "system" fn InitPropVariantFromInt64Vector(prgn : *const i64, celems : u32, ppropvar : *mut PROPVARIANT) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - InitPropVariantFromInt64Vector(::core::mem::transmute(prgn.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prgn.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + InitPropVariantFromInt64Vector(::core::mem::transmute(prgn.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prgn.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Variant"))] @@ -215,7 +215,7 @@ where pub unsafe fn InitPropVariantFromStringVector(prgsz: ::core::option::Option<&[::windows_core::PCWSTR]>) -> ::windows_core::Result { ::windows_targets::link!("propsys.dll" "system" fn InitPropVariantFromStringVector(prgsz : *const ::windows_core::PCWSTR, celems : u32, ppropvar : *mut PROPVARIANT) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - InitPropVariantFromStringVector(::core::mem::transmute(prgsz.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prgsz.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + InitPropVariantFromStringVector(::core::mem::transmute(prgsz.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prgsz.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Variant"))] @@ -223,7 +223,7 @@ pub unsafe fn InitPropVariantFromStringVector(prgsz: ::core::option::Option<&[:: pub unsafe fn InitPropVariantFromUInt16Vector(prgn: ::core::option::Option<&[u16]>) -> ::windows_core::Result { ::windows_targets::link!("propsys.dll" "system" fn InitPropVariantFromUInt16Vector(prgn : *const u16, celems : u32, ppropvar : *mut PROPVARIANT) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - InitPropVariantFromUInt16Vector(::core::mem::transmute(prgn.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prgn.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + InitPropVariantFromUInt16Vector(::core::mem::transmute(prgn.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prgn.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Variant"))] @@ -231,7 +231,7 @@ pub unsafe fn InitPropVariantFromUInt16Vector(prgn: ::core::option::Option<&[u16 pub unsafe fn InitPropVariantFromUInt32Vector(prgn: ::core::option::Option<&[u32]>) -> ::windows_core::Result { ::windows_targets::link!("propsys.dll" "system" fn InitPropVariantFromUInt32Vector(prgn : *const u32, celems : u32, ppropvar : *mut PROPVARIANT) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - InitPropVariantFromUInt32Vector(::core::mem::transmute(prgn.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prgn.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + InitPropVariantFromUInt32Vector(::core::mem::transmute(prgn.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prgn.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Variant"))] @@ -239,7 +239,7 @@ pub unsafe fn InitPropVariantFromUInt32Vector(prgn: ::core::option::Option<&[u32 pub unsafe fn InitPropVariantFromUInt64Vector(prgn: ::core::option::Option<&[u64]>) -> ::windows_core::Result { ::windows_targets::link!("propsys.dll" "system" fn InitPropVariantFromUInt64Vector(prgn : *const u64, celems : u32, ppropvar : *mut PROPVARIANT) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - InitPropVariantFromUInt64Vector(::core::mem::transmute(prgn.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prgn.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + InitPropVariantFromUInt64Vector(::core::mem::transmute(prgn.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prgn.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Variant"))] @@ -432,7 +432,7 @@ pub unsafe fn PropVariantToBoolean(propvarin: *const PROPVARIANT) -> ::windows_c #[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); - PropVariantToBooleanVector(propvar, ::core::mem::transmute(prgf.as_ptr()), prgf.len() as _, pcelem).ok() + PropVariantToBooleanVector(propvar, ::core::mem::transmute(prgf.as_ptr()), prgf.len().try_into().unwrap(), pcelem).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Variant"))] @@ -471,7 +471,7 @@ pub unsafe fn PropVariantToDouble(propvarin: *const PROPVARIANT) -> ::windows_co #[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); - PropVariantToDoubleVector(propvar, ::core::mem::transmute(prgn.as_ptr()), prgn.len() as _, pcelem).ok() + PropVariantToDoubleVector(propvar, ::core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), pcelem).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Variant"))] @@ -500,7 +500,7 @@ 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); - PropVariantToFileTimeVector(propvar, ::core::mem::transmute(prgft.as_ptr()), prgft.len() as _, pcelem).ok() + PropVariantToFileTimeVector(propvar, ::core::mem::transmute(prgft.as_ptr()), prgft.len().try_into().unwrap(), pcelem).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Variant"))] @@ -530,7 +530,7 @@ pub unsafe fn PropVariantToInt16(propvarin: *const PROPVARIANT) -> ::windows_cor #[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); - PropVariantToInt16Vector(propvar, ::core::mem::transmute(prgn.as_ptr()), prgn.len() as _, pcelem).ok() + PropVariantToInt16Vector(propvar, ::core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), pcelem).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Variant"))] @@ -559,7 +559,7 @@ pub unsafe fn PropVariantToInt32(propvarin: *const PROPVARIANT) -> ::windows_cor #[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); - PropVariantToInt32Vector(propvar, ::core::mem::transmute(prgn.as_ptr()), prgn.len() as _, pcelem).ok() + PropVariantToInt32Vector(propvar, ::core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), pcelem).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Variant"))] @@ -588,7 +588,7 @@ pub unsafe fn PropVariantToInt64(propvarin: *const PROPVARIANT) -> ::windows_cor #[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); - PropVariantToInt64Vector(propvar, ::core::mem::transmute(prgn.as_ptr()), prgn.len() as _, pcelem).ok() + PropVariantToInt64Vector(propvar, ::core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), pcelem).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Variant"))] @@ -609,7 +609,7 @@ pub unsafe fn PropVariantToInt64WithDefault(propvarin: *const PROPVARIANT, lldef #[inline] pub unsafe fn PropVariantToString(propvar: *const PROPVARIANT, psz: &mut [u16]) -> ::windows_core::Result<()> { ::windows_targets::link!("propsys.dll" "system" fn PropVariantToString(propvar : *const PROPVARIANT, psz : ::windows_core::PWSTR, cch : u32) -> ::windows_core::HRESULT); - PropVariantToString(propvar, ::core::mem::transmute(psz.as_ptr()), psz.len() as _).ok() + PropVariantToString(propvar, ::core::mem::transmute(psz.as_ptr()), psz.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Variant"))] @@ -624,7 +624,7 @@ pub unsafe fn PropVariantToStringAlloc(propvar: *const PROPVARIANT) -> ::windows #[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); - PropVariantToStringVector(propvar, ::core::mem::transmute(prgsz.as_ptr()), prgsz.len() as _, pcelem).ok() + PropVariantToStringVector(propvar, ::core::mem::transmute(prgsz.as_ptr()), prgsz.len().try_into().unwrap(), pcelem).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Variant"))] @@ -656,7 +656,7 @@ pub unsafe fn PropVariantToUInt16(propvarin: *const PROPVARIANT) -> ::windows_co #[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); - PropVariantToUInt16Vector(propvar, ::core::mem::transmute(prgn.as_ptr()), prgn.len() as _, pcelem).ok() + PropVariantToUInt16Vector(propvar, ::core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), pcelem).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Variant"))] @@ -685,7 +685,7 @@ pub unsafe fn PropVariantToUInt32(propvarin: *const PROPVARIANT) -> ::windows_co #[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); - PropVariantToUInt32Vector(propvar, ::core::mem::transmute(prgn.as_ptr()), prgn.len() as _, pcelem).ok() + PropVariantToUInt32Vector(propvar, ::core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), pcelem).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Variant"))] @@ -714,7 +714,7 @@ pub unsafe fn PropVariantToUInt64(propvarin: *const PROPVARIANT) -> ::windows_co #[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); - PropVariantToUInt64Vector(propvar, ::core::mem::transmute(prgn.as_ptr()), prgn.len() as _, pcelem).ok() + PropVariantToUInt64Vector(propvar, ::core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), pcelem).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Variant"))] @@ -1045,7 +1045,7 @@ impl IEnumSTATPROPSETSTG { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn Next(&self, rgelt: &mut [STATPROPSETSTG], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::HRESULT { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))) + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::HRESULT { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt) @@ -1084,7 +1084,7 @@ impl IEnumSTATPROPSTG { #[doc = "Required features: `\"Win32_System_Variant\"`"] #[cfg(feature = "Win32_System_Variant")] pub unsafe fn Next(&self, rgelt: &mut [STATPROPSTG], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::HRESULT { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))) + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::HRESULT { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt) @@ -1123,7 +1123,7 @@ impl IEnumSTATSTG { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn Next(&self, rgelt: &mut [super::STATSTG], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -1203,7 +1203,7 @@ pub struct IFillLockBytes_Vtbl { pub struct ILayoutStorage(::windows_core::IUnknown); impl ILayoutStorage { pub unsafe fn LayoutScript(&self, pstoragelayout: &[super::StorageLayout], glfinterleavedflag: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).LayoutScript)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pstoragelayout.as_ptr()), pstoragelayout.len() as _, glfinterleavedflag).ok() + (::windows_core::Interface::vtable(self).LayoutScript)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pstoragelayout.as_ptr()), pstoragelayout.len().try_into().unwrap(), glfinterleavedflag).ok() } pub unsafe fn BeginMonitor(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).BeginMonitor)(::windows_core::Interface::as_raw(self)).ok() @@ -1420,7 +1420,7 @@ impl IPropertyBag2 { #[doc = "Required features: `\"Win32_System_Variant\"`"] #[cfg(feature = "Win32_System_Variant")] pub unsafe fn GetPropertyInfo(&self, iproperty: u32, ppropbag: &mut [PROPBAG2], pcproperties: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPropertyInfo)(::windows_core::Interface::as_raw(self), iproperty, ppropbag.len() as _, ::core::mem::transmute(ppropbag.as_ptr()), pcproperties).ok() + (::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).ok() } pub unsafe fn LoadObject(&self, pstrname: P0, dwhint: u32, punkobject: P1, perrlog: P2) -> ::windows_core::Result<()> where @@ -1508,7 +1508,7 @@ impl IPropertyStorage { (::windows_core::Interface::vtable(self).WriteMultiple)(::windows_core::Interface::as_raw(self), cpspec, rgpspec, rgpropvar, propidnamefirst).ok() } pub unsafe fn DeleteMultiple(&self, rgpspec: &[PROPSPEC]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).DeleteMultiple)(::windows_core::Interface::as_raw(self), rgpspec.len() as _, ::core::mem::transmute(rgpspec.as_ptr())).ok() + (::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<()> { (::windows_core::Interface::vtable(self).ReadPropertyNames)(::windows_core::Interface::as_raw(self), cpropid, rgpropid, rglpwstrname).ok() @@ -1517,7 +1517,7 @@ impl IPropertyStorage { (::windows_core::Interface::vtable(self).WritePropertyNames)(::windows_core::Interface::as_raw(self), cpropid, rgpropid, rglpwstrname).ok() } pub unsafe fn DeletePropertyNames(&self, rgpropid: &[u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).DeletePropertyNames)(::windows_core::Interface::as_raw(self), rgpropid.len() as _, ::core::mem::transmute(rgpropid.as_ptr())).ok() + (::windows_core::Interface::vtable(self).DeletePropertyNames)(::windows_core::Interface::as_raw(self), rgpropid.len().try_into().unwrap(), ::core::mem::transmute(rgpropid.as_ptr())).ok() } pub unsafe fn Commit(&self, grfcommitflags: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Commit)(::windows_core::Interface::as_raw(self), grfcommitflags).ok() @@ -1640,7 +1640,7 @@ impl IStorage { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).CopyTo)(::windows_core::Interface::as_raw(self), rgiidexclude.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rgiidexclude.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(snbexclude.unwrap_or(::std::ptr::null())), pstgdest.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).CopyTo)(::windows_core::Interface::as_raw(self), rgiidexclude.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(rgiidexclude.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(snbexclude.unwrap_or(::std::ptr::null())), pstgdest.into_param().abi()).ok() } pub unsafe fn MoveElementTo(&self, pwcsname: P0, pstgdest: P1, pwcsnewname: P2, grfflags: STGMOVE) -> ::windows_core::Result<()> where diff --git a/crates/libs/windows/src/Windows/Win32/System/Com/Urlmon/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Com/Urlmon/mod.rs index c75f81be67..617ecf808b 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 @@ -24,7 +24,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("urlmon.dll" "system" fn CoInternetCombineUrl(pwzbaseurl : ::windows_core::PCWSTR, pwzrelativeurl : ::windows_core::PCWSTR, dwcombineflags : u32, pszresult : ::windows_core::PWSTR, cchresult : u32, pcchresult : *mut u32, dwreserved : u32) -> ::windows_core::HRESULT); - CoInternetCombineUrl(pwzbaseurl.into_param().abi(), pwzrelativeurl.into_param().abi(), dwcombineflags, ::core::mem::transmute(pszresult.as_ptr()), pszresult.len() as _, ::core::mem::transmute(pcchresult.unwrap_or(::std::ptr::null_mut())), dwreserved).ok() + CoInternetCombineUrl(pwzbaseurl.into_param().abi(), pwzrelativeurl.into_param().abi(), dwcombineflags, ::core::mem::transmute(pszresult.as_ptr()), pszresult.len().try_into().unwrap(), ::core::mem::transmute(pcchresult.unwrap_or(::std::ptr::null_mut())), dwreserved).ok() } #[inline] pub unsafe fn CoInternetCombineUrlEx(pbaseuri: P0, pwzrelativeurl: P1, dwcombineflags: u32, ppcombineduri: *mut ::core::option::Option, dwreserved: usize) -> ::windows_core::Result<()> @@ -128,7 +128,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("urlmon.dll" "system" fn CoInternetParseIUri(piuri : * mut::core::ffi::c_void, parseaction : PARSEACTION, dwflags : u32, pwzresult : ::windows_core::PWSTR, cchresult : u32, pcchresult : *mut u32, dwreserved : usize) -> ::windows_core::HRESULT); - CoInternetParseIUri(piuri.into_param().abi(), parseaction, dwflags, ::core::mem::transmute(pwzresult.as_ptr()), pwzresult.len() as _, pcchresult, dwreserved).ok() + CoInternetParseIUri(piuri.into_param().abi(), parseaction, dwflags, ::core::mem::transmute(pwzresult.as_ptr()), pwzresult.len().try_into().unwrap(), pcchresult, dwreserved).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::IntoParam<::windows_core::PCWSTR>, { ::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); - CoInternetParseUrl(pwzurl.into_param().abi(), parseaction, dwflags, ::core::mem::transmute(pszresult.as_ptr()), pszresult.len() as _, pcchresult, dwreserved).ok() + CoInternetParseUrl(pwzurl.into_param().abi(), parseaction, dwflags, ::core::mem::transmute(pszresult.as_ptr()), pszresult.len().try_into().unwrap(), pcchresult, dwreserved).ok() } #[inline] pub unsafe fn CoInternetQueryInfo(pwzurl: P0, queryoptions: QUERYOPTION, dwqueryflags: u32, pvbuffer: *mut ::core::ffi::c_void, cbbuffer: u32, pcbbuffer: ::core::option::Option<*mut u32>, dwreserved: u32) -> ::windows_core::Result<()> @@ -159,7 +159,7 @@ where #[inline] pub unsafe fn CompareSecurityIds(pbsecurityid1: &[u8], pbsecurityid2: &[u8], dwreserved: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("urlmon.dll" "system" fn CompareSecurityIds(pbsecurityid1 : *const u8, dwlen1 : u32, pbsecurityid2 : *const u8, dwlen2 : u32, dwreserved : u32) -> ::windows_core::HRESULT); - CompareSecurityIds(::core::mem::transmute(pbsecurityid1.as_ptr()), pbsecurityid1.len() as _, ::core::mem::transmute(pbsecurityid2.as_ptr()), pbsecurityid2.len() as _, dwreserved).ok() + CompareSecurityIds(::core::mem::transmute(pbsecurityid1.as_ptr()), pbsecurityid1.len().try_into().unwrap(), ::core::mem::transmute(pbsecurityid2.as_ptr()), pbsecurityid2.len().try_into().unwrap(), dwreserved).ok() } #[inline] pub unsafe fn CompatFlagsFromClsid(pclsid: *const ::windows_core::GUID, pdwcompatflags: *mut u32, pdwmiscstatusflags: *mut u32) -> ::windows_core::Result<()> { @@ -205,7 +205,7 @@ where pub unsafe fn CreateFormatEnumerator(rgfmtetc: &[super::FORMATETC]) -> ::windows_core::Result { ::windows_targets::link!("urlmon.dll" "system" fn CreateFormatEnumerator(cfmtetc : u32, rgfmtetc : *const super:: FORMATETC, ppenumfmtetc : *mut * mut::core::ffi::c_void) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - CreateFormatEnumerator(rgfmtetc.len() as _, ::core::mem::transmute(rgfmtetc.as_ptr()), &mut result__).from_abi(result__) + CreateFormatEnumerator(rgfmtetc.len().try_into().unwrap(), ::core::mem::transmute(rgfmtetc.as_ptr()), &mut result__).from_abi(result__) } #[inline] pub unsafe fn CreateURLMoniker(pmkctx: P0, szurl: P1) -> ::windows_core::Result @@ -511,7 +511,7 @@ where P2: ::windows_core::IntoParam, { ::windows_targets::link!("urlmon.dll" "system" fn URLDownloadToCacheFileA(param0 : * mut::core::ffi::c_void, param1 : ::windows_core::PCSTR, param2 : ::windows_core::PSTR, cchfilename : u32, param4 : u32, param5 : * mut::core::ffi::c_void) -> ::windows_core::HRESULT); - URLDownloadToCacheFileA(param0.into_param().abi(), param1.into_param().abi(), ::core::mem::transmute(param2.as_ptr()), param2.len() as _, param4, param5.into_param().abi()).ok() + URLDownloadToCacheFileA(param0.into_param().abi(), param1.into_param().abi(), ::core::mem::transmute(param2.as_ptr()), param2.len().try_into().unwrap(), param4, param5.into_param().abi()).ok() } #[inline] pub unsafe fn URLDownloadToCacheFileW(param0: P0, param1: P1, param2: &mut [u16], param4: u32, param5: P2) -> ::windows_core::Result<()> @@ -521,7 +521,7 @@ where P2: ::windows_core::IntoParam, { ::windows_targets::link!("urlmon.dll" "system" fn URLDownloadToCacheFileW(param0 : * mut::core::ffi::c_void, param1 : ::windows_core::PCWSTR, param2 : ::windows_core::PWSTR, cchfilename : u32, param4 : u32, param5 : * mut::core::ffi::c_void) -> ::windows_core::HRESULT); - URLDownloadToCacheFileW(param0.into_param().abi(), param1.into_param().abi(), ::core::mem::transmute(param2.as_ptr()), param2.len() as _, param4, param5.into_param().abi()).ok() + URLDownloadToCacheFileW(param0.into_param().abi(), param1.into_param().abi(), ::core::mem::transmute(param2.as_ptr()), param2.len().try_into().unwrap(), param4, param5.into_param().abi()).ok() } #[inline] pub unsafe fn URLDownloadToFileA(param0: P0, param1: P1, param2: P2, param3: u32, param4: P3) -> ::windows_core::Result<()> @@ -762,10 +762,10 @@ pub struct ICodeInstall_Vtbl { pub struct 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<()> { - (::windows_core::Interface::vtable(self).DoEncode)(::windows_core::Interface::as_raw(self), dwflags, pbinbuffer.len() as _, ::core::mem::transmute(pbinbuffer.as_ptr()), pboutbuffer.len() as _, ::core::mem::transmute(pboutbuffer.as_ptr()), linbytesavailable, plinbytesread, ploutbyteswritten, dwreserved).ok() + (::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, ploutbyteswritten, 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<()> { - (::windows_core::Interface::vtable(self).DoDecode)(::windows_core::Interface::as_raw(self), dwflags, pbinbuffer.len() as _, ::core::mem::transmute(pbinbuffer.as_ptr()), pboutbuffer.len() as _, ::core::mem::transmute(pboutbuffer.as_ptr()), linbytesavailable, plinbytesread, ploutbyteswritten, dwreserved).ok() + (::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, ploutbyteswritten, dwreserved).ok() } pub unsafe fn SetEncodingLevel(&self, dwenclevel: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).SetEncodingLevel)(::windows_core::Interface::as_raw(self), dwenclevel).ok() @@ -1075,10 +1075,10 @@ impl IInternetHostSecurityManager { (::windows_core::Interface::vtable(self).GetSecurityId)(::windows_core::Interface::as_raw(self), pbsecurityid, pcbsecurityid, dwreserved).ok() } pub unsafe fn ProcessUrlAction(&self, dwaction: u32, ppolicy: &mut [u8], pcontext: ::core::option::Option<&[u8]>, dwflags: u32, dwreserved: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).ProcessUrlAction)(::windows_core::Interface::as_raw(self), dwaction, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len() as _, ::core::mem::transmute(pcontext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pcontext.as_deref().map_or(0, |slice| slice.len() as _), dwflags, dwreserved).ok() + (::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<()> { - (::windows_core::Interface::vtable(self).QueryCustomPolicy)(::windows_core::Interface::as_raw(self), guidkey, pppolicy, pcbpolicy, ::core::mem::transmute(pcontext.as_ptr()), pcontext.len() as _, dwreserved).ok() + (::windows_core::Interface::vtable(self).QueryCustomPolicy)(::windows_core::Interface::as_raw(self), guidkey, pppolicy, pcbpolicy, ::core::mem::transmute(pcontext.as_ptr()), pcontext.len().try_into().unwrap(), dwreserved).ok() } } ::windows_core::imp::interface_hierarchy!(IInternetHostSecurityManager, ::windows_core::IUnknown); @@ -1153,7 +1153,7 @@ impl IInternetProtocol { (::windows_core::Interface::vtable(self).base__.Resume)(::windows_core::Interface::as_raw(self)).ok() } pub unsafe fn Read(&self, pv: &mut [u8], pcbread: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Read)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pv.as_ptr()), pv.len() as _, pcbread).ok() + (::windows_core::Interface::vtable(self).Read)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pv.as_ptr()), pv.len().try_into().unwrap(), pcbread).ok() } pub unsafe fn Seek(&self, dlibmove: i64, dworigin: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1213,7 +1213,7 @@ impl IInternetProtocolEx { (::windows_core::Interface::vtable(self).base__.base__.Resume)(::windows_core::Interface::as_raw(self)).ok() } pub unsafe fn Read(&self, pv: &mut [u8], pcbread: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.Read)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pv.as_ptr()), pv.len() as _, pcbread).ok() + (::windows_core::Interface::vtable(self).base__.Read)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pv.as_ptr()), pv.len().try_into().unwrap(), pcbread).ok() } pub unsafe fn Seek(&self, dlibmove: i64, dworigin: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1454,7 +1454,7 @@ impl IInternetSecurityManager { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).ProcessUrlAction)(::windows_core::Interface::as_raw(self), pwszurl.into_param().abi(), dwaction, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len() as _, pcontext, cbcontext, dwflags, dwreserved).ok() + (::windows_core::Interface::vtable(self).ProcessUrlAction)(::windows_core::Interface::as_raw(self), pwszurl.into_param().abi(), dwaction, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len().try_into().unwrap(), pcontext, cbcontext, dwflags, dwreserved).ok() } pub unsafe fn QueryCustomPolicy(&self, pwszurl: P0, guidkey: *const ::windows_core::GUID, pppolicy: *mut *mut u8, pcbpolicy: *mut u32, pcontext: *const u8, cbcontext: u32, dwreserved: u32) -> ::windows_core::Result<()> where @@ -1522,7 +1522,7 @@ impl IInternetSecurityManagerEx { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).base__.ProcessUrlAction)(::windows_core::Interface::as_raw(self), pwszurl.into_param().abi(), dwaction, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len() as _, pcontext, cbcontext, dwflags, dwreserved).ok() + (::windows_core::Interface::vtable(self).base__.ProcessUrlAction)(::windows_core::Interface::as_raw(self), pwszurl.into_param().abi(), dwaction, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len().try_into().unwrap(), pcontext, cbcontext, dwflags, dwreserved).ok() } pub unsafe fn QueryCustomPolicy(&self, pwszurl: P0, guidkey: *const ::windows_core::GUID, pppolicy: *mut *mut u8, pcbpolicy: *mut u32, pcontext: *const u8, cbcontext: u32, dwreserved: u32) -> ::windows_core::Result<()> where @@ -1543,7 +1543,7 @@ impl IInternetSecurityManagerEx { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).ProcessUrlActionEx)(::windows_core::Interface::as_raw(self), pwszurl.into_param().abi(), dwaction, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len() as _, pcontext, cbcontext, dwflags, dwreserved, pdwoutflags).ok() + (::windows_core::Interface::vtable(self).ProcessUrlActionEx)(::windows_core::Interface::as_raw(self), pwszurl.into_param().abi(), dwaction, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len().try_into().unwrap(), pcontext, cbcontext, dwflags, dwreserved, pdwoutflags).ok() } } ::windows_core::imp::interface_hierarchy!(IInternetSecurityManagerEx, ::windows_core::IUnknown, IInternetSecurityManager); @@ -1589,7 +1589,7 @@ impl IInternetSecurityManagerEx2 { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).base__.base__.ProcessUrlAction)(::windows_core::Interface::as_raw(self), pwszurl.into_param().abi(), dwaction, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len() as _, pcontext, cbcontext, dwflags, dwreserved).ok() + (::windows_core::Interface::vtable(self).base__.base__.ProcessUrlAction)(::windows_core::Interface::as_raw(self), pwszurl.into_param().abi(), dwaction, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len().try_into().unwrap(), pcontext, cbcontext, dwflags, dwreserved).ok() } pub unsafe fn QueryCustomPolicy(&self, pwszurl: P0, guidkey: *const ::windows_core::GUID, pppolicy: *mut *mut u8, pcbpolicy: *mut u32, pcontext: *const u8, cbcontext: u32, dwreserved: u32) -> ::windows_core::Result<()> where @@ -1610,7 +1610,7 @@ impl IInternetSecurityManagerEx2 { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).base__.ProcessUrlActionEx)(::windows_core::Interface::as_raw(self), pwszurl.into_param().abi(), dwaction, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len() as _, pcontext, cbcontext, dwflags, dwreserved, pdwoutflags).ok() + (::windows_core::Interface::vtable(self).base__.ProcessUrlActionEx)(::windows_core::Interface::as_raw(self), pwszurl.into_param().abi(), dwaction, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len().try_into().unwrap(), pcontext, cbcontext, dwflags, dwreserved, pdwoutflags).ok() } pub unsafe fn MapUrlToZoneEx2(&self, puri: P0, pdwzone: *mut u32, dwflags: u32, ppwszmappedurl: ::core::option::Option<*mut ::windows_core::PWSTR>, pdwoutflags: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where @@ -1622,7 +1622,7 @@ impl IInternetSecurityManagerEx2 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).ProcessUrlActionEx2)(::windows_core::Interface::as_raw(self), puri.into_param().abi(), dwaction, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len() as _, pcontext, cbcontext, dwflags, dwreserved, pdwoutflags).ok() + (::windows_core::Interface::vtable(self).ProcessUrlActionEx2)(::windows_core::Interface::as_raw(self), puri.into_param().abi(), dwaction, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len().try_into().unwrap(), pcontext, cbcontext, dwflags, dwreserved, pdwoutflags).ok() } pub unsafe fn GetSecurityIdEx2(&self, puri: P0, pbsecurityid: &mut [u8; 512], pcbsecurityid: *mut u32, dwreserved: usize) -> ::windows_core::Result<()> where @@ -1797,13 +1797,13 @@ impl IInternetZoneManager { (::windows_core::Interface::vtable(self).GetZoneCustomPolicy)(::windows_core::Interface::as_raw(self), dwzone, guidkey, pppolicy, pcbpolicy, urlzonereg).ok() } pub unsafe fn SetZoneCustomPolicy(&self, dwzone: u32, guidkey: *const ::windows_core::GUID, ppolicy: &[u8], urlzonereg: URLZONEREG) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetZoneCustomPolicy)(::windows_core::Interface::as_raw(self), dwzone, guidkey, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len() as _, urlzonereg).ok() + (::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() } pub unsafe fn GetZoneActionPolicy(&self, dwzone: u32, dwaction: u32, ppolicy: &mut [u8], urlzonereg: URLZONEREG) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetZoneActionPolicy)(::windows_core::Interface::as_raw(self), dwzone, dwaction, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len() as _, urlzonereg).ok() + (::windows_core::Interface::vtable(self).GetZoneActionPolicy)(::windows_core::Interface::as_raw(self), dwzone, dwaction, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len().try_into().unwrap(), urlzonereg).ok() } pub unsafe fn SetZoneActionPolicy(&self, dwzone: u32, dwaction: u32, ppolicy: &[u8], urlzonereg: URLZONEREG) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetZoneActionPolicy)(::windows_core::Interface::as_raw(self), dwzone, dwaction, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len() as _, urlzonereg).ok() + (::windows_core::Interface::vtable(self).SetZoneActionPolicy)(::windows_core::Interface::as_raw(self), dwzone, dwaction, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len().try_into().unwrap(), urlzonereg).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1877,13 +1877,13 @@ impl IInternetZoneManagerEx { (::windows_core::Interface::vtable(self).base__.GetZoneCustomPolicy)(::windows_core::Interface::as_raw(self), dwzone, guidkey, pppolicy, pcbpolicy, urlzonereg).ok() } pub unsafe fn SetZoneCustomPolicy(&self, dwzone: u32, guidkey: *const ::windows_core::GUID, ppolicy: &[u8], urlzonereg: URLZONEREG) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetZoneCustomPolicy)(::windows_core::Interface::as_raw(self), dwzone, guidkey, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len() as _, urlzonereg).ok() + (::windows_core::Interface::vtable(self).base__.SetZoneCustomPolicy)(::windows_core::Interface::as_raw(self), dwzone, guidkey, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len().try_into().unwrap(), urlzonereg).ok() } pub unsafe fn GetZoneActionPolicy(&self, dwzone: u32, dwaction: u32, ppolicy: &mut [u8], urlzonereg: URLZONEREG) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetZoneActionPolicy)(::windows_core::Interface::as_raw(self), dwzone, dwaction, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len() as _, urlzonereg).ok() + (::windows_core::Interface::vtable(self).base__.GetZoneActionPolicy)(::windows_core::Interface::as_raw(self), dwzone, dwaction, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len().try_into().unwrap(), urlzonereg).ok() } pub unsafe fn SetZoneActionPolicy(&self, dwzone: u32, dwaction: u32, ppolicy: &[u8], urlzonereg: URLZONEREG) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetZoneActionPolicy)(::windows_core::Interface::as_raw(self), dwzone, dwaction, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len() as _, urlzonereg).ok() + (::windows_core::Interface::vtable(self).base__.SetZoneActionPolicy)(::windows_core::Interface::as_raw(self), dwzone, dwaction, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len().try_into().unwrap(), urlzonereg).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1916,10 +1916,10 @@ impl IInternetZoneManagerEx { (::windows_core::Interface::vtable(self).base__.CopyTemplatePoliciesToZone)(::windows_core::Interface::as_raw(self), dwtemplate, dwzone, dwreserved).ok() } pub unsafe fn GetZoneActionPolicyEx(&self, dwzone: u32, dwaction: u32, ppolicy: &mut [u8], urlzonereg: URLZONEREG, dwflags: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetZoneActionPolicyEx)(::windows_core::Interface::as_raw(self), dwzone, dwaction, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len() as _, urlzonereg, dwflags).ok() + (::windows_core::Interface::vtable(self).GetZoneActionPolicyEx)(::windows_core::Interface::as_raw(self), dwzone, dwaction, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len().try_into().unwrap(), urlzonereg, dwflags).ok() } pub unsafe fn SetZoneActionPolicyEx(&self, dwzone: u32, dwaction: u32, ppolicy: &[u8], urlzonereg: URLZONEREG, dwflags: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetZoneActionPolicyEx)(::windows_core::Interface::as_raw(self), dwzone, dwaction, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len() as _, urlzonereg, dwflags).ok() + (::windows_core::Interface::vtable(self).SetZoneActionPolicyEx)(::windows_core::Interface::as_raw(self), dwzone, dwaction, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len().try_into().unwrap(), urlzonereg, dwflags).ok() } } ::windows_core::imp::interface_hierarchy!(IInternetZoneManagerEx, ::windows_core::IUnknown, IInternetZoneManager); @@ -1950,13 +1950,13 @@ impl IInternetZoneManagerEx2 { (::windows_core::Interface::vtable(self).base__.base__.GetZoneCustomPolicy)(::windows_core::Interface::as_raw(self), dwzone, guidkey, pppolicy, pcbpolicy, urlzonereg).ok() } pub unsafe fn SetZoneCustomPolicy(&self, dwzone: u32, guidkey: *const ::windows_core::GUID, ppolicy: &[u8], urlzonereg: URLZONEREG) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.SetZoneCustomPolicy)(::windows_core::Interface::as_raw(self), dwzone, guidkey, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len() as _, urlzonereg).ok() + (::windows_core::Interface::vtable(self).base__.base__.SetZoneCustomPolicy)(::windows_core::Interface::as_raw(self), dwzone, guidkey, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len().try_into().unwrap(), urlzonereg).ok() } pub unsafe fn GetZoneActionPolicy(&self, dwzone: u32, dwaction: u32, ppolicy: &mut [u8], urlzonereg: URLZONEREG) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetZoneActionPolicy)(::windows_core::Interface::as_raw(self), dwzone, dwaction, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len() as _, urlzonereg).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetZoneActionPolicy)(::windows_core::Interface::as_raw(self), dwzone, dwaction, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len().try_into().unwrap(), urlzonereg).ok() } pub unsafe fn SetZoneActionPolicy(&self, dwzone: u32, dwaction: u32, ppolicy: &[u8], urlzonereg: URLZONEREG) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.SetZoneActionPolicy)(::windows_core::Interface::as_raw(self), dwzone, dwaction, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len() as _, urlzonereg).ok() + (::windows_core::Interface::vtable(self).base__.base__.SetZoneActionPolicy)(::windows_core::Interface::as_raw(self), dwzone, dwaction, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len().try_into().unwrap(), urlzonereg).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1989,10 +1989,10 @@ impl IInternetZoneManagerEx2 { (::windows_core::Interface::vtable(self).base__.base__.CopyTemplatePoliciesToZone)(::windows_core::Interface::as_raw(self), dwtemplate, dwzone, dwreserved).ok() } pub unsafe fn GetZoneActionPolicyEx(&self, dwzone: u32, dwaction: u32, ppolicy: &mut [u8], urlzonereg: URLZONEREG, dwflags: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetZoneActionPolicyEx)(::windows_core::Interface::as_raw(self), dwzone, dwaction, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len() as _, urlzonereg, dwflags).ok() + (::windows_core::Interface::vtable(self).base__.GetZoneActionPolicyEx)(::windows_core::Interface::as_raw(self), dwzone, dwaction, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len().try_into().unwrap(), urlzonereg, dwflags).ok() } pub unsafe fn SetZoneActionPolicyEx(&self, dwzone: u32, dwaction: u32, ppolicy: &[u8], urlzonereg: URLZONEREG, dwflags: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetZoneActionPolicyEx)(::windows_core::Interface::as_raw(self), dwzone, dwaction, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len() as _, urlzonereg, dwflags).ok() + (::windows_core::Interface::vtable(self).base__.SetZoneActionPolicyEx)(::windows_core::Interface::as_raw(self), dwzone, dwaction, ::core::mem::transmute(ppolicy.as_ptr()), ppolicy.len().try_into().unwrap(), urlzonereg, dwflags).ok() } pub unsafe fn GetZoneAttributesEx(&self, dwzone: u32, pzoneattributes: *mut ZONEATTRIBUTES, dwflags: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetZoneAttributesEx)(::windows_core::Interface::as_raw(self), dwzone, pzoneattributes, dwflags).ok() 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 1feaa107c5..5fe1f0b44d 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Com/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Com/mod.rs @@ -124,7 +124,7 @@ where P0: ::windows_core::IntoParam<::windows_core::IUnknown>, { ::windows_targets::link!("ole32.dll" "system" fn CoCreateInstanceEx(clsid : *const ::windows_core::GUID, punkouter : * mut::core::ffi::c_void, dwclsctx : CLSCTX, pserverinfo : *const COSERVERINFO, dwcount : u32, presults : *mut MULTI_QI) -> ::windows_core::HRESULT); - CoCreateInstanceEx(clsid, punkouter.into_param().abi(), dwclsctx, ::core::mem::transmute(pserverinfo.unwrap_or(::std::ptr::null())), presults.len() as _, ::core::mem::transmute(presults.as_ptr())).ok() + CoCreateInstanceEx(clsid, punkouter.into_param().abi(), dwclsctx, ::core::mem::transmute(pserverinfo.unwrap_or(::std::ptr::null())), presults.len().try_into().unwrap(), ::core::mem::transmute(presults.as_ptr())).ok() } #[inline] pub unsafe fn CoCreateInstanceFromApp(clsid: *const ::windows_core::GUID, punkouter: P0, dwclsctx: CLSCTX, reserved: ::core::option::Option<*const ::core::ffi::c_void>, presults: &mut [MULTI_QI]) -> ::windows_core::Result<()> @@ -132,7 +132,7 @@ where P0: ::windows_core::IntoParam<::windows_core::IUnknown>, { ::windows_targets::link!("ole32.dll" "system" fn CoCreateInstanceFromApp(clsid : *const ::windows_core::GUID, punkouter : * mut::core::ffi::c_void, dwclsctx : CLSCTX, reserved : *const ::core::ffi::c_void, dwcount : u32, presults : *mut MULTI_QI) -> ::windows_core::HRESULT); - CoCreateInstanceFromApp(clsid, punkouter.into_param().abi(), dwclsctx, ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null())), presults.len() as _, ::core::mem::transmute(presults.as_ptr())).ok() + CoCreateInstanceFromApp(clsid, punkouter.into_param().abi(), dwclsctx, ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null())), presults.len().try_into().unwrap(), ::core::mem::transmute(presults.as_ptr())).ok() } #[inline] pub unsafe fn CoDecrementMTAUsage(cookie: P0) -> ::windows_core::Result<()> @@ -605,7 +605,7 @@ pub unsafe fn CoUninitialize() { pub unsafe fn CoWaitForMultipleHandles(dwflags: u32, dwtimeout: u32, phandles: &[super::super::Foundation::HANDLE]) -> ::windows_core::Result { ::windows_targets::link!("ole32.dll" "system" fn CoWaitForMultipleHandles(dwflags : u32, dwtimeout : u32, chandles : u32, phandles : *const super::super::Foundation:: HANDLE, lpdwindex : *mut u32) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - CoWaitForMultipleHandles(dwflags, dwtimeout, phandles.len() as _, ::core::mem::transmute(phandles.as_ptr()), &mut result__).from_abi(result__) + CoWaitForMultipleHandles(dwflags, dwtimeout, phandles.len().try_into().unwrap(), ::core::mem::transmute(phandles.as_ptr()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -613,7 +613,7 @@ pub unsafe fn CoWaitForMultipleHandles(dwflags: u32, dwtimeout: u32, phandles: & pub unsafe fn CoWaitForMultipleObjects(dwflags: u32, dwtimeout: u32, phandles: &[super::super::Foundation::HANDLE]) -> ::windows_core::Result { ::windows_targets::link!("ole32.dll" "system" fn CoWaitForMultipleObjects(dwflags : u32, dwtimeout : u32, chandles : u32, phandles : *const super::super::Foundation:: HANDLE, lpdwindex : *mut u32) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - CoWaitForMultipleObjects(dwflags, dwtimeout, phandles.len() as _, ::core::mem::transmute(phandles.as_ptr()), &mut result__).from_abi(result__) + CoWaitForMultipleObjects(dwflags, dwtimeout, phandles.len().try_into().unwrap(), ::core::mem::transmute(phandles.as_ptr()), &mut result__).from_abi(result__) } #[inline] pub unsafe fn CreateAntiMoniker() -> ::windows_core::Result { @@ -835,7 +835,7 @@ pub unsafe fn StringFromCLSID(rclsid: *const ::windows_core::GUID) -> ::windows_ #[inline] pub unsafe fn StringFromGUID2(rguid: *const ::windows_core::GUID, lpsz: &mut [u16]) -> i32 { ::windows_targets::link!("ole32.dll" "system" fn StringFromGUID2(rguid : *const ::windows_core::GUID, lpsz : ::windows_core::PWSTR, cchmax : i32) -> i32); - StringFromGUID2(rguid, ::core::mem::transmute(lpsz.as_ptr()), lpsz.len() as _) + StringFromGUID2(rguid, ::core::mem::transmute(lpsz.as_ptr()), lpsz.len().try_into().unwrap()) } #[inline] pub unsafe fn StringFromIID(rclsid: *const ::windows_core::GUID) -> ::windows_core::Result<::windows_core::PWSTR> { @@ -976,7 +976,7 @@ pub struct AsyncIAdviseSink2_Vtbl { pub struct AsyncIMultiQI(::windows_core::IUnknown); impl AsyncIMultiQI { pub unsafe fn Begin_QueryMultipleInterfaces(&self, pmqis: &mut [MULTI_QI]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Begin_QueryMultipleInterfaces)(::windows_core::Interface::as_raw(self), pmqis.len() as _, ::core::mem::transmute(pmqis.as_ptr())).ok() + (::windows_core::Interface::vtable(self).Begin_QueryMultipleInterfaces)(::windows_core::Interface::as_raw(self), pmqis.len().try_into().unwrap(), ::core::mem::transmute(pmqis.as_ptr())).ok() } pub unsafe fn Finish_QueryMultipleInterfaces(&self, pmqis: *mut MULTI_QI) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Finish_QueryMultipleInterfaces)(::windows_core::Interface::as_raw(self), pmqis).ok() @@ -1007,7 +1007,7 @@ impl AsyncIPipeByte { (::windows_core::Interface::vtable(self).Finish_Pull)(::windows_core::Interface::as_raw(self), buf, pcreturned).ok() } pub unsafe fn Begin_Push(&self, buf: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Begin_Push)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buf.as_ptr()), buf.len() as _).ok() + (::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() } pub unsafe fn Finish_Push(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Finish_Push)(::windows_core::Interface::as_raw(self)).ok() @@ -1040,7 +1040,7 @@ impl AsyncIPipeDouble { (::windows_core::Interface::vtable(self).Finish_Pull)(::windows_core::Interface::as_raw(self), buf, pcreturned).ok() } pub unsafe fn Begin_Push(&self, buf: &[f64]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Begin_Push)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buf.as_ptr()), buf.len() as _).ok() + (::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() } pub unsafe fn Finish_Push(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Finish_Push)(::windows_core::Interface::as_raw(self)).ok() @@ -1073,7 +1073,7 @@ impl AsyncIPipeLong { (::windows_core::Interface::vtable(self).Finish_Pull)(::windows_core::Interface::as_raw(self), buf, pcreturned).ok() } pub unsafe fn Begin_Push(&self, buf: &[i32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Begin_Push)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buf.as_ptr()), buf.len() as _).ok() + (::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() } pub unsafe fn Finish_Push(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Finish_Push)(::windows_core::Interface::as_raw(self)).ok() @@ -1843,10 +1843,10 @@ impl ICatInformation { } pub unsafe fn EnumClassesOfCategories(&self, rgcatidimpl: &[::windows_core::GUID], rgcatidreq: &[::windows_core::GUID]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).EnumClassesOfCategories)(::windows_core::Interface::as_raw(self), rgcatidimpl.len() as _, ::core::mem::transmute(rgcatidimpl.as_ptr()), rgcatidreq.len() as _, ::core::mem::transmute(rgcatidreq.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).EnumClassesOfCategories)(::windows_core::Interface::as_raw(self), rgcatidimpl.len().try_into().unwrap(), ::core::mem::transmute(rgcatidimpl.as_ptr()), rgcatidreq.len().try_into().unwrap(), ::core::mem::transmute(rgcatidreq.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn IsClassOfCategories(&self, rclsid: *const ::windows_core::GUID, rgcatidimpl: &[::windows_core::GUID], rgcatidreq: &[::windows_core::GUID]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).IsClassOfCategories)(::windows_core::Interface::as_raw(self), rclsid, rgcatidimpl.len() as _, ::core::mem::transmute(rgcatidimpl.as_ptr()), rgcatidreq.len() as _, ::core::mem::transmute(rgcatidreq.as_ptr())).ok() + (::windows_core::Interface::vtable(self).IsClassOfCategories)(::windows_core::Interface::as_raw(self), rclsid, rgcatidimpl.len().try_into().unwrap(), ::core::mem::transmute(rgcatidimpl.as_ptr()), rgcatidreq.len().try_into().unwrap(), ::core::mem::transmute(rgcatidreq.as_ptr())).ok() } pub unsafe fn EnumImplCategoriesOfClass(&self, rclsid: *const ::windows_core::GUID) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1880,22 +1880,22 @@ pub struct ICatInformation_Vtbl { pub struct ICatRegister(::windows_core::IUnknown); impl ICatRegister { pub unsafe fn RegisterCategories(&self, rgcategoryinfo: &[CATEGORYINFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).RegisterCategories)(::windows_core::Interface::as_raw(self), rgcategoryinfo.len() as _, ::core::mem::transmute(rgcategoryinfo.as_ptr())).ok() + (::windows_core::Interface::vtable(self).RegisterCategories)(::windows_core::Interface::as_raw(self), rgcategoryinfo.len().try_into().unwrap(), ::core::mem::transmute(rgcategoryinfo.as_ptr())).ok() } pub unsafe fn UnRegisterCategories(&self, rgcatid: &[::windows_core::GUID]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).UnRegisterCategories)(::windows_core::Interface::as_raw(self), rgcatid.len() as _, ::core::mem::transmute(rgcatid.as_ptr())).ok() + (::windows_core::Interface::vtable(self).UnRegisterCategories)(::windows_core::Interface::as_raw(self), rgcatid.len().try_into().unwrap(), ::core::mem::transmute(rgcatid.as_ptr())).ok() } pub unsafe fn RegisterClassImplCategories(&self, rclsid: *const ::windows_core::GUID, rgcatid: &[::windows_core::GUID]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).RegisterClassImplCategories)(::windows_core::Interface::as_raw(self), rclsid, rgcatid.len() as _, ::core::mem::transmute(rgcatid.as_ptr())).ok() + (::windows_core::Interface::vtable(self).RegisterClassImplCategories)(::windows_core::Interface::as_raw(self), rclsid, rgcatid.len().try_into().unwrap(), ::core::mem::transmute(rgcatid.as_ptr())).ok() } pub unsafe fn UnRegisterClassImplCategories(&self, rclsid: *const ::windows_core::GUID, rgcatid: &[::windows_core::GUID]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).UnRegisterClassImplCategories)(::windows_core::Interface::as_raw(self), rclsid, rgcatid.len() as _, ::core::mem::transmute(rgcatid.as_ptr())).ok() + (::windows_core::Interface::vtable(self).UnRegisterClassImplCategories)(::windows_core::Interface::as_raw(self), rclsid, rgcatid.len().try_into().unwrap(), ::core::mem::transmute(rgcatid.as_ptr())).ok() } pub unsafe fn RegisterClassReqCategories(&self, rclsid: *const ::windows_core::GUID, rgcatid: &[::windows_core::GUID]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).RegisterClassReqCategories)(::windows_core::Interface::as_raw(self), rclsid, rgcatid.len() as _, ::core::mem::transmute(rgcatid.as_ptr())).ok() + (::windows_core::Interface::vtable(self).RegisterClassReqCategories)(::windows_core::Interface::as_raw(self), rclsid, rgcatid.len().try_into().unwrap(), ::core::mem::transmute(rgcatid.as_ptr())).ok() } pub unsafe fn UnRegisterClassReqCategories(&self, rclsid: *const ::windows_core::GUID, rgcatid: &[::windows_core::GUID]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).UnRegisterClassReqCategories)(::windows_core::Interface::as_raw(self), rclsid, rgcatid.len() as _, ::core::mem::transmute(rgcatid.as_ptr())).ok() + (::windows_core::Interface::vtable(self).UnRegisterClassReqCategories)(::windows_core::Interface::as_raw(self), rclsid, rgcatid.len().try_into().unwrap(), ::core::mem::transmute(rgcatid.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(ICatRegister, ::windows_core::IUnknown); @@ -2397,7 +2397,7 @@ pub struct IDispatch_Vtbl { pub struct IEnumCATEGORYINFO(::windows_core::IUnknown); impl IEnumCATEGORYINFO { pub unsafe fn Next(&self, rgelt: &mut [CATEGORYINFO], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -2431,7 +2431,7 @@ pub struct IEnumCATEGORYINFO_Vtbl { pub struct IEnumConnectionPoints(::windows_core::IUnknown); impl IEnumConnectionPoints { pub unsafe fn Next(&self, ppcp: &mut [::core::option::Option], pcfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppcp.len() as _, ::core::mem::transmute(ppcp.as_ptr()), pcfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppcp.len().try_into().unwrap(), ::core::mem::transmute(ppcp.as_ptr()), pcfetched).ok() } pub unsafe fn Skip(&self, cconnections: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), cconnections).ok() @@ -2465,7 +2465,7 @@ pub struct IEnumConnectionPoints_Vtbl { pub struct IEnumConnections(::windows_core::IUnknown); impl IEnumConnections { pub unsafe fn Next(&self, rgcd: &mut [CONNECTDATA], pcfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgcd.len() as _, ::core::mem::transmute(rgcd.as_ptr()), pcfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgcd.len().try_into().unwrap(), ::core::mem::transmute(rgcd.as_ptr()), pcfetched).ok() } pub unsafe fn Skip(&self, cconnections: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), cconnections).ok() @@ -2499,7 +2499,7 @@ pub struct IEnumConnections_Vtbl { pub struct IEnumContextProps(::windows_core::IUnknown); impl IEnumContextProps { pub unsafe fn Next(&self, pcontextproperties: &mut [ContextProperty], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), pcontextproperties.len() as _, ::core::mem::transmute(pcontextproperties.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), pcontextproperties.len().try_into().unwrap(), ::core::mem::transmute(pcontextproperties.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -2538,7 +2538,7 @@ pub struct IEnumContextProps_Vtbl { pub struct IEnumFORMATETC(::windows_core::IUnknown); impl IEnumFORMATETC { pub unsafe fn Next(&self, rgelt: &mut [FORMATETC], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -2572,7 +2572,7 @@ pub struct IEnumFORMATETC_Vtbl { pub struct IEnumGUID(::windows_core::IUnknown); impl IEnumGUID { pub unsafe fn Next(&self, rgelt: &mut [::windows_core::GUID], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::HRESULT { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))) + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::HRESULT { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt) @@ -2606,7 +2606,7 @@ pub struct IEnumGUID_Vtbl { pub struct IEnumMoniker(::windows_core::IUnknown); impl IEnumMoniker { pub unsafe fn Next(&self, rgelt: &mut [::core::option::Option], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::HRESULT { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))) + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::HRESULT { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt) @@ -2640,7 +2640,7 @@ pub struct IEnumMoniker_Vtbl { pub struct IEnumSTATDATA(::windows_core::IUnknown); impl IEnumSTATDATA { pub unsafe fn Next(&self, rgelt: &mut [STATDATA], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -2674,7 +2674,7 @@ pub struct IEnumSTATDATA_Vtbl { pub struct IEnumString(::windows_core::IUnknown); impl IEnumString { pub unsafe fn Next(&self, rgelt: &mut [::windows_core::PWSTR], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::HRESULT { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))) + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::HRESULT { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt) @@ -2708,7 +2708,7 @@ pub struct IEnumString_Vtbl { pub struct IEnumUnknown(::windows_core::IUnknown); impl IEnumUnknown { pub unsafe fn Next(&self, rgelt: &mut [::core::option::Option<::windows_core::IUnknown>], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -3375,7 +3375,7 @@ pub struct IMoniker_Vtbl { pub struct IMultiQI(::windows_core::IUnknown); impl IMultiQI { pub unsafe fn QueryMultipleInterfaces(&self, pmqis: &mut [MULTI_QI]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).QueryMultipleInterfaces)(::windows_core::Interface::as_raw(self), pmqis.len() as _, ::core::mem::transmute(pmqis.as_ptr())).ok() + (::windows_core::Interface::vtable(self).QueryMultipleInterfaces)(::windows_core::Interface::as_raw(self), pmqis.len().try_into().unwrap(), ::core::mem::transmute(pmqis.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IMultiQI, ::windows_core::IUnknown); @@ -3565,7 +3565,7 @@ impl IPersistMemory { (::windows_core::Interface::vtable(self).IsDirty)(::windows_core::Interface::as_raw(self)) } pub unsafe fn Load(&self, pmem: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Load)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pmem.as_ptr()), pmem.len() as _).ok() + (::windows_core::Interface::vtable(self).Load)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pmem.as_ptr()), pmem.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3573,7 +3573,7 @@ impl IPersistMemory { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).Save)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pmem.as_ptr()), fcleardirty.into_param().abi(), pmem.len() as _).ok() + (::windows_core::Interface::vtable(self).Save)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pmem.as_ptr()), fcleardirty.into_param().abi(), pmem.len().try_into().unwrap()).ok() } pub unsafe fn GetSizeMax(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -3712,10 +3712,10 @@ pub struct IPersistStreamInit_Vtbl { pub struct IPipeByte(::windows_core::IUnknown); impl IPipeByte { pub unsafe fn Pull(&self, buf: &mut [u8], pcreturned: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Pull)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buf.as_ptr()), buf.len() as _, pcreturned).ok() + (::windows_core::Interface::vtable(self).Pull)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap(), pcreturned).ok() } pub unsafe fn Push(&self, buf: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Push)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buf.as_ptr()), buf.len() as _).ok() + (::windows_core::Interface::vtable(self).Push)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(IPipeByte, ::windows_core::IUnknown); @@ -3737,10 +3737,10 @@ pub struct IPipeByte_Vtbl { pub struct IPipeDouble(::windows_core::IUnknown); impl IPipeDouble { pub unsafe fn Pull(&self, buf: &mut [f64], pcreturned: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Pull)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buf.as_ptr()), buf.len() as _, pcreturned).ok() + (::windows_core::Interface::vtable(self).Pull)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap(), pcreturned).ok() } pub unsafe fn Push(&self, buf: &[f64]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Push)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buf.as_ptr()), buf.len() as _).ok() + (::windows_core::Interface::vtable(self).Push)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(IPipeDouble, ::windows_core::IUnknown); @@ -3762,10 +3762,10 @@ pub struct IPipeDouble_Vtbl { pub struct IPipeLong(::windows_core::IUnknown); impl IPipeLong { pub unsafe fn Pull(&self, buf: &mut [i32], pcreturned: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Pull)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buf.as_ptr()), buf.len() as _, pcreturned).ok() + (::windows_core::Interface::vtable(self).Pull)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap(), pcreturned).ok() } pub unsafe fn Push(&self, buf: &[i32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Push)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buf.as_ptr()), buf.len() as _).ok() + (::windows_core::Interface::vtable(self).Push)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(IPipeLong, ::windows_core::IUnknown); @@ -3863,7 +3863,7 @@ pub struct IProgressNotify_Vtbl { pub struct IROTData(::windows_core::IUnknown); impl IROTData { pub unsafe fn GetComparisonData(&self, pbdata: &mut [u8], pcbdata: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetComparisonData)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbdata.as_ptr()), pbdata.len() as _, pcbdata).ok() + (::windows_core::Interface::vtable(self).GetComparisonData)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), pcbdata).ok() } } ::windows_core::imp::interface_hierarchy!(IROTData, ::windows_core::IUnknown); @@ -4856,7 +4856,7 @@ impl ITypeInfo { (::windows_core::Interface::vtable(self).GetVarDesc)(::windows_core::Interface::as_raw(self), index, &mut result__).from_abi(result__) } pub unsafe fn GetNames(&self, memid: i32, rgbstrnames: &mut [::windows_core::BSTR], pcnames: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNames)(::windows_core::Interface::as_raw(self), memid, ::core::mem::transmute(rgbstrnames.as_ptr()), rgbstrnames.len() as _, pcnames).ok() + (::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).ok() } pub unsafe fn GetRefTypeOfImplType(&self, index: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -4997,7 +4997,7 @@ impl ITypeInfo2 { (::windows_core::Interface::vtable(self).base__.GetVarDesc)(::windows_core::Interface::as_raw(self), index, &mut result__).from_abi(result__) } pub unsafe fn GetNames(&self, memid: i32, rgbstrnames: &mut [::windows_core::BSTR], pcnames: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetNames)(::windows_core::Interface::as_raw(self), memid, ::core::mem::transmute(rgbstrnames.as_ptr()), rgbstrnames.len() as _, pcnames).ok() + (::windows_core::Interface::vtable(self).base__.GetNames)(::windows_core::Interface::as_raw(self), memid, ::core::mem::transmute(rgbstrnames.as_ptr()), rgbstrnames.len().try_into().unwrap(), pcnames).ok() } pub unsafe fn GetRefTypeOfImplType(&self, index: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); 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 fc211b0e75..f9b9fd6b80 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ComponentServices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ComponentServices/mod.rs @@ -1001,10 +1001,10 @@ impl ICOMLBArguments { (::windows_core::Interface::vtable(self).SetCLSID)(::windows_core::Interface::as_raw(self), pclsid).ok() } pub unsafe fn GetMachineName(&self, szservername: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetMachineName)(::windows_core::Interface::as_raw(self), szservername.len() as _, ::core::mem::transmute(szservername.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetMachineName)(::windows_core::Interface::as_raw(self), szservername.len().try_into().unwrap(), ::core::mem::transmute(szservername.as_ptr())).ok() } pub unsafe fn SetMachineName(&self, szservername: &[u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetMachineName)(::windows_core::Interface::as_raw(self), szservername.len() as _, ::core::mem::transmute(szservername.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetMachineName)(::windows_core::Interface::as_raw(self), szservername.len().try_into().unwrap(), ::core::mem::transmute(szservername.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(ICOMLBArguments, ::windows_core::IUnknown); @@ -2075,7 +2075,7 @@ impl IComSecurityEvents { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).OnAuthenticate)(::windows_core::Interface::as_raw(self), pinfo, guidactivity, objectid, guidiid, imeth, psidoriginaluser.len() as _, ::core::mem::transmute(psidoriginaluser.as_ptr()), psidcurrentuser.len() as _, ::core::mem::transmute(psidcurrentuser.as_ptr()), bcurrentuserinpersonatinginproc.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).OnAuthenticate)(::windows_core::Interface::as_raw(self), pinfo, guidactivity, objectid, guidiid, imeth, psidoriginaluser.len().try_into().unwrap(), ::core::mem::transmute(psidoriginaluser.as_ptr()), psidcurrentuser.len().try_into().unwrap(), ::core::mem::transmute(psidcurrentuser.as_ptr()), bcurrentuserinpersonatinginproc.into_param().abi()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2083,7 +2083,7 @@ impl IComSecurityEvents { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).OnAuthenticateFail)(::windows_core::Interface::as_raw(self), pinfo, guidactivity, objectid, guidiid, imeth, psidoriginaluser.len() as _, ::core::mem::transmute(psidoriginaluser.as_ptr()), psidcurrentuser.len() as _, ::core::mem::transmute(psidcurrentuser.as_ptr()), bcurrentuserinpersonatinginproc.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).OnAuthenticateFail)(::windows_core::Interface::as_raw(self), pinfo, guidactivity, objectid, guidiid, imeth, psidoriginaluser.len().try_into().unwrap(), ::core::mem::transmute(psidoriginaluser.as_ptr()), psidcurrentuser.len().try_into().unwrap(), ::core::mem::transmute(psidcurrentuser.as_ptr()), bcurrentuserinpersonatinginproc.into_param().abi()).ok() } } ::windows_core::imp::interface_hierarchy!(IComSecurityEvents, ::windows_core::IUnknown); @@ -3103,7 +3103,7 @@ impl ICrmLogControl { #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] pub unsafe fn WriteLogRecord(&self, rgblob: &[super::Com::BLOB]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).WriteLogRecord)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rgblob.as_ptr()), rgblob.len() as _).ok() + (::windows_core::Interface::vtable(self).WriteLogRecord)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rgblob.as_ptr()), rgblob.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(ICrmLogControl, ::windows_core::IUnknown); 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 df362a398c..0385068453 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Console/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Console/mod.rs @@ -141,12 +141,12 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetConsoleAliasA(source : ::windows_core::PCSTR, targetbuffer : ::windows_core::PSTR, targetbufferlength : u32, exename : ::windows_core::PCSTR) -> u32); - GetConsoleAliasA(source.into_param().abi(), ::core::mem::transmute(targetbuffer.as_ptr()), targetbuffer.len() as _, exename.into_param().abi()) + GetConsoleAliasA(source.into_param().abi(), ::core::mem::transmute(targetbuffer.as_ptr()), targetbuffer.len().try_into().unwrap(), exename.into_param().abi()) } #[inline] pub unsafe fn GetConsoleAliasExesA(exenamebuffer: &mut [u8]) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn GetConsoleAliasExesA(exenamebuffer : ::windows_core::PSTR, exenamebufferlength : u32) -> u32); - GetConsoleAliasExesA(::core::mem::transmute(exenamebuffer.as_ptr()), exenamebuffer.len() as _) + GetConsoleAliasExesA(::core::mem::transmute(exenamebuffer.as_ptr()), exenamebuffer.len().try_into().unwrap()) } #[inline] pub unsafe fn GetConsoleAliasExesLengthA() -> u32 { @@ -161,7 +161,7 @@ pub unsafe fn GetConsoleAliasExesLengthW() -> u32 { #[inline] pub unsafe fn GetConsoleAliasExesW(exenamebuffer: &mut [u16]) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn GetConsoleAliasExesW(exenamebuffer : ::windows_core::PWSTR, exenamebufferlength : u32) -> u32); - GetConsoleAliasExesW(::core::mem::transmute(exenamebuffer.as_ptr()), exenamebuffer.len() as _) + GetConsoleAliasExesW(::core::mem::transmute(exenamebuffer.as_ptr()), exenamebuffer.len().try_into().unwrap()) } #[inline] pub unsafe fn GetConsoleAliasW(source: P0, targetbuffer: &mut [u16], exename: P1) -> u32 @@ -170,7 +170,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetConsoleAliasW(source : ::windows_core::PCWSTR, targetbuffer : ::windows_core::PWSTR, targetbufferlength : u32, exename : ::windows_core::PCWSTR) -> u32); - GetConsoleAliasW(source.into_param().abi(), ::core::mem::transmute(targetbuffer.as_ptr()), targetbuffer.len() as _, exename.into_param().abi()) + GetConsoleAliasW(source.into_param().abi(), ::core::mem::transmute(targetbuffer.as_ptr()), targetbuffer.len().try_into().unwrap(), exename.into_param().abi()) } #[inline] pub unsafe fn GetConsoleAliasesA(aliasbuffer: &mut [u8], exename: P0) -> u32 @@ -178,7 +178,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetConsoleAliasesA(aliasbuffer : ::windows_core::PSTR, aliasbufferlength : u32, exename : ::windows_core::PCSTR) -> u32); - GetConsoleAliasesA(::core::mem::transmute(aliasbuffer.as_ptr()), aliasbuffer.len() as _, exename.into_param().abi()) + GetConsoleAliasesA(::core::mem::transmute(aliasbuffer.as_ptr()), aliasbuffer.len().try_into().unwrap(), exename.into_param().abi()) } #[inline] pub unsafe fn GetConsoleAliasesLengthA(exename: P0) -> u32 @@ -202,7 +202,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetConsoleAliasesW(aliasbuffer : ::windows_core::PWSTR, aliasbufferlength : u32, exename : ::windows_core::PCWSTR) -> u32); - GetConsoleAliasesW(::core::mem::transmute(aliasbuffer.as_ptr()), aliasbuffer.len() as _, exename.into_param().abi()) + GetConsoleAliasesW(::core::mem::transmute(aliasbuffer.as_ptr()), aliasbuffer.len().try_into().unwrap(), exename.into_param().abi()) } #[inline] pub unsafe fn GetConsoleCP() -> u32 { @@ -215,7 +215,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetConsoleCommandHistoryA(commands : ::windows_core::PSTR, commandbufferlength : u32, exename : ::windows_core::PCSTR) -> u32); - GetConsoleCommandHistoryA(::core::mem::transmute(commands.as_ptr()), commands.len() as _, exename.into_param().abi()) + GetConsoleCommandHistoryA(::core::mem::transmute(commands.as_ptr()), commands.len().try_into().unwrap(), exename.into_param().abi()) } #[inline] pub unsafe fn GetConsoleCommandHistoryLengthA(exename: P0) -> u32 @@ -288,12 +288,12 @@ where #[inline] pub unsafe fn GetConsoleOriginalTitleA(lpconsoletitle: &mut [u8]) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn GetConsoleOriginalTitleA(lpconsoletitle : ::windows_core::PSTR, nsize : u32) -> u32); - GetConsoleOriginalTitleA(::core::mem::transmute(lpconsoletitle.as_ptr()), lpconsoletitle.len() as _) + GetConsoleOriginalTitleA(::core::mem::transmute(lpconsoletitle.as_ptr()), lpconsoletitle.len().try_into().unwrap()) } #[inline] pub unsafe fn GetConsoleOriginalTitleW(lpconsoletitle: &mut [u16]) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn GetConsoleOriginalTitleW(lpconsoletitle : ::windows_core::PWSTR, nsize : u32) -> u32); - GetConsoleOriginalTitleW(::core::mem::transmute(lpconsoletitle.as_ptr()), lpconsoletitle.len() as _) + GetConsoleOriginalTitleW(::core::mem::transmute(lpconsoletitle.as_ptr()), lpconsoletitle.len().try_into().unwrap()) } #[inline] pub unsafe fn GetConsoleOutputCP() -> u32 { @@ -303,7 +303,7 @@ pub unsafe fn GetConsoleOutputCP() -> u32 { #[inline] pub unsafe fn GetConsoleProcessList(lpdwprocesslist: &mut [u32]) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn GetConsoleProcessList(lpdwprocesslist : *mut u32, dwprocesscount : u32) -> u32); - GetConsoleProcessList(::core::mem::transmute(lpdwprocesslist.as_ptr()), lpdwprocesslist.len() as _) + GetConsoleProcessList(::core::mem::transmute(lpdwprocesslist.as_ptr()), lpdwprocesslist.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -335,12 +335,12 @@ pub unsafe fn GetConsoleSelectionInfo(lpconsoleselectioninfo: *mut CONSOLE_SELEC #[inline] pub unsafe fn GetConsoleTitleA(lpconsoletitle: &mut [u8]) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn GetConsoleTitleA(lpconsoletitle : ::windows_core::PSTR, nsize : u32) -> u32); - GetConsoleTitleA(::core::mem::transmute(lpconsoletitle.as_ptr()), lpconsoletitle.len() as _) + GetConsoleTitleA(::core::mem::transmute(lpconsoletitle.as_ptr()), lpconsoletitle.len().try_into().unwrap()) } #[inline] pub unsafe fn GetConsoleTitleW(lpconsoletitle: &mut [u16]) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn GetConsoleTitleW(lpconsoletitle : ::windows_core::PWSTR, nsize : u32) -> u32); - GetConsoleTitleW(::core::mem::transmute(lpconsoletitle.as_ptr()), lpconsoletitle.len() as _) + GetConsoleTitleW(::core::mem::transmute(lpconsoletitle.as_ptr()), lpconsoletitle.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -414,7 +414,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn PeekConsoleInputA(hconsoleinput : super::super::Foundation:: HANDLE, lpbuffer : *mut INPUT_RECORD, nlength : u32, lpnumberofeventsread : *mut u32) -> super::super::Foundation:: BOOL); - PeekConsoleInputA(hconsoleinput.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, lpnumberofeventsread).ok() + PeekConsoleInputA(hconsoleinput.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), lpnumberofeventsread).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -424,7 +424,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn PeekConsoleInputW(hconsoleinput : super::super::Foundation:: HANDLE, lpbuffer : *mut INPUT_RECORD, nlength : u32, lpnumberofeventsread : *mut u32) -> super::super::Foundation:: BOOL); - PeekConsoleInputW(hconsoleinput.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, lpnumberofeventsread).ok() + PeekConsoleInputW(hconsoleinput.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), lpnumberofeventsread).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -444,7 +444,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn ReadConsoleInputA(hconsoleinput : super::super::Foundation:: HANDLE, lpbuffer : *mut INPUT_RECORD, nlength : u32, lpnumberofeventsread : *mut u32) -> super::super::Foundation:: BOOL); - ReadConsoleInputA(hconsoleinput.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, lpnumberofeventsread).ok() + ReadConsoleInputA(hconsoleinput.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), lpnumberofeventsread).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -454,7 +454,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn ReadConsoleInputW(hconsoleinput : super::super::Foundation:: HANDLE, lpbuffer : *mut INPUT_RECORD, nlength : u32, lpnumberofeventsread : *mut u32) -> super::super::Foundation:: BOOL); - ReadConsoleInputW(hconsoleinput.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, lpnumberofeventsread).ok() + ReadConsoleInputW(hconsoleinput.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), lpnumberofeventsread).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -474,7 +474,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn ReadConsoleOutputAttribute(hconsoleoutput : super::super::Foundation:: HANDLE, lpattribute : *mut u16, nlength : u32, dwreadcoord : COORD, lpnumberofattrsread : *mut u32) -> super::super::Foundation:: BOOL); - ReadConsoleOutputAttribute(hconsoleoutput.into_param().abi(), ::core::mem::transmute(lpattribute.as_ptr()), lpattribute.len() as _, ::core::mem::transmute(dwreadcoord), lpnumberofattrsread).ok() + ReadConsoleOutputAttribute(hconsoleoutput.into_param().abi(), ::core::mem::transmute(lpattribute.as_ptr()), lpattribute.len().try_into().unwrap(), ::core::mem::transmute(dwreadcoord), lpnumberofattrsread).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -484,7 +484,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn ReadConsoleOutputCharacterA(hconsoleoutput : super::super::Foundation:: HANDLE, lpcharacter : ::windows_core::PSTR, nlength : u32, dwreadcoord : COORD, lpnumberofcharsread : *mut u32) -> super::super::Foundation:: BOOL); - ReadConsoleOutputCharacterA(hconsoleoutput.into_param().abi(), ::core::mem::transmute(lpcharacter.as_ptr()), lpcharacter.len() as _, ::core::mem::transmute(dwreadcoord), lpnumberofcharsread).ok() + ReadConsoleOutputCharacterA(hconsoleoutput.into_param().abi(), ::core::mem::transmute(lpcharacter.as_ptr()), lpcharacter.len().try_into().unwrap(), ::core::mem::transmute(dwreadcoord), lpnumberofcharsread).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -494,7 +494,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn ReadConsoleOutputCharacterW(hconsoleoutput : super::super::Foundation:: HANDLE, lpcharacter : ::windows_core::PWSTR, nlength : u32, dwreadcoord : COORD, lpnumberofcharsread : *mut u32) -> super::super::Foundation:: BOOL); - ReadConsoleOutputCharacterW(hconsoleoutput.into_param().abi(), ::core::mem::transmute(lpcharacter.as_ptr()), lpcharacter.len() as _, ::core::mem::transmute(dwreadcoord), lpnumberofcharsread).ok() + ReadConsoleOutputCharacterW(hconsoleoutput.into_param().abi(), ::core::mem::transmute(lpcharacter.as_ptr()), lpcharacter.len().try_into().unwrap(), ::core::mem::transmute(dwreadcoord), lpnumberofcharsread).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -745,7 +745,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn WriteConsoleA(hconsoleoutput : super::super::Foundation:: HANDLE, lpbuffer : *const ::core::ffi::c_void, nnumberofcharstowrite : u32, lpnumberofcharswritten : *mut u32, lpreserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - WriteConsoleA(hconsoleoutput.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, ::core::mem::transmute(lpnumberofcharswritten.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))).ok() + WriteConsoleA(hconsoleoutput.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), ::core::mem::transmute(lpnumberofcharswritten.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -755,7 +755,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn WriteConsoleInputA(hconsoleinput : super::super::Foundation:: HANDLE, lpbuffer : *const INPUT_RECORD, nlength : u32, lpnumberofeventswritten : *mut u32) -> super::super::Foundation:: BOOL); - WriteConsoleInputA(hconsoleinput.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, lpnumberofeventswritten).ok() + WriteConsoleInputA(hconsoleinput.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), lpnumberofeventswritten).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -765,7 +765,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn WriteConsoleInputW(hconsoleinput : super::super::Foundation:: HANDLE, lpbuffer : *const INPUT_RECORD, nlength : u32, lpnumberofeventswritten : *mut u32) -> super::super::Foundation:: BOOL); - WriteConsoleInputW(hconsoleinput.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, lpnumberofeventswritten).ok() + WriteConsoleInputW(hconsoleinput.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), lpnumberofeventswritten).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -785,7 +785,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn WriteConsoleOutputAttribute(hconsoleoutput : super::super::Foundation:: HANDLE, lpattribute : *const u16, nlength : u32, dwwritecoord : COORD, lpnumberofattrswritten : *mut u32) -> super::super::Foundation:: BOOL); - WriteConsoleOutputAttribute(hconsoleoutput.into_param().abi(), ::core::mem::transmute(lpattribute.as_ptr()), lpattribute.len() as _, ::core::mem::transmute(dwwritecoord), lpnumberofattrswritten).ok() + WriteConsoleOutputAttribute(hconsoleoutput.into_param().abi(), ::core::mem::transmute(lpattribute.as_ptr()), lpattribute.len().try_into().unwrap(), ::core::mem::transmute(dwwritecoord), lpnumberofattrswritten).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -795,7 +795,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn WriteConsoleOutputCharacterA(hconsoleoutput : super::super::Foundation:: HANDLE, lpcharacter : ::windows_core::PCSTR, nlength : u32, dwwritecoord : COORD, lpnumberofcharswritten : *mut u32) -> super::super::Foundation:: BOOL); - WriteConsoleOutputCharacterA(hconsoleoutput.into_param().abi(), ::core::mem::transmute(lpcharacter.as_ptr()), lpcharacter.len() as _, ::core::mem::transmute(dwwritecoord), lpnumberofcharswritten).ok() + WriteConsoleOutputCharacterA(hconsoleoutput.into_param().abi(), ::core::mem::transmute(lpcharacter.as_ptr()), lpcharacter.len().try_into().unwrap(), ::core::mem::transmute(dwwritecoord), lpnumberofcharswritten).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -805,7 +805,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn WriteConsoleOutputCharacterW(hconsoleoutput : super::super::Foundation:: HANDLE, lpcharacter : ::windows_core::PCWSTR, nlength : u32, dwwritecoord : COORD, lpnumberofcharswritten : *mut u32) -> super::super::Foundation:: BOOL); - WriteConsoleOutputCharacterW(hconsoleoutput.into_param().abi(), ::core::mem::transmute(lpcharacter.as_ptr()), lpcharacter.len() as _, ::core::mem::transmute(dwwritecoord), lpnumberofcharswritten).ok() + WriteConsoleOutputCharacterW(hconsoleoutput.into_param().abi(), ::core::mem::transmute(lpcharacter.as_ptr()), lpcharacter.len().try_into().unwrap(), ::core::mem::transmute(dwwritecoord), lpnumberofcharswritten).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -825,7 +825,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn WriteConsoleW(hconsoleoutput : super::super::Foundation:: HANDLE, lpbuffer : *const ::core::ffi::c_void, nnumberofcharstowrite : u32, lpnumberofcharswritten : *mut u32, lpreserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - WriteConsoleW(hconsoleoutput.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, ::core::mem::transmute(lpnumberofcharswritten.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))).ok() + WriteConsoleW(hconsoleoutput.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), ::core::mem::transmute(lpnumberofcharswritten.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))).ok() } 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 3fe05ea680..4a93b777a8 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Contacts/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Contacts/mod.rs @@ -3,10 +3,10 @@ pub struct IContact(::windows_core::IUnknown); impl IContact { pub unsafe fn GetContactID(&self, pszcontactid: &mut [u16], pdwcchcontactidrequired: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetContactID)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszcontactid.as_ptr()), pszcontactid.len() as _, pdwcchcontactidrequired).ok() + (::windows_core::Interface::vtable(self).GetContactID)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszcontactid.as_ptr()), pszcontactid.len().try_into().unwrap(), pdwcchcontactidrequired).ok() } pub unsafe fn GetPath(&self, pszpath: &mut [u16], pdwcchpathrequired: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszpath.as_ptr()), pszpath.len() as _, pdwcchpathrequired).ok() + (::windows_core::Interface::vtable(self).GetPath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszpath.as_ptr()), pszpath.len().try_into().unwrap(), pdwcchpathrequired).ok() } pub unsafe fn CommitChanges(&self, dwcommitflags: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).CommitChanges)(::windows_core::Interface::as_raw(self), dwcommitflags).ok() @@ -976,7 +976,7 @@ impl IContactProperties { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).GetString)(::windows_core::Interface::as_raw(self), pszpropertyname.into_param().abi(), dwflags, ::core::mem::transmute(pszvalue.as_ptr()), pszvalue.len() as _, pdwcchpropertyvaluerequired).ok() + (::windows_core::Interface::vtable(self).GetString)(::windows_core::Interface::as_raw(self), pszpropertyname.into_param().abi(), dwflags, ::core::mem::transmute(pszvalue.as_ptr()), pszvalue.len().try_into().unwrap(), pdwcchpropertyvaluerequired).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -992,13 +992,13 @@ impl IContactProperties { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).GetBinary)(::windows_core::Interface::as_raw(self), pszpropertyname.into_param().abi(), dwflags, ::core::mem::transmute(pszcontenttype.as_ptr()), pszcontenttype.len() as _, pdwcchcontenttyperequired, ::core::mem::transmute(ppstream)).ok() + (::windows_core::Interface::vtable(self).GetBinary)(::windows_core::Interface::as_raw(self), pszpropertyname.into_param().abi(), dwflags, ::core::mem::transmute(pszcontenttype.as_ptr()), pszcontenttype.len().try_into().unwrap(), pdwcchcontenttyperequired, ::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::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).GetLabels)(::windows_core::Interface::as_raw(self), pszarrayelementname.into_param().abi(), dwflags, ::core::mem::transmute(pszlabels.as_ptr()), pszlabels.len() as _, pdwcchlabelsrequired).ok() + (::windows_core::Interface::vtable(self).GetLabels)(::windows_core::Interface::as_raw(self), pszarrayelementname.into_param().abi(), dwflags, ::core::mem::transmute(pszlabels.as_ptr()), pszlabels.len().try_into().unwrap(), pdwcchlabelsrequired).ok() } pub unsafe fn SetString(&self, pszpropertyname: P0, dwflags: u32, pszvalue: P1) -> ::windows_core::Result<()> where @@ -1029,7 +1029,7 @@ impl IContactProperties { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).SetLabels)(::windows_core::Interface::as_raw(self), pszarrayelementname.into_param().abi(), dwflags, ppszlabels.len() as _, ::core::mem::transmute(ppszlabels.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetLabels)(::windows_core::Interface::as_raw(self), pszarrayelementname.into_param().abi(), dwflags, ppszlabels.len().try_into().unwrap(), ::core::mem::transmute(ppszlabels.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1038,7 +1038,7 @@ impl IContactProperties { P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).CreateArrayNode)(::windows_core::Interface::as_raw(self), pszarrayname.into_param().abi(), dwflags, fappend.into_param().abi(), ::core::mem::transmute(psznewarrayelementname.as_ptr()), psznewarrayelementname.len() as _, pdwcchnewarrayelementnamerequired).ok() + (::windows_core::Interface::vtable(self).CreateArrayNode)(::windows_core::Interface::as_raw(self), pszarrayname.into_param().abi(), dwflags, fappend.into_param().abi(), ::core::mem::transmute(psznewarrayelementname.as_ptr()), psznewarrayelementname.len().try_into().unwrap(), pdwcchnewarrayelementnamerequired).ok() } pub unsafe fn DeleteProperty(&self, pszpropertyname: P0, dwflags: u32) -> ::windows_core::Result<()> where @@ -1065,7 +1065,7 @@ impl IContactProperties { P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).GetPropertyCollection)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pppropertycollection), dwflags, pszmultivaluename.into_param().abi(), ppszlabels.len() as _, ::core::mem::transmute(ppszlabels.as_ptr()), fanylabelmatches.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).GetPropertyCollection)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pppropertycollection), dwflags, pszmultivaluename.into_param().abi(), ppszlabels.len().try_into().unwrap(), ::core::mem::transmute(ppszlabels.as_ptr()), fanylabelmatches.into_param().abi()).ok() } } ::windows_core::imp::interface_hierarchy!(IContactProperties, ::windows_core::IUnknown); @@ -1122,7 +1122,7 @@ impl IContactPropertyCollection { (::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<()> { - (::windows_core::Interface::vtable(self).GetPropertyName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszpropertyname.as_ptr()), pszpropertyname.len() as _, pdwcchpropertynamerequired).ok() + (::windows_core::Interface::vtable(self).GetPropertyName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszpropertyname.as_ptr()), pszpropertyname.len().try_into().unwrap(), pdwcchpropertynamerequired).ok() } pub unsafe fn GetPropertyType(&self, pdwtype: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetPropertyType)(::windows_core::Interface::as_raw(self), pdwtype).ok() @@ -1136,7 +1136,7 @@ impl IContactPropertyCollection { (::windows_core::Interface::vtable(self).GetPropertyModificationDate)(::windows_core::Interface::as_raw(self), pftmodificationdate).ok() } pub unsafe fn GetPropertyArrayElementID(&self, pszarrayelementid: &mut [u16], pdwccharrayelementidrequired: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPropertyArrayElementID)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszarrayelementid.as_ptr()), pszarrayelementid.len() as _, pdwccharrayelementidrequired).ok() + (::windows_core::Interface::vtable(self).GetPropertyArrayElementID)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszarrayelementid.as_ptr()), pszarrayelementid.len().try_into().unwrap(), pdwccharrayelementidrequired).ok() } } ::windows_core::imp::interface_hierarchy!(IContactPropertyCollection, ::windows_core::IUnknown); 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 d6871d5785..24b013b3d9 100644 --- a/crates/libs/windows/src/Windows/Win32/System/DataExchange/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/DataExchange/mod.rs @@ -71,7 +71,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn DdeAddData(hdata : HDDEDATA, psrc : *const u8, cb : u32, cboff : u32) -> HDDEDATA); - DdeAddData(hdata.into_param().abi(), ::core::mem::transmute(psrc.as_ptr()), psrc.len() as _, cboff) + DdeAddData(hdata.into_param().abi(), ::core::mem::transmute(psrc.as_ptr()), psrc.len().try_into().unwrap(), cboff) } #[inline] pub unsafe fn DdeClientTransaction(pdata: ::core::option::Option<*const u8>, cbdata: u32, hconv: P0, hszitem: P1, wfmt: u32, wtype: DDE_CLIENT_TRANSACTION_TYPE, dwtimeout: u32, pdwresult: ::core::option::Option<*mut u32>) -> HDDEDATA @@ -120,7 +120,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn DdeCreateDataHandle(idinst : u32, psrc : *const u8, cb : u32, cboff : u32, hszitem : HSZ, wfmt : u32, afcmd : u32) -> HDDEDATA); - DdeCreateDataHandle(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() as _), cboff, hszitem.into_param().abi(), wfmt, afcmd) + 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.into_param().abi(), wfmt, afcmd) } #[inline] pub unsafe fn DdeCreateStringHandleA(idinst: u32, psz: P0, icodepage: i32) -> HSZ @@ -194,7 +194,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn DdeGetData(hdata : HDDEDATA, pdst : *mut u8, cbmax : u32, cboff : u32) -> u32); - DdeGetData(hdata.into_param().abi(), ::core::mem::transmute(pdst.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdst.as_deref().map_or(0, |slice| slice.len() as _), cboff) + DdeGetData(hdata.into_param().abi(), ::core::mem::transmute(pdst.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdst.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), cboff) } #[inline] pub unsafe fn DdeGetLastError(idinst: u32) -> u32 { @@ -276,7 +276,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn DdeQueryStringA(idinst : u32, hsz : HSZ, psz : ::windows_core::PSTR, cchmax : u32, icodepage : i32) -> u32); - DdeQueryStringA(idinst, hsz.into_param().abi(), ::core::mem::transmute(psz.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), psz.as_deref().map_or(0, |slice| slice.len() as _), icodepage) + DdeQueryStringA(idinst, hsz.into_param().abi(), ::core::mem::transmute(psz.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), psz.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), icodepage) } #[inline] pub unsafe fn DdeQueryStringW(idinst: u32, hsz: P0, psz: ::core::option::Option<&mut [u16]>, icodepage: i32) -> u32 @@ -284,7 +284,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn DdeQueryStringW(idinst : u32, hsz : HSZ, psz : ::windows_core::PWSTR, cchmax : u32, icodepage : i32) -> u32); - DdeQueryStringW(idinst, hsz.into_param().abi(), ::core::mem::transmute(psz.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), psz.as_deref().map_or(0, |slice| slice.len() as _), icodepage) + DdeQueryStringW(idinst, hsz.into_param().abi(), ::core::mem::transmute(psz.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), psz.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), icodepage) } #[inline] pub unsafe fn DdeReconnect(hconv: P0) -> HCONV @@ -377,12 +377,12 @@ where #[inline] pub unsafe fn GetAtomNameA(natom: u16, lpbuffer: &mut [u8]) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn GetAtomNameA(natom : u16, lpbuffer : ::windows_core::PSTR, nsize : i32) -> u32); - GetAtomNameA(natom, ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _) + GetAtomNameA(natom, ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap()) } #[inline] pub unsafe fn GetAtomNameW(natom: u16, lpbuffer: &mut [u16]) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn GetAtomNameW(natom : u16, lpbuffer : ::windows_core::PWSTR, nsize : i32) -> u32); - GetAtomNameW(natom, ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _) + GetAtomNameW(natom, ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -395,12 +395,12 @@ pub unsafe fn GetClipboardData(uformat: u32) -> ::windows_core::Result i32 { ::windows_targets::link!("user32.dll" "system" fn GetClipboardFormatNameA(format : u32, lpszformatname : ::windows_core::PSTR, cchmaxcount : i32) -> i32); - GetClipboardFormatNameA(format, ::core::mem::transmute(lpszformatname.as_ptr()), lpszformatname.len() as _) + GetClipboardFormatNameA(format, ::core::mem::transmute(lpszformatname.as_ptr()), lpszformatname.len().try_into().unwrap()) } #[inline] pub unsafe fn GetClipboardFormatNameW(format: u32, lpszformatname: &mut [u16]) -> i32 { ::windows_targets::link!("user32.dll" "system" fn GetClipboardFormatNameW(format : u32, lpszformatname : ::windows_core::PWSTR, cchmaxcount : i32) -> i32); - GetClipboardFormatNameW(format, ::core::mem::transmute(lpszformatname.as_ptr()), lpszformatname.len() as _) + GetClipboardFormatNameW(format, ::core::mem::transmute(lpszformatname.as_ptr()), lpszformatname.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -431,14 +431,14 @@ pub unsafe fn GetOpenClipboardWindow() -> super::super::Foundation::HWND { #[inline] pub unsafe fn GetPriorityClipboardFormat(paformatprioritylist: &[u32]) -> i32 { ::windows_targets::link!("user32.dll" "system" fn GetPriorityClipboardFormat(paformatprioritylist : *const u32, cformats : i32) -> i32); - GetPriorityClipboardFormat(::core::mem::transmute(paformatprioritylist.as_ptr()), paformatprioritylist.len() as _) + GetPriorityClipboardFormat(::core::mem::transmute(paformatprioritylist.as_ptr()), paformatprioritylist.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[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); - GetUpdatedClipboardFormats(::core::mem::transmute(lpuiformats.as_ptr()), lpuiformats.len() as _, pcformatsout).ok() + GetUpdatedClipboardFormats(::core::mem::transmute(lpuiformats.as_ptr()), lpuiformats.len().try_into().unwrap(), pcformatsout).ok() } #[inline] pub unsafe fn GlobalAddAtomA(lpstring: P0) -> u16 @@ -496,12 +496,12 @@ where #[inline] pub unsafe fn GlobalGetAtomNameA(natom: u16, lpbuffer: &mut [u8]) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn GlobalGetAtomNameA(natom : u16, lpbuffer : ::windows_core::PSTR, nsize : i32) -> u32); - GlobalGetAtomNameA(natom, ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _) + GlobalGetAtomNameA(natom, ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap()) } #[inline] pub unsafe fn GlobalGetAtomNameW(natom: u16, lpbuffer: &mut [u16]) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn GlobalGetAtomNameW(natom : u16, lpbuffer : ::windows_core::PWSTR, nsize : i32) -> u32); - GlobalGetAtomNameW(natom, ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _) + GlobalGetAtomNameW(natom, ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -610,7 +610,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn SetWinMetaFileBits(nsize : u32, lpmeta16data : *const u8, hdcref : super::super::Graphics::Gdi:: HDC, lpmfp : *const METAFILEPICT) -> super::super::Graphics::Gdi:: HENHMETAFILE); - SetWinMetaFileBits(lpmeta16data.len() as _, ::core::mem::transmute(lpmeta16data.as_ptr()), hdcref.into_param().abi(), ::core::mem::transmute(lpmfp.unwrap_or(::std::ptr::null()))) + SetWinMetaFileBits(lpmeta16data.len().try_into().unwrap(), ::core::mem::transmute(lpmeta16data.as_ptr()), hdcref.into_param().abi(), ::core::mem::transmute(lpmfp.unwrap_or(::std::ptr::null()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 0ab07fd692..31e4db627c 100644 --- a/crates/libs/windows/src/Windows/Win32/System/DeploymentServices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/DeploymentServices/mod.rs @@ -56,7 +56,7 @@ pub unsafe fn PxeDhcpv6AppendOptionRaw(preply: *mut ::core::ffi::c_void, cbreply #[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); - PxeDhcpv6CreateRelayRepl(::core::mem::transmute(prelaymessages.as_ptr()), prelaymessages.len() as _, ::core::mem::transmute(pinnerpacket.as_ptr()), pinnerpacket.len() as _, preplybuffer, cbreplybuffer, pcbreplybuffer) + PxeDhcpv6CreateRelayRepl(::core::mem::transmute(prelaymessages.as_ptr()), prelaymessages.len().try_into().unwrap(), ::core::mem::transmute(pinnerpacket.as_ptr()), pinnerpacket.len().try_into().unwrap(), preplybuffer, cbreplybuffer, pcbreplybuffer) } #[inline] pub unsafe fn PxeDhcpv6GetOptionValue(ppacket: *const ::core::ffi::c_void, upacketlen: u32, uinstance: u32, woption: u16, pwoptionlen: ::core::option::Option<*mut u16>, ppoptionvalue: ::core::option::Option<*mut *mut ::core::ffi::c_void>) -> u32 { @@ -86,7 +86,7 @@ where #[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); - PxeDhcpv6ParseRelayForw(prelayforwpacket, urelayforwpacketlen, ::core::mem::transmute(prelaymessages.as_ptr()), prelaymessages.len() as _, pnrelaymessages, ppinnerpacket, pcbinnerpacket) + PxeDhcpv6ParseRelayForw(prelayforwpacket, urelayforwpacketlen, ::core::mem::transmute(prelaymessages.as_ptr()), prelaymessages.len().try_into().unwrap(), pnrelaymessages, ppinnerpacket, pcbinnerpacket) } #[inline] pub unsafe fn PxeGetServerInfo(uinfotype: u32, pbuffer: *mut ::core::ffi::c_void, ubufferlen: u32) -> u32 { @@ -360,7 +360,7 @@ where #[inline] pub unsafe fn WdsCliFreeStringArray(ppwszarray: ::core::option::Option<&mut [::windows_core::PWSTR]>) -> ::windows_core::Result<()> { ::windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliFreeStringArray(ppwszarray : *mut ::windows_core::PWSTR, ulcount : u32) -> ::windows_core::HRESULT); - WdsCliFreeStringArray(::core::mem::transmute(ppwszarray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppwszarray.as_deref().map_or(0, |slice| slice.len() as _)).ok() + WdsCliFreeStringArray(::core::mem::transmute(ppwszarray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppwszarray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } #[inline] pub unsafe fn WdsCliGetDriverQueryXml(pwszwindirpath: P0) -> ::windows_core::Result<::windows_core::PWSTR> 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 80d2cc9192..cc2716ccea 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 @@ -215,10 +215,10 @@ impl ICorProfilerCallback { (::windows_core::Interface::vtable(self).ObjectsAllocatedByClass)(::windows_core::Interface::as_raw(self), cclasscount, classids, cobjects).ok() } pub unsafe fn ObjectReferences(&self, objectid: usize, classid: usize, objectrefids: &[usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).ObjectReferences)(::windows_core::Interface::as_raw(self), objectid, classid, objectrefids.len() as _, ::core::mem::transmute(objectrefids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).ObjectReferences)(::windows_core::Interface::as_raw(self), objectid, classid, objectrefids.len().try_into().unwrap(), ::core::mem::transmute(objectrefids.as_ptr())).ok() } pub unsafe fn RootReferences(&self, rootrefids: &[usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).RootReferences)(::windows_core::Interface::as_raw(self), rootrefids.len() as _, ::core::mem::transmute(rootrefids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).RootReferences)(::windows_core::Interface::as_raw(self), rootrefids.len().try_into().unwrap(), ::core::mem::transmute(rootrefids.as_ptr())).ok() } pub unsafe fn ExceptionThrown(&self, thrownobjectid: usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).ExceptionThrown)(::windows_core::Interface::as_raw(self), thrownobjectid).ok() @@ -571,10 +571,10 @@ impl ICorProfilerCallback10 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.ObjectsAllocatedByClass)(::windows_core::Interface::as_raw(self), cclasscount, classids, cobjects).ok() } pub unsafe fn ObjectReferences(&self, objectid: usize, classid: usize, objectrefids: &[usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.ObjectReferences)(::windows_core::Interface::as_raw(self), objectid, classid, objectrefids.len() as _, ::core::mem::transmute(objectrefids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.ObjectReferences)(::windows_core::Interface::as_raw(self), objectid, classid, objectrefids.len().try_into().unwrap(), ::core::mem::transmute(objectrefids.as_ptr())).ok() } pub unsafe fn RootReferences(&self, rootrefids: &[usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.RootReferences)(::windows_core::Interface::as_raw(self), rootrefids.len() as _, ::core::mem::transmute(rootrefids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.RootReferences)(::windows_core::Interface::as_raw(self), rootrefids.len().try_into().unwrap(), ::core::mem::transmute(rootrefids.as_ptr())).ok() } pub unsafe fn ExceptionThrown(&self, thrownobjectid: usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.ExceptionThrown)(::windows_core::Interface::as_raw(self), thrownobjectid).ok() @@ -631,12 +631,12 @@ impl ICorProfilerCallback10 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.ExceptionCLRCatcherExecute)(::windows_core::Interface::as_raw(self)).ok() } pub unsafe fn ThreadNameChanged(&self, threadid: usize, name: ::core::option::Option<&[u16]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.ThreadNameChanged)(::windows_core::Interface::as_raw(self), threadid, name.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(name.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.ThreadNameChanged)(::windows_core::Interface::as_raw(self), threadid, name.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(name.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GarbageCollectionStarted(&self, generationcollected: &[super::super::super::Foundation::BOOL], reason: COR_PRF_GC_REASON) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GarbageCollectionStarted)(::windows_core::Interface::as_raw(self), generationcollected.len() as _, ::core::mem::transmute(generationcollected.as_ptr()), reason).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GarbageCollectionStarted)(::windows_core::Interface::as_raw(self), generationcollected.len().try_into().unwrap(), ::core::mem::transmute(generationcollected.as_ptr()), reason).ok() } pub unsafe fn SurvivingReferences(&self, csurvivingobjectidranges: u32, objectidrangestart: *const usize, cobjectidrangelength: *const u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.SurvivingReferences)(::windows_core::Interface::as_raw(self), csurvivingobjectidranges, objectidrangestart, cobjectidrangelength).ok() @@ -732,7 +732,7 @@ impl ICorProfilerCallback10 { (::windows_core::Interface::vtable(self).base__.DynamicMethodUnloaded)(::windows_core::Interface::as_raw(self), functionid).ok() } pub unsafe fn EventPipeEventDelivered(&self, provider: usize, eventid: u32, eventversion: u32, metadatablob: &[u8], eventdata: &[u8], pactivityid: *const ::windows_core::GUID, prelatedactivityid: *const ::windows_core::GUID, eventthread: usize, numstackframes: u32, stackframes: *const usize) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).EventPipeEventDelivered)(::windows_core::Interface::as_raw(self), provider, eventid, eventversion, metadatablob.len() as _, ::core::mem::transmute(metadatablob.as_ptr()), eventdata.len() as _, ::core::mem::transmute(eventdata.as_ptr()), pactivityid, prelatedactivityid, eventthread, numstackframes, stackframes).ok() + (::windows_core::Interface::vtable(self).EventPipeEventDelivered)(::windows_core::Interface::as_raw(self), provider, eventid, eventversion, metadatablob.len().try_into().unwrap(), ::core::mem::transmute(metadatablob.as_ptr()), eventdata.len().try_into().unwrap(), ::core::mem::transmute(eventdata.as_ptr()), pactivityid, prelatedactivityid, eventthread, numstackframes, stackframes).ok() } pub unsafe fn EventPipeProviderCreated(&self, provider: usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).EventPipeProviderCreated)(::windows_core::Interface::as_raw(self), provider).ok() @@ -943,10 +943,10 @@ impl ICorProfilerCallback11 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.ObjectsAllocatedByClass)(::windows_core::Interface::as_raw(self), cclasscount, classids, cobjects).ok() } pub unsafe fn ObjectReferences(&self, objectid: usize, classid: usize, objectrefids: &[usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.ObjectReferences)(::windows_core::Interface::as_raw(self), objectid, classid, objectrefids.len() as _, ::core::mem::transmute(objectrefids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.ObjectReferences)(::windows_core::Interface::as_raw(self), objectid, classid, objectrefids.len().try_into().unwrap(), ::core::mem::transmute(objectrefids.as_ptr())).ok() } pub unsafe fn RootReferences(&self, rootrefids: &[usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.RootReferences)(::windows_core::Interface::as_raw(self), rootrefids.len() as _, ::core::mem::transmute(rootrefids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.RootReferences)(::windows_core::Interface::as_raw(self), rootrefids.len().try_into().unwrap(), ::core::mem::transmute(rootrefids.as_ptr())).ok() } pub unsafe fn ExceptionThrown(&self, thrownobjectid: usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.ExceptionThrown)(::windows_core::Interface::as_raw(self), thrownobjectid).ok() @@ -1003,12 +1003,12 @@ impl ICorProfilerCallback11 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.ExceptionCLRCatcherExecute)(::windows_core::Interface::as_raw(self)).ok() } pub unsafe fn ThreadNameChanged(&self, threadid: usize, name: ::core::option::Option<&[u16]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.ThreadNameChanged)(::windows_core::Interface::as_raw(self), threadid, name.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(name.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.ThreadNameChanged)(::windows_core::Interface::as_raw(self), threadid, name.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(name.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GarbageCollectionStarted(&self, generationcollected: &[super::super::super::Foundation::BOOL], reason: COR_PRF_GC_REASON) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GarbageCollectionStarted)(::windows_core::Interface::as_raw(self), generationcollected.len() as _, ::core::mem::transmute(generationcollected.as_ptr()), reason).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GarbageCollectionStarted)(::windows_core::Interface::as_raw(self), generationcollected.len().try_into().unwrap(), ::core::mem::transmute(generationcollected.as_ptr()), reason).ok() } pub unsafe fn SurvivingReferences(&self, csurvivingobjectidranges: u32, objectidrangestart: *const usize, cobjectidrangelength: *const u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.SurvivingReferences)(::windows_core::Interface::as_raw(self), csurvivingobjectidranges, objectidrangestart, cobjectidrangelength).ok() @@ -1104,7 +1104,7 @@ impl ICorProfilerCallback11 { (::windows_core::Interface::vtable(self).base__.base__.DynamicMethodUnloaded)(::windows_core::Interface::as_raw(self), functionid).ok() } pub unsafe fn EventPipeEventDelivered(&self, provider: usize, eventid: u32, eventversion: u32, metadatablob: &[u8], eventdata: &[u8], pactivityid: *const ::windows_core::GUID, prelatedactivityid: *const ::windows_core::GUID, eventthread: usize, numstackframes: u32, stackframes: *const usize) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.EventPipeEventDelivered)(::windows_core::Interface::as_raw(self), provider, eventid, eventversion, metadatablob.len() as _, ::core::mem::transmute(metadatablob.as_ptr()), eventdata.len() as _, ::core::mem::transmute(eventdata.as_ptr()), pactivityid, prelatedactivityid, eventthread, numstackframes, stackframes).ok() + (::windows_core::Interface::vtable(self).base__.EventPipeEventDelivered)(::windows_core::Interface::as_raw(self), provider, eventid, eventversion, metadatablob.len().try_into().unwrap(), ::core::mem::transmute(metadatablob.as_ptr()), eventdata.len().try_into().unwrap(), ::core::mem::transmute(eventdata.as_ptr()), pactivityid, prelatedactivityid, eventthread, numstackframes, stackframes).ok() } pub unsafe fn EventPipeProviderCreated(&self, provider: usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.EventPipeProviderCreated)(::windows_core::Interface::as_raw(self), provider).ok() @@ -1322,10 +1322,10 @@ impl ICorProfilerCallback2 { (::windows_core::Interface::vtable(self).base__.ObjectsAllocatedByClass)(::windows_core::Interface::as_raw(self), cclasscount, classids, cobjects).ok() } pub unsafe fn ObjectReferences(&self, objectid: usize, classid: usize, objectrefids: &[usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.ObjectReferences)(::windows_core::Interface::as_raw(self), objectid, classid, objectrefids.len() as _, ::core::mem::transmute(objectrefids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.ObjectReferences)(::windows_core::Interface::as_raw(self), objectid, classid, objectrefids.len().try_into().unwrap(), ::core::mem::transmute(objectrefids.as_ptr())).ok() } pub unsafe fn RootReferences(&self, rootrefids: &[usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.RootReferences)(::windows_core::Interface::as_raw(self), rootrefids.len() as _, ::core::mem::transmute(rootrefids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.RootReferences)(::windows_core::Interface::as_raw(self), rootrefids.len().try_into().unwrap(), ::core::mem::transmute(rootrefids.as_ptr())).ok() } pub unsafe fn ExceptionThrown(&self, thrownobjectid: usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.ExceptionThrown)(::windows_core::Interface::as_raw(self), thrownobjectid).ok() @@ -1382,12 +1382,12 @@ impl ICorProfilerCallback2 { (::windows_core::Interface::vtable(self).base__.ExceptionCLRCatcherExecute)(::windows_core::Interface::as_raw(self)).ok() } pub unsafe fn ThreadNameChanged(&self, threadid: usize, name: ::core::option::Option<&[u16]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).ThreadNameChanged)(::windows_core::Interface::as_raw(self), threadid, name.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(name.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + (::windows_core::Interface::vtable(self).ThreadNameChanged)(::windows_core::Interface::as_raw(self), threadid, name.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(name.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GarbageCollectionStarted(&self, generationcollected: &[super::super::super::Foundation::BOOL], reason: COR_PRF_GC_REASON) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GarbageCollectionStarted)(::windows_core::Interface::as_raw(self), generationcollected.len() as _, ::core::mem::transmute(generationcollected.as_ptr()), reason).ok() + (::windows_core::Interface::vtable(self).GarbageCollectionStarted)(::windows_core::Interface::as_raw(self), generationcollected.len().try_into().unwrap(), ::core::mem::transmute(generationcollected.as_ptr()), reason).ok() } pub unsafe fn SurvivingReferences(&self, csurvivingobjectidranges: u32, objectidrangestart: *const usize, cobjectidrangelength: *const u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).SurvivingReferences)(::windows_core::Interface::as_raw(self), csurvivingobjectidranges, objectidrangestart, cobjectidrangelength).ok() @@ -1622,10 +1622,10 @@ impl ICorProfilerCallback3 { (::windows_core::Interface::vtable(self).base__.base__.ObjectsAllocatedByClass)(::windows_core::Interface::as_raw(self), cclasscount, classids, cobjects).ok() } pub unsafe fn ObjectReferences(&self, objectid: usize, classid: usize, objectrefids: &[usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.ObjectReferences)(::windows_core::Interface::as_raw(self), objectid, classid, objectrefids.len() as _, ::core::mem::transmute(objectrefids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.ObjectReferences)(::windows_core::Interface::as_raw(self), objectid, classid, objectrefids.len().try_into().unwrap(), ::core::mem::transmute(objectrefids.as_ptr())).ok() } pub unsafe fn RootReferences(&self, rootrefids: &[usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.RootReferences)(::windows_core::Interface::as_raw(self), rootrefids.len() as _, ::core::mem::transmute(rootrefids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.RootReferences)(::windows_core::Interface::as_raw(self), rootrefids.len().try_into().unwrap(), ::core::mem::transmute(rootrefids.as_ptr())).ok() } pub unsafe fn ExceptionThrown(&self, thrownobjectid: usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.ExceptionThrown)(::windows_core::Interface::as_raw(self), thrownobjectid).ok() @@ -1682,12 +1682,12 @@ impl ICorProfilerCallback3 { (::windows_core::Interface::vtable(self).base__.base__.ExceptionCLRCatcherExecute)(::windows_core::Interface::as_raw(self)).ok() } pub unsafe fn ThreadNameChanged(&self, threadid: usize, name: ::core::option::Option<&[u16]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.ThreadNameChanged)(::windows_core::Interface::as_raw(self), threadid, name.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(name.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + (::windows_core::Interface::vtable(self).base__.ThreadNameChanged)(::windows_core::Interface::as_raw(self), threadid, name.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(name.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GarbageCollectionStarted(&self, generationcollected: &[super::super::super::Foundation::BOOL], reason: COR_PRF_GC_REASON) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GarbageCollectionStarted)(::windows_core::Interface::as_raw(self), generationcollected.len() as _, ::core::mem::transmute(generationcollected.as_ptr()), reason).ok() + (::windows_core::Interface::vtable(self).base__.GarbageCollectionStarted)(::windows_core::Interface::as_raw(self), generationcollected.len().try_into().unwrap(), ::core::mem::transmute(generationcollected.as_ptr()), reason).ok() } pub unsafe fn SurvivingReferences(&self, csurvivingobjectidranges: u32, objectidrangestart: *const usize, cobjectidrangelength: *const u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.SurvivingReferences)(::windows_core::Interface::as_raw(self), csurvivingobjectidranges, objectidrangestart, cobjectidrangelength).ok() @@ -1926,10 +1926,10 @@ impl ICorProfilerCallback4 { (::windows_core::Interface::vtable(self).base__.base__.base__.ObjectsAllocatedByClass)(::windows_core::Interface::as_raw(self), cclasscount, classids, cobjects).ok() } pub unsafe fn ObjectReferences(&self, objectid: usize, classid: usize, objectrefids: &[usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.ObjectReferences)(::windows_core::Interface::as_raw(self), objectid, classid, objectrefids.len() as _, ::core::mem::transmute(objectrefids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.ObjectReferences)(::windows_core::Interface::as_raw(self), objectid, classid, objectrefids.len().try_into().unwrap(), ::core::mem::transmute(objectrefids.as_ptr())).ok() } pub unsafe fn RootReferences(&self, rootrefids: &[usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.RootReferences)(::windows_core::Interface::as_raw(self), rootrefids.len() as _, ::core::mem::transmute(rootrefids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.RootReferences)(::windows_core::Interface::as_raw(self), rootrefids.len().try_into().unwrap(), ::core::mem::transmute(rootrefids.as_ptr())).ok() } pub unsafe fn ExceptionThrown(&self, thrownobjectid: usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.ExceptionThrown)(::windows_core::Interface::as_raw(self), thrownobjectid).ok() @@ -1986,12 +1986,12 @@ impl ICorProfilerCallback4 { (::windows_core::Interface::vtable(self).base__.base__.base__.ExceptionCLRCatcherExecute)(::windows_core::Interface::as_raw(self)).ok() } pub unsafe fn ThreadNameChanged(&self, threadid: usize, name: ::core::option::Option<&[u16]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.ThreadNameChanged)(::windows_core::Interface::as_raw(self), threadid, name.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(name.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.ThreadNameChanged)(::windows_core::Interface::as_raw(self), threadid, name.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(name.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GarbageCollectionStarted(&self, generationcollected: &[super::super::super::Foundation::BOOL], reason: COR_PRF_GC_REASON) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GarbageCollectionStarted)(::windows_core::Interface::as_raw(self), generationcollected.len() as _, ::core::mem::transmute(generationcollected.as_ptr()), reason).ok() + (::windows_core::Interface::vtable(self).base__.base__.GarbageCollectionStarted)(::windows_core::Interface::as_raw(self), generationcollected.len().try_into().unwrap(), ::core::mem::transmute(generationcollected.as_ptr()), reason).ok() } pub unsafe fn SurvivingReferences(&self, csurvivingobjectidranges: u32, objectidrangestart: *const usize, cobjectidrangelength: *const u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.SurvivingReferences)(::windows_core::Interface::as_raw(self), csurvivingobjectidranges, objectidrangestart, cobjectidrangelength).ok() @@ -2270,10 +2270,10 @@ impl ICorProfilerCallback5 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.ObjectsAllocatedByClass)(::windows_core::Interface::as_raw(self), cclasscount, classids, cobjects).ok() } pub unsafe fn ObjectReferences(&self, objectid: usize, classid: usize, objectrefids: &[usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.ObjectReferences)(::windows_core::Interface::as_raw(self), objectid, classid, objectrefids.len() as _, ::core::mem::transmute(objectrefids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.ObjectReferences)(::windows_core::Interface::as_raw(self), objectid, classid, objectrefids.len().try_into().unwrap(), ::core::mem::transmute(objectrefids.as_ptr())).ok() } pub unsafe fn RootReferences(&self, rootrefids: &[usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.RootReferences)(::windows_core::Interface::as_raw(self), rootrefids.len() as _, ::core::mem::transmute(rootrefids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.RootReferences)(::windows_core::Interface::as_raw(self), rootrefids.len().try_into().unwrap(), ::core::mem::transmute(rootrefids.as_ptr())).ok() } pub unsafe fn ExceptionThrown(&self, thrownobjectid: usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.ExceptionThrown)(::windows_core::Interface::as_raw(self), thrownobjectid).ok() @@ -2330,12 +2330,12 @@ impl ICorProfilerCallback5 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.ExceptionCLRCatcherExecute)(::windows_core::Interface::as_raw(self)).ok() } pub unsafe fn ThreadNameChanged(&self, threadid: usize, name: ::core::option::Option<&[u16]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.ThreadNameChanged)(::windows_core::Interface::as_raw(self), threadid, name.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(name.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.ThreadNameChanged)(::windows_core::Interface::as_raw(self), threadid, name.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(name.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GarbageCollectionStarted(&self, generationcollected: &[super::super::super::Foundation::BOOL], reason: COR_PRF_GC_REASON) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.GarbageCollectionStarted)(::windows_core::Interface::as_raw(self), generationcollected.len() as _, ::core::mem::transmute(generationcollected.as_ptr()), reason).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GarbageCollectionStarted)(::windows_core::Interface::as_raw(self), generationcollected.len().try_into().unwrap(), ::core::mem::transmute(generationcollected.as_ptr()), reason).ok() } pub unsafe fn SurvivingReferences(&self, csurvivingobjectidranges: u32, objectidrangestart: *const usize, cobjectidrangelength: *const u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.SurvivingReferences)(::windows_core::Interface::as_raw(self), csurvivingobjectidranges, objectidrangestart, cobjectidrangelength).ok() @@ -2606,10 +2606,10 @@ impl ICorProfilerCallback6 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.ObjectsAllocatedByClass)(::windows_core::Interface::as_raw(self), cclasscount, classids, cobjects).ok() } pub unsafe fn ObjectReferences(&self, objectid: usize, classid: usize, objectrefids: &[usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.ObjectReferences)(::windows_core::Interface::as_raw(self), objectid, classid, objectrefids.len() as _, ::core::mem::transmute(objectrefids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.ObjectReferences)(::windows_core::Interface::as_raw(self), objectid, classid, objectrefids.len().try_into().unwrap(), ::core::mem::transmute(objectrefids.as_ptr())).ok() } pub unsafe fn RootReferences(&self, rootrefids: &[usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.RootReferences)(::windows_core::Interface::as_raw(self), rootrefids.len() as _, ::core::mem::transmute(rootrefids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.RootReferences)(::windows_core::Interface::as_raw(self), rootrefids.len().try_into().unwrap(), ::core::mem::transmute(rootrefids.as_ptr())).ok() } pub unsafe fn ExceptionThrown(&self, thrownobjectid: usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.ExceptionThrown)(::windows_core::Interface::as_raw(self), thrownobjectid).ok() @@ -2666,12 +2666,12 @@ impl ICorProfilerCallback6 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.ExceptionCLRCatcherExecute)(::windows_core::Interface::as_raw(self)).ok() } pub unsafe fn ThreadNameChanged(&self, threadid: usize, name: ::core::option::Option<&[u16]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.ThreadNameChanged)(::windows_core::Interface::as_raw(self), threadid, name.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(name.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.ThreadNameChanged)(::windows_core::Interface::as_raw(self), threadid, name.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(name.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GarbageCollectionStarted(&self, generationcollected: &[super::super::super::Foundation::BOOL], reason: COR_PRF_GC_REASON) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GarbageCollectionStarted)(::windows_core::Interface::as_raw(self), generationcollected.len() as _, ::core::mem::transmute(generationcollected.as_ptr()), reason).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GarbageCollectionStarted)(::windows_core::Interface::as_raw(self), generationcollected.len().try_into().unwrap(), ::core::mem::transmute(generationcollected.as_ptr()), reason).ok() } pub unsafe fn SurvivingReferences(&self, csurvivingobjectidranges: u32, objectidrangestart: *const usize, cobjectidrangelength: *const u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.SurvivingReferences)(::windows_core::Interface::as_raw(self), csurvivingobjectidranges, objectidrangestart, cobjectidrangelength).ok() @@ -2949,10 +2949,10 @@ impl ICorProfilerCallback7 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.ObjectsAllocatedByClass)(::windows_core::Interface::as_raw(self), cclasscount, classids, cobjects).ok() } pub unsafe fn ObjectReferences(&self, objectid: usize, classid: usize, objectrefids: &[usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.ObjectReferences)(::windows_core::Interface::as_raw(self), objectid, classid, objectrefids.len() as _, ::core::mem::transmute(objectrefids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.ObjectReferences)(::windows_core::Interface::as_raw(self), objectid, classid, objectrefids.len().try_into().unwrap(), ::core::mem::transmute(objectrefids.as_ptr())).ok() } pub unsafe fn RootReferences(&self, rootrefids: &[usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.RootReferences)(::windows_core::Interface::as_raw(self), rootrefids.len() as _, ::core::mem::transmute(rootrefids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.RootReferences)(::windows_core::Interface::as_raw(self), rootrefids.len().try_into().unwrap(), ::core::mem::transmute(rootrefids.as_ptr())).ok() } pub unsafe fn ExceptionThrown(&self, thrownobjectid: usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.ExceptionThrown)(::windows_core::Interface::as_raw(self), thrownobjectid).ok() @@ -3009,12 +3009,12 @@ impl ICorProfilerCallback7 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.ExceptionCLRCatcherExecute)(::windows_core::Interface::as_raw(self)).ok() } pub unsafe fn ThreadNameChanged(&self, threadid: usize, name: ::core::option::Option<&[u16]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.ThreadNameChanged)(::windows_core::Interface::as_raw(self), threadid, name.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(name.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.ThreadNameChanged)(::windows_core::Interface::as_raw(self), threadid, name.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(name.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GarbageCollectionStarted(&self, generationcollected: &[super::super::super::Foundation::BOOL], reason: COR_PRF_GC_REASON) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GarbageCollectionStarted)(::windows_core::Interface::as_raw(self), generationcollected.len() as _, ::core::mem::transmute(generationcollected.as_ptr()), reason).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GarbageCollectionStarted)(::windows_core::Interface::as_raw(self), generationcollected.len().try_into().unwrap(), ::core::mem::transmute(generationcollected.as_ptr()), reason).ok() } pub unsafe fn SurvivingReferences(&self, csurvivingobjectidranges: u32, objectidrangestart: *const usize, cobjectidrangelength: *const u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.SurvivingReferences)(::windows_core::Interface::as_raw(self), csurvivingobjectidranges, objectidrangestart, cobjectidrangelength).ok() @@ -3295,10 +3295,10 @@ impl ICorProfilerCallback8 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.ObjectsAllocatedByClass)(::windows_core::Interface::as_raw(self), cclasscount, classids, cobjects).ok() } pub unsafe fn ObjectReferences(&self, objectid: usize, classid: usize, objectrefids: &[usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.ObjectReferences)(::windows_core::Interface::as_raw(self), objectid, classid, objectrefids.len() as _, ::core::mem::transmute(objectrefids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.ObjectReferences)(::windows_core::Interface::as_raw(self), objectid, classid, objectrefids.len().try_into().unwrap(), ::core::mem::transmute(objectrefids.as_ptr())).ok() } pub unsafe fn RootReferences(&self, rootrefids: &[usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.RootReferences)(::windows_core::Interface::as_raw(self), rootrefids.len() as _, ::core::mem::transmute(rootrefids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.RootReferences)(::windows_core::Interface::as_raw(self), rootrefids.len().try_into().unwrap(), ::core::mem::transmute(rootrefids.as_ptr())).ok() } pub unsafe fn ExceptionThrown(&self, thrownobjectid: usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.ExceptionThrown)(::windows_core::Interface::as_raw(self), thrownobjectid).ok() @@ -3355,12 +3355,12 @@ impl ICorProfilerCallback8 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.ExceptionCLRCatcherExecute)(::windows_core::Interface::as_raw(self)).ok() } pub unsafe fn ThreadNameChanged(&self, threadid: usize, name: ::core::option::Option<&[u16]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.ThreadNameChanged)(::windows_core::Interface::as_raw(self), threadid, name.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(name.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.ThreadNameChanged)(::windows_core::Interface::as_raw(self), threadid, name.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(name.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GarbageCollectionStarted(&self, generationcollected: &[super::super::super::Foundation::BOOL], reason: COR_PRF_GC_REASON) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GarbageCollectionStarted)(::windows_core::Interface::as_raw(self), generationcollected.len() as _, ::core::mem::transmute(generationcollected.as_ptr()), reason).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GarbageCollectionStarted)(::windows_core::Interface::as_raw(self), generationcollected.len().try_into().unwrap(), ::core::mem::transmute(generationcollected.as_ptr()), reason).ok() } pub unsafe fn SurvivingReferences(&self, csurvivingobjectidranges: u32, objectidrangestart: *const usize, cobjectidrangelength: *const u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.SurvivingReferences)(::windows_core::Interface::as_raw(self), csurvivingobjectidranges, objectidrangestart, cobjectidrangelength).ok() @@ -3664,10 +3664,10 @@ impl ICorProfilerCallback9 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.ObjectsAllocatedByClass)(::windows_core::Interface::as_raw(self), cclasscount, classids, cobjects).ok() } pub unsafe fn ObjectReferences(&self, objectid: usize, classid: usize, objectrefids: &[usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.ObjectReferences)(::windows_core::Interface::as_raw(self), objectid, classid, objectrefids.len() as _, ::core::mem::transmute(objectrefids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.ObjectReferences)(::windows_core::Interface::as_raw(self), objectid, classid, objectrefids.len().try_into().unwrap(), ::core::mem::transmute(objectrefids.as_ptr())).ok() } pub unsafe fn RootReferences(&self, rootrefids: &[usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.RootReferences)(::windows_core::Interface::as_raw(self), rootrefids.len() as _, ::core::mem::transmute(rootrefids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.RootReferences)(::windows_core::Interface::as_raw(self), rootrefids.len().try_into().unwrap(), ::core::mem::transmute(rootrefids.as_ptr())).ok() } pub unsafe fn ExceptionThrown(&self, thrownobjectid: usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.ExceptionThrown)(::windows_core::Interface::as_raw(self), thrownobjectid).ok() @@ -3724,12 +3724,12 @@ impl ICorProfilerCallback9 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.ExceptionCLRCatcherExecute)(::windows_core::Interface::as_raw(self)).ok() } pub unsafe fn ThreadNameChanged(&self, threadid: usize, name: ::core::option::Option<&[u16]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.ThreadNameChanged)(::windows_core::Interface::as_raw(self), threadid, name.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(name.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.ThreadNameChanged)(::windows_core::Interface::as_raw(self), threadid, name.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(name.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GarbageCollectionStarted(&self, generationcollected: &[super::super::super::Foundation::BOOL], reason: COR_PRF_GC_REASON) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GarbageCollectionStarted)(::windows_core::Interface::as_raw(self), generationcollected.len() as _, ::core::mem::transmute(generationcollected.as_ptr()), reason).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GarbageCollectionStarted)(::windows_core::Interface::as_raw(self), generationcollected.len().try_into().unwrap(), ::core::mem::transmute(generationcollected.as_ptr()), reason).ok() } pub unsafe fn SurvivingReferences(&self, csurvivingobjectidranges: u32, objectidrangestart: *const usize, cobjectidrangelength: *const u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.SurvivingReferences)(::windows_core::Interface::as_raw(self), csurvivingobjectidranges, objectidrangestart, cobjectidrangelength).ok() @@ -3846,12 +3846,12 @@ impl ICorProfilerFunctionControl { (::windows_core::Interface::vtable(self).SetCodegenFlags)(::windows_core::Interface::as_raw(self), flags).ok() } pub unsafe fn SetILFunctionBody(&self, pbnewilmethodheader: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetILFunctionBody)(::windows_core::Interface::as_raw(self), pbnewilmethodheader.len() as _, ::core::mem::transmute(pbnewilmethodheader.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetILFunctionBody)(::windows_core::Interface::as_raw(self), pbnewilmethodheader.len().try_into().unwrap(), ::core::mem::transmute(pbnewilmethodheader.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetILInstrumentedCodeMap(&self, rgilmapentries: &[COR_IL_MAP]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetILInstrumentedCodeMap)(::windows_core::Interface::as_raw(self), rgilmapentries.len() as _, ::core::mem::transmute(rgilmapentries.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetILInstrumentedCodeMap)(::windows_core::Interface::as_raw(self), rgilmapentries.len().try_into().unwrap(), ::core::mem::transmute(rgilmapentries.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(ICorProfilerFunctionControl, ::windows_core::IUnknown); @@ -3891,7 +3891,7 @@ impl ICorProfilerFunctionEnum { (::windows_core::Interface::vtable(self).GetCount)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn Next(&self, ids: &mut [COR_PRF_FUNCTION], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ids.len() as _, ::core::mem::transmute(ids.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ids.len().try_into().unwrap(), ::core::mem::transmute(ids.as_ptr()), pceltfetched).ok() } } ::windows_core::imp::interface_hierarchy!(ICorProfilerFunctionEnum, ::windows_core::IUnknown); @@ -3982,7 +3982,7 @@ impl ICorProfilerInfo { (::windows_core::Interface::vtable(self).GetTokenAndMetaDataFromFunction)(::windows_core::Interface::as_raw(self), functionid, riid, ::core::mem::transmute(ppimport), ptoken).ok() } pub unsafe fn GetModuleInfo(&self, moduleid: usize, ppbaseloadaddress: *mut *mut u8, pcchname: *mut u32, szname: &mut [u16], passemblyid: *mut usize) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetModuleInfo)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid).ok() + (::windows_core::Interface::vtable(self).GetModuleInfo)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid).ok() } pub unsafe fn GetModuleMetaData(&self, moduleid: usize, dwopenflags: u32, riid: *const ::windows_core::GUID) -> ::windows_core::Result<::windows_core::IUnknown> { let mut result__ = ::std::mem::zeroed(); @@ -3999,10 +3999,10 @@ impl ICorProfilerInfo { (::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<()> { - (::windows_core::Interface::vtable(self).GetAppDomainInfo)(::windows_core::Interface::as_raw(self), appdomainid, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), pprocessid).ok() + (::windows_core::Interface::vtable(self).GetAppDomainInfo)(::windows_core::Interface::as_raw(self), appdomainid, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), pprocessid).ok() } pub unsafe fn GetAssemblyInfo(&self, assemblyid: usize, pcchname: *mut u32, szname: &mut [u16], pappdomainid: *mut usize, pmoduleid: *mut usize) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetAssemblyInfo)(::windows_core::Interface::as_raw(self), assemblyid, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), pappdomainid, pmoduleid).ok() + (::windows_core::Interface::vtable(self).GetAssemblyInfo)(::windows_core::Interface::as_raw(self), assemblyid, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), pappdomainid, pmoduleid).ok() } pub unsafe fn SetFunctionReJIT(&self, functionid: usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).SetFunctionReJIT)(::windows_core::Interface::as_raw(self), functionid).ok() @@ -4016,7 +4016,7 @@ impl ICorProfilerInfo { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).SetILInstrumentedCodeMap)(::windows_core::Interface::as_raw(self), functionid, fstartjit.into_param().abi(), rgilmapentries.len() as _, ::core::mem::transmute(rgilmapentries.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetILInstrumentedCodeMap)(::windows_core::Interface::as_raw(self), functionid, fstartjit.into_param().abi(), rgilmapentries.len().try_into().unwrap(), ::core::mem::transmute(rgilmapentries.as_ptr())).ok() } pub unsafe fn GetInprocInspectionInterface(&self) -> ::windows_core::Result<::windows_core::IUnknown> { let mut result__ = ::std::mem::zeroed(); @@ -4043,7 +4043,7 @@ impl ICorProfilerInfo { (::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<()> { - (::windows_core::Interface::vtable(self).GetILToNativeMapping)(::windows_core::Interface::as_raw(self), functionid, map.len() as _, pcmap, ::core::mem::transmute(map.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetILToNativeMapping)(::windows_core::Interface::as_raw(self), functionid, map.len().try_into().unwrap(), pcmap, ::core::mem::transmute(map.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(ICorProfilerInfo, ::windows_core::IUnknown); @@ -4177,7 +4177,7 @@ impl ICorProfilerInfo10 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetTokenAndMetaDataFromFunction)(::windows_core::Interface::as_raw(self), functionid, riid, ::core::mem::transmute(ppimport), ptoken).ok() } pub unsafe fn GetModuleInfo(&self, moduleid: usize, ppbaseloadaddress: *mut *mut u8, pcchname: *mut u32, szname: &mut [u16], passemblyid: *mut usize) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetModuleInfo)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetModuleInfo)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid).ok() } pub unsafe fn GetModuleMetaData(&self, moduleid: usize, dwopenflags: u32, riid: *const ::windows_core::GUID) -> ::windows_core::Result<::windows_core::IUnknown> { let mut result__ = ::std::mem::zeroed(); @@ -4194,10 +4194,10 @@ impl ICorProfilerInfo10 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetAppDomainInfo)(::windows_core::Interface::as_raw(self), appdomainid, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), pprocessid).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetAppDomainInfo)(::windows_core::Interface::as_raw(self), appdomainid, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), pprocessid).ok() } pub unsafe fn GetAssemblyInfo(&self, assemblyid: usize, pcchname: *mut u32, szname: &mut [u16], pappdomainid: *mut usize, pmoduleid: *mut usize) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetAssemblyInfo)(::windows_core::Interface::as_raw(self), assemblyid, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), pappdomainid, pmoduleid).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetAssemblyInfo)(::windows_core::Interface::as_raw(self), assemblyid, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), pappdomainid, pmoduleid).ok() } pub unsafe fn SetFunctionReJIT(&self, functionid: usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.SetFunctionReJIT)(::windows_core::Interface::as_raw(self), functionid).ok() @@ -4211,7 +4211,7 @@ impl ICorProfilerInfo10 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.SetILInstrumentedCodeMap)(::windows_core::Interface::as_raw(self), functionid, fstartjit.into_param().abi(), rgilmapentries.len() as _, ::core::mem::transmute(rgilmapentries.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.SetILInstrumentedCodeMap)(::windows_core::Interface::as_raw(self), functionid, fstartjit.into_param().abi(), rgilmapentries.len().try_into().unwrap(), ::core::mem::transmute(rgilmapentries.as_ptr())).ok() } pub unsafe fn GetInprocInspectionInterface(&self) -> ::windows_core::Result<::windows_core::IUnknown> { let mut result__ = ::std::mem::zeroed(); @@ -4238,10 +4238,10 @@ impl ICorProfilerInfo10 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetILToNativeMapping)(::windows_core::Interface::as_raw(self), functionid, map.len() as _, pcmap, ::core::mem::transmute(map.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetILToNativeMapping)(::windows_core::Interface::as_raw(self), functionid, map.len().try_into().unwrap(), pcmap, ::core::mem::transmute(map.as_ptr())).ok() } pub unsafe fn DoStackSnapshot(&self, thread: usize, callback: *const StackSnapshotCallback, infoflags: u32, clientdata: *const ::core::ffi::c_void, context: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.DoStackSnapshot)(::windows_core::Interface::as_raw(self), thread, callback, infoflags, clientdata, ::core::mem::transmute(context.as_ptr()), context.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.DoStackSnapshot)(::windows_core::Interface::as_raw(self), thread, callback, infoflags, clientdata, ::core::mem::transmute(context.as_ptr()), context.len().try_into().unwrap()).ok() } pub unsafe fn SetEnterLeaveFunctionHooks2(&self, pfuncenter: *const FunctionEnter2, pfuncleave: *const FunctionLeave2, pfunctailcall: *const FunctionTailcall2) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.SetEnterLeaveFunctionHooks2)(::windows_core::Interface::as_raw(self), pfuncenter, pfuncleave, pfunctailcall).ok() @@ -4261,15 +4261,15 @@ impl ICorProfilerInfo10 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetClassIDInfo2)(::windows_core::Interface::as_raw(self), classid, pmoduleid, ptypedeftoken, pparentclassid, cnumtypeargs, pcnumtypeargs, typeargs).ok() } pub unsafe fn GetCodeInfo2(&self, functionid: usize, pccodeinfos: *mut u32, codeinfos: &mut [COR_PRF_CODE_INFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetCodeInfo2)(::windows_core::Interface::as_raw(self), functionid, codeinfos.len() as _, pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetCodeInfo2)(::windows_core::Interface::as_raw(self), functionid, codeinfos.len().try_into().unwrap(), pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() } pub unsafe fn GetClassFromTokenAndTypeArgs(&self, moduleid: usize, typedef: u32, typeargs: &[usize]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetClassFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, typedef, typeargs.len() as _, ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetClassFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, typedef, typeargs.len().try_into().unwrap(), ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn GetFunctionFromTokenAndTypeArgs(&self, moduleid: usize, funcdef: u32, classid: usize, typeargs: &[usize]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetFunctionFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, funcdef, classid, typeargs.len() as _, ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetFunctionFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, funcdef, classid, typeargs.len().try_into().unwrap(), ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn EnumModuleFrozenObjects(&self, moduleid: usize) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -4303,7 +4303,7 @@ impl ICorProfilerInfo10 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetStaticFieldInfo)(::windows_core::Interface::as_raw(self), classid, fieldtoken, &mut result__).from_abi(result__) } pub unsafe fn GetGenerationBounds(&self, pcobjectranges: *mut u32, ranges: &mut [COR_PRF_GC_GENERATION_RANGE]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetGenerationBounds)(::windows_core::Interface::as_raw(self), ranges.len() as _, pcobjectranges, ::core::mem::transmute(ranges.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetGenerationBounds)(::windows_core::Interface::as_raw(self), ranges.len().try_into().unwrap(), pcobjectranges, ::core::mem::transmute(ranges.as_ptr())).ok() } pub unsafe fn GetObjectGeneration(&self, objectid: usize) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -4349,16 +4349,16 @@ impl ICorProfilerInfo10 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.EnumModules)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } 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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetRuntimeInformation)(::windows_core::Interface::as_raw(self), pclrinstanceid, pruntimetype, pmajorversion, pminorversion, pbuildnumber, pqfeversion, szversionstring.len() as _, pcchversionstring, ::core::mem::transmute(szversionstring.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetRuntimeInformation)(::windows_core::Interface::as_raw(self), pclrinstanceid, pruntimetype, pmajorversion, pminorversion, pbuildnumber, pqfeversion, szversionstring.len().try_into().unwrap(), pcchversionstring, ::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<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetThreadStaticAddress2)(::windows_core::Interface::as_raw(self), classid, fieldtoken, appdomainid, threadid, ppaddress).ok() } pub unsafe fn GetAppDomainsContainingModule(&self, moduleid: usize, pcappdomainids: *mut u32, appdomainids: &mut [usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetAppDomainsContainingModule)(::windows_core::Interface::as_raw(self), moduleid, appdomainids.len() as _, pcappdomainids, ::core::mem::transmute(appdomainids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetAppDomainsContainingModule)(::windows_core::Interface::as_raw(self), moduleid, appdomainids.len().try_into().unwrap(), pcappdomainids, ::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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetModuleInfo2)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid, pdwmoduleflags).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetModuleInfo2)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid, pdwmoduleflags).ok() } pub unsafe fn EnumThreads(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -4374,16 +4374,16 @@ impl ICorProfilerInfo10 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.RequestRevert)(::windows_core::Interface::as_raw(self), cfunctions, moduleids, methodids, status).ok() } pub unsafe fn GetCodeInfo3(&self, functionid: usize, rejitid: usize, pccodeinfos: *mut u32, codeinfos: &mut [COR_PRF_CODE_INFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetCodeInfo3)(::windows_core::Interface::as_raw(self), functionid, rejitid, codeinfos.len() as _, pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetCodeInfo3)(::windows_core::Interface::as_raw(self), functionid, rejitid, codeinfos.len().try_into().unwrap(), pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() } pub unsafe fn GetFunctionFromIP2(&self, ip: *const u8, pfunctionid: *mut usize, prejitid: *mut usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetFunctionFromIP2)(::windows_core::Interface::as_raw(self), ip, pfunctionid, prejitid).ok() } pub unsafe fn GetReJITIDs(&self, functionid: usize, pcrejitids: *mut u32, rejitids: &mut [usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetReJITIDs)(::windows_core::Interface::as_raw(self), functionid, rejitids.len() as _, pcrejitids, ::core::mem::transmute(rejitids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetReJITIDs)(::windows_core::Interface::as_raw(self), functionid, rejitids.len().try_into().unwrap(), pcrejitids, ::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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetILToNativeMapping2)(::windows_core::Interface::as_raw(self), functionid, rejitid, map.len() as _, pcmap, ::core::mem::transmute(map.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetILToNativeMapping2)(::windows_core::Interface::as_raw(self), functionid, rejitid, map.len().try_into().unwrap(), pcmap, ::core::mem::transmute(map.as_ptr())).ok() } pub unsafe fn EnumJITedFunctions2(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -4553,7 +4553,7 @@ impl ICorProfilerInfo11 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetTokenAndMetaDataFromFunction)(::windows_core::Interface::as_raw(self), functionid, riid, ::core::mem::transmute(ppimport), ptoken).ok() } pub unsafe fn GetModuleInfo(&self, moduleid: usize, ppbaseloadaddress: *mut *mut u8, pcchname: *mut u32, szname: &mut [u16], passemblyid: *mut usize) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetModuleInfo)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetModuleInfo)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid).ok() } pub unsafe fn GetModuleMetaData(&self, moduleid: usize, dwopenflags: u32, riid: *const ::windows_core::GUID) -> ::windows_core::Result<::windows_core::IUnknown> { let mut result__ = ::std::mem::zeroed(); @@ -4570,10 +4570,10 @@ impl ICorProfilerInfo11 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetAppDomainInfo)(::windows_core::Interface::as_raw(self), appdomainid, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), pprocessid).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetAppDomainInfo)(::windows_core::Interface::as_raw(self), appdomainid, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), pprocessid).ok() } pub unsafe fn GetAssemblyInfo(&self, assemblyid: usize, pcchname: *mut u32, szname: &mut [u16], pappdomainid: *mut usize, pmoduleid: *mut usize) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetAssemblyInfo)(::windows_core::Interface::as_raw(self), assemblyid, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), pappdomainid, pmoduleid).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetAssemblyInfo)(::windows_core::Interface::as_raw(self), assemblyid, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), pappdomainid, pmoduleid).ok() } pub unsafe fn SetFunctionReJIT(&self, functionid: usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.SetFunctionReJIT)(::windows_core::Interface::as_raw(self), functionid).ok() @@ -4587,7 +4587,7 @@ impl ICorProfilerInfo11 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.SetILInstrumentedCodeMap)(::windows_core::Interface::as_raw(self), functionid, fstartjit.into_param().abi(), rgilmapentries.len() as _, ::core::mem::transmute(rgilmapentries.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.SetILInstrumentedCodeMap)(::windows_core::Interface::as_raw(self), functionid, fstartjit.into_param().abi(), rgilmapentries.len().try_into().unwrap(), ::core::mem::transmute(rgilmapentries.as_ptr())).ok() } pub unsafe fn GetInprocInspectionInterface(&self) -> ::windows_core::Result<::windows_core::IUnknown> { let mut result__ = ::std::mem::zeroed(); @@ -4614,10 +4614,10 @@ impl ICorProfilerInfo11 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetILToNativeMapping)(::windows_core::Interface::as_raw(self), functionid, map.len() as _, pcmap, ::core::mem::transmute(map.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetILToNativeMapping)(::windows_core::Interface::as_raw(self), functionid, map.len().try_into().unwrap(), pcmap, ::core::mem::transmute(map.as_ptr())).ok() } pub unsafe fn DoStackSnapshot(&self, thread: usize, callback: *const StackSnapshotCallback, infoflags: u32, clientdata: *const ::core::ffi::c_void, context: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.DoStackSnapshot)(::windows_core::Interface::as_raw(self), thread, callback, infoflags, clientdata, ::core::mem::transmute(context.as_ptr()), context.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.DoStackSnapshot)(::windows_core::Interface::as_raw(self), thread, callback, infoflags, clientdata, ::core::mem::transmute(context.as_ptr()), context.len().try_into().unwrap()).ok() } pub unsafe fn SetEnterLeaveFunctionHooks2(&self, pfuncenter: *const FunctionEnter2, pfuncleave: *const FunctionLeave2, pfunctailcall: *const FunctionTailcall2) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.SetEnterLeaveFunctionHooks2)(::windows_core::Interface::as_raw(self), pfuncenter, pfuncleave, pfunctailcall).ok() @@ -4637,15 +4637,15 @@ impl ICorProfilerInfo11 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetClassIDInfo2)(::windows_core::Interface::as_raw(self), classid, pmoduleid, ptypedeftoken, pparentclassid, cnumtypeargs, pcnumtypeargs, typeargs).ok() } pub unsafe fn GetCodeInfo2(&self, functionid: usize, pccodeinfos: *mut u32, codeinfos: &mut [COR_PRF_CODE_INFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetCodeInfo2)(::windows_core::Interface::as_raw(self), functionid, codeinfos.len() as _, pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetCodeInfo2)(::windows_core::Interface::as_raw(self), functionid, codeinfos.len().try_into().unwrap(), pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() } pub unsafe fn GetClassFromTokenAndTypeArgs(&self, moduleid: usize, typedef: u32, typeargs: &[usize]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetClassFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, typedef, typeargs.len() as _, ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetClassFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, typedef, typeargs.len().try_into().unwrap(), ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn GetFunctionFromTokenAndTypeArgs(&self, moduleid: usize, funcdef: u32, classid: usize, typeargs: &[usize]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetFunctionFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, funcdef, classid, typeargs.len() as _, ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetFunctionFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, funcdef, classid, typeargs.len().try_into().unwrap(), ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn EnumModuleFrozenObjects(&self, moduleid: usize) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -4679,7 +4679,7 @@ impl ICorProfilerInfo11 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetStaticFieldInfo)(::windows_core::Interface::as_raw(self), classid, fieldtoken, &mut result__).from_abi(result__) } pub unsafe fn GetGenerationBounds(&self, pcobjectranges: *mut u32, ranges: &mut [COR_PRF_GC_GENERATION_RANGE]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetGenerationBounds)(::windows_core::Interface::as_raw(self), ranges.len() as _, pcobjectranges, ::core::mem::transmute(ranges.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetGenerationBounds)(::windows_core::Interface::as_raw(self), ranges.len().try_into().unwrap(), pcobjectranges, ::core::mem::transmute(ranges.as_ptr())).ok() } pub unsafe fn GetObjectGeneration(&self, objectid: usize) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -4725,16 +4725,16 @@ impl ICorProfilerInfo11 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.EnumModules)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } 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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetRuntimeInformation)(::windows_core::Interface::as_raw(self), pclrinstanceid, pruntimetype, pmajorversion, pminorversion, pbuildnumber, pqfeversion, szversionstring.len() as _, pcchversionstring, ::core::mem::transmute(szversionstring.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetRuntimeInformation)(::windows_core::Interface::as_raw(self), pclrinstanceid, pruntimetype, pmajorversion, pminorversion, pbuildnumber, pqfeversion, szversionstring.len().try_into().unwrap(), pcchversionstring, ::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<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetThreadStaticAddress2)(::windows_core::Interface::as_raw(self), classid, fieldtoken, appdomainid, threadid, ppaddress).ok() } pub unsafe fn GetAppDomainsContainingModule(&self, moduleid: usize, pcappdomainids: *mut u32, appdomainids: &mut [usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetAppDomainsContainingModule)(::windows_core::Interface::as_raw(self), moduleid, appdomainids.len() as _, pcappdomainids, ::core::mem::transmute(appdomainids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetAppDomainsContainingModule)(::windows_core::Interface::as_raw(self), moduleid, appdomainids.len().try_into().unwrap(), pcappdomainids, ::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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetModuleInfo2)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid, pdwmoduleflags).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetModuleInfo2)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid, pdwmoduleflags).ok() } pub unsafe fn EnumThreads(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -4750,16 +4750,16 @@ impl ICorProfilerInfo11 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.RequestRevert)(::windows_core::Interface::as_raw(self), cfunctions, moduleids, methodids, status).ok() } pub unsafe fn GetCodeInfo3(&self, functionid: usize, rejitid: usize, pccodeinfos: *mut u32, codeinfos: &mut [COR_PRF_CODE_INFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetCodeInfo3)(::windows_core::Interface::as_raw(self), functionid, rejitid, codeinfos.len() as _, pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetCodeInfo3)(::windows_core::Interface::as_raw(self), functionid, rejitid, codeinfos.len().try_into().unwrap(), pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() } pub unsafe fn GetFunctionFromIP2(&self, ip: *const u8, pfunctionid: *mut usize, prejitid: *mut usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetFunctionFromIP2)(::windows_core::Interface::as_raw(self), ip, pfunctionid, prejitid).ok() } pub unsafe fn GetReJITIDs(&self, functionid: usize, pcrejitids: *mut u32, rejitids: &mut [usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetReJITIDs)(::windows_core::Interface::as_raw(self), functionid, rejitids.len() as _, pcrejitids, ::core::mem::transmute(rejitids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetReJITIDs)(::windows_core::Interface::as_raw(self), functionid, rejitids.len().try_into().unwrap(), pcrejitids, ::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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetILToNativeMapping2)(::windows_core::Interface::as_raw(self), functionid, rejitid, map.len() as _, pcmap, ::core::mem::transmute(map.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetILToNativeMapping2)(::windows_core::Interface::as_raw(self), functionid, rejitid, map.len().try_into().unwrap(), pcmap, ::core::mem::transmute(map.as_ptr())).ok() } pub unsafe fn EnumJITedFunctions2(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -4837,7 +4837,7 @@ impl ICorProfilerInfo11 { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).GetEnvironmentVariableA)(::windows_core::Interface::as_raw(self), szname.into_param().abi(), szvalue.len() as _, pcchvalue, ::core::mem::transmute(szvalue.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetEnvironmentVariableA)(::windows_core::Interface::as_raw(self), szname.into_param().abi(), szvalue.len().try_into().unwrap(), pcchvalue, ::core::mem::transmute(szvalue.as_ptr())).ok() } pub unsafe fn SetEnvironmentVariable(&self, szname: P0, szvalue: P1) -> ::windows_core::Result<()> where @@ -4932,7 +4932,7 @@ impl ICorProfilerInfo12 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetTokenAndMetaDataFromFunction)(::windows_core::Interface::as_raw(self), functionid, riid, ::core::mem::transmute(ppimport), ptoken).ok() } pub unsafe fn GetModuleInfo(&self, moduleid: usize, ppbaseloadaddress: *mut *mut u8, pcchname: *mut u32, szname: &mut [u16], passemblyid: *mut usize) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetModuleInfo)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetModuleInfo)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid).ok() } pub unsafe fn GetModuleMetaData(&self, moduleid: usize, dwopenflags: u32, riid: *const ::windows_core::GUID) -> ::windows_core::Result<::windows_core::IUnknown> { let mut result__ = ::std::mem::zeroed(); @@ -4949,10 +4949,10 @@ impl ICorProfilerInfo12 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetAppDomainInfo)(::windows_core::Interface::as_raw(self), appdomainid, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), pprocessid).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetAppDomainInfo)(::windows_core::Interface::as_raw(self), appdomainid, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), pprocessid).ok() } pub unsafe fn GetAssemblyInfo(&self, assemblyid: usize, pcchname: *mut u32, szname: &mut [u16], pappdomainid: *mut usize, pmoduleid: *mut usize) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetAssemblyInfo)(::windows_core::Interface::as_raw(self), assemblyid, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), pappdomainid, pmoduleid).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetAssemblyInfo)(::windows_core::Interface::as_raw(self), assemblyid, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), pappdomainid, pmoduleid).ok() } pub unsafe fn SetFunctionReJIT(&self, functionid: usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.SetFunctionReJIT)(::windows_core::Interface::as_raw(self), functionid).ok() @@ -4966,7 +4966,7 @@ impl ICorProfilerInfo12 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.SetILInstrumentedCodeMap)(::windows_core::Interface::as_raw(self), functionid, fstartjit.into_param().abi(), rgilmapentries.len() as _, ::core::mem::transmute(rgilmapentries.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.SetILInstrumentedCodeMap)(::windows_core::Interface::as_raw(self), functionid, fstartjit.into_param().abi(), rgilmapentries.len().try_into().unwrap(), ::core::mem::transmute(rgilmapentries.as_ptr())).ok() } pub unsafe fn GetInprocInspectionInterface(&self) -> ::windows_core::Result<::windows_core::IUnknown> { let mut result__ = ::std::mem::zeroed(); @@ -4993,10 +4993,10 @@ impl ICorProfilerInfo12 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetILToNativeMapping)(::windows_core::Interface::as_raw(self), functionid, map.len() as _, pcmap, ::core::mem::transmute(map.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetILToNativeMapping)(::windows_core::Interface::as_raw(self), functionid, map.len().try_into().unwrap(), pcmap, ::core::mem::transmute(map.as_ptr())).ok() } pub unsafe fn DoStackSnapshot(&self, thread: usize, callback: *const StackSnapshotCallback, infoflags: u32, clientdata: *const ::core::ffi::c_void, context: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.DoStackSnapshot)(::windows_core::Interface::as_raw(self), thread, callback, infoflags, clientdata, ::core::mem::transmute(context.as_ptr()), context.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.DoStackSnapshot)(::windows_core::Interface::as_raw(self), thread, callback, infoflags, clientdata, ::core::mem::transmute(context.as_ptr()), context.len().try_into().unwrap()).ok() } pub unsafe fn SetEnterLeaveFunctionHooks2(&self, pfuncenter: *const FunctionEnter2, pfuncleave: *const FunctionLeave2, pfunctailcall: *const FunctionTailcall2) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.SetEnterLeaveFunctionHooks2)(::windows_core::Interface::as_raw(self), pfuncenter, pfuncleave, pfunctailcall).ok() @@ -5016,15 +5016,15 @@ impl ICorProfilerInfo12 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetClassIDInfo2)(::windows_core::Interface::as_raw(self), classid, pmoduleid, ptypedeftoken, pparentclassid, cnumtypeargs, pcnumtypeargs, typeargs).ok() } pub unsafe fn GetCodeInfo2(&self, functionid: usize, pccodeinfos: *mut u32, codeinfos: &mut [COR_PRF_CODE_INFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetCodeInfo2)(::windows_core::Interface::as_raw(self), functionid, codeinfos.len() as _, pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetCodeInfo2)(::windows_core::Interface::as_raw(self), functionid, codeinfos.len().try_into().unwrap(), pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() } pub unsafe fn GetClassFromTokenAndTypeArgs(&self, moduleid: usize, typedef: u32, typeargs: &[usize]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetClassFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, typedef, typeargs.len() as _, ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetClassFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, typedef, typeargs.len().try_into().unwrap(), ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn GetFunctionFromTokenAndTypeArgs(&self, moduleid: usize, funcdef: u32, classid: usize, typeargs: &[usize]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetFunctionFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, funcdef, classid, typeargs.len() as _, ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetFunctionFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, funcdef, classid, typeargs.len().try_into().unwrap(), ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn EnumModuleFrozenObjects(&self, moduleid: usize) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -5058,7 +5058,7 @@ impl ICorProfilerInfo12 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetStaticFieldInfo)(::windows_core::Interface::as_raw(self), classid, fieldtoken, &mut result__).from_abi(result__) } pub unsafe fn GetGenerationBounds(&self, pcobjectranges: *mut u32, ranges: &mut [COR_PRF_GC_GENERATION_RANGE]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetGenerationBounds)(::windows_core::Interface::as_raw(self), ranges.len() as _, pcobjectranges, ::core::mem::transmute(ranges.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetGenerationBounds)(::windows_core::Interface::as_raw(self), ranges.len().try_into().unwrap(), pcobjectranges, ::core::mem::transmute(ranges.as_ptr())).ok() } pub unsafe fn GetObjectGeneration(&self, objectid: usize) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -5104,16 +5104,16 @@ impl ICorProfilerInfo12 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.EnumModules)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } 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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetRuntimeInformation)(::windows_core::Interface::as_raw(self), pclrinstanceid, pruntimetype, pmajorversion, pminorversion, pbuildnumber, pqfeversion, szversionstring.len() as _, pcchversionstring, ::core::mem::transmute(szversionstring.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetRuntimeInformation)(::windows_core::Interface::as_raw(self), pclrinstanceid, pruntimetype, pmajorversion, pminorversion, pbuildnumber, pqfeversion, szversionstring.len().try_into().unwrap(), pcchversionstring, ::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<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetThreadStaticAddress2)(::windows_core::Interface::as_raw(self), classid, fieldtoken, appdomainid, threadid, ppaddress).ok() } pub unsafe fn GetAppDomainsContainingModule(&self, moduleid: usize, pcappdomainids: *mut u32, appdomainids: &mut [usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetAppDomainsContainingModule)(::windows_core::Interface::as_raw(self), moduleid, appdomainids.len() as _, pcappdomainids, ::core::mem::transmute(appdomainids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetAppDomainsContainingModule)(::windows_core::Interface::as_raw(self), moduleid, appdomainids.len().try_into().unwrap(), pcappdomainids, ::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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetModuleInfo2)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid, pdwmoduleflags).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetModuleInfo2)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid, pdwmoduleflags).ok() } pub unsafe fn EnumThreads(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -5129,16 +5129,16 @@ impl ICorProfilerInfo12 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.RequestRevert)(::windows_core::Interface::as_raw(self), cfunctions, moduleids, methodids, status).ok() } pub unsafe fn GetCodeInfo3(&self, functionid: usize, rejitid: usize, pccodeinfos: *mut u32, codeinfos: &mut [COR_PRF_CODE_INFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetCodeInfo3)(::windows_core::Interface::as_raw(self), functionid, rejitid, codeinfos.len() as _, pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetCodeInfo3)(::windows_core::Interface::as_raw(self), functionid, rejitid, codeinfos.len().try_into().unwrap(), pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() } pub unsafe fn GetFunctionFromIP2(&self, ip: *const u8, pfunctionid: *mut usize, prejitid: *mut usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetFunctionFromIP2)(::windows_core::Interface::as_raw(self), ip, pfunctionid, prejitid).ok() } pub unsafe fn GetReJITIDs(&self, functionid: usize, pcrejitids: *mut u32, rejitids: &mut [usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetReJITIDs)(::windows_core::Interface::as_raw(self), functionid, rejitids.len() as _, pcrejitids, ::core::mem::transmute(rejitids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetReJITIDs)(::windows_core::Interface::as_raw(self), functionid, rejitids.len().try_into().unwrap(), pcrejitids, ::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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetILToNativeMapping2)(::windows_core::Interface::as_raw(self), functionid, rejitid, map.len() as _, pcmap, ::core::mem::transmute(map.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetILToNativeMapping2)(::windows_core::Interface::as_raw(self), functionid, rejitid, map.len().try_into().unwrap(), pcmap, ::core::mem::transmute(map.as_ptr())).ok() } pub unsafe fn EnumJITedFunctions2(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -5216,7 +5216,7 @@ impl ICorProfilerInfo12 { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).base__.GetEnvironmentVariableA)(::windows_core::Interface::as_raw(self), szname.into_param().abi(), szvalue.len() as _, pcchvalue, ::core::mem::transmute(szvalue.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.GetEnvironmentVariableA)(::windows_core::Interface::as_raw(self), szname.into_param().abi(), szvalue.len().try_into().unwrap(), pcchvalue, ::core::mem::transmute(szvalue.as_ptr())).ok() } pub unsafe fn SetEnvironmentVariable(&self, szname: P0, szvalue: P1) -> ::windows_core::Result<()> where @@ -5232,7 +5232,7 @@ impl ICorProfilerInfo12 { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).EventPipeStartSession)(::windows_core::Interface::as_raw(self), pproviderconfigs.len() as _, ::core::mem::transmute(pproviderconfigs.as_ptr()), requestrundown.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).EventPipeStartSession)(::windows_core::Interface::as_raw(self), pproviderconfigs.len().try_into().unwrap(), ::core::mem::transmute(pproviderconfigs.as_ptr()), requestrundown.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn EventPipeAddProviderToSession(&self, session: u64, providerconfig: COR_PRF_EVENTPIPE_PROVIDER_CONFIG) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).EventPipeAddProviderToSession)(::windows_core::Interface::as_raw(self), session, ::core::mem::transmute(providerconfig)).ok() @@ -5248,7 +5248,7 @@ impl ICorProfilerInfo12 { (::windows_core::Interface::vtable(self).EventPipeCreateProvider)(::windows_core::Interface::as_raw(self), providername.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn EventPipeGetProviderInfo(&self, provider: usize, pcchname: *mut u32, providername: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).EventPipeGetProviderInfo)(::windows_core::Interface::as_raw(self), provider, providername.len() as _, pcchname, ::core::mem::transmute(providername.as_ptr())).ok() + (::windows_core::Interface::vtable(self).EventPipeGetProviderInfo)(::windows_core::Interface::as_raw(self), provider, providername.len().try_into().unwrap(), pcchname, ::core::mem::transmute(providername.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -5258,10 +5258,10 @@ impl ICorProfilerInfo12 { P1: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).EventPipeDefineEvent)(::windows_core::Interface::as_raw(self), provider, eventname.into_param().abi(), eventid, keywords, eventversion, level, opcode, needstack.into_param().abi(), pparamdescs.len() as _, ::core::mem::transmute(pparamdescs.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).EventPipeDefineEvent)(::windows_core::Interface::as_raw(self), provider, eventname.into_param().abi(), eventid, keywords, eventversion, level, opcode, needstack.into_param().abi(), pparamdescs.len().try_into().unwrap(), ::core::mem::transmute(pparamdescs.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn EventPipeWriteEvent(&self, event: usize, data: &[COR_PRF_EVENT_DATA], pactivityid: *const ::windows_core::GUID, prelatedactivityid: *const ::windows_core::GUID) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).EventPipeWriteEvent)(::windows_core::Interface::as_raw(self), event, data.len() as _, ::core::mem::transmute(data.as_ptr()), pactivityid, prelatedactivityid).ok() + (::windows_core::Interface::vtable(self).EventPipeWriteEvent)(::windows_core::Interface::as_raw(self), event, data.len().try_into().unwrap(), ::core::mem::transmute(data.as_ptr()), pactivityid, prelatedactivityid).ok() } } ::windows_core::imp::interface_hierarchy!(ICorProfilerInfo12, ::windows_core::IUnknown, ICorProfilerInfo, ICorProfilerInfo2, ICorProfilerInfo3, ICorProfilerInfo4, ICorProfilerInfo5, ICorProfilerInfo6, ICorProfilerInfo7, ICorProfilerInfo8, ICorProfilerInfo9, ICorProfilerInfo10, ICorProfilerInfo11); @@ -5360,7 +5360,7 @@ impl ICorProfilerInfo13 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetTokenAndMetaDataFromFunction)(::windows_core::Interface::as_raw(self), functionid, riid, ::core::mem::transmute(ppimport), ptoken).ok() } pub unsafe fn GetModuleInfo(&self, moduleid: usize, ppbaseloadaddress: *mut *mut u8, pcchname: *mut u32, szname: &mut [u16], passemblyid: *mut usize) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetModuleInfo)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetModuleInfo)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid).ok() } pub unsafe fn GetModuleMetaData(&self, moduleid: usize, dwopenflags: u32, riid: *const ::windows_core::GUID) -> ::windows_core::Result<::windows_core::IUnknown> { let mut result__ = ::std::mem::zeroed(); @@ -5377,10 +5377,10 @@ impl ICorProfilerInfo13 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetAppDomainInfo)(::windows_core::Interface::as_raw(self), appdomainid, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), pprocessid).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetAppDomainInfo)(::windows_core::Interface::as_raw(self), appdomainid, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), pprocessid).ok() } pub unsafe fn GetAssemblyInfo(&self, assemblyid: usize, pcchname: *mut u32, szname: &mut [u16], pappdomainid: *mut usize, pmoduleid: *mut usize) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetAssemblyInfo)(::windows_core::Interface::as_raw(self), assemblyid, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), pappdomainid, pmoduleid).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetAssemblyInfo)(::windows_core::Interface::as_raw(self), assemblyid, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), pappdomainid, pmoduleid).ok() } pub unsafe fn SetFunctionReJIT(&self, functionid: usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.SetFunctionReJIT)(::windows_core::Interface::as_raw(self), functionid).ok() @@ -5394,7 +5394,7 @@ impl ICorProfilerInfo13 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.SetILInstrumentedCodeMap)(::windows_core::Interface::as_raw(self), functionid, fstartjit.into_param().abi(), rgilmapentries.len() as _, ::core::mem::transmute(rgilmapentries.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.SetILInstrumentedCodeMap)(::windows_core::Interface::as_raw(self), functionid, fstartjit.into_param().abi(), rgilmapentries.len().try_into().unwrap(), ::core::mem::transmute(rgilmapentries.as_ptr())).ok() } pub unsafe fn GetInprocInspectionInterface(&self) -> ::windows_core::Result<::windows_core::IUnknown> { let mut result__ = ::std::mem::zeroed(); @@ -5421,10 +5421,10 @@ impl ICorProfilerInfo13 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetILToNativeMapping)(::windows_core::Interface::as_raw(self), functionid, map.len() as _, pcmap, ::core::mem::transmute(map.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetILToNativeMapping)(::windows_core::Interface::as_raw(self), functionid, map.len().try_into().unwrap(), pcmap, ::core::mem::transmute(map.as_ptr())).ok() } pub unsafe fn DoStackSnapshot(&self, thread: usize, callback: *const StackSnapshotCallback, infoflags: u32, clientdata: *const ::core::ffi::c_void, context: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.DoStackSnapshot)(::windows_core::Interface::as_raw(self), thread, callback, infoflags, clientdata, ::core::mem::transmute(context.as_ptr()), context.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.DoStackSnapshot)(::windows_core::Interface::as_raw(self), thread, callback, infoflags, clientdata, ::core::mem::transmute(context.as_ptr()), context.len().try_into().unwrap()).ok() } pub unsafe fn SetEnterLeaveFunctionHooks2(&self, pfuncenter: *const FunctionEnter2, pfuncleave: *const FunctionLeave2, pfunctailcall: *const FunctionTailcall2) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.SetEnterLeaveFunctionHooks2)(::windows_core::Interface::as_raw(self), pfuncenter, pfuncleave, pfunctailcall).ok() @@ -5444,15 +5444,15 @@ impl ICorProfilerInfo13 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetClassIDInfo2)(::windows_core::Interface::as_raw(self), classid, pmoduleid, ptypedeftoken, pparentclassid, cnumtypeargs, pcnumtypeargs, typeargs).ok() } pub unsafe fn GetCodeInfo2(&self, functionid: usize, pccodeinfos: *mut u32, codeinfos: &mut [COR_PRF_CODE_INFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetCodeInfo2)(::windows_core::Interface::as_raw(self), functionid, codeinfos.len() as _, pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetCodeInfo2)(::windows_core::Interface::as_raw(self), functionid, codeinfos.len().try_into().unwrap(), pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() } pub unsafe fn GetClassFromTokenAndTypeArgs(&self, moduleid: usize, typedef: u32, typeargs: &[usize]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetClassFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, typedef, typeargs.len() as _, ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetClassFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, typedef, typeargs.len().try_into().unwrap(), ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn GetFunctionFromTokenAndTypeArgs(&self, moduleid: usize, funcdef: u32, classid: usize, typeargs: &[usize]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetFunctionFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, funcdef, classid, typeargs.len() as _, ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetFunctionFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, funcdef, classid, typeargs.len().try_into().unwrap(), ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn EnumModuleFrozenObjects(&self, moduleid: usize) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -5486,7 +5486,7 @@ impl ICorProfilerInfo13 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetStaticFieldInfo)(::windows_core::Interface::as_raw(self), classid, fieldtoken, &mut result__).from_abi(result__) } pub unsafe fn GetGenerationBounds(&self, pcobjectranges: *mut u32, ranges: &mut [COR_PRF_GC_GENERATION_RANGE]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetGenerationBounds)(::windows_core::Interface::as_raw(self), ranges.len() as _, pcobjectranges, ::core::mem::transmute(ranges.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetGenerationBounds)(::windows_core::Interface::as_raw(self), ranges.len().try_into().unwrap(), pcobjectranges, ::core::mem::transmute(ranges.as_ptr())).ok() } pub unsafe fn GetObjectGeneration(&self, objectid: usize) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -5532,16 +5532,16 @@ impl ICorProfilerInfo13 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.EnumModules)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } 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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetRuntimeInformation)(::windows_core::Interface::as_raw(self), pclrinstanceid, pruntimetype, pmajorversion, pminorversion, pbuildnumber, pqfeversion, szversionstring.len() as _, pcchversionstring, ::core::mem::transmute(szversionstring.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetRuntimeInformation)(::windows_core::Interface::as_raw(self), pclrinstanceid, pruntimetype, pmajorversion, pminorversion, pbuildnumber, pqfeversion, szversionstring.len().try_into().unwrap(), pcchversionstring, ::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<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetThreadStaticAddress2)(::windows_core::Interface::as_raw(self), classid, fieldtoken, appdomainid, threadid, ppaddress).ok() } pub unsafe fn GetAppDomainsContainingModule(&self, moduleid: usize, pcappdomainids: *mut u32, appdomainids: &mut [usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetAppDomainsContainingModule)(::windows_core::Interface::as_raw(self), moduleid, appdomainids.len() as _, pcappdomainids, ::core::mem::transmute(appdomainids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetAppDomainsContainingModule)(::windows_core::Interface::as_raw(self), moduleid, appdomainids.len().try_into().unwrap(), pcappdomainids, ::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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetModuleInfo2)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid, pdwmoduleflags).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetModuleInfo2)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid, pdwmoduleflags).ok() } pub unsafe fn EnumThreads(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -5557,16 +5557,16 @@ impl ICorProfilerInfo13 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.RequestRevert)(::windows_core::Interface::as_raw(self), cfunctions, moduleids, methodids, status).ok() } pub unsafe fn GetCodeInfo3(&self, functionid: usize, rejitid: usize, pccodeinfos: *mut u32, codeinfos: &mut [COR_PRF_CODE_INFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetCodeInfo3)(::windows_core::Interface::as_raw(self), functionid, rejitid, codeinfos.len() as _, pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetCodeInfo3)(::windows_core::Interface::as_raw(self), functionid, rejitid, codeinfos.len().try_into().unwrap(), pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() } pub unsafe fn GetFunctionFromIP2(&self, ip: *const u8, pfunctionid: *mut usize, prejitid: *mut usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetFunctionFromIP2)(::windows_core::Interface::as_raw(self), ip, pfunctionid, prejitid).ok() } pub unsafe fn GetReJITIDs(&self, functionid: usize, pcrejitids: *mut u32, rejitids: &mut [usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetReJITIDs)(::windows_core::Interface::as_raw(self), functionid, rejitids.len() as _, pcrejitids, ::core::mem::transmute(rejitids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetReJITIDs)(::windows_core::Interface::as_raw(self), functionid, rejitids.len().try_into().unwrap(), pcrejitids, ::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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetILToNativeMapping2)(::windows_core::Interface::as_raw(self), functionid, rejitid, map.len() as _, pcmap, ::core::mem::transmute(map.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.GetILToNativeMapping2)(::windows_core::Interface::as_raw(self), functionid, rejitid, map.len().try_into().unwrap(), pcmap, ::core::mem::transmute(map.as_ptr())).ok() } pub unsafe fn EnumJITedFunctions2(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -5644,7 +5644,7 @@ impl ICorProfilerInfo13 { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).base__.base__.GetEnvironmentVariableA)(::windows_core::Interface::as_raw(self), szname.into_param().abi(), szvalue.len() as _, pcchvalue, ::core::mem::transmute(szvalue.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetEnvironmentVariableA)(::windows_core::Interface::as_raw(self), szname.into_param().abi(), szvalue.len().try_into().unwrap(), pcchvalue, ::core::mem::transmute(szvalue.as_ptr())).ok() } pub unsafe fn SetEnvironmentVariable(&self, szname: P0, szvalue: P1) -> ::windows_core::Result<()> where @@ -5660,7 +5660,7 @@ impl ICorProfilerInfo13 { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.EventPipeStartSession)(::windows_core::Interface::as_raw(self), pproviderconfigs.len() as _, ::core::mem::transmute(pproviderconfigs.as_ptr()), requestrundown.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.EventPipeStartSession)(::windows_core::Interface::as_raw(self), pproviderconfigs.len().try_into().unwrap(), ::core::mem::transmute(pproviderconfigs.as_ptr()), requestrundown.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn EventPipeAddProviderToSession(&self, session: u64, providerconfig: COR_PRF_EVENTPIPE_PROVIDER_CONFIG) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.EventPipeAddProviderToSession)(::windows_core::Interface::as_raw(self), session, ::core::mem::transmute(providerconfig)).ok() @@ -5676,7 +5676,7 @@ impl ICorProfilerInfo13 { (::windows_core::Interface::vtable(self).base__.EventPipeCreateProvider)(::windows_core::Interface::as_raw(self), providername.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn EventPipeGetProviderInfo(&self, provider: usize, pcchname: *mut u32, providername: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.EventPipeGetProviderInfo)(::windows_core::Interface::as_raw(self), provider, providername.len() as _, pcchname, ::core::mem::transmute(providername.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.EventPipeGetProviderInfo)(::windows_core::Interface::as_raw(self), provider, providername.len().try_into().unwrap(), pcchname, ::core::mem::transmute(providername.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -5686,10 +5686,10 @@ impl ICorProfilerInfo13 { P1: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.EventPipeDefineEvent)(::windows_core::Interface::as_raw(self), provider, eventname.into_param().abi(), eventid, keywords, eventversion, level, opcode, needstack.into_param().abi(), pparamdescs.len() as _, ::core::mem::transmute(pparamdescs.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.EventPipeDefineEvent)(::windows_core::Interface::as_raw(self), provider, eventname.into_param().abi(), eventid, keywords, eventversion, level, opcode, needstack.into_param().abi(), pparamdescs.len().try_into().unwrap(), ::core::mem::transmute(pparamdescs.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn EventPipeWriteEvent(&self, event: usize, data: &[COR_PRF_EVENT_DATA], pactivityid: *const ::windows_core::GUID, prelatedactivityid: *const ::windows_core::GUID) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.EventPipeWriteEvent)(::windows_core::Interface::as_raw(self), event, data.len() as _, ::core::mem::transmute(data.as_ptr()), pactivityid, prelatedactivityid).ok() + (::windows_core::Interface::vtable(self).base__.EventPipeWriteEvent)(::windows_core::Interface::as_raw(self), event, data.len().try_into().unwrap(), ::core::mem::transmute(data.as_ptr()), pactivityid, prelatedactivityid).ok() } pub unsafe fn CreateHandle(&self, object: usize, r#type: COR_PRF_HANDLE_TYPE, phandle: *mut *mut *mut ::core::ffi::c_void) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).CreateHandle)(::windows_core::Interface::as_raw(self), object, r#type, phandle).ok() @@ -5788,7 +5788,7 @@ impl ICorProfilerInfo14 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetTokenAndMetaDataFromFunction)(::windows_core::Interface::as_raw(self), functionid, riid, ::core::mem::transmute(ppimport), ptoken).ok() } pub unsafe fn GetModuleInfo(&self, moduleid: usize, ppbaseloadaddress: *mut *mut u8, pcchname: *mut u32, szname: &mut [u16], passemblyid: *mut usize) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetModuleInfo)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetModuleInfo)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid).ok() } pub unsafe fn GetModuleMetaData(&self, moduleid: usize, dwopenflags: u32, riid: *const ::windows_core::GUID) -> ::windows_core::Result<::windows_core::IUnknown> { let mut result__ = ::std::mem::zeroed(); @@ -5805,10 +5805,10 @@ impl ICorProfilerInfo14 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetAppDomainInfo)(::windows_core::Interface::as_raw(self), appdomainid, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), pprocessid).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetAppDomainInfo)(::windows_core::Interface::as_raw(self), appdomainid, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), pprocessid).ok() } pub unsafe fn GetAssemblyInfo(&self, assemblyid: usize, pcchname: *mut u32, szname: &mut [u16], pappdomainid: *mut usize, pmoduleid: *mut usize) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetAssemblyInfo)(::windows_core::Interface::as_raw(self), assemblyid, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), pappdomainid, pmoduleid).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetAssemblyInfo)(::windows_core::Interface::as_raw(self), assemblyid, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), pappdomainid, pmoduleid).ok() } pub unsafe fn SetFunctionReJIT(&self, functionid: usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.SetFunctionReJIT)(::windows_core::Interface::as_raw(self), functionid).ok() @@ -5822,7 +5822,7 @@ impl ICorProfilerInfo14 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.SetILInstrumentedCodeMap)(::windows_core::Interface::as_raw(self), functionid, fstartjit.into_param().abi(), rgilmapentries.len() as _, ::core::mem::transmute(rgilmapentries.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.SetILInstrumentedCodeMap)(::windows_core::Interface::as_raw(self), functionid, fstartjit.into_param().abi(), rgilmapentries.len().try_into().unwrap(), ::core::mem::transmute(rgilmapentries.as_ptr())).ok() } pub unsafe fn GetInprocInspectionInterface(&self) -> ::windows_core::Result<::windows_core::IUnknown> { let mut result__ = ::std::mem::zeroed(); @@ -5849,10 +5849,10 @@ impl ICorProfilerInfo14 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetILToNativeMapping)(::windows_core::Interface::as_raw(self), functionid, map.len() as _, pcmap, ::core::mem::transmute(map.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetILToNativeMapping)(::windows_core::Interface::as_raw(self), functionid, map.len().try_into().unwrap(), pcmap, ::core::mem::transmute(map.as_ptr())).ok() } pub unsafe fn DoStackSnapshot(&self, thread: usize, callback: *const StackSnapshotCallback, infoflags: u32, clientdata: *const ::core::ffi::c_void, context: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.DoStackSnapshot)(::windows_core::Interface::as_raw(self), thread, callback, infoflags, clientdata, ::core::mem::transmute(context.as_ptr()), context.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.DoStackSnapshot)(::windows_core::Interface::as_raw(self), thread, callback, infoflags, clientdata, ::core::mem::transmute(context.as_ptr()), context.len().try_into().unwrap()).ok() } pub unsafe fn SetEnterLeaveFunctionHooks2(&self, pfuncenter: *const FunctionEnter2, pfuncleave: *const FunctionLeave2, pfunctailcall: *const FunctionTailcall2) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.SetEnterLeaveFunctionHooks2)(::windows_core::Interface::as_raw(self), pfuncenter, pfuncleave, pfunctailcall).ok() @@ -5872,15 +5872,15 @@ impl ICorProfilerInfo14 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetClassIDInfo2)(::windows_core::Interface::as_raw(self), classid, pmoduleid, ptypedeftoken, pparentclassid, cnumtypeargs, pcnumtypeargs, typeargs).ok() } pub unsafe fn GetCodeInfo2(&self, functionid: usize, pccodeinfos: *mut u32, codeinfos: &mut [COR_PRF_CODE_INFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetCodeInfo2)(::windows_core::Interface::as_raw(self), functionid, codeinfos.len() as _, pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetCodeInfo2)(::windows_core::Interface::as_raw(self), functionid, codeinfos.len().try_into().unwrap(), pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() } pub unsafe fn GetClassFromTokenAndTypeArgs(&self, moduleid: usize, typedef: u32, typeargs: &[usize]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetClassFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, typedef, typeargs.len() as _, ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetClassFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, typedef, typeargs.len().try_into().unwrap(), ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn GetFunctionFromTokenAndTypeArgs(&self, moduleid: usize, funcdef: u32, classid: usize, typeargs: &[usize]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetFunctionFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, funcdef, classid, typeargs.len() as _, ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetFunctionFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, funcdef, classid, typeargs.len().try_into().unwrap(), ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn EnumModuleFrozenObjects(&self, moduleid: usize) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -5914,7 +5914,7 @@ impl ICorProfilerInfo14 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetStaticFieldInfo)(::windows_core::Interface::as_raw(self), classid, fieldtoken, &mut result__).from_abi(result__) } pub unsafe fn GetGenerationBounds(&self, pcobjectranges: *mut u32, ranges: &mut [COR_PRF_GC_GENERATION_RANGE]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetGenerationBounds)(::windows_core::Interface::as_raw(self), ranges.len() as _, pcobjectranges, ::core::mem::transmute(ranges.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetGenerationBounds)(::windows_core::Interface::as_raw(self), ranges.len().try_into().unwrap(), pcobjectranges, ::core::mem::transmute(ranges.as_ptr())).ok() } pub unsafe fn GetObjectGeneration(&self, objectid: usize) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -5960,16 +5960,16 @@ impl ICorProfilerInfo14 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.EnumModules)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } 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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetRuntimeInformation)(::windows_core::Interface::as_raw(self), pclrinstanceid, pruntimetype, pmajorversion, pminorversion, pbuildnumber, pqfeversion, szversionstring.len() as _, pcchversionstring, ::core::mem::transmute(szversionstring.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetRuntimeInformation)(::windows_core::Interface::as_raw(self), pclrinstanceid, pruntimetype, pmajorversion, pminorversion, pbuildnumber, pqfeversion, szversionstring.len().try_into().unwrap(), pcchversionstring, ::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<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetThreadStaticAddress2)(::windows_core::Interface::as_raw(self), classid, fieldtoken, appdomainid, threadid, ppaddress).ok() } pub unsafe fn GetAppDomainsContainingModule(&self, moduleid: usize, pcappdomainids: *mut u32, appdomainids: &mut [usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetAppDomainsContainingModule)(::windows_core::Interface::as_raw(self), moduleid, appdomainids.len() as _, pcappdomainids, ::core::mem::transmute(appdomainids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetAppDomainsContainingModule)(::windows_core::Interface::as_raw(self), moduleid, appdomainids.len().try_into().unwrap(), pcappdomainids, ::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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetModuleInfo2)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid, pdwmoduleflags).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetModuleInfo2)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid, pdwmoduleflags).ok() } pub unsafe fn EnumThreads(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -5985,16 +5985,16 @@ impl ICorProfilerInfo14 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.RequestRevert)(::windows_core::Interface::as_raw(self), cfunctions, moduleids, methodids, status).ok() } pub unsafe fn GetCodeInfo3(&self, functionid: usize, rejitid: usize, pccodeinfos: *mut u32, codeinfos: &mut [COR_PRF_CODE_INFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetCodeInfo3)(::windows_core::Interface::as_raw(self), functionid, rejitid, codeinfos.len() as _, pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetCodeInfo3)(::windows_core::Interface::as_raw(self), functionid, rejitid, codeinfos.len().try_into().unwrap(), pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() } pub unsafe fn GetFunctionFromIP2(&self, ip: *const u8, pfunctionid: *mut usize, prejitid: *mut usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetFunctionFromIP2)(::windows_core::Interface::as_raw(self), ip, pfunctionid, prejitid).ok() } pub unsafe fn GetReJITIDs(&self, functionid: usize, pcrejitids: *mut u32, rejitids: &mut [usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetReJITIDs)(::windows_core::Interface::as_raw(self), functionid, rejitids.len() as _, pcrejitids, ::core::mem::transmute(rejitids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetReJITIDs)(::windows_core::Interface::as_raw(self), functionid, rejitids.len().try_into().unwrap(), pcrejitids, ::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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetILToNativeMapping2)(::windows_core::Interface::as_raw(self), functionid, rejitid, map.len() as _, pcmap, ::core::mem::transmute(map.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.base__.base__.GetILToNativeMapping2)(::windows_core::Interface::as_raw(self), functionid, rejitid, map.len().try_into().unwrap(), pcmap, ::core::mem::transmute(map.as_ptr())).ok() } pub unsafe fn EnumJITedFunctions2(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -6072,7 +6072,7 @@ impl ICorProfilerInfo14 { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetEnvironmentVariableA)(::windows_core::Interface::as_raw(self), szname.into_param().abi(), szvalue.len() as _, pcchvalue, ::core::mem::transmute(szvalue.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetEnvironmentVariableA)(::windows_core::Interface::as_raw(self), szname.into_param().abi(), szvalue.len().try_into().unwrap(), pcchvalue, ::core::mem::transmute(szvalue.as_ptr())).ok() } pub unsafe fn SetEnvironmentVariable(&self, szname: P0, szvalue: P1) -> ::windows_core::Result<()> where @@ -6088,7 +6088,7 @@ impl ICorProfilerInfo14 { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.EventPipeStartSession)(::windows_core::Interface::as_raw(self), pproviderconfigs.len() as _, ::core::mem::transmute(pproviderconfigs.as_ptr()), requestrundown.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.EventPipeStartSession)(::windows_core::Interface::as_raw(self), pproviderconfigs.len().try_into().unwrap(), ::core::mem::transmute(pproviderconfigs.as_ptr()), requestrundown.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn EventPipeAddProviderToSession(&self, session: u64, providerconfig: COR_PRF_EVENTPIPE_PROVIDER_CONFIG) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.EventPipeAddProviderToSession)(::windows_core::Interface::as_raw(self), session, ::core::mem::transmute(providerconfig)).ok() @@ -6104,7 +6104,7 @@ impl ICorProfilerInfo14 { (::windows_core::Interface::vtable(self).base__.base__.EventPipeCreateProvider)(::windows_core::Interface::as_raw(self), providername.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn EventPipeGetProviderInfo(&self, provider: usize, pcchname: *mut u32, providername: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.EventPipeGetProviderInfo)(::windows_core::Interface::as_raw(self), provider, providername.len() as _, pcchname, ::core::mem::transmute(providername.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.EventPipeGetProviderInfo)(::windows_core::Interface::as_raw(self), provider, providername.len().try_into().unwrap(), pcchname, ::core::mem::transmute(providername.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -6114,10 +6114,10 @@ impl ICorProfilerInfo14 { P1: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.EventPipeDefineEvent)(::windows_core::Interface::as_raw(self), provider, eventname.into_param().abi(), eventid, keywords, eventversion, level, opcode, needstack.into_param().abi(), pparamdescs.len() as _, ::core::mem::transmute(pparamdescs.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.EventPipeDefineEvent)(::windows_core::Interface::as_raw(self), provider, eventname.into_param().abi(), eventid, keywords, eventversion, level, opcode, needstack.into_param().abi(), pparamdescs.len().try_into().unwrap(), ::core::mem::transmute(pparamdescs.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn EventPipeWriteEvent(&self, event: usize, data: &[COR_PRF_EVENT_DATA], pactivityid: *const ::windows_core::GUID, prelatedactivityid: *const ::windows_core::GUID) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.EventPipeWriteEvent)(::windows_core::Interface::as_raw(self), event, data.len() as _, ::core::mem::transmute(data.as_ptr()), pactivityid, prelatedactivityid).ok() + (::windows_core::Interface::vtable(self).base__.base__.EventPipeWriteEvent)(::windows_core::Interface::as_raw(self), event, data.len().try_into().unwrap(), ::core::mem::transmute(data.as_ptr()), pactivityid, prelatedactivityid).ok() } pub unsafe fn CreateHandle(&self, object: usize, r#type: COR_PRF_HANDLE_TYPE, phandle: *mut *mut *mut ::core::ffi::c_void) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.CreateHandle)(::windows_core::Interface::as_raw(self), object, r#type, phandle).ok() @@ -6134,7 +6134,7 @@ impl ICorProfilerInfo14 { (::windows_core::Interface::vtable(self).EnumerateNonGCObjects)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetNonGCHeapBounds(&self, pcobjectranges: *mut u32, ranges: &mut [COR_PRF_NONGC_HEAP_RANGE]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNonGCHeapBounds)(::windows_core::Interface::as_raw(self), ranges.len() as _, pcobjectranges, ::core::mem::transmute(ranges.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetNonGCHeapBounds)(::windows_core::Interface::as_raw(self), ranges.len().try_into().unwrap(), pcobjectranges, ::core::mem::transmute(ranges.as_ptr())).ok() } pub unsafe fn EventPipeCreateProvider2(&self, providername: P0, pcallback: *const EventPipeProviderCallback) -> ::windows_core::Result where @@ -6230,7 +6230,7 @@ impl ICorProfilerInfo2 { (::windows_core::Interface::vtable(self).base__.GetTokenAndMetaDataFromFunction)(::windows_core::Interface::as_raw(self), functionid, riid, ::core::mem::transmute(ppimport), ptoken).ok() } pub unsafe fn GetModuleInfo(&self, moduleid: usize, ppbaseloadaddress: *mut *mut u8, pcchname: *mut u32, szname: &mut [u16], passemblyid: *mut usize) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetModuleInfo)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid).ok() + (::windows_core::Interface::vtable(self).base__.GetModuleInfo)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid).ok() } pub unsafe fn GetModuleMetaData(&self, moduleid: usize, dwopenflags: u32, riid: *const ::windows_core::GUID) -> ::windows_core::Result<::windows_core::IUnknown> { let mut result__ = ::std::mem::zeroed(); @@ -6247,10 +6247,10 @@ impl ICorProfilerInfo2 { (::windows_core::Interface::vtable(self).base__.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<()> { - (::windows_core::Interface::vtable(self).base__.GetAppDomainInfo)(::windows_core::Interface::as_raw(self), appdomainid, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), pprocessid).ok() + (::windows_core::Interface::vtable(self).base__.GetAppDomainInfo)(::windows_core::Interface::as_raw(self), appdomainid, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), pprocessid).ok() } pub unsafe fn GetAssemblyInfo(&self, assemblyid: usize, pcchname: *mut u32, szname: &mut [u16], pappdomainid: *mut usize, pmoduleid: *mut usize) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetAssemblyInfo)(::windows_core::Interface::as_raw(self), assemblyid, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), pappdomainid, pmoduleid).ok() + (::windows_core::Interface::vtable(self).base__.GetAssemblyInfo)(::windows_core::Interface::as_raw(self), assemblyid, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), pappdomainid, pmoduleid).ok() } pub unsafe fn SetFunctionReJIT(&self, functionid: usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.SetFunctionReJIT)(::windows_core::Interface::as_raw(self), functionid).ok() @@ -6264,7 +6264,7 @@ impl ICorProfilerInfo2 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.SetILInstrumentedCodeMap)(::windows_core::Interface::as_raw(self), functionid, fstartjit.into_param().abi(), rgilmapentries.len() as _, ::core::mem::transmute(rgilmapentries.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.SetILInstrumentedCodeMap)(::windows_core::Interface::as_raw(self), functionid, fstartjit.into_param().abi(), rgilmapentries.len().try_into().unwrap(), ::core::mem::transmute(rgilmapentries.as_ptr())).ok() } pub unsafe fn GetInprocInspectionInterface(&self) -> ::windows_core::Result<::windows_core::IUnknown> { let mut result__ = ::std::mem::zeroed(); @@ -6291,10 +6291,10 @@ impl ICorProfilerInfo2 { (::windows_core::Interface::vtable(self).base__.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<()> { - (::windows_core::Interface::vtable(self).base__.GetILToNativeMapping)(::windows_core::Interface::as_raw(self), functionid, map.len() as _, pcmap, ::core::mem::transmute(map.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.GetILToNativeMapping)(::windows_core::Interface::as_raw(self), functionid, map.len().try_into().unwrap(), pcmap, ::core::mem::transmute(map.as_ptr())).ok() } pub unsafe fn DoStackSnapshot(&self, thread: usize, callback: *const StackSnapshotCallback, infoflags: u32, clientdata: *const ::core::ffi::c_void, context: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).DoStackSnapshot)(::windows_core::Interface::as_raw(self), thread, callback, infoflags, clientdata, ::core::mem::transmute(context.as_ptr()), context.len() as _).ok() + (::windows_core::Interface::vtable(self).DoStackSnapshot)(::windows_core::Interface::as_raw(self), thread, callback, infoflags, clientdata, ::core::mem::transmute(context.as_ptr()), context.len().try_into().unwrap()).ok() } pub unsafe fn SetEnterLeaveFunctionHooks2(&self, pfuncenter: *const FunctionEnter2, pfuncleave: *const FunctionLeave2, pfunctailcall: *const FunctionTailcall2) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).SetEnterLeaveFunctionHooks2)(::windows_core::Interface::as_raw(self), pfuncenter, pfuncleave, pfunctailcall).ok() @@ -6314,15 +6314,15 @@ impl ICorProfilerInfo2 { (::windows_core::Interface::vtable(self).GetClassIDInfo2)(::windows_core::Interface::as_raw(self), classid, pmoduleid, ptypedeftoken, pparentclassid, cnumtypeargs, pcnumtypeargs, typeargs).ok() } pub unsafe fn GetCodeInfo2(&self, functionid: usize, pccodeinfos: *mut u32, codeinfos: &mut [COR_PRF_CODE_INFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetCodeInfo2)(::windows_core::Interface::as_raw(self), functionid, codeinfos.len() as _, pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetCodeInfo2)(::windows_core::Interface::as_raw(self), functionid, codeinfos.len().try_into().unwrap(), pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() } pub unsafe fn GetClassFromTokenAndTypeArgs(&self, moduleid: usize, typedef: u32, typeargs: &[usize]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).GetClassFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, typedef, typeargs.len() as _, ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).GetClassFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, typedef, typeargs.len().try_into().unwrap(), ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn GetFunctionFromTokenAndTypeArgs(&self, moduleid: usize, funcdef: u32, classid: usize, typeargs: &[usize]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).GetFunctionFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, funcdef, classid, typeargs.len() as _, ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).GetFunctionFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, funcdef, classid, typeargs.len().try_into().unwrap(), ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn EnumModuleFrozenObjects(&self, moduleid: usize) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -6356,7 +6356,7 @@ impl ICorProfilerInfo2 { (::windows_core::Interface::vtable(self).GetStaticFieldInfo)(::windows_core::Interface::as_raw(self), classid, fieldtoken, &mut result__).from_abi(result__) } pub unsafe fn GetGenerationBounds(&self, pcobjectranges: *mut u32, ranges: &mut [COR_PRF_GC_GENERATION_RANGE]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetGenerationBounds)(::windows_core::Interface::as_raw(self), ranges.len() as _, pcobjectranges, ::core::mem::transmute(ranges.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetGenerationBounds)(::windows_core::Interface::as_raw(self), ranges.len().try_into().unwrap(), pcobjectranges, ::core::mem::transmute(ranges.as_ptr())).ok() } pub unsafe fn GetObjectGeneration(&self, objectid: usize) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -6474,7 +6474,7 @@ impl ICorProfilerInfo3 { (::windows_core::Interface::vtable(self).base__.base__.GetTokenAndMetaDataFromFunction)(::windows_core::Interface::as_raw(self), functionid, riid, ::core::mem::transmute(ppimport), ptoken).ok() } pub unsafe fn GetModuleInfo(&self, moduleid: usize, ppbaseloadaddress: *mut *mut u8, pcchname: *mut u32, szname: &mut [u16], passemblyid: *mut usize) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetModuleInfo)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetModuleInfo)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid).ok() } pub unsafe fn GetModuleMetaData(&self, moduleid: usize, dwopenflags: u32, riid: *const ::windows_core::GUID) -> ::windows_core::Result<::windows_core::IUnknown> { let mut result__ = ::std::mem::zeroed(); @@ -6491,10 +6491,10 @@ impl ICorProfilerInfo3 { (::windows_core::Interface::vtable(self).base__.base__.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<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetAppDomainInfo)(::windows_core::Interface::as_raw(self), appdomainid, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), pprocessid).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetAppDomainInfo)(::windows_core::Interface::as_raw(self), appdomainid, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), pprocessid).ok() } pub unsafe fn GetAssemblyInfo(&self, assemblyid: usize, pcchname: *mut u32, szname: &mut [u16], pappdomainid: *mut usize, pmoduleid: *mut usize) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetAssemblyInfo)(::windows_core::Interface::as_raw(self), assemblyid, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), pappdomainid, pmoduleid).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetAssemblyInfo)(::windows_core::Interface::as_raw(self), assemblyid, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), pappdomainid, pmoduleid).ok() } pub unsafe fn SetFunctionReJIT(&self, functionid: usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.SetFunctionReJIT)(::windows_core::Interface::as_raw(self), functionid).ok() @@ -6508,7 +6508,7 @@ impl ICorProfilerInfo3 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.SetILInstrumentedCodeMap)(::windows_core::Interface::as_raw(self), functionid, fstartjit.into_param().abi(), rgilmapentries.len() as _, ::core::mem::transmute(rgilmapentries.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.SetILInstrumentedCodeMap)(::windows_core::Interface::as_raw(self), functionid, fstartjit.into_param().abi(), rgilmapentries.len().try_into().unwrap(), ::core::mem::transmute(rgilmapentries.as_ptr())).ok() } pub unsafe fn GetInprocInspectionInterface(&self) -> ::windows_core::Result<::windows_core::IUnknown> { let mut result__ = ::std::mem::zeroed(); @@ -6535,10 +6535,10 @@ impl ICorProfilerInfo3 { (::windows_core::Interface::vtable(self).base__.base__.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<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetILToNativeMapping)(::windows_core::Interface::as_raw(self), functionid, map.len() as _, pcmap, ::core::mem::transmute(map.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetILToNativeMapping)(::windows_core::Interface::as_raw(self), functionid, map.len().try_into().unwrap(), pcmap, ::core::mem::transmute(map.as_ptr())).ok() } pub unsafe fn DoStackSnapshot(&self, thread: usize, callback: *const StackSnapshotCallback, infoflags: u32, clientdata: *const ::core::ffi::c_void, context: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.DoStackSnapshot)(::windows_core::Interface::as_raw(self), thread, callback, infoflags, clientdata, ::core::mem::transmute(context.as_ptr()), context.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.DoStackSnapshot)(::windows_core::Interface::as_raw(self), thread, callback, infoflags, clientdata, ::core::mem::transmute(context.as_ptr()), context.len().try_into().unwrap()).ok() } pub unsafe fn SetEnterLeaveFunctionHooks2(&self, pfuncenter: *const FunctionEnter2, pfuncleave: *const FunctionLeave2, pfunctailcall: *const FunctionTailcall2) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.SetEnterLeaveFunctionHooks2)(::windows_core::Interface::as_raw(self), pfuncenter, pfuncleave, pfunctailcall).ok() @@ -6558,15 +6558,15 @@ impl ICorProfilerInfo3 { (::windows_core::Interface::vtable(self).base__.GetClassIDInfo2)(::windows_core::Interface::as_raw(self), classid, pmoduleid, ptypedeftoken, pparentclassid, cnumtypeargs, pcnumtypeargs, typeargs).ok() } pub unsafe fn GetCodeInfo2(&self, functionid: usize, pccodeinfos: *mut u32, codeinfos: &mut [COR_PRF_CODE_INFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetCodeInfo2)(::windows_core::Interface::as_raw(self), functionid, codeinfos.len() as _, pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.GetCodeInfo2)(::windows_core::Interface::as_raw(self), functionid, codeinfos.len().try_into().unwrap(), pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() } pub unsafe fn GetClassFromTokenAndTypeArgs(&self, moduleid: usize, typedef: u32, typeargs: &[usize]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.GetClassFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, typedef, typeargs.len() as _, ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.GetClassFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, typedef, typeargs.len().try_into().unwrap(), ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn GetFunctionFromTokenAndTypeArgs(&self, moduleid: usize, funcdef: u32, classid: usize, typeargs: &[usize]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.GetFunctionFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, funcdef, classid, typeargs.len() as _, ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.GetFunctionFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, funcdef, classid, typeargs.len().try_into().unwrap(), ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn EnumModuleFrozenObjects(&self, moduleid: usize) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -6600,7 +6600,7 @@ impl ICorProfilerInfo3 { (::windows_core::Interface::vtable(self).base__.GetStaticFieldInfo)(::windows_core::Interface::as_raw(self), classid, fieldtoken, &mut result__).from_abi(result__) } pub unsafe fn GetGenerationBounds(&self, pcobjectranges: *mut u32, ranges: &mut [COR_PRF_GC_GENERATION_RANGE]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetGenerationBounds)(::windows_core::Interface::as_raw(self), ranges.len() as _, pcobjectranges, ::core::mem::transmute(ranges.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.GetGenerationBounds)(::windows_core::Interface::as_raw(self), ranges.len().try_into().unwrap(), pcobjectranges, ::core::mem::transmute(ranges.as_ptr())).ok() } pub unsafe fn GetObjectGeneration(&self, objectid: usize) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -6646,16 +6646,16 @@ impl ICorProfilerInfo3 { (::windows_core::Interface::vtable(self).EnumModules)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } 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<()> { - (::windows_core::Interface::vtable(self).GetRuntimeInformation)(::windows_core::Interface::as_raw(self), pclrinstanceid, pruntimetype, pmajorversion, pminorversion, pbuildnumber, pqfeversion, szversionstring.len() as _, pcchversionstring, ::core::mem::transmute(szversionstring.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetRuntimeInformation)(::windows_core::Interface::as_raw(self), pclrinstanceid, pruntimetype, pmajorversion, pminorversion, pbuildnumber, pqfeversion, szversionstring.len().try_into().unwrap(), pcchversionstring, ::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<()> { (::windows_core::Interface::vtable(self).GetThreadStaticAddress2)(::windows_core::Interface::as_raw(self), classid, fieldtoken, appdomainid, threadid, ppaddress).ok() } pub unsafe fn GetAppDomainsContainingModule(&self, moduleid: usize, pcappdomainids: *mut u32, appdomainids: &mut [usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetAppDomainsContainingModule)(::windows_core::Interface::as_raw(self), moduleid, appdomainids.len() as _, pcappdomainids, ::core::mem::transmute(appdomainids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetAppDomainsContainingModule)(::windows_core::Interface::as_raw(self), moduleid, appdomainids.len().try_into().unwrap(), pcappdomainids, ::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<()> { - (::windows_core::Interface::vtable(self).GetModuleInfo2)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid, pdwmoduleflags).ok() + (::windows_core::Interface::vtable(self).GetModuleInfo2)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid, pdwmoduleflags).ok() } } ::windows_core::imp::interface_hierarchy!(ICorProfilerInfo3, ::windows_core::IUnknown, ICorProfilerInfo, ICorProfilerInfo2); @@ -6758,7 +6758,7 @@ impl ICorProfilerInfo4 { (::windows_core::Interface::vtable(self).base__.base__.base__.GetTokenAndMetaDataFromFunction)(::windows_core::Interface::as_raw(self), functionid, riid, ::core::mem::transmute(ppimport), ptoken).ok() } pub unsafe fn GetModuleInfo(&self, moduleid: usize, ppbaseloadaddress: *mut *mut u8, pcchname: *mut u32, szname: &mut [u16], passemblyid: *mut usize) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetModuleInfo)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetModuleInfo)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid).ok() } pub unsafe fn GetModuleMetaData(&self, moduleid: usize, dwopenflags: u32, riid: *const ::windows_core::GUID) -> ::windows_core::Result<::windows_core::IUnknown> { let mut result__ = ::std::mem::zeroed(); @@ -6775,10 +6775,10 @@ impl ICorProfilerInfo4 { (::windows_core::Interface::vtable(self).base__.base__.base__.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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetAppDomainInfo)(::windows_core::Interface::as_raw(self), appdomainid, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), pprocessid).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetAppDomainInfo)(::windows_core::Interface::as_raw(self), appdomainid, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), pprocessid).ok() } pub unsafe fn GetAssemblyInfo(&self, assemblyid: usize, pcchname: *mut u32, szname: &mut [u16], pappdomainid: *mut usize, pmoduleid: *mut usize) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetAssemblyInfo)(::windows_core::Interface::as_raw(self), assemblyid, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), pappdomainid, pmoduleid).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetAssemblyInfo)(::windows_core::Interface::as_raw(self), assemblyid, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), pappdomainid, pmoduleid).ok() } pub unsafe fn SetFunctionReJIT(&self, functionid: usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.SetFunctionReJIT)(::windows_core::Interface::as_raw(self), functionid).ok() @@ -6792,7 +6792,7 @@ impl ICorProfilerInfo4 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.SetILInstrumentedCodeMap)(::windows_core::Interface::as_raw(self), functionid, fstartjit.into_param().abi(), rgilmapentries.len() as _, ::core::mem::transmute(rgilmapentries.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.SetILInstrumentedCodeMap)(::windows_core::Interface::as_raw(self), functionid, fstartjit.into_param().abi(), rgilmapentries.len().try_into().unwrap(), ::core::mem::transmute(rgilmapentries.as_ptr())).ok() } pub unsafe fn GetInprocInspectionInterface(&self) -> ::windows_core::Result<::windows_core::IUnknown> { let mut result__ = ::std::mem::zeroed(); @@ -6819,10 +6819,10 @@ impl ICorProfilerInfo4 { (::windows_core::Interface::vtable(self).base__.base__.base__.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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetILToNativeMapping)(::windows_core::Interface::as_raw(self), functionid, map.len() as _, pcmap, ::core::mem::transmute(map.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetILToNativeMapping)(::windows_core::Interface::as_raw(self), functionid, map.len().try_into().unwrap(), pcmap, ::core::mem::transmute(map.as_ptr())).ok() } pub unsafe fn DoStackSnapshot(&self, thread: usize, callback: *const StackSnapshotCallback, infoflags: u32, clientdata: *const ::core::ffi::c_void, context: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.DoStackSnapshot)(::windows_core::Interface::as_raw(self), thread, callback, infoflags, clientdata, ::core::mem::transmute(context.as_ptr()), context.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.DoStackSnapshot)(::windows_core::Interface::as_raw(self), thread, callback, infoflags, clientdata, ::core::mem::transmute(context.as_ptr()), context.len().try_into().unwrap()).ok() } pub unsafe fn SetEnterLeaveFunctionHooks2(&self, pfuncenter: *const FunctionEnter2, pfuncleave: *const FunctionLeave2, pfunctailcall: *const FunctionTailcall2) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.SetEnterLeaveFunctionHooks2)(::windows_core::Interface::as_raw(self), pfuncenter, pfuncleave, pfunctailcall).ok() @@ -6842,15 +6842,15 @@ impl ICorProfilerInfo4 { (::windows_core::Interface::vtable(self).base__.base__.GetClassIDInfo2)(::windows_core::Interface::as_raw(self), classid, pmoduleid, ptypedeftoken, pparentclassid, cnumtypeargs, pcnumtypeargs, typeargs).ok() } pub unsafe fn GetCodeInfo2(&self, functionid: usize, pccodeinfos: *mut u32, codeinfos: &mut [COR_PRF_CODE_INFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetCodeInfo2)(::windows_core::Interface::as_raw(self), functionid, codeinfos.len() as _, pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetCodeInfo2)(::windows_core::Interface::as_raw(self), functionid, codeinfos.len().try_into().unwrap(), pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() } pub unsafe fn GetClassFromTokenAndTypeArgs(&self, moduleid: usize, typedef: u32, typeargs: &[usize]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.GetClassFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, typedef, typeargs.len() as _, ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.GetClassFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, typedef, typeargs.len().try_into().unwrap(), ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn GetFunctionFromTokenAndTypeArgs(&self, moduleid: usize, funcdef: u32, classid: usize, typeargs: &[usize]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.GetFunctionFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, funcdef, classid, typeargs.len() as _, ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.GetFunctionFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, funcdef, classid, typeargs.len().try_into().unwrap(), ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn EnumModuleFrozenObjects(&self, moduleid: usize) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -6884,7 +6884,7 @@ impl ICorProfilerInfo4 { (::windows_core::Interface::vtable(self).base__.base__.GetStaticFieldInfo)(::windows_core::Interface::as_raw(self), classid, fieldtoken, &mut result__).from_abi(result__) } pub unsafe fn GetGenerationBounds(&self, pcobjectranges: *mut u32, ranges: &mut [COR_PRF_GC_GENERATION_RANGE]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetGenerationBounds)(::windows_core::Interface::as_raw(self), ranges.len() as _, pcobjectranges, ::core::mem::transmute(ranges.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetGenerationBounds)(::windows_core::Interface::as_raw(self), ranges.len().try_into().unwrap(), pcobjectranges, ::core::mem::transmute(ranges.as_ptr())).ok() } pub unsafe fn GetObjectGeneration(&self, objectid: usize) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -6930,16 +6930,16 @@ impl ICorProfilerInfo4 { (::windows_core::Interface::vtable(self).base__.EnumModules)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } 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<()> { - (::windows_core::Interface::vtable(self).base__.GetRuntimeInformation)(::windows_core::Interface::as_raw(self), pclrinstanceid, pruntimetype, pmajorversion, pminorversion, pbuildnumber, pqfeversion, szversionstring.len() as _, pcchversionstring, ::core::mem::transmute(szversionstring.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.GetRuntimeInformation)(::windows_core::Interface::as_raw(self), pclrinstanceid, pruntimetype, pmajorversion, pminorversion, pbuildnumber, pqfeversion, szversionstring.len().try_into().unwrap(), pcchversionstring, ::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<()> { (::windows_core::Interface::vtable(self).base__.GetThreadStaticAddress2)(::windows_core::Interface::as_raw(self), classid, fieldtoken, appdomainid, threadid, ppaddress).ok() } pub unsafe fn GetAppDomainsContainingModule(&self, moduleid: usize, pcappdomainids: *mut u32, appdomainids: &mut [usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetAppDomainsContainingModule)(::windows_core::Interface::as_raw(self), moduleid, appdomainids.len() as _, pcappdomainids, ::core::mem::transmute(appdomainids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.GetAppDomainsContainingModule)(::windows_core::Interface::as_raw(self), moduleid, appdomainids.len().try_into().unwrap(), pcappdomainids, ::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<()> { - (::windows_core::Interface::vtable(self).base__.GetModuleInfo2)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid, pdwmoduleflags).ok() + (::windows_core::Interface::vtable(self).base__.GetModuleInfo2)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid, pdwmoduleflags).ok() } pub unsafe fn EnumThreads(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -6955,16 +6955,16 @@ impl ICorProfilerInfo4 { (::windows_core::Interface::vtable(self).RequestRevert)(::windows_core::Interface::as_raw(self), cfunctions, moduleids, methodids, status).ok() } pub unsafe fn GetCodeInfo3(&self, functionid: usize, rejitid: usize, pccodeinfos: *mut u32, codeinfos: &mut [COR_PRF_CODE_INFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetCodeInfo3)(::windows_core::Interface::as_raw(self), functionid, rejitid, codeinfos.len() as _, pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetCodeInfo3)(::windows_core::Interface::as_raw(self), functionid, rejitid, codeinfos.len().try_into().unwrap(), pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() } pub unsafe fn GetFunctionFromIP2(&self, ip: *const u8, pfunctionid: *mut usize, prejitid: *mut usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetFunctionFromIP2)(::windows_core::Interface::as_raw(self), ip, pfunctionid, prejitid).ok() } pub unsafe fn GetReJITIDs(&self, functionid: usize, pcrejitids: *mut u32, rejitids: &mut [usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetReJITIDs)(::windows_core::Interface::as_raw(self), functionid, rejitids.len() as _, pcrejitids, ::core::mem::transmute(rejitids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetReJITIDs)(::windows_core::Interface::as_raw(self), functionid, rejitids.len().try_into().unwrap(), pcrejitids, ::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<()> { - (::windows_core::Interface::vtable(self).GetILToNativeMapping2)(::windows_core::Interface::as_raw(self), functionid, rejitid, map.len() as _, pcmap, ::core::mem::transmute(map.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetILToNativeMapping2)(::windows_core::Interface::as_raw(self), functionid, rejitid, map.len().try_into().unwrap(), pcmap, ::core::mem::transmute(map.as_ptr())).ok() } pub unsafe fn EnumJITedFunctions2(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -7068,7 +7068,7 @@ impl ICorProfilerInfo5 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetTokenAndMetaDataFromFunction)(::windows_core::Interface::as_raw(self), functionid, riid, ::core::mem::transmute(ppimport), ptoken).ok() } pub unsafe fn GetModuleInfo(&self, moduleid: usize, ppbaseloadaddress: *mut *mut u8, pcchname: *mut u32, szname: &mut [u16], passemblyid: *mut usize) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetModuleInfo)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetModuleInfo)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid).ok() } pub unsafe fn GetModuleMetaData(&self, moduleid: usize, dwopenflags: u32, riid: *const ::windows_core::GUID) -> ::windows_core::Result<::windows_core::IUnknown> { let mut result__ = ::std::mem::zeroed(); @@ -7085,10 +7085,10 @@ impl ICorProfilerInfo5 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetAppDomainInfo)(::windows_core::Interface::as_raw(self), appdomainid, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), pprocessid).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetAppDomainInfo)(::windows_core::Interface::as_raw(self), appdomainid, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), pprocessid).ok() } pub unsafe fn GetAssemblyInfo(&self, assemblyid: usize, pcchname: *mut u32, szname: &mut [u16], pappdomainid: *mut usize, pmoduleid: *mut usize) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetAssemblyInfo)(::windows_core::Interface::as_raw(self), assemblyid, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), pappdomainid, pmoduleid).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetAssemblyInfo)(::windows_core::Interface::as_raw(self), assemblyid, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), pappdomainid, pmoduleid).ok() } pub unsafe fn SetFunctionReJIT(&self, functionid: usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.SetFunctionReJIT)(::windows_core::Interface::as_raw(self), functionid).ok() @@ -7102,7 +7102,7 @@ impl ICorProfilerInfo5 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.SetILInstrumentedCodeMap)(::windows_core::Interface::as_raw(self), functionid, fstartjit.into_param().abi(), rgilmapentries.len() as _, ::core::mem::transmute(rgilmapentries.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.SetILInstrumentedCodeMap)(::windows_core::Interface::as_raw(self), functionid, fstartjit.into_param().abi(), rgilmapentries.len().try_into().unwrap(), ::core::mem::transmute(rgilmapentries.as_ptr())).ok() } pub unsafe fn GetInprocInspectionInterface(&self) -> ::windows_core::Result<::windows_core::IUnknown> { let mut result__ = ::std::mem::zeroed(); @@ -7129,10 +7129,10 @@ impl ICorProfilerInfo5 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetILToNativeMapping)(::windows_core::Interface::as_raw(self), functionid, map.len() as _, pcmap, ::core::mem::transmute(map.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetILToNativeMapping)(::windows_core::Interface::as_raw(self), functionid, map.len().try_into().unwrap(), pcmap, ::core::mem::transmute(map.as_ptr())).ok() } pub unsafe fn DoStackSnapshot(&self, thread: usize, callback: *const StackSnapshotCallback, infoflags: u32, clientdata: *const ::core::ffi::c_void, context: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.DoStackSnapshot)(::windows_core::Interface::as_raw(self), thread, callback, infoflags, clientdata, ::core::mem::transmute(context.as_ptr()), context.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.DoStackSnapshot)(::windows_core::Interface::as_raw(self), thread, callback, infoflags, clientdata, ::core::mem::transmute(context.as_ptr()), context.len().try_into().unwrap()).ok() } pub unsafe fn SetEnterLeaveFunctionHooks2(&self, pfuncenter: *const FunctionEnter2, pfuncleave: *const FunctionLeave2, pfunctailcall: *const FunctionTailcall2) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.SetEnterLeaveFunctionHooks2)(::windows_core::Interface::as_raw(self), pfuncenter, pfuncleave, pfunctailcall).ok() @@ -7152,15 +7152,15 @@ impl ICorProfilerInfo5 { (::windows_core::Interface::vtable(self).base__.base__.base__.GetClassIDInfo2)(::windows_core::Interface::as_raw(self), classid, pmoduleid, ptypedeftoken, pparentclassid, cnumtypeargs, pcnumtypeargs, typeargs).ok() } pub unsafe fn GetCodeInfo2(&self, functionid: usize, pccodeinfos: *mut u32, codeinfos: &mut [COR_PRF_CODE_INFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetCodeInfo2)(::windows_core::Interface::as_raw(self), functionid, codeinfos.len() as _, pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetCodeInfo2)(::windows_core::Interface::as_raw(self), functionid, codeinfos.len().try_into().unwrap(), pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() } pub unsafe fn GetClassFromTokenAndTypeArgs(&self, moduleid: usize, typedef: u32, typeargs: &[usize]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.GetClassFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, typedef, typeargs.len() as _, ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.GetClassFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, typedef, typeargs.len().try_into().unwrap(), ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn GetFunctionFromTokenAndTypeArgs(&self, moduleid: usize, funcdef: u32, classid: usize, typeargs: &[usize]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.GetFunctionFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, funcdef, classid, typeargs.len() as _, ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.GetFunctionFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, funcdef, classid, typeargs.len().try_into().unwrap(), ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn EnumModuleFrozenObjects(&self, moduleid: usize) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -7194,7 +7194,7 @@ impl ICorProfilerInfo5 { (::windows_core::Interface::vtable(self).base__.base__.base__.GetStaticFieldInfo)(::windows_core::Interface::as_raw(self), classid, fieldtoken, &mut result__).from_abi(result__) } pub unsafe fn GetGenerationBounds(&self, pcobjectranges: *mut u32, ranges: &mut [COR_PRF_GC_GENERATION_RANGE]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetGenerationBounds)(::windows_core::Interface::as_raw(self), ranges.len() as _, pcobjectranges, ::core::mem::transmute(ranges.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetGenerationBounds)(::windows_core::Interface::as_raw(self), ranges.len().try_into().unwrap(), pcobjectranges, ::core::mem::transmute(ranges.as_ptr())).ok() } pub unsafe fn GetObjectGeneration(&self, objectid: usize) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -7240,16 +7240,16 @@ impl ICorProfilerInfo5 { (::windows_core::Interface::vtable(self).base__.base__.EnumModules)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } 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<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetRuntimeInformation)(::windows_core::Interface::as_raw(self), pclrinstanceid, pruntimetype, pmajorversion, pminorversion, pbuildnumber, pqfeversion, szversionstring.len() as _, pcchversionstring, ::core::mem::transmute(szversionstring.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetRuntimeInformation)(::windows_core::Interface::as_raw(self), pclrinstanceid, pruntimetype, pmajorversion, pminorversion, pbuildnumber, pqfeversion, szversionstring.len().try_into().unwrap(), pcchversionstring, ::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<()> { (::windows_core::Interface::vtable(self).base__.base__.GetThreadStaticAddress2)(::windows_core::Interface::as_raw(self), classid, fieldtoken, appdomainid, threadid, ppaddress).ok() } pub unsafe fn GetAppDomainsContainingModule(&self, moduleid: usize, pcappdomainids: *mut u32, appdomainids: &mut [usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetAppDomainsContainingModule)(::windows_core::Interface::as_raw(self), moduleid, appdomainids.len() as _, pcappdomainids, ::core::mem::transmute(appdomainids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetAppDomainsContainingModule)(::windows_core::Interface::as_raw(self), moduleid, appdomainids.len().try_into().unwrap(), pcappdomainids, ::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<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetModuleInfo2)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid, pdwmoduleflags).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetModuleInfo2)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid, pdwmoduleflags).ok() } pub unsafe fn EnumThreads(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -7265,16 +7265,16 @@ impl ICorProfilerInfo5 { (::windows_core::Interface::vtable(self).base__.RequestRevert)(::windows_core::Interface::as_raw(self), cfunctions, moduleids, methodids, status).ok() } pub unsafe fn GetCodeInfo3(&self, functionid: usize, rejitid: usize, pccodeinfos: *mut u32, codeinfos: &mut [COR_PRF_CODE_INFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetCodeInfo3)(::windows_core::Interface::as_raw(self), functionid, rejitid, codeinfos.len() as _, pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.GetCodeInfo3)(::windows_core::Interface::as_raw(self), functionid, rejitid, codeinfos.len().try_into().unwrap(), pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() } pub unsafe fn GetFunctionFromIP2(&self, ip: *const u8, pfunctionid: *mut usize, prejitid: *mut usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetFunctionFromIP2)(::windows_core::Interface::as_raw(self), ip, pfunctionid, prejitid).ok() } pub unsafe fn GetReJITIDs(&self, functionid: usize, pcrejitids: *mut u32, rejitids: &mut [usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetReJITIDs)(::windows_core::Interface::as_raw(self), functionid, rejitids.len() as _, pcrejitids, ::core::mem::transmute(rejitids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.GetReJITIDs)(::windows_core::Interface::as_raw(self), functionid, rejitids.len().try_into().unwrap(), pcrejitids, ::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<()> { - (::windows_core::Interface::vtable(self).base__.GetILToNativeMapping2)(::windows_core::Interface::as_raw(self), functionid, rejitid, map.len() as _, pcmap, ::core::mem::transmute(map.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.GetILToNativeMapping2)(::windows_core::Interface::as_raw(self), functionid, rejitid, map.len().try_into().unwrap(), pcmap, ::core::mem::transmute(map.as_ptr())).ok() } pub unsafe fn EnumJITedFunctions2(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -7376,7 +7376,7 @@ impl ICorProfilerInfo6 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetTokenAndMetaDataFromFunction)(::windows_core::Interface::as_raw(self), functionid, riid, ::core::mem::transmute(ppimport), ptoken).ok() } pub unsafe fn GetModuleInfo(&self, moduleid: usize, ppbaseloadaddress: *mut *mut u8, pcchname: *mut u32, szname: &mut [u16], passemblyid: *mut usize) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetModuleInfo)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetModuleInfo)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid).ok() } pub unsafe fn GetModuleMetaData(&self, moduleid: usize, dwopenflags: u32, riid: *const ::windows_core::GUID) -> ::windows_core::Result<::windows_core::IUnknown> { let mut result__ = ::std::mem::zeroed(); @@ -7393,10 +7393,10 @@ impl ICorProfilerInfo6 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetAppDomainInfo)(::windows_core::Interface::as_raw(self), appdomainid, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), pprocessid).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetAppDomainInfo)(::windows_core::Interface::as_raw(self), appdomainid, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), pprocessid).ok() } pub unsafe fn GetAssemblyInfo(&self, assemblyid: usize, pcchname: *mut u32, szname: &mut [u16], pappdomainid: *mut usize, pmoduleid: *mut usize) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetAssemblyInfo)(::windows_core::Interface::as_raw(self), assemblyid, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), pappdomainid, pmoduleid).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetAssemblyInfo)(::windows_core::Interface::as_raw(self), assemblyid, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), pappdomainid, pmoduleid).ok() } pub unsafe fn SetFunctionReJIT(&self, functionid: usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.SetFunctionReJIT)(::windows_core::Interface::as_raw(self), functionid).ok() @@ -7410,7 +7410,7 @@ impl ICorProfilerInfo6 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.SetILInstrumentedCodeMap)(::windows_core::Interface::as_raw(self), functionid, fstartjit.into_param().abi(), rgilmapentries.len() as _, ::core::mem::transmute(rgilmapentries.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.SetILInstrumentedCodeMap)(::windows_core::Interface::as_raw(self), functionid, fstartjit.into_param().abi(), rgilmapentries.len().try_into().unwrap(), ::core::mem::transmute(rgilmapentries.as_ptr())).ok() } pub unsafe fn GetInprocInspectionInterface(&self) -> ::windows_core::Result<::windows_core::IUnknown> { let mut result__ = ::std::mem::zeroed(); @@ -7437,10 +7437,10 @@ impl ICorProfilerInfo6 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetILToNativeMapping)(::windows_core::Interface::as_raw(self), functionid, map.len() as _, pcmap, ::core::mem::transmute(map.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetILToNativeMapping)(::windows_core::Interface::as_raw(self), functionid, map.len().try_into().unwrap(), pcmap, ::core::mem::transmute(map.as_ptr())).ok() } pub unsafe fn DoStackSnapshot(&self, thread: usize, callback: *const StackSnapshotCallback, infoflags: u32, clientdata: *const ::core::ffi::c_void, context: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.DoStackSnapshot)(::windows_core::Interface::as_raw(self), thread, callback, infoflags, clientdata, ::core::mem::transmute(context.as_ptr()), context.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.DoStackSnapshot)(::windows_core::Interface::as_raw(self), thread, callback, infoflags, clientdata, ::core::mem::transmute(context.as_ptr()), context.len().try_into().unwrap()).ok() } pub unsafe fn SetEnterLeaveFunctionHooks2(&self, pfuncenter: *const FunctionEnter2, pfuncleave: *const FunctionLeave2, pfunctailcall: *const FunctionTailcall2) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.SetEnterLeaveFunctionHooks2)(::windows_core::Interface::as_raw(self), pfuncenter, pfuncleave, pfunctailcall).ok() @@ -7460,15 +7460,15 @@ impl ICorProfilerInfo6 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetClassIDInfo2)(::windows_core::Interface::as_raw(self), classid, pmoduleid, ptypedeftoken, pparentclassid, cnumtypeargs, pcnumtypeargs, typeargs).ok() } pub unsafe fn GetCodeInfo2(&self, functionid: usize, pccodeinfos: *mut u32, codeinfos: &mut [COR_PRF_CODE_INFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetCodeInfo2)(::windows_core::Interface::as_raw(self), functionid, codeinfos.len() as _, pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetCodeInfo2)(::windows_core::Interface::as_raw(self), functionid, codeinfos.len().try_into().unwrap(), pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() } pub unsafe fn GetClassFromTokenAndTypeArgs(&self, moduleid: usize, typedef: u32, typeargs: &[usize]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetClassFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, typedef, typeargs.len() as _, ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetClassFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, typedef, typeargs.len().try_into().unwrap(), ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn GetFunctionFromTokenAndTypeArgs(&self, moduleid: usize, funcdef: u32, classid: usize, typeargs: &[usize]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetFunctionFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, funcdef, classid, typeargs.len() as _, ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetFunctionFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, funcdef, classid, typeargs.len().try_into().unwrap(), ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn EnumModuleFrozenObjects(&self, moduleid: usize) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -7502,7 +7502,7 @@ impl ICorProfilerInfo6 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetStaticFieldInfo)(::windows_core::Interface::as_raw(self), classid, fieldtoken, &mut result__).from_abi(result__) } pub unsafe fn GetGenerationBounds(&self, pcobjectranges: *mut u32, ranges: &mut [COR_PRF_GC_GENERATION_RANGE]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetGenerationBounds)(::windows_core::Interface::as_raw(self), ranges.len() as _, pcobjectranges, ::core::mem::transmute(ranges.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetGenerationBounds)(::windows_core::Interface::as_raw(self), ranges.len().try_into().unwrap(), pcobjectranges, ::core::mem::transmute(ranges.as_ptr())).ok() } pub unsafe fn GetObjectGeneration(&self, objectid: usize) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -7548,16 +7548,16 @@ impl ICorProfilerInfo6 { (::windows_core::Interface::vtable(self).base__.base__.base__.EnumModules)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } 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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetRuntimeInformation)(::windows_core::Interface::as_raw(self), pclrinstanceid, pruntimetype, pmajorversion, pminorversion, pbuildnumber, pqfeversion, szversionstring.len() as _, pcchversionstring, ::core::mem::transmute(szversionstring.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetRuntimeInformation)(::windows_core::Interface::as_raw(self), pclrinstanceid, pruntimetype, pmajorversion, pminorversion, pbuildnumber, pqfeversion, szversionstring.len().try_into().unwrap(), pcchversionstring, ::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<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.GetThreadStaticAddress2)(::windows_core::Interface::as_raw(self), classid, fieldtoken, appdomainid, threadid, ppaddress).ok() } pub unsafe fn GetAppDomainsContainingModule(&self, moduleid: usize, pcappdomainids: *mut u32, appdomainids: &mut [usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetAppDomainsContainingModule)(::windows_core::Interface::as_raw(self), moduleid, appdomainids.len() as _, pcappdomainids, ::core::mem::transmute(appdomainids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetAppDomainsContainingModule)(::windows_core::Interface::as_raw(self), moduleid, appdomainids.len().try_into().unwrap(), pcappdomainids, ::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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetModuleInfo2)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid, pdwmoduleflags).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetModuleInfo2)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid, pdwmoduleflags).ok() } pub unsafe fn EnumThreads(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -7573,16 +7573,16 @@ impl ICorProfilerInfo6 { (::windows_core::Interface::vtable(self).base__.base__.RequestRevert)(::windows_core::Interface::as_raw(self), cfunctions, moduleids, methodids, status).ok() } pub unsafe fn GetCodeInfo3(&self, functionid: usize, rejitid: usize, pccodeinfos: *mut u32, codeinfos: &mut [COR_PRF_CODE_INFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetCodeInfo3)(::windows_core::Interface::as_raw(self), functionid, rejitid, codeinfos.len() as _, pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetCodeInfo3)(::windows_core::Interface::as_raw(self), functionid, rejitid, codeinfos.len().try_into().unwrap(), pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() } pub unsafe fn GetFunctionFromIP2(&self, ip: *const u8, pfunctionid: *mut usize, prejitid: *mut usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.GetFunctionFromIP2)(::windows_core::Interface::as_raw(self), ip, pfunctionid, prejitid).ok() } pub unsafe fn GetReJITIDs(&self, functionid: usize, pcrejitids: *mut u32, rejitids: &mut [usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetReJITIDs)(::windows_core::Interface::as_raw(self), functionid, rejitids.len() as _, pcrejitids, ::core::mem::transmute(rejitids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetReJITIDs)(::windows_core::Interface::as_raw(self), functionid, rejitids.len().try_into().unwrap(), pcrejitids, ::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<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetILToNativeMapping2)(::windows_core::Interface::as_raw(self), functionid, rejitid, map.len() as _, pcmap, ::core::mem::transmute(map.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetILToNativeMapping2)(::windows_core::Interface::as_raw(self), functionid, rejitid, map.len().try_into().unwrap(), pcmap, ::core::mem::transmute(map.as_ptr())).ok() } pub unsafe fn EnumJITedFunctions2(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -7691,7 +7691,7 @@ impl ICorProfilerInfo7 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetTokenAndMetaDataFromFunction)(::windows_core::Interface::as_raw(self), functionid, riid, ::core::mem::transmute(ppimport), ptoken).ok() } pub unsafe fn GetModuleInfo(&self, moduleid: usize, ppbaseloadaddress: *mut *mut u8, pcchname: *mut u32, szname: &mut [u16], passemblyid: *mut usize) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetModuleInfo)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetModuleInfo)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid).ok() } pub unsafe fn GetModuleMetaData(&self, moduleid: usize, dwopenflags: u32, riid: *const ::windows_core::GUID) -> ::windows_core::Result<::windows_core::IUnknown> { let mut result__ = ::std::mem::zeroed(); @@ -7708,10 +7708,10 @@ impl ICorProfilerInfo7 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetAppDomainInfo)(::windows_core::Interface::as_raw(self), appdomainid, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), pprocessid).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetAppDomainInfo)(::windows_core::Interface::as_raw(self), appdomainid, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), pprocessid).ok() } pub unsafe fn GetAssemblyInfo(&self, assemblyid: usize, pcchname: *mut u32, szname: &mut [u16], pappdomainid: *mut usize, pmoduleid: *mut usize) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetAssemblyInfo)(::windows_core::Interface::as_raw(self), assemblyid, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), pappdomainid, pmoduleid).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetAssemblyInfo)(::windows_core::Interface::as_raw(self), assemblyid, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), pappdomainid, pmoduleid).ok() } pub unsafe fn SetFunctionReJIT(&self, functionid: usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.SetFunctionReJIT)(::windows_core::Interface::as_raw(self), functionid).ok() @@ -7725,7 +7725,7 @@ impl ICorProfilerInfo7 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.SetILInstrumentedCodeMap)(::windows_core::Interface::as_raw(self), functionid, fstartjit.into_param().abi(), rgilmapentries.len() as _, ::core::mem::transmute(rgilmapentries.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.SetILInstrumentedCodeMap)(::windows_core::Interface::as_raw(self), functionid, fstartjit.into_param().abi(), rgilmapentries.len().try_into().unwrap(), ::core::mem::transmute(rgilmapentries.as_ptr())).ok() } pub unsafe fn GetInprocInspectionInterface(&self) -> ::windows_core::Result<::windows_core::IUnknown> { let mut result__ = ::std::mem::zeroed(); @@ -7752,10 +7752,10 @@ impl ICorProfilerInfo7 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetILToNativeMapping)(::windows_core::Interface::as_raw(self), functionid, map.len() as _, pcmap, ::core::mem::transmute(map.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetILToNativeMapping)(::windows_core::Interface::as_raw(self), functionid, map.len().try_into().unwrap(), pcmap, ::core::mem::transmute(map.as_ptr())).ok() } pub unsafe fn DoStackSnapshot(&self, thread: usize, callback: *const StackSnapshotCallback, infoflags: u32, clientdata: *const ::core::ffi::c_void, context: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.DoStackSnapshot)(::windows_core::Interface::as_raw(self), thread, callback, infoflags, clientdata, ::core::mem::transmute(context.as_ptr()), context.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.DoStackSnapshot)(::windows_core::Interface::as_raw(self), thread, callback, infoflags, clientdata, ::core::mem::transmute(context.as_ptr()), context.len().try_into().unwrap()).ok() } pub unsafe fn SetEnterLeaveFunctionHooks2(&self, pfuncenter: *const FunctionEnter2, pfuncleave: *const FunctionLeave2, pfunctailcall: *const FunctionTailcall2) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.SetEnterLeaveFunctionHooks2)(::windows_core::Interface::as_raw(self), pfuncenter, pfuncleave, pfunctailcall).ok() @@ -7775,15 +7775,15 @@ impl ICorProfilerInfo7 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetClassIDInfo2)(::windows_core::Interface::as_raw(self), classid, pmoduleid, ptypedeftoken, pparentclassid, cnumtypeargs, pcnumtypeargs, typeargs).ok() } pub unsafe fn GetCodeInfo2(&self, functionid: usize, pccodeinfos: *mut u32, codeinfos: &mut [COR_PRF_CODE_INFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetCodeInfo2)(::windows_core::Interface::as_raw(self), functionid, codeinfos.len() as _, pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetCodeInfo2)(::windows_core::Interface::as_raw(self), functionid, codeinfos.len().try_into().unwrap(), pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() } pub unsafe fn GetClassFromTokenAndTypeArgs(&self, moduleid: usize, typedef: u32, typeargs: &[usize]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetClassFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, typedef, typeargs.len() as _, ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetClassFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, typedef, typeargs.len().try_into().unwrap(), ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn GetFunctionFromTokenAndTypeArgs(&self, moduleid: usize, funcdef: u32, classid: usize, typeargs: &[usize]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetFunctionFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, funcdef, classid, typeargs.len() as _, ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetFunctionFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, funcdef, classid, typeargs.len().try_into().unwrap(), ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn EnumModuleFrozenObjects(&self, moduleid: usize) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -7817,7 +7817,7 @@ impl ICorProfilerInfo7 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetStaticFieldInfo)(::windows_core::Interface::as_raw(self), classid, fieldtoken, &mut result__).from_abi(result__) } pub unsafe fn GetGenerationBounds(&self, pcobjectranges: *mut u32, ranges: &mut [COR_PRF_GC_GENERATION_RANGE]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetGenerationBounds)(::windows_core::Interface::as_raw(self), ranges.len() as _, pcobjectranges, ::core::mem::transmute(ranges.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetGenerationBounds)(::windows_core::Interface::as_raw(self), ranges.len().try_into().unwrap(), pcobjectranges, ::core::mem::transmute(ranges.as_ptr())).ok() } pub unsafe fn GetObjectGeneration(&self, objectid: usize) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -7863,16 +7863,16 @@ impl ICorProfilerInfo7 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.EnumModules)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } 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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetRuntimeInformation)(::windows_core::Interface::as_raw(self), pclrinstanceid, pruntimetype, pmajorversion, pminorversion, pbuildnumber, pqfeversion, szversionstring.len() as _, pcchversionstring, ::core::mem::transmute(szversionstring.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetRuntimeInformation)(::windows_core::Interface::as_raw(self), pclrinstanceid, pruntimetype, pmajorversion, pminorversion, pbuildnumber, pqfeversion, szversionstring.len().try_into().unwrap(), pcchversionstring, ::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<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetThreadStaticAddress2)(::windows_core::Interface::as_raw(self), classid, fieldtoken, appdomainid, threadid, ppaddress).ok() } pub unsafe fn GetAppDomainsContainingModule(&self, moduleid: usize, pcappdomainids: *mut u32, appdomainids: &mut [usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetAppDomainsContainingModule)(::windows_core::Interface::as_raw(self), moduleid, appdomainids.len() as _, pcappdomainids, ::core::mem::transmute(appdomainids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetAppDomainsContainingModule)(::windows_core::Interface::as_raw(self), moduleid, appdomainids.len().try_into().unwrap(), pcappdomainids, ::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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetModuleInfo2)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid, pdwmoduleflags).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetModuleInfo2)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid, pdwmoduleflags).ok() } pub unsafe fn EnumThreads(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -7888,16 +7888,16 @@ impl ICorProfilerInfo7 { (::windows_core::Interface::vtable(self).base__.base__.base__.RequestRevert)(::windows_core::Interface::as_raw(self), cfunctions, moduleids, methodids, status).ok() } pub unsafe fn GetCodeInfo3(&self, functionid: usize, rejitid: usize, pccodeinfos: *mut u32, codeinfos: &mut [COR_PRF_CODE_INFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetCodeInfo3)(::windows_core::Interface::as_raw(self), functionid, rejitid, codeinfos.len() as _, pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetCodeInfo3)(::windows_core::Interface::as_raw(self), functionid, rejitid, codeinfos.len().try_into().unwrap(), pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() } pub unsafe fn GetFunctionFromIP2(&self, ip: *const u8, pfunctionid: *mut usize, prejitid: *mut usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.GetFunctionFromIP2)(::windows_core::Interface::as_raw(self), ip, pfunctionid, prejitid).ok() } pub unsafe fn GetReJITIDs(&self, functionid: usize, pcrejitids: *mut u32, rejitids: &mut [usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetReJITIDs)(::windows_core::Interface::as_raw(self), functionid, rejitids.len() as _, pcrejitids, ::core::mem::transmute(rejitids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetReJITIDs)(::windows_core::Interface::as_raw(self), functionid, rejitids.len().try_into().unwrap(), pcrejitids, ::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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetILToNativeMapping2)(::windows_core::Interface::as_raw(self), functionid, rejitid, map.len() as _, pcmap, ::core::mem::transmute(map.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetILToNativeMapping2)(::windows_core::Interface::as_raw(self), functionid, rejitid, map.len().try_into().unwrap(), pcmap, ::core::mem::transmute(map.as_ptr())).ok() } pub unsafe fn EnumJITedFunctions2(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -8015,7 +8015,7 @@ impl ICorProfilerInfo8 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetTokenAndMetaDataFromFunction)(::windows_core::Interface::as_raw(self), functionid, riid, ::core::mem::transmute(ppimport), ptoken).ok() } pub unsafe fn GetModuleInfo(&self, moduleid: usize, ppbaseloadaddress: *mut *mut u8, pcchname: *mut u32, szname: &mut [u16], passemblyid: *mut usize) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetModuleInfo)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetModuleInfo)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid).ok() } pub unsafe fn GetModuleMetaData(&self, moduleid: usize, dwopenflags: u32, riid: *const ::windows_core::GUID) -> ::windows_core::Result<::windows_core::IUnknown> { let mut result__ = ::std::mem::zeroed(); @@ -8032,10 +8032,10 @@ impl ICorProfilerInfo8 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetAppDomainInfo)(::windows_core::Interface::as_raw(self), appdomainid, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), pprocessid).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetAppDomainInfo)(::windows_core::Interface::as_raw(self), appdomainid, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), pprocessid).ok() } pub unsafe fn GetAssemblyInfo(&self, assemblyid: usize, pcchname: *mut u32, szname: &mut [u16], pappdomainid: *mut usize, pmoduleid: *mut usize) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetAssemblyInfo)(::windows_core::Interface::as_raw(self), assemblyid, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), pappdomainid, pmoduleid).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetAssemblyInfo)(::windows_core::Interface::as_raw(self), assemblyid, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), pappdomainid, pmoduleid).ok() } pub unsafe fn SetFunctionReJIT(&self, functionid: usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.SetFunctionReJIT)(::windows_core::Interface::as_raw(self), functionid).ok() @@ -8049,7 +8049,7 @@ impl ICorProfilerInfo8 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.SetILInstrumentedCodeMap)(::windows_core::Interface::as_raw(self), functionid, fstartjit.into_param().abi(), rgilmapentries.len() as _, ::core::mem::transmute(rgilmapentries.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.SetILInstrumentedCodeMap)(::windows_core::Interface::as_raw(self), functionid, fstartjit.into_param().abi(), rgilmapentries.len().try_into().unwrap(), ::core::mem::transmute(rgilmapentries.as_ptr())).ok() } pub unsafe fn GetInprocInspectionInterface(&self) -> ::windows_core::Result<::windows_core::IUnknown> { let mut result__ = ::std::mem::zeroed(); @@ -8076,10 +8076,10 @@ impl ICorProfilerInfo8 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetILToNativeMapping)(::windows_core::Interface::as_raw(self), functionid, map.len() as _, pcmap, ::core::mem::transmute(map.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetILToNativeMapping)(::windows_core::Interface::as_raw(self), functionid, map.len().try_into().unwrap(), pcmap, ::core::mem::transmute(map.as_ptr())).ok() } pub unsafe fn DoStackSnapshot(&self, thread: usize, callback: *const StackSnapshotCallback, infoflags: u32, clientdata: *const ::core::ffi::c_void, context: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.DoStackSnapshot)(::windows_core::Interface::as_raw(self), thread, callback, infoflags, clientdata, ::core::mem::transmute(context.as_ptr()), context.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.DoStackSnapshot)(::windows_core::Interface::as_raw(self), thread, callback, infoflags, clientdata, ::core::mem::transmute(context.as_ptr()), context.len().try_into().unwrap()).ok() } pub unsafe fn SetEnterLeaveFunctionHooks2(&self, pfuncenter: *const FunctionEnter2, pfuncleave: *const FunctionLeave2, pfunctailcall: *const FunctionTailcall2) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.SetEnterLeaveFunctionHooks2)(::windows_core::Interface::as_raw(self), pfuncenter, pfuncleave, pfunctailcall).ok() @@ -8099,15 +8099,15 @@ impl ICorProfilerInfo8 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetClassIDInfo2)(::windows_core::Interface::as_raw(self), classid, pmoduleid, ptypedeftoken, pparentclassid, cnumtypeargs, pcnumtypeargs, typeargs).ok() } pub unsafe fn GetCodeInfo2(&self, functionid: usize, pccodeinfos: *mut u32, codeinfos: &mut [COR_PRF_CODE_INFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetCodeInfo2)(::windows_core::Interface::as_raw(self), functionid, codeinfos.len() as _, pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetCodeInfo2)(::windows_core::Interface::as_raw(self), functionid, codeinfos.len().try_into().unwrap(), pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() } pub unsafe fn GetClassFromTokenAndTypeArgs(&self, moduleid: usize, typedef: u32, typeargs: &[usize]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetClassFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, typedef, typeargs.len() as _, ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetClassFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, typedef, typeargs.len().try_into().unwrap(), ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn GetFunctionFromTokenAndTypeArgs(&self, moduleid: usize, funcdef: u32, classid: usize, typeargs: &[usize]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetFunctionFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, funcdef, classid, typeargs.len() as _, ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetFunctionFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, funcdef, classid, typeargs.len().try_into().unwrap(), ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn EnumModuleFrozenObjects(&self, moduleid: usize) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -8141,7 +8141,7 @@ impl ICorProfilerInfo8 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetStaticFieldInfo)(::windows_core::Interface::as_raw(self), classid, fieldtoken, &mut result__).from_abi(result__) } pub unsafe fn GetGenerationBounds(&self, pcobjectranges: *mut u32, ranges: &mut [COR_PRF_GC_GENERATION_RANGE]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetGenerationBounds)(::windows_core::Interface::as_raw(self), ranges.len() as _, pcobjectranges, ::core::mem::transmute(ranges.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetGenerationBounds)(::windows_core::Interface::as_raw(self), ranges.len().try_into().unwrap(), pcobjectranges, ::core::mem::transmute(ranges.as_ptr())).ok() } pub unsafe fn GetObjectGeneration(&self, objectid: usize) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -8187,16 +8187,16 @@ impl ICorProfilerInfo8 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.EnumModules)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } 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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetRuntimeInformation)(::windows_core::Interface::as_raw(self), pclrinstanceid, pruntimetype, pmajorversion, pminorversion, pbuildnumber, pqfeversion, szversionstring.len() as _, pcchversionstring, ::core::mem::transmute(szversionstring.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetRuntimeInformation)(::windows_core::Interface::as_raw(self), pclrinstanceid, pruntimetype, pmajorversion, pminorversion, pbuildnumber, pqfeversion, szversionstring.len().try_into().unwrap(), pcchversionstring, ::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<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetThreadStaticAddress2)(::windows_core::Interface::as_raw(self), classid, fieldtoken, appdomainid, threadid, ppaddress).ok() } pub unsafe fn GetAppDomainsContainingModule(&self, moduleid: usize, pcappdomainids: *mut u32, appdomainids: &mut [usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetAppDomainsContainingModule)(::windows_core::Interface::as_raw(self), moduleid, appdomainids.len() as _, pcappdomainids, ::core::mem::transmute(appdomainids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetAppDomainsContainingModule)(::windows_core::Interface::as_raw(self), moduleid, appdomainids.len().try_into().unwrap(), pcappdomainids, ::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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetModuleInfo2)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid, pdwmoduleflags).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetModuleInfo2)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid, pdwmoduleflags).ok() } pub unsafe fn EnumThreads(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -8212,16 +8212,16 @@ impl ICorProfilerInfo8 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.RequestRevert)(::windows_core::Interface::as_raw(self), cfunctions, moduleids, methodids, status).ok() } pub unsafe fn GetCodeInfo3(&self, functionid: usize, rejitid: usize, pccodeinfos: *mut u32, codeinfos: &mut [COR_PRF_CODE_INFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetCodeInfo3)(::windows_core::Interface::as_raw(self), functionid, rejitid, codeinfos.len() as _, pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetCodeInfo3)(::windows_core::Interface::as_raw(self), functionid, rejitid, codeinfos.len().try_into().unwrap(), pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() } pub unsafe fn GetFunctionFromIP2(&self, ip: *const u8, pfunctionid: *mut usize, prejitid: *mut usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetFunctionFromIP2)(::windows_core::Interface::as_raw(self), ip, pfunctionid, prejitid).ok() } pub unsafe fn GetReJITIDs(&self, functionid: usize, pcrejitids: *mut u32, rejitids: &mut [usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetReJITIDs)(::windows_core::Interface::as_raw(self), functionid, rejitids.len() as _, pcrejitids, ::core::mem::transmute(rejitids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetReJITIDs)(::windows_core::Interface::as_raw(self), functionid, rejitids.len().try_into().unwrap(), pcrejitids, ::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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetILToNativeMapping2)(::windows_core::Interface::as_raw(self), functionid, rejitid, map.len() as _, pcmap, ::core::mem::transmute(map.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.GetILToNativeMapping2)(::windows_core::Interface::as_raw(self), functionid, rejitid, map.len().try_into().unwrap(), pcmap, ::core::mem::transmute(map.as_ptr())).ok() } pub unsafe fn EnumJITedFunctions2(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -8354,7 +8354,7 @@ impl ICorProfilerInfo9 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetTokenAndMetaDataFromFunction)(::windows_core::Interface::as_raw(self), functionid, riid, ::core::mem::transmute(ppimport), ptoken).ok() } pub unsafe fn GetModuleInfo(&self, moduleid: usize, ppbaseloadaddress: *mut *mut u8, pcchname: *mut u32, szname: &mut [u16], passemblyid: *mut usize) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetModuleInfo)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetModuleInfo)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid).ok() } pub unsafe fn GetModuleMetaData(&self, moduleid: usize, dwopenflags: u32, riid: *const ::windows_core::GUID) -> ::windows_core::Result<::windows_core::IUnknown> { let mut result__ = ::std::mem::zeroed(); @@ -8371,10 +8371,10 @@ impl ICorProfilerInfo9 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetAppDomainInfo)(::windows_core::Interface::as_raw(self), appdomainid, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), pprocessid).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetAppDomainInfo)(::windows_core::Interface::as_raw(self), appdomainid, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), pprocessid).ok() } pub unsafe fn GetAssemblyInfo(&self, assemblyid: usize, pcchname: *mut u32, szname: &mut [u16], pappdomainid: *mut usize, pmoduleid: *mut usize) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetAssemblyInfo)(::windows_core::Interface::as_raw(self), assemblyid, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), pappdomainid, pmoduleid).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetAssemblyInfo)(::windows_core::Interface::as_raw(self), assemblyid, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), pappdomainid, pmoduleid).ok() } pub unsafe fn SetFunctionReJIT(&self, functionid: usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.SetFunctionReJIT)(::windows_core::Interface::as_raw(self), functionid).ok() @@ -8388,7 +8388,7 @@ impl ICorProfilerInfo9 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.SetILInstrumentedCodeMap)(::windows_core::Interface::as_raw(self), functionid, fstartjit.into_param().abi(), rgilmapentries.len() as _, ::core::mem::transmute(rgilmapentries.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.SetILInstrumentedCodeMap)(::windows_core::Interface::as_raw(self), functionid, fstartjit.into_param().abi(), rgilmapentries.len().try_into().unwrap(), ::core::mem::transmute(rgilmapentries.as_ptr())).ok() } pub unsafe fn GetInprocInspectionInterface(&self) -> ::windows_core::Result<::windows_core::IUnknown> { let mut result__ = ::std::mem::zeroed(); @@ -8415,10 +8415,10 @@ impl ICorProfilerInfo9 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetILToNativeMapping)(::windows_core::Interface::as_raw(self), functionid, map.len() as _, pcmap, ::core::mem::transmute(map.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.base__.GetILToNativeMapping)(::windows_core::Interface::as_raw(self), functionid, map.len().try_into().unwrap(), pcmap, ::core::mem::transmute(map.as_ptr())).ok() } pub unsafe fn DoStackSnapshot(&self, thread: usize, callback: *const StackSnapshotCallback, infoflags: u32, clientdata: *const ::core::ffi::c_void, context: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.DoStackSnapshot)(::windows_core::Interface::as_raw(self), thread, callback, infoflags, clientdata, ::core::mem::transmute(context.as_ptr()), context.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.DoStackSnapshot)(::windows_core::Interface::as_raw(self), thread, callback, infoflags, clientdata, ::core::mem::transmute(context.as_ptr()), context.len().try_into().unwrap()).ok() } pub unsafe fn SetEnterLeaveFunctionHooks2(&self, pfuncenter: *const FunctionEnter2, pfuncleave: *const FunctionLeave2, pfunctailcall: *const FunctionTailcall2) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.SetEnterLeaveFunctionHooks2)(::windows_core::Interface::as_raw(self), pfuncenter, pfuncleave, pfunctailcall).ok() @@ -8438,15 +8438,15 @@ impl ICorProfilerInfo9 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetClassIDInfo2)(::windows_core::Interface::as_raw(self), classid, pmoduleid, ptypedeftoken, pparentclassid, cnumtypeargs, pcnumtypeargs, typeargs).ok() } pub unsafe fn GetCodeInfo2(&self, functionid: usize, pccodeinfos: *mut u32, codeinfos: &mut [COR_PRF_CODE_INFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetCodeInfo2)(::windows_core::Interface::as_raw(self), functionid, codeinfos.len() as _, pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetCodeInfo2)(::windows_core::Interface::as_raw(self), functionid, codeinfos.len().try_into().unwrap(), pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() } pub unsafe fn GetClassFromTokenAndTypeArgs(&self, moduleid: usize, typedef: u32, typeargs: &[usize]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetClassFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, typedef, typeargs.len() as _, ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetClassFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, typedef, typeargs.len().try_into().unwrap(), ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn GetFunctionFromTokenAndTypeArgs(&self, moduleid: usize, funcdef: u32, classid: usize, typeargs: &[usize]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetFunctionFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, funcdef, classid, typeargs.len() as _, ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetFunctionFromTokenAndTypeArgs)(::windows_core::Interface::as_raw(self), moduleid, funcdef, classid, typeargs.len().try_into().unwrap(), ::core::mem::transmute(typeargs.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn EnumModuleFrozenObjects(&self, moduleid: usize) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -8480,7 +8480,7 @@ impl ICorProfilerInfo9 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetStaticFieldInfo)(::windows_core::Interface::as_raw(self), classid, fieldtoken, &mut result__).from_abi(result__) } pub unsafe fn GetGenerationBounds(&self, pcobjectranges: *mut u32, ranges: &mut [COR_PRF_GC_GENERATION_RANGE]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetGenerationBounds)(::windows_core::Interface::as_raw(self), ranges.len() as _, pcobjectranges, ::core::mem::transmute(ranges.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.base__.GetGenerationBounds)(::windows_core::Interface::as_raw(self), ranges.len().try_into().unwrap(), pcobjectranges, ::core::mem::transmute(ranges.as_ptr())).ok() } pub unsafe fn GetObjectGeneration(&self, objectid: usize) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -8526,16 +8526,16 @@ impl ICorProfilerInfo9 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.EnumModules)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } 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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetRuntimeInformation)(::windows_core::Interface::as_raw(self), pclrinstanceid, pruntimetype, pmajorversion, pminorversion, pbuildnumber, pqfeversion, szversionstring.len() as _, pcchversionstring, ::core::mem::transmute(szversionstring.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetRuntimeInformation)(::windows_core::Interface::as_raw(self), pclrinstanceid, pruntimetype, pmajorversion, pminorversion, pbuildnumber, pqfeversion, szversionstring.len().try_into().unwrap(), pcchversionstring, ::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<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetThreadStaticAddress2)(::windows_core::Interface::as_raw(self), classid, fieldtoken, appdomainid, threadid, ppaddress).ok() } pub unsafe fn GetAppDomainsContainingModule(&self, moduleid: usize, pcappdomainids: *mut u32, appdomainids: &mut [usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetAppDomainsContainingModule)(::windows_core::Interface::as_raw(self), moduleid, appdomainids.len() as _, pcappdomainids, ::core::mem::transmute(appdomainids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetAppDomainsContainingModule)(::windows_core::Interface::as_raw(self), moduleid, appdomainids.len().try_into().unwrap(), pcappdomainids, ::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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetModuleInfo2)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len() as _, pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid, pdwmoduleflags).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.base__.GetModuleInfo2)(::windows_core::Interface::as_raw(self), moduleid, ppbaseloadaddress, szname.len().try_into().unwrap(), pcchname, ::core::mem::transmute(szname.as_ptr()), passemblyid, pdwmoduleflags).ok() } pub unsafe fn EnumThreads(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -8551,16 +8551,16 @@ impl ICorProfilerInfo9 { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.RequestRevert)(::windows_core::Interface::as_raw(self), cfunctions, moduleids, methodids, status).ok() } pub unsafe fn GetCodeInfo3(&self, functionid: usize, rejitid: usize, pccodeinfos: *mut u32, codeinfos: &mut [COR_PRF_CODE_INFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetCodeInfo3)(::windows_core::Interface::as_raw(self), functionid, rejitid, codeinfos.len() as _, pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetCodeInfo3)(::windows_core::Interface::as_raw(self), functionid, rejitid, codeinfos.len().try_into().unwrap(), pccodeinfos, ::core::mem::transmute(codeinfos.as_ptr())).ok() } pub unsafe fn GetFunctionFromIP2(&self, ip: *const u8, pfunctionid: *mut usize, prejitid: *mut usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetFunctionFromIP2)(::windows_core::Interface::as_raw(self), ip, pfunctionid, prejitid).ok() } pub unsafe fn GetReJITIDs(&self, functionid: usize, pcrejitids: *mut u32, rejitids: &mut [usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetReJITIDs)(::windows_core::Interface::as_raw(self), functionid, rejitids.len() as _, pcrejitids, ::core::mem::transmute(rejitids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetReJITIDs)(::windows_core::Interface::as_raw(self), functionid, rejitids.len().try_into().unwrap(), pcrejitids, ::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<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetILToNativeMapping2)(::windows_core::Interface::as_raw(self), functionid, rejitid, map.len() as _, pcmap, ::core::mem::transmute(map.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.GetILToNativeMapping2)(::windows_core::Interface::as_raw(self), functionid, rejitid, map.len().try_into().unwrap(), pcmap, ::core::mem::transmute(map.as_ptr())).ok() } pub unsafe fn EnumJITedFunctions2(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -8647,7 +8647,7 @@ impl ICorProfilerMethodEnum { (::windows_core::Interface::vtable(self).GetCount)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn Next(&self, elements: &mut [COR_PRF_METHOD], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), elements.len() as _, ::core::mem::transmute(elements.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), elements.len().try_into().unwrap(), ::core::mem::transmute(elements.as_ptr()), pceltfetched).ok() } } ::windows_core::imp::interface_hierarchy!(ICorProfilerMethodEnum, ::windows_core::IUnknown); @@ -8686,7 +8686,7 @@ impl ICorProfilerModuleEnum { (::windows_core::Interface::vtable(self).GetCount)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn Next(&self, ids: &mut [usize], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ids.len() as _, ::core::mem::transmute(ids.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ids.len().try_into().unwrap(), ::core::mem::transmute(ids.as_ptr()), pceltfetched).ok() } } ::windows_core::imp::interface_hierarchy!(ICorProfilerModuleEnum, ::windows_core::IUnknown); @@ -8725,7 +8725,7 @@ impl ICorProfilerObjectEnum { (::windows_core::Interface::vtable(self).GetCount)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn Next(&self, objects: &mut [usize], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), objects.len() as _, ::core::mem::transmute(objects.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), objects.len().try_into().unwrap(), ::core::mem::transmute(objects.as_ptr()), pceltfetched).ok() } } ::windows_core::imp::interface_hierarchy!(ICorProfilerObjectEnum, ::windows_core::IUnknown); @@ -8764,7 +8764,7 @@ impl ICorProfilerThreadEnum { (::windows_core::Interface::vtable(self).GetCount)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn Next(&self, ids: &mut [usize], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ids.len() as _, ::core::mem::transmute(ids.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ids.len().try_into().unwrap(), ::core::mem::transmute(ids.as_ptr()), pceltfetched).ok() } } ::windows_core::imp::interface_hierarchy!(ICorProfilerThreadEnum, ::windows_core::IUnknown); 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 23b520ab95..22fde62a97 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 @@ -1264,13 +1264,13 @@ pub struct IActiveScriptProfilerControl5_Vtbl { pub struct IActiveScriptProfilerHeapEnum(::windows_core::IUnknown); impl IActiveScriptProfilerHeapEnum { pub unsafe fn Next(&self, heapobjects: &mut [*mut PROFILER_HEAP_OBJECT], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), heapobjects.len() as _, ::core::mem::transmute(heapobjects.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), heapobjects.len().try_into().unwrap(), ::core::mem::transmute(heapobjects.as_ptr()), pceltfetched).ok() } pub unsafe fn GetOptionalInfo(&self, heapobject: *const PROFILER_HEAP_OBJECT, optionalinfo: &mut [PROFILER_HEAP_OBJECT_OPTIONAL_INFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetOptionalInfo)(::windows_core::Interface::as_raw(self), heapobject, optionalinfo.len() as _, ::core::mem::transmute(optionalinfo.as_ptr())).ok() + (::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() } pub unsafe fn FreeObjectAndOptionalInfo(&self, heapobjects: &[*const PROFILER_HEAP_OBJECT]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).FreeObjectAndOptionalInfo)(::windows_core::Interface::as_raw(self), heapobjects.len() as _, ::core::mem::transmute(heapobjects.as_ptr())).ok() + (::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<()> { (::windows_core::Interface::vtable(self).GetNameIdMap)(::windows_core::Interface::as_raw(self), pnamelist, pcelt).ok() @@ -1912,7 +1912,7 @@ impl IDebugApplication11032 { #[cfg(feature = "Win32_Foundation")] pub unsafe fn CallableWaitForHandles(&self, phandles: &[super::super::super::super::Foundation::HANDLE]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CallableWaitForHandles)(::windows_core::Interface::as_raw(self), phandles.len() as _, ::core::mem::transmute(phandles.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CallableWaitForHandles)(::windows_core::Interface::as_raw(self), phandles.len().try_into().unwrap(), ::core::mem::transmute(phandles.as_ptr()), &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IDebugApplication11032, ::windows_core::IUnknown, IRemoteDebugApplication110); @@ -1964,7 +1964,7 @@ impl IDebugApplication11064 { #[cfg(feature = "Win32_Foundation")] pub unsafe fn CallableWaitForHandles(&self, phandles: &[super::super::super::super::Foundation::HANDLE]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CallableWaitForHandles)(::windows_core::Interface::as_raw(self), phandles.len() as _, ::core::mem::transmute(phandles.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CallableWaitForHandles)(::windows_core::Interface::as_raw(self), phandles.len().try_into().unwrap(), ::core::mem::transmute(phandles.as_ptr()), &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IDebugApplication11064, ::windows_core::IUnknown, IRemoteDebugApplication110); @@ -3021,7 +3021,7 @@ impl IDebugDocumentHelper32 { (::windows_core::Interface::vtable(self).SetDefaultTextAttr)(::windows_core::Interface::as_raw(self), statextattr).ok() } pub unsafe fn SetTextAttributes(&self, ulcharoffset: u32, pstatextattr: &[u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetTextAttributes)(::windows_core::Interface::as_raw(self), ulcharoffset, pstatextattr.len() as _, ::core::mem::transmute(pstatextattr.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetTextAttributes)(::windows_core::Interface::as_raw(self), ulcharoffset, pstatextattr.len().try_into().unwrap(), ::core::mem::transmute(pstatextattr.as_ptr())).ok() } pub unsafe fn SetLongName(&self, pszlongname: P0) -> ::windows_core::Result<()> where @@ -3148,7 +3148,7 @@ impl IDebugDocumentHelper64 { (::windows_core::Interface::vtable(self).SetDefaultTextAttr)(::windows_core::Interface::as_raw(self), statextattr).ok() } pub unsafe fn SetTextAttributes(&self, ulcharoffset: u32, pstatextattr: &[u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetTextAttributes)(::windows_core::Interface::as_raw(self), ulcharoffset, pstatextattr.len() as _, ::core::mem::transmute(pstatextattr.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetTextAttributes)(::windows_core::Interface::as_raw(self), ulcharoffset, pstatextattr.len().try_into().unwrap(), ::core::mem::transmute(pstatextattr.as_ptr())).ok() } pub unsafe fn SetLongName(&self, pszlongname: P0) -> ::windows_core::Result<()> where @@ -3427,13 +3427,13 @@ impl IDebugDocumentTextAuthor { (::windows_core::Interface::vtable(self).base__.GetContextOfPosition)(::windows_core::Interface::as_raw(self), ccharacterposition, cnumchars, &mut result__).from_abi(result__) } pub unsafe fn InsertText(&self, ccharacterposition: u32, pchartext: &[u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).InsertText)(::windows_core::Interface::as_raw(self), ccharacterposition, pchartext.len() as _, ::core::mem::transmute(pchartext.as_ptr())).ok() + (::windows_core::Interface::vtable(self).InsertText)(::windows_core::Interface::as_raw(self), ccharacterposition, pchartext.len().try_into().unwrap(), ::core::mem::transmute(pchartext.as_ptr())).ok() } pub unsafe fn RemoveText(&self, ccharacterposition: u32, cnumtoremove: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).RemoveText)(::windows_core::Interface::as_raw(self), ccharacterposition, cnumtoremove).ok() } pub unsafe fn ReplaceText(&self, ccharacterposition: u32, pchartext: &[u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).ReplaceText)(::windows_core::Interface::as_raw(self), ccharacterposition, pchartext.len() as _, ::core::mem::transmute(pchartext.as_ptr())).ok() + (::windows_core::Interface::vtable(self).ReplaceText)(::windows_core::Interface::as_raw(self), ccharacterposition, pchartext.len().try_into().unwrap(), ::core::mem::transmute(pchartext.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IDebugDocumentTextAuthor, ::windows_core::IUnknown, IDebugDocumentInfo, IDebugDocument, IDebugDocumentText); @@ -4200,7 +4200,7 @@ pub struct IEnumDebugStackFrames64_Vtbl { pub struct IEnumJsStackFrames(::windows_core::IUnknown); impl IEnumJsStackFrames { pub unsafe fn Next(&self, pframes: &mut [JS_NATIVE_FRAME], pcfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), pframes.len() as _, ::core::mem::transmute(pframes.as_ptr()), pcfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), pframes.len().try_into().unwrap(), ::core::mem::transmute(pframes.as_ptr()), pcfetched).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -4361,10 +4361,10 @@ pub struct IJsDebugBreakPoint_Vtbl { pub struct IJsDebugDataTarget(::windows_core::IUnknown); impl IJsDebugDataTarget { pub unsafe fn ReadMemory(&self, address: u64, flags: JsDebugReadMemoryFlags, pbuffer: &mut [u8], pbytesread: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).ReadMemory)(::windows_core::Interface::as_raw(self), address, flags, ::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len() as _, pbytesread).ok() + (::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).ok() } pub unsafe fn WriteMemory(&self, address: u64, pmemory: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).WriteMemory)(::windows_core::Interface::as_raw(self), address, ::core::mem::transmute(pmemory.as_ptr()), pmemory.len() as _).ok() + (::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() } pub unsafe fn AllocateVirtualMemory(&self, address: u64, size: u32, allocationtype: u32, pageprotection: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -4390,7 +4390,7 @@ impl IJsDebugDataTarget { (::windows_core::Interface::vtable(self).CreateStackFrameEnumerator)(::windows_core::Interface::as_raw(self), threadid, &mut result__).from_abi(result__) } pub unsafe fn GetThreadContext(&self, threadid: u32, contextflags: u32, pcontext: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetThreadContext)(::windows_core::Interface::as_raw(self), threadid, contextflags, pcontext.len() as _, ::core::mem::transmute(pcontext.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetThreadContext)(::windows_core::Interface::as_raw(self), threadid, contextflags, pcontext.len().try_into().unwrap(), ::core::mem::transmute(pcontext.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IJsDebugDataTarget, ::windows_core::IUnknown); @@ -4562,7 +4562,7 @@ pub struct IJsDebugStackWalker_Vtbl { pub struct IJsEnumDebugProperty(::windows_core::IUnknown); impl IJsEnumDebugProperty { pub unsafe fn Next(&self, ppdebugproperty: &mut [::core::option::Option], pactualcount: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppdebugproperty.len() as _, ::core::mem::transmute(ppdebugproperty.as_ptr()), pactualcount).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppdebugproperty.len().try_into().unwrap(), ::core::mem::transmute(ppdebugproperty.as_ptr()), pactualcount).ok() } pub unsafe fn GetCount(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -5143,7 +5143,7 @@ impl IScriptEntry { P3: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.CreateChildHandler)(::windows_core::Interface::as_raw(self), pszdefaultname.into_param().abi(), ::core::mem::transmute(prgpsznames.as_ptr()), prgpsznames.len() as _, pszevent.into_param().abi(), pszdelimiter.into_param().abi(), ptisignature.into_param().abi(), imethodsignature, isn, dwcookie, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateChildHandler)(::windows_core::Interface::as_raw(self), pszdefaultname.into_param().abi(), ::core::mem::transmute(prgpsznames.as_ptr()), prgpsznames.len().try_into().unwrap(), pszevent.into_param().abi(), pszdelimiter.into_param().abi(), ptisignature.into_param().abi(), imethodsignature, isn, dwcookie, &mut result__).from_abi(result__) } pub unsafe fn GetText(&self) -> ::windows_core::Result<::windows_core::BSTR> { let mut result__ = ::std::mem::zeroed(); @@ -5314,7 +5314,7 @@ impl IScriptNode { P3: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateChildHandler)(::windows_core::Interface::as_raw(self), pszdefaultname.into_param().abi(), ::core::mem::transmute(prgpsznames.as_ptr()), prgpsznames.len() as _, pszevent.into_param().abi(), pszdelimiter.into_param().abi(), ptisignature.into_param().abi(), imethodsignature, isn, dwcookie, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateChildHandler)(::windows_core::Interface::as_raw(self), pszdefaultname.into_param().abi(), ::core::mem::transmute(prgpsznames.as_ptr()), prgpsznames.len().try_into().unwrap(), pszevent.into_param().abi(), pszdelimiter.into_param().abi(), ptisignature.into_param().abi(), imethodsignature, isn, dwcookie, &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IScriptNode, ::windows_core::IUnknown); @@ -5393,7 +5393,7 @@ impl IScriptScriptlet { P3: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.CreateChildHandler)(::windows_core::Interface::as_raw(self), pszdefaultname.into_param().abi(), ::core::mem::transmute(prgpsznames.as_ptr()), prgpsznames.len() as _, pszevent.into_param().abi(), pszdelimiter.into_param().abi(), ptisignature.into_param().abi(), imethodsignature, isn, dwcookie, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.CreateChildHandler)(::windows_core::Interface::as_raw(self), pszdefaultname.into_param().abi(), ::core::mem::transmute(prgpsznames.as_ptr()), prgpsznames.len().try_into().unwrap(), pszevent.into_param().abi(), pszdelimiter.into_param().abi(), ptisignature.into_param().abi(), imethodsignature, isn, dwcookie, &mut result__).from_abi(result__) } pub unsafe fn GetText(&self) -> ::windows_core::Result<::windows_core::BSTR> { let mut result__ = ::std::mem::zeroed(); 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 bc92f3965f..66e2441d1e 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 @@ -1354,10 +1354,10 @@ impl IDebugAdvanced2 { where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { - (::windows_core::Interface::vtable(self).FindSourceFileAndToken)(::windows_core::Interface::as_raw(self), startelement, modaddr, file.into_param().abi(), flags, ::core::mem::transmute(filetoken.unwrap_or(::std::ptr::null())), filetokensize, ::core::mem::transmute(foundelement.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(foundsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).FindSourceFileAndToken)(::windows_core::Interface::as_raw(self), startelement, modaddr, file.into_param().abi(), flags, ::core::mem::transmute(filetoken.unwrap_or(::std::ptr::null())), filetokensize, ::core::mem::transmute(foundelement.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(foundsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolInformation(&self, which: u32, arg64: u64, arg32: u32, buffer: ::core::option::Option<*mut ::core::ffi::c_void>, buffersize: u32, infosize: ::core::option::Option<*mut u32>, stringbuffer: ::core::option::Option<&mut [u8]>, stringsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSymbolInformation)(::windows_core::Interface::as_raw(self), which, arg64, arg32, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize, ::core::mem::transmute(infosize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(stringbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), stringbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolInformation)(::windows_core::Interface::as_raw(self), which, arg64, arg32, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize, ::core::mem::transmute(infosize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(stringbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), stringbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSystemObjectInformation(&self, which: u32, arg64: u64, arg32: u32, buffer: ::core::option::Option<*mut ::core::ffi::c_void>, buffersize: u32, infosize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetSystemObjectInformation)(::windows_core::Interface::as_raw(self), which, arg64, arg32, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize, ::core::mem::transmute(infosize.unwrap_or(::std::ptr::null_mut()))).ok() @@ -1405,10 +1405,10 @@ impl IDebugAdvanced3 { where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { - (::windows_core::Interface::vtable(self).FindSourceFileAndToken)(::windows_core::Interface::as_raw(self), startelement, modaddr, file.into_param().abi(), flags, ::core::mem::transmute(filetoken.unwrap_or(::std::ptr::null())), filetokensize, ::core::mem::transmute(foundelement.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(foundsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).FindSourceFileAndToken)(::windows_core::Interface::as_raw(self), startelement, modaddr, file.into_param().abi(), flags, ::core::mem::transmute(filetoken.unwrap_or(::std::ptr::null())), filetokensize, ::core::mem::transmute(foundelement.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(foundsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolInformation(&self, which: u32, arg64: u64, arg32: u32, buffer: ::core::option::Option<*mut ::core::ffi::c_void>, buffersize: u32, infosize: ::core::option::Option<*mut u32>, stringbuffer: ::core::option::Option<&mut [u8]>, stringsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSymbolInformation)(::windows_core::Interface::as_raw(self), which, arg64, arg32, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize, ::core::mem::transmute(infosize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(stringbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), stringbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolInformation)(::windows_core::Interface::as_raw(self), which, arg64, arg32, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize, ::core::mem::transmute(infosize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(stringbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), stringbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSystemObjectInformation(&self, which: u32, arg64: u64, arg32: u32, buffer: ::core::option::Option<*mut ::core::ffi::c_void>, buffersize: u32, infosize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetSystemObjectInformation)(::windows_core::Interface::as_raw(self), which, arg64, arg32, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize, ::core::mem::transmute(infosize.unwrap_or(::std::ptr::null_mut()))).ok() @@ -1423,10 +1423,10 @@ impl IDebugAdvanced3 { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).FindSourceFileAndTokenWide)(::windows_core::Interface::as_raw(self), startelement, modaddr, file.into_param().abi(), flags, ::core::mem::transmute(filetoken.unwrap_or(::std::ptr::null())), filetokensize, ::core::mem::transmute(foundelement.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(foundsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).FindSourceFileAndTokenWide)(::windows_core::Interface::as_raw(self), startelement, modaddr, file.into_param().abi(), flags, ::core::mem::transmute(filetoken.unwrap_or(::std::ptr::null())), filetokensize, ::core::mem::transmute(foundelement.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(foundsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolInformationWide(&self, which: u32, arg64: u64, arg32: u32, buffer: ::core::option::Option<*mut ::core::ffi::c_void>, buffersize: u32, infosize: ::core::option::Option<*mut u32>, stringbuffer: ::core::option::Option<&mut [u16]>, stringsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSymbolInformationWide)(::windows_core::Interface::as_raw(self), which, arg64, arg32, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize, ::core::mem::transmute(infosize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(stringbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), stringbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolInformationWide)(::windows_core::Interface::as_raw(self), which, arg64, arg32, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize, ::core::mem::transmute(infosize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(stringbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), stringbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() } } ::windows_core::imp::interface_hierarchy!(IDebugAdvanced3, ::windows_core::IUnknown); @@ -1474,10 +1474,10 @@ impl IDebugAdvanced4 { where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { - (::windows_core::Interface::vtable(self).FindSourceFileAndToken)(::windows_core::Interface::as_raw(self), startelement, modaddr, file.into_param().abi(), flags, ::core::mem::transmute(filetoken.unwrap_or(::std::ptr::null())), filetokensize, ::core::mem::transmute(foundelement.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(foundsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).FindSourceFileAndToken)(::windows_core::Interface::as_raw(self), startelement, modaddr, file.into_param().abi(), flags, ::core::mem::transmute(filetoken.unwrap_or(::std::ptr::null())), filetokensize, ::core::mem::transmute(foundelement.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(foundsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolInformation(&self, which: u32, arg64: u64, arg32: u32, buffer: ::core::option::Option<*mut ::core::ffi::c_void>, buffersize: u32, infosize: ::core::option::Option<*mut u32>, stringbuffer: ::core::option::Option<&mut [u8]>, stringsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSymbolInformation)(::windows_core::Interface::as_raw(self), which, arg64, arg32, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize, ::core::mem::transmute(infosize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(stringbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), stringbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolInformation)(::windows_core::Interface::as_raw(self), which, arg64, arg32, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize, ::core::mem::transmute(infosize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(stringbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), stringbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSystemObjectInformation(&self, which: u32, arg64: u64, arg32: u32, buffer: ::core::option::Option<*mut ::core::ffi::c_void>, buffersize: u32, infosize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetSystemObjectInformation)(::windows_core::Interface::as_raw(self), which, arg64, arg32, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize, ::core::mem::transmute(infosize.unwrap_or(::std::ptr::null_mut()))).ok() @@ -1492,10 +1492,10 @@ impl IDebugAdvanced4 { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).FindSourceFileAndTokenWide)(::windows_core::Interface::as_raw(self), startelement, modaddr, file.into_param().abi(), flags, ::core::mem::transmute(filetoken.unwrap_or(::std::ptr::null())), filetokensize, ::core::mem::transmute(foundelement.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(foundsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).FindSourceFileAndTokenWide)(::windows_core::Interface::as_raw(self), startelement, modaddr, file.into_param().abi(), flags, ::core::mem::transmute(filetoken.unwrap_or(::std::ptr::null())), filetokensize, ::core::mem::transmute(foundelement.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(foundsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolInformationWide(&self, which: u32, arg64: u64, arg32: u32, buffer: ::core::option::Option<*mut ::core::ffi::c_void>, buffersize: u32, infosize: ::core::option::Option<*mut u32>, stringbuffer: ::core::option::Option<&mut [u16]>, stringsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSymbolInformationWide)(::windows_core::Interface::as_raw(self), which, arg64, arg32, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize, ::core::mem::transmute(infosize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(stringbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), stringbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolInformationWide)(::windows_core::Interface::as_raw(self), which, arg64, arg32, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize, ::core::mem::transmute(infosize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(stringbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), stringbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolInformationWideEx(&self, which: u32, arg64: u64, arg32: u32, buffer: ::core::option::Option<*mut ::core::ffi::c_void>, buffersize: u32, infosize: ::core::option::Option<*mut u32>, stringbuffer: ::core::option::Option<&mut [u16]>, stringsize: ::core::option::Option<*mut u32>, pinfoex: ::core::option::Option<*mut SYMBOL_INFO_EX>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetSymbolInformationWideEx)( @@ -1507,7 +1507,7 @@ impl IDebugAdvanced4 { buffersize, ::core::mem::transmute(infosize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(stringbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - stringbuffer.as_deref().map_or(0, |slice| slice.len() as _), + stringbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pinfoex.unwrap_or(::std::ptr::null_mut())), ) @@ -1597,7 +1597,7 @@ impl IDebugBreakpoint { (::windows_core::Interface::vtable(self).SetMatchThreadId)(::windows_core::Interface::as_raw(self), thread).ok() } pub unsafe fn GetCommand(&self, buffer: ::core::option::Option<&mut [u8]>, commandsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetCommand)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetCommand)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetCommand(&self, command: P0) -> ::windows_core::Result<()> where @@ -1606,7 +1606,7 @@ impl IDebugBreakpoint { (::windows_core::Interface::vtable(self).SetCommand)(::windows_core::Interface::as_raw(self), command.into_param().abi()).ok() } pub unsafe fn GetOffsetExpression(&self, buffer: ::core::option::Option<&mut [u8]>, expressionsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetOffsetExpression)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(expressionsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetOffsetExpression)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(expressionsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetOffsetExpression(&self, expression: P0) -> ::windows_core::Result<()> where @@ -1711,7 +1711,7 @@ impl IDebugBreakpoint2 { (::windows_core::Interface::vtable(self).SetMatchThreadId)(::windows_core::Interface::as_raw(self), thread).ok() } pub unsafe fn GetCommand(&self, buffer: ::core::option::Option<&mut [u8]>, commandsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetCommand)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetCommand)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetCommand(&self, command: P0) -> ::windows_core::Result<()> where @@ -1720,7 +1720,7 @@ impl IDebugBreakpoint2 { (::windows_core::Interface::vtable(self).SetCommand)(::windows_core::Interface::as_raw(self), command.into_param().abi()).ok() } pub unsafe fn GetOffsetExpression(&self, buffer: ::core::option::Option<&mut [u8]>, expressionsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetOffsetExpression)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(expressionsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetOffsetExpression)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(expressionsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetOffsetExpression(&self, expression: P0) -> ::windows_core::Result<()> where @@ -1732,7 +1732,7 @@ impl IDebugBreakpoint2 { (::windows_core::Interface::vtable(self).GetParameters)(::windows_core::Interface::as_raw(self), params).ok() } pub unsafe fn GetCommandWide(&self, buffer: ::core::option::Option<&mut [u16]>, commandsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetCommandWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetCommandWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetCommandWide(&self, command: P0) -> ::windows_core::Result<()> where @@ -1741,7 +1741,7 @@ impl IDebugBreakpoint2 { (::windows_core::Interface::vtable(self).SetCommandWide)(::windows_core::Interface::as_raw(self), command.into_param().abi()).ok() } pub unsafe fn GetOffsetExpressionWide(&self, buffer: ::core::option::Option<&mut [u16]>, expressionsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetOffsetExpressionWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(expressionsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetOffsetExpressionWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(expressionsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetOffsetExpressionWide(&self, expression: P0) -> ::windows_core::Result<()> where @@ -1847,7 +1847,7 @@ impl IDebugBreakpoint3 { (::windows_core::Interface::vtable(self).SetMatchThreadId)(::windows_core::Interface::as_raw(self), thread).ok() } pub unsafe fn GetCommand(&self, buffer: ::core::option::Option<&mut [u8]>, commandsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetCommand)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetCommand)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetCommand(&self, command: P0) -> ::windows_core::Result<()> where @@ -1856,7 +1856,7 @@ impl IDebugBreakpoint3 { (::windows_core::Interface::vtable(self).SetCommand)(::windows_core::Interface::as_raw(self), command.into_param().abi()).ok() } pub unsafe fn GetOffsetExpression(&self, buffer: ::core::option::Option<&mut [u8]>, expressionsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetOffsetExpression)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(expressionsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetOffsetExpression)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(expressionsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetOffsetExpression(&self, expression: P0) -> ::windows_core::Result<()> where @@ -1868,7 +1868,7 @@ impl IDebugBreakpoint3 { (::windows_core::Interface::vtable(self).GetParameters)(::windows_core::Interface::as_raw(self), params).ok() } pub unsafe fn GetCommandWide(&self, buffer: ::core::option::Option<&mut [u16]>, commandsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetCommandWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetCommandWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetCommandWide(&self, command: P0) -> ::windows_core::Result<()> where @@ -1877,7 +1877,7 @@ impl IDebugBreakpoint3 { (::windows_core::Interface::vtable(self).SetCommandWide)(::windows_core::Interface::as_raw(self), command.into_param().abi()).ok() } pub unsafe fn GetOffsetExpressionWide(&self, buffer: ::core::option::Option<&mut [u16]>, expressionsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetOffsetExpressionWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(expressionsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetOffsetExpressionWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(expressionsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetOffsetExpressionWide(&self, expression: P0) -> ::windows_core::Result<()> where @@ -1939,7 +1939,7 @@ impl IDebugClient { (::windows_core::Interface::vtable(self).AttachKernel)(::windows_core::Interface::as_raw(self), flags, connectoptions.into_param().abi()).ok() } pub unsafe fn GetKernelConnectionOptions(&self, buffer: ::core::option::Option<&mut [u8]>, optionssize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetKernelConnectionOptions)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(optionssize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetKernelConnectionOptions)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(optionssize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetKernelConnectionOptions(&self, options: P0) -> ::windows_core::Result<()> where @@ -1964,7 +1964,7 @@ impl IDebugClient { (::windows_core::Interface::vtable(self).DisconnectProcessServer)(::windows_core::Interface::as_raw(self), server).ok() } pub unsafe fn GetRunningProcessSystemIds(&self, server: u64, ids: ::core::option::Option<&mut [u32]>, actualcount: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(::windows_core::Interface::as_raw(self), server, ::core::mem::transmute(ids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(actualcount.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(::windows_core::Interface::as_raw(self), server, ::core::mem::transmute(ids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualcount.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetRunningProcessSystemIdByExecutableName(&self, server: u64, exename: P0, flags: u32) -> ::windows_core::Result where @@ -1980,10 +1980,10 @@ impl IDebugClient { systemid, 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() as _), + exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualexenamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(description.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - description.as_deref().map_or(0, |slice| slice.len() as _), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualdescriptionsize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -2117,7 +2117,7 @@ impl IDebugClient { (::windows_core::Interface::vtable(self).SetOutputWidth)(::windows_core::Interface::as_raw(self), columns).ok() } pub unsafe fn GetOutputLinePrefix(&self, buffer: ::core::option::Option<&mut [u8]>, prefixsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetOutputLinePrefix)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prefixsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetOutputLinePrefix)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(prefixsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetOutputLinePrefix(&self, prefix: P0) -> ::windows_core::Result<()> where @@ -2126,7 +2126,7 @@ impl IDebugClient { (::windows_core::Interface::vtable(self).SetOutputLinePrefix)(::windows_core::Interface::as_raw(self), prefix.into_param().abi()).ok() } pub unsafe fn GetIdentity(&self, buffer: ::core::option::Option<&mut [u8]>, identitysize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetIdentity)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(identitysize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetIdentity)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(identitysize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: P0) -> ::windows_core::Result<()> where @@ -2216,7 +2216,7 @@ impl IDebugClient2 { (::windows_core::Interface::vtable(self).AttachKernel)(::windows_core::Interface::as_raw(self), flags, connectoptions.into_param().abi()).ok() } pub unsafe fn GetKernelConnectionOptions(&self, buffer: ::core::option::Option<&mut [u8]>, optionssize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetKernelConnectionOptions)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(optionssize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetKernelConnectionOptions)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(optionssize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetKernelConnectionOptions(&self, options: P0) -> ::windows_core::Result<()> where @@ -2241,7 +2241,7 @@ impl IDebugClient2 { (::windows_core::Interface::vtable(self).DisconnectProcessServer)(::windows_core::Interface::as_raw(self), server).ok() } pub unsafe fn GetRunningProcessSystemIds(&self, server: u64, ids: ::core::option::Option<&mut [u32]>, actualcount: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(::windows_core::Interface::as_raw(self), server, ::core::mem::transmute(ids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(actualcount.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(::windows_core::Interface::as_raw(self), server, ::core::mem::transmute(ids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualcount.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetRunningProcessSystemIdByExecutableName(&self, server: u64, exename: P0, flags: u32) -> ::windows_core::Result where @@ -2257,10 +2257,10 @@ impl IDebugClient2 { systemid, 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() as _), + exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualexenamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(description.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - description.as_deref().map_or(0, |slice| slice.len() as _), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualdescriptionsize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -2394,7 +2394,7 @@ impl IDebugClient2 { (::windows_core::Interface::vtable(self).SetOutputWidth)(::windows_core::Interface::as_raw(self), columns).ok() } pub unsafe fn GetOutputLinePrefix(&self, buffer: ::core::option::Option<&mut [u8]>, prefixsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetOutputLinePrefix)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prefixsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetOutputLinePrefix)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(prefixsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetOutputLinePrefix(&self, prefix: P0) -> ::windows_core::Result<()> where @@ -2403,7 +2403,7 @@ impl IDebugClient2 { (::windows_core::Interface::vtable(self).SetOutputLinePrefix)(::windows_core::Interface::as_raw(self), prefix.into_param().abi()).ok() } pub unsafe fn GetIdentity(&self, buffer: ::core::option::Option<&mut [u8]>, identitysize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetIdentity)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(identitysize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetIdentity)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(identitysize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: P0) -> ::windows_core::Result<()> where @@ -2532,7 +2532,7 @@ impl IDebugClient3 { (::windows_core::Interface::vtable(self).AttachKernel)(::windows_core::Interface::as_raw(self), flags, connectoptions.into_param().abi()).ok() } pub unsafe fn GetKernelConnectionOptions(&self, buffer: ::core::option::Option<&mut [u8]>, optionssize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetKernelConnectionOptions)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(optionssize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetKernelConnectionOptions)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(optionssize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetKernelConnectionOptions(&self, options: P0) -> ::windows_core::Result<()> where @@ -2557,7 +2557,7 @@ impl IDebugClient3 { (::windows_core::Interface::vtable(self).DisconnectProcessServer)(::windows_core::Interface::as_raw(self), server).ok() } pub unsafe fn GetRunningProcessSystemIds(&self, server: u64, ids: ::core::option::Option<&mut [u32]>, actualcount: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(::windows_core::Interface::as_raw(self), server, ::core::mem::transmute(ids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(actualcount.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(::windows_core::Interface::as_raw(self), server, ::core::mem::transmute(ids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualcount.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetRunningProcessSystemIdByExecutableName(&self, server: u64, exename: P0, flags: u32) -> ::windows_core::Result where @@ -2573,10 +2573,10 @@ impl IDebugClient3 { systemid, 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() as _), + exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualexenamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(description.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - description.as_deref().map_or(0, |slice| slice.len() as _), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualdescriptionsize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -2710,7 +2710,7 @@ impl IDebugClient3 { (::windows_core::Interface::vtable(self).SetOutputWidth)(::windows_core::Interface::as_raw(self), columns).ok() } pub unsafe fn GetOutputLinePrefix(&self, buffer: ::core::option::Option<&mut [u8]>, prefixsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetOutputLinePrefix)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prefixsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetOutputLinePrefix)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(prefixsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetOutputLinePrefix(&self, prefix: P0) -> ::windows_core::Result<()> where @@ -2719,7 +2719,7 @@ impl IDebugClient3 { (::windows_core::Interface::vtable(self).SetOutputLinePrefix)(::windows_core::Interface::as_raw(self), prefix.into_param().abi()).ok() } pub unsafe fn GetIdentity(&self, buffer: ::core::option::Option<&mut [u8]>, identitysize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetIdentity)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(identitysize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetIdentity)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(identitysize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: P0) -> ::windows_core::Result<()> where @@ -2785,10 +2785,10 @@ impl IDebugClient3 { systemid, 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() as _), + exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualexenamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(description.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - description.as_deref().map_or(0, |slice| slice.len() as _), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualdescriptionsize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -2886,7 +2886,7 @@ impl IDebugClient4 { (::windows_core::Interface::vtable(self).AttachKernel)(::windows_core::Interface::as_raw(self), flags, connectoptions.into_param().abi()).ok() } pub unsafe fn GetKernelConnectionOptions(&self, buffer: ::core::option::Option<&mut [u8]>, optionssize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetKernelConnectionOptions)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(optionssize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetKernelConnectionOptions)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(optionssize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetKernelConnectionOptions(&self, options: P0) -> ::windows_core::Result<()> where @@ -2911,7 +2911,7 @@ impl IDebugClient4 { (::windows_core::Interface::vtable(self).DisconnectProcessServer)(::windows_core::Interface::as_raw(self), server).ok() } pub unsafe fn GetRunningProcessSystemIds(&self, server: u64, ids: ::core::option::Option<&mut [u32]>, actualcount: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(::windows_core::Interface::as_raw(self), server, ::core::mem::transmute(ids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(actualcount.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(::windows_core::Interface::as_raw(self), server, ::core::mem::transmute(ids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualcount.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetRunningProcessSystemIdByExecutableName(&self, server: u64, exename: P0, flags: u32) -> ::windows_core::Result where @@ -2927,10 +2927,10 @@ impl IDebugClient4 { systemid, 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() as _), + exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualexenamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(description.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - description.as_deref().map_or(0, |slice| slice.len() as _), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualdescriptionsize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -3064,7 +3064,7 @@ impl IDebugClient4 { (::windows_core::Interface::vtable(self).SetOutputWidth)(::windows_core::Interface::as_raw(self), columns).ok() } pub unsafe fn GetOutputLinePrefix(&self, buffer: ::core::option::Option<&mut [u8]>, prefixsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetOutputLinePrefix)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prefixsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetOutputLinePrefix)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(prefixsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetOutputLinePrefix(&self, prefix: P0) -> ::windows_core::Result<()> where @@ -3073,7 +3073,7 @@ impl IDebugClient4 { (::windows_core::Interface::vtable(self).SetOutputLinePrefix)(::windows_core::Interface::as_raw(self), prefix.into_param().abi()).ok() } pub unsafe fn GetIdentity(&self, buffer: ::core::option::Option<&mut [u8]>, identitysize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetIdentity)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(identitysize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetIdentity)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(identitysize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: P0) -> ::windows_core::Result<()> where @@ -3139,10 +3139,10 @@ impl IDebugClient4 { systemid, 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() as _), + exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualexenamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(description.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - description.as_deref().map_or(0, |slice| slice.len() as _), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualdescriptionsize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -3183,10 +3183,10 @@ impl IDebugClient4 { (::windows_core::Interface::vtable(self).GetNumberDumpFiles)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetDumpFile(&self, index: u32, buffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>, handle: ::core::option::Option<*mut u64>, r#type: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDumpFile)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(handle.unwrap_or(::std::ptr::null_mut())), r#type).ok() + (::windows_core::Interface::vtable(self).GetDumpFile)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(handle.unwrap_or(::std::ptr::null_mut())), r#type).ok() } pub unsafe fn GetDumpFileWide(&self, index: u32, buffer: ::core::option::Option<&mut [u16]>, namesize: ::core::option::Option<*mut u32>, handle: ::core::option::Option<*mut u64>, r#type: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDumpFileWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(handle.unwrap_or(::std::ptr::null_mut())), r#type).ok() + (::windows_core::Interface::vtable(self).GetDumpFileWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(handle.unwrap_or(::std::ptr::null_mut())), r#type).ok() } } ::windows_core::imp::interface_hierarchy!(IDebugClient4, ::windows_core::IUnknown); @@ -3275,7 +3275,7 @@ impl IDebugClient5 { (::windows_core::Interface::vtable(self).AttachKernel)(::windows_core::Interface::as_raw(self), flags, connectoptions.into_param().abi()).ok() } pub unsafe fn GetKernelConnectionOptions(&self, buffer: ::core::option::Option<&mut [u8]>, optionssize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetKernelConnectionOptions)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(optionssize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetKernelConnectionOptions)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(optionssize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetKernelConnectionOptions(&self, options: P0) -> ::windows_core::Result<()> where @@ -3300,7 +3300,7 @@ impl IDebugClient5 { (::windows_core::Interface::vtable(self).DisconnectProcessServer)(::windows_core::Interface::as_raw(self), server).ok() } pub unsafe fn GetRunningProcessSystemIds(&self, server: u64, ids: ::core::option::Option<&mut [u32]>, actualcount: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(::windows_core::Interface::as_raw(self), server, ::core::mem::transmute(ids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(actualcount.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(::windows_core::Interface::as_raw(self), server, ::core::mem::transmute(ids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualcount.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetRunningProcessSystemIdByExecutableName(&self, server: u64, exename: P0, flags: u32) -> ::windows_core::Result where @@ -3316,10 +3316,10 @@ impl IDebugClient5 { systemid, 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() as _), + exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualexenamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(description.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - description.as_deref().map_or(0, |slice| slice.len() as _), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualdescriptionsize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -3453,7 +3453,7 @@ impl IDebugClient5 { (::windows_core::Interface::vtable(self).SetOutputWidth)(::windows_core::Interface::as_raw(self), columns).ok() } pub unsafe fn GetOutputLinePrefix(&self, buffer: ::core::option::Option<&mut [u8]>, prefixsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetOutputLinePrefix)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prefixsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetOutputLinePrefix)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(prefixsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetOutputLinePrefix(&self, prefix: P0) -> ::windows_core::Result<()> where @@ -3462,7 +3462,7 @@ impl IDebugClient5 { (::windows_core::Interface::vtable(self).SetOutputLinePrefix)(::windows_core::Interface::as_raw(self), prefix.into_param().abi()).ok() } pub unsafe fn GetIdentity(&self, buffer: ::core::option::Option<&mut [u8]>, identitysize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetIdentity)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(identitysize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetIdentity)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(identitysize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: P0) -> ::windows_core::Result<()> where @@ -3528,10 +3528,10 @@ impl IDebugClient5 { systemid, 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() as _), + exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualexenamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(description.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - description.as_deref().map_or(0, |slice| slice.len() as _), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualdescriptionsize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -3572,10 +3572,10 @@ impl IDebugClient5 { (::windows_core::Interface::vtable(self).GetNumberDumpFiles)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetDumpFile(&self, index: u32, buffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>, handle: ::core::option::Option<*mut u64>, r#type: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDumpFile)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(handle.unwrap_or(::std::ptr::null_mut())), r#type).ok() + (::windows_core::Interface::vtable(self).GetDumpFile)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(handle.unwrap_or(::std::ptr::null_mut())), r#type).ok() } pub unsafe fn GetDumpFileWide(&self, index: u32, buffer: ::core::option::Option<&mut [u16]>, namesize: ::core::option::Option<*mut u32>, handle: ::core::option::Option<*mut u64>, r#type: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDumpFileWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(handle.unwrap_or(::std::ptr::null_mut())), r#type).ok() + (::windows_core::Interface::vtable(self).GetDumpFileWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(handle.unwrap_or(::std::ptr::null_mut())), r#type).ok() } pub unsafe fn AttachKernelWide(&self, flags: u32, connectoptions: P0) -> ::windows_core::Result<()> where @@ -3584,7 +3584,7 @@ impl IDebugClient5 { (::windows_core::Interface::vtable(self).AttachKernelWide)(::windows_core::Interface::as_raw(self), flags, connectoptions.into_param().abi()).ok() } pub unsafe fn GetKernelConnectionOptionsWide(&self, buffer: ::core::option::Option<&mut [u16]>, optionssize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetKernelConnectionOptionsWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(optionssize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetKernelConnectionOptionsWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(optionssize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetKernelConnectionOptionsWide(&self, options: P0) -> ::windows_core::Result<()> where @@ -3628,7 +3628,7 @@ impl IDebugClient5 { (::windows_core::Interface::vtable(self).SetOutputCallbacksWide)(::windows_core::Interface::as_raw(self), callbacks.into_param().abi()).ok() } pub unsafe fn GetOutputLinePrefixWide(&self, buffer: ::core::option::Option<&mut [u16]>, prefixsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetOutputLinePrefixWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prefixsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetOutputLinePrefixWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(prefixsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetOutputLinePrefixWide(&self, prefix: P0) -> ::windows_core::Result<()> where @@ -3637,7 +3637,7 @@ impl IDebugClient5 { (::windows_core::Interface::vtable(self).SetOutputLinePrefixWide)(::windows_core::Interface::as_raw(self), prefix.into_param().abi()).ok() } pub unsafe fn GetIdentityWide(&self, buffer: ::core::option::Option<&mut [u16]>, identitysize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetIdentityWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(identitysize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetIdentityWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(identitysize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn OutputIdentityWide(&self, outputcontrol: u32, flags: u32, format: P0) -> ::windows_core::Result<()> where @@ -3717,7 +3717,7 @@ impl IDebugClient5 { (::windows_core::Interface::vtable(self).GetNumberEventCallbacks)(::windows_core::Interface::as_raw(self), eventflags, &mut result__).from_abi(result__) } pub unsafe fn GetQuitLockString(&self, buffer: ::core::option::Option<&mut [u8]>, stringsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetQuitLockString)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetQuitLockString)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetQuitLockString(&self, string: P0) -> ::windows_core::Result<()> where @@ -3726,7 +3726,7 @@ impl IDebugClient5 { (::windows_core::Interface::vtable(self).SetQuitLockString)(::windows_core::Interface::as_raw(self), string.into_param().abi()).ok() } pub unsafe fn GetQuitLockStringWide(&self, buffer: ::core::option::Option<&mut [u16]>, stringsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetQuitLockStringWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetQuitLockStringWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetQuitLockStringWide(&self, string: P0) -> ::windows_core::Result<()> where @@ -3850,7 +3850,7 @@ impl IDebugClient6 { (::windows_core::Interface::vtable(self).AttachKernel)(::windows_core::Interface::as_raw(self), flags, connectoptions.into_param().abi()).ok() } pub unsafe fn GetKernelConnectionOptions(&self, buffer: ::core::option::Option<&mut [u8]>, optionssize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetKernelConnectionOptions)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(optionssize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetKernelConnectionOptions)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(optionssize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetKernelConnectionOptions(&self, options: P0) -> ::windows_core::Result<()> where @@ -3875,7 +3875,7 @@ impl IDebugClient6 { (::windows_core::Interface::vtable(self).DisconnectProcessServer)(::windows_core::Interface::as_raw(self), server).ok() } pub unsafe fn GetRunningProcessSystemIds(&self, server: u64, ids: ::core::option::Option<&mut [u32]>, actualcount: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(::windows_core::Interface::as_raw(self), server, ::core::mem::transmute(ids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(actualcount.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(::windows_core::Interface::as_raw(self), server, ::core::mem::transmute(ids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualcount.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetRunningProcessSystemIdByExecutableName(&self, server: u64, exename: P0, flags: u32) -> ::windows_core::Result where @@ -3891,10 +3891,10 @@ impl IDebugClient6 { systemid, 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() as _), + exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualexenamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(description.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - description.as_deref().map_or(0, |slice| slice.len() as _), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualdescriptionsize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -4028,7 +4028,7 @@ impl IDebugClient6 { (::windows_core::Interface::vtable(self).SetOutputWidth)(::windows_core::Interface::as_raw(self), columns).ok() } pub unsafe fn GetOutputLinePrefix(&self, buffer: ::core::option::Option<&mut [u8]>, prefixsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetOutputLinePrefix)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prefixsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetOutputLinePrefix)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(prefixsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetOutputLinePrefix(&self, prefix: P0) -> ::windows_core::Result<()> where @@ -4037,7 +4037,7 @@ impl IDebugClient6 { (::windows_core::Interface::vtable(self).SetOutputLinePrefix)(::windows_core::Interface::as_raw(self), prefix.into_param().abi()).ok() } pub unsafe fn GetIdentity(&self, buffer: ::core::option::Option<&mut [u8]>, identitysize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetIdentity)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(identitysize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetIdentity)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(identitysize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: P0) -> ::windows_core::Result<()> where @@ -4103,10 +4103,10 @@ impl IDebugClient6 { systemid, 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() as _), + exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualexenamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(description.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - description.as_deref().map_or(0, |slice| slice.len() as _), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualdescriptionsize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -4147,10 +4147,10 @@ impl IDebugClient6 { (::windows_core::Interface::vtable(self).GetNumberDumpFiles)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetDumpFile(&self, index: u32, buffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>, handle: ::core::option::Option<*mut u64>, r#type: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDumpFile)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(handle.unwrap_or(::std::ptr::null_mut())), r#type).ok() + (::windows_core::Interface::vtable(self).GetDumpFile)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(handle.unwrap_or(::std::ptr::null_mut())), r#type).ok() } pub unsafe fn GetDumpFileWide(&self, index: u32, buffer: ::core::option::Option<&mut [u16]>, namesize: ::core::option::Option<*mut u32>, handle: ::core::option::Option<*mut u64>, r#type: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDumpFileWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(handle.unwrap_or(::std::ptr::null_mut())), r#type).ok() + (::windows_core::Interface::vtable(self).GetDumpFileWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(handle.unwrap_or(::std::ptr::null_mut())), r#type).ok() } pub unsafe fn AttachKernelWide(&self, flags: u32, connectoptions: P0) -> ::windows_core::Result<()> where @@ -4159,7 +4159,7 @@ impl IDebugClient6 { (::windows_core::Interface::vtable(self).AttachKernelWide)(::windows_core::Interface::as_raw(self), flags, connectoptions.into_param().abi()).ok() } pub unsafe fn GetKernelConnectionOptionsWide(&self, buffer: ::core::option::Option<&mut [u16]>, optionssize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetKernelConnectionOptionsWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(optionssize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetKernelConnectionOptionsWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(optionssize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetKernelConnectionOptionsWide(&self, options: P0) -> ::windows_core::Result<()> where @@ -4203,7 +4203,7 @@ impl IDebugClient6 { (::windows_core::Interface::vtable(self).SetOutputCallbacksWide)(::windows_core::Interface::as_raw(self), callbacks.into_param().abi()).ok() } pub unsafe fn GetOutputLinePrefixWide(&self, buffer: ::core::option::Option<&mut [u16]>, prefixsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetOutputLinePrefixWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prefixsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetOutputLinePrefixWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(prefixsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetOutputLinePrefixWide(&self, prefix: P0) -> ::windows_core::Result<()> where @@ -4212,7 +4212,7 @@ impl IDebugClient6 { (::windows_core::Interface::vtable(self).SetOutputLinePrefixWide)(::windows_core::Interface::as_raw(self), prefix.into_param().abi()).ok() } pub unsafe fn GetIdentityWide(&self, buffer: ::core::option::Option<&mut [u16]>, identitysize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetIdentityWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(identitysize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetIdentityWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(identitysize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn OutputIdentityWide(&self, outputcontrol: u32, flags: u32, format: P0) -> ::windows_core::Result<()> where @@ -4292,7 +4292,7 @@ impl IDebugClient6 { (::windows_core::Interface::vtable(self).GetNumberEventCallbacks)(::windows_core::Interface::as_raw(self), eventflags, &mut result__).from_abi(result__) } pub unsafe fn GetQuitLockString(&self, buffer: ::core::option::Option<&mut [u8]>, stringsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetQuitLockString)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetQuitLockString)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetQuitLockString(&self, string: P0) -> ::windows_core::Result<()> where @@ -4301,7 +4301,7 @@ impl IDebugClient6 { (::windows_core::Interface::vtable(self).SetQuitLockString)(::windows_core::Interface::as_raw(self), string.into_param().abi()).ok() } pub unsafe fn GetQuitLockStringWide(&self, buffer: ::core::option::Option<&mut [u16]>, stringsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetQuitLockStringWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetQuitLockStringWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetQuitLockStringWide(&self, string: P0) -> ::windows_core::Result<()> where @@ -4432,7 +4432,7 @@ impl IDebugClient7 { (::windows_core::Interface::vtable(self).AttachKernel)(::windows_core::Interface::as_raw(self), flags, connectoptions.into_param().abi()).ok() } pub unsafe fn GetKernelConnectionOptions(&self, buffer: ::core::option::Option<&mut [u8]>, optionssize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetKernelConnectionOptions)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(optionssize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetKernelConnectionOptions)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(optionssize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetKernelConnectionOptions(&self, options: P0) -> ::windows_core::Result<()> where @@ -4457,7 +4457,7 @@ impl IDebugClient7 { (::windows_core::Interface::vtable(self).DisconnectProcessServer)(::windows_core::Interface::as_raw(self), server).ok() } pub unsafe fn GetRunningProcessSystemIds(&self, server: u64, ids: ::core::option::Option<&mut [u32]>, actualcount: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(::windows_core::Interface::as_raw(self), server, ::core::mem::transmute(ids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(actualcount.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(::windows_core::Interface::as_raw(self), server, ::core::mem::transmute(ids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualcount.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetRunningProcessSystemIdByExecutableName(&self, server: u64, exename: P0, flags: u32) -> ::windows_core::Result where @@ -4473,10 +4473,10 @@ impl IDebugClient7 { systemid, 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() as _), + exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualexenamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(description.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - description.as_deref().map_or(0, |slice| slice.len() as _), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualdescriptionsize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -4610,7 +4610,7 @@ impl IDebugClient7 { (::windows_core::Interface::vtable(self).SetOutputWidth)(::windows_core::Interface::as_raw(self), columns).ok() } pub unsafe fn GetOutputLinePrefix(&self, buffer: ::core::option::Option<&mut [u8]>, prefixsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetOutputLinePrefix)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prefixsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetOutputLinePrefix)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(prefixsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetOutputLinePrefix(&self, prefix: P0) -> ::windows_core::Result<()> where @@ -4619,7 +4619,7 @@ impl IDebugClient7 { (::windows_core::Interface::vtable(self).SetOutputLinePrefix)(::windows_core::Interface::as_raw(self), prefix.into_param().abi()).ok() } pub unsafe fn GetIdentity(&self, buffer: ::core::option::Option<&mut [u8]>, identitysize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetIdentity)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(identitysize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetIdentity)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(identitysize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: P0) -> ::windows_core::Result<()> where @@ -4685,10 +4685,10 @@ impl IDebugClient7 { systemid, 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() as _), + exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualexenamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(description.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - description.as_deref().map_or(0, |slice| slice.len() as _), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualdescriptionsize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -4729,10 +4729,10 @@ impl IDebugClient7 { (::windows_core::Interface::vtable(self).GetNumberDumpFiles)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetDumpFile(&self, index: u32, buffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>, handle: ::core::option::Option<*mut u64>, r#type: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDumpFile)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(handle.unwrap_or(::std::ptr::null_mut())), r#type).ok() + (::windows_core::Interface::vtable(self).GetDumpFile)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(handle.unwrap_or(::std::ptr::null_mut())), r#type).ok() } pub unsafe fn GetDumpFileWide(&self, index: u32, buffer: ::core::option::Option<&mut [u16]>, namesize: ::core::option::Option<*mut u32>, handle: ::core::option::Option<*mut u64>, r#type: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDumpFileWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(handle.unwrap_or(::std::ptr::null_mut())), r#type).ok() + (::windows_core::Interface::vtable(self).GetDumpFileWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(handle.unwrap_or(::std::ptr::null_mut())), r#type).ok() } pub unsafe fn AttachKernelWide(&self, flags: u32, connectoptions: P0) -> ::windows_core::Result<()> where @@ -4741,7 +4741,7 @@ impl IDebugClient7 { (::windows_core::Interface::vtable(self).AttachKernelWide)(::windows_core::Interface::as_raw(self), flags, connectoptions.into_param().abi()).ok() } pub unsafe fn GetKernelConnectionOptionsWide(&self, buffer: ::core::option::Option<&mut [u16]>, optionssize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetKernelConnectionOptionsWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(optionssize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetKernelConnectionOptionsWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(optionssize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetKernelConnectionOptionsWide(&self, options: P0) -> ::windows_core::Result<()> where @@ -4785,7 +4785,7 @@ impl IDebugClient7 { (::windows_core::Interface::vtable(self).SetOutputCallbacksWide)(::windows_core::Interface::as_raw(self), callbacks.into_param().abi()).ok() } pub unsafe fn GetOutputLinePrefixWide(&self, buffer: ::core::option::Option<&mut [u16]>, prefixsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetOutputLinePrefixWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prefixsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetOutputLinePrefixWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(prefixsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetOutputLinePrefixWide(&self, prefix: P0) -> ::windows_core::Result<()> where @@ -4794,7 +4794,7 @@ impl IDebugClient7 { (::windows_core::Interface::vtable(self).SetOutputLinePrefixWide)(::windows_core::Interface::as_raw(self), prefix.into_param().abi()).ok() } pub unsafe fn GetIdentityWide(&self, buffer: ::core::option::Option<&mut [u16]>, identitysize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetIdentityWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(identitysize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetIdentityWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(identitysize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn OutputIdentityWide(&self, outputcontrol: u32, flags: u32, format: P0) -> ::windows_core::Result<()> where @@ -4874,7 +4874,7 @@ impl IDebugClient7 { (::windows_core::Interface::vtable(self).GetNumberEventCallbacks)(::windows_core::Interface::as_raw(self), eventflags, &mut result__).from_abi(result__) } pub unsafe fn GetQuitLockString(&self, buffer: ::core::option::Option<&mut [u8]>, stringsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetQuitLockString)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetQuitLockString)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetQuitLockString(&self, string: P0) -> ::windows_core::Result<()> where @@ -4883,7 +4883,7 @@ impl IDebugClient7 { (::windows_core::Interface::vtable(self).SetQuitLockString)(::windows_core::Interface::as_raw(self), string.into_param().abi()).ok() } pub unsafe fn GetQuitLockStringWide(&self, buffer: ::core::option::Option<&mut [u16]>, stringsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetQuitLockStringWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetQuitLockStringWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetQuitLockStringWide(&self, string: P0) -> ::windows_core::Result<()> where @@ -5018,7 +5018,7 @@ impl IDebugClient8 { (::windows_core::Interface::vtable(self).AttachKernel)(::windows_core::Interface::as_raw(self), flags, connectoptions.into_param().abi()).ok() } pub unsafe fn GetKernelConnectionOptions(&self, buffer: ::core::option::Option<&mut [u8]>, optionssize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetKernelConnectionOptions)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(optionssize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetKernelConnectionOptions)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(optionssize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetKernelConnectionOptions(&self, options: P0) -> ::windows_core::Result<()> where @@ -5043,7 +5043,7 @@ impl IDebugClient8 { (::windows_core::Interface::vtable(self).DisconnectProcessServer)(::windows_core::Interface::as_raw(self), server).ok() } pub unsafe fn GetRunningProcessSystemIds(&self, server: u64, ids: ::core::option::Option<&mut [u32]>, actualcount: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(::windows_core::Interface::as_raw(self), server, ::core::mem::transmute(ids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(actualcount.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(::windows_core::Interface::as_raw(self), server, ::core::mem::transmute(ids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualcount.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetRunningProcessSystemIdByExecutableName(&self, server: u64, exename: P0, flags: u32) -> ::windows_core::Result where @@ -5059,10 +5059,10 @@ impl IDebugClient8 { systemid, 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() as _), + exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualexenamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(description.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - description.as_deref().map_or(0, |slice| slice.len() as _), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualdescriptionsize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -5196,7 +5196,7 @@ impl IDebugClient8 { (::windows_core::Interface::vtable(self).SetOutputWidth)(::windows_core::Interface::as_raw(self), columns).ok() } pub unsafe fn GetOutputLinePrefix(&self, buffer: ::core::option::Option<&mut [u8]>, prefixsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetOutputLinePrefix)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prefixsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetOutputLinePrefix)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(prefixsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetOutputLinePrefix(&self, prefix: P0) -> ::windows_core::Result<()> where @@ -5205,7 +5205,7 @@ impl IDebugClient8 { (::windows_core::Interface::vtable(self).SetOutputLinePrefix)(::windows_core::Interface::as_raw(self), prefix.into_param().abi()).ok() } pub unsafe fn GetIdentity(&self, buffer: ::core::option::Option<&mut [u8]>, identitysize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetIdentity)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(identitysize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetIdentity)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(identitysize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: P0) -> ::windows_core::Result<()> where @@ -5271,10 +5271,10 @@ impl IDebugClient8 { systemid, 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() as _), + exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualexenamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(description.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - description.as_deref().map_or(0, |slice| slice.len() as _), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(actualdescriptionsize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -5315,10 +5315,10 @@ impl IDebugClient8 { (::windows_core::Interface::vtable(self).GetNumberDumpFiles)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetDumpFile(&self, index: u32, buffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>, handle: ::core::option::Option<*mut u64>, r#type: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDumpFile)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(handle.unwrap_or(::std::ptr::null_mut())), r#type).ok() + (::windows_core::Interface::vtable(self).GetDumpFile)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(handle.unwrap_or(::std::ptr::null_mut())), r#type).ok() } pub unsafe fn GetDumpFileWide(&self, index: u32, buffer: ::core::option::Option<&mut [u16]>, namesize: ::core::option::Option<*mut u32>, handle: ::core::option::Option<*mut u64>, r#type: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDumpFileWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(handle.unwrap_or(::std::ptr::null_mut())), r#type).ok() + (::windows_core::Interface::vtable(self).GetDumpFileWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(handle.unwrap_or(::std::ptr::null_mut())), r#type).ok() } pub unsafe fn AttachKernelWide(&self, flags: u32, connectoptions: P0) -> ::windows_core::Result<()> where @@ -5327,7 +5327,7 @@ impl IDebugClient8 { (::windows_core::Interface::vtable(self).AttachKernelWide)(::windows_core::Interface::as_raw(self), flags, connectoptions.into_param().abi()).ok() } pub unsafe fn GetKernelConnectionOptionsWide(&self, buffer: ::core::option::Option<&mut [u16]>, optionssize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetKernelConnectionOptionsWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(optionssize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetKernelConnectionOptionsWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(optionssize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetKernelConnectionOptionsWide(&self, options: P0) -> ::windows_core::Result<()> where @@ -5371,7 +5371,7 @@ impl IDebugClient8 { (::windows_core::Interface::vtable(self).SetOutputCallbacksWide)(::windows_core::Interface::as_raw(self), callbacks.into_param().abi()).ok() } pub unsafe fn GetOutputLinePrefixWide(&self, buffer: ::core::option::Option<&mut [u16]>, prefixsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetOutputLinePrefixWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(prefixsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetOutputLinePrefixWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(prefixsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetOutputLinePrefixWide(&self, prefix: P0) -> ::windows_core::Result<()> where @@ -5380,7 +5380,7 @@ impl IDebugClient8 { (::windows_core::Interface::vtable(self).SetOutputLinePrefixWide)(::windows_core::Interface::as_raw(self), prefix.into_param().abi()).ok() } pub unsafe fn GetIdentityWide(&self, buffer: ::core::option::Option<&mut [u16]>, identitysize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetIdentityWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(identitysize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetIdentityWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(identitysize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn OutputIdentityWide(&self, outputcontrol: u32, flags: u32, format: P0) -> ::windows_core::Result<()> where @@ -5460,7 +5460,7 @@ impl IDebugClient8 { (::windows_core::Interface::vtable(self).GetNumberEventCallbacks)(::windows_core::Interface::as_raw(self), eventflags, &mut result__).from_abi(result__) } pub unsafe fn GetQuitLockString(&self, buffer: ::core::option::Option<&mut [u8]>, stringsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetQuitLockString)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetQuitLockString)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetQuitLockString(&self, string: P0) -> ::windows_core::Result<()> where @@ -5469,7 +5469,7 @@ impl IDebugClient8 { (::windows_core::Interface::vtable(self).SetQuitLockString)(::windows_core::Interface::as_raw(self), string.into_param().abi()).ok() } pub unsafe fn GetQuitLockStringWide(&self, buffer: ::core::option::Option<&mut [u16]>, stringsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetQuitLockStringWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetQuitLockStringWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetQuitLockStringWide(&self, string: P0) -> ::windows_core::Result<()> where @@ -5620,7 +5620,7 @@ impl IDebugControl { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetLogFile(&self, buffer: ::core::option::Option<&mut [u8]>, filesize: ::core::option::Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLogFile)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), append).ok() + (::windows_core::Interface::vtable(self).GetLogFile)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), append).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -5642,7 +5642,7 @@ impl IDebugControl { (::windows_core::Interface::vtable(self).SetLogMask)(::windows_core::Interface::as_raw(self), mask).ok() } pub unsafe fn Input(&self, buffer: &mut [u8], inputsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Input)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, ::core::mem::transmute(inputsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Input)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ::core::mem::transmute(inputsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn ReturnInput(&self, buffer: P0) -> ::windows_core::Result<()> where @@ -5687,7 +5687,7 @@ impl IDebugControl { (::windows_core::Interface::vtable(self).OutputPromptVaList)(::windows_core::Interface::as_raw(self), outputcontrol, format.into_param().abi(), args).ok() } pub unsafe fn GetPromptText(&self, buffer: ::core::option::Option<&mut [u8]>, textsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPromptText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetPromptText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn OutputCurrentState(&self, outputcontrol: u32, flags: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).OutputCurrentState)(::windows_core::Interface::as_raw(self), outputcontrol, flags).ok() @@ -5710,7 +5710,7 @@ impl IDebugControl { (::windows_core::Interface::vtable(self).Assemble)(::windows_core::Interface::as_raw(self), offset, instr.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn Disassemble(&self, offset: u64, flags: u32, buffer: ::core::option::Option<&mut [u8]>, disassemblysize: ::core::option::Option<*mut u32>, endoffset: *mut u64) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Disassemble)(::windows_core::Interface::as_raw(self), offset, flags, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(disassemblysize.unwrap_or(::std::ptr::null_mut())), endoffset).ok() + (::windows_core::Interface::vtable(self).Disassemble)(::windows_core::Interface::as_raw(self), offset, flags, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(disassemblysize.unwrap_or(::std::ptr::null_mut())), endoffset).ok() } pub unsafe fn GetDisassembleEffectiveOffset(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -5721,7 +5721,7 @@ impl IDebugControl { (::windows_core::Interface::vtable(self).OutputDisassembly)(::windows_core::Interface::as_raw(self), outputcontrol, offset, flags, &mut result__).from_abi(result__) } pub unsafe fn OutputDisassemblyLines(&self, outputcontrol: u32, previouslines: u32, offset: u64, flags: u32, offsetline: ::core::option::Option<*mut u32>, startoffset: ::core::option::Option<*mut u64>, endoffset: ::core::option::Option<*mut u64>, lineoffsets: ::core::option::Option<&mut [u64]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).OutputDisassemblyLines)(::windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len() as _), offset, flags, ::core::mem::transmute(offsetline.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(startoffset.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(endoffset.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lineoffsets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + (::windows_core::Interface::vtable(self).OutputDisassemblyLines)(::windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, ::core::mem::transmute(offsetline.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(startoffset.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(endoffset.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lineoffsets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() } pub unsafe fn GetNearInstruction(&self, offset: u64, delta: i32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -5730,7 +5730,7 @@ impl IDebugControl { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetStackTrace(&self, frameoffset: u64, stackoffset: u64, instructionoffset: u64, frames: &mut [DEBUG_STACK_FRAME], framesfilled: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetStackTrace)(::windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, ::core::mem::transmute(frames.as_ptr()), frames.len() as _, ::core::mem::transmute(framesfilled.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetStackTrace)(::windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, ::core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), ::core::mem::transmute(framesfilled.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetReturnOffset(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -5739,7 +5739,7 @@ impl IDebugControl { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn OutputStackTrace(&self, outputcontrol: u32, frames: ::core::option::Option<&[DEBUG_STACK_FRAME]>, flags: u32) -> ::windows_core::Result<()> { - (::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() as _), flags).ok() + (::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<()> { (::windows_core::Interface::vtable(self).GetDebuggeeType)(::windows_core::Interface::as_raw(self), class, qualifier).ok() @@ -5757,7 +5757,7 @@ impl IDebugControl { (::windows_core::Interface::vtable(self).GetNumberPossibleExecutingProcessorTypes)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetPossibleExecutingProcessorTypes(&self, start: u32, types: &mut [u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPossibleExecutingProcessorTypes)(::windows_core::Interface::as_raw(self), start, types.len() as _, ::core::mem::transmute(types.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetPossibleExecutingProcessorTypes)(::windows_core::Interface::as_raw(self), start, types.len().try_into().unwrap(), ::core::mem::transmute(types.as_ptr())).ok() } pub unsafe fn GetNumberProcessors(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -5770,11 +5770,11 @@ impl IDebugControl { major, minor, ::core::mem::transmute(servicepackstring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - servicepackstring.as_deref().map_or(0, |slice| slice.len() as _), + servicepackstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(servicepackstringused.unwrap_or(::std::ptr::null_mut())), servicepacknumber, ::core::mem::transmute(buildstring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - buildstring.as_deref().map_or(0, |slice| slice.len() as _), + buildstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(buildstringused.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -5794,17 +5794,17 @@ impl IDebugControl { (::windows_core::Interface::vtable(self).GetNumberSupportedProcessorTypes)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetSupportedProcessorTypes(&self, start: u32, types: &mut [u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSupportedProcessorTypes)(::windows_core::Interface::as_raw(self), start, types.len() as _, ::core::mem::transmute(types.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetSupportedProcessorTypes)(::windows_core::Interface::as_raw(self), start, types.len().try_into().unwrap(), ::core::mem::transmute(types.as_ptr())).ok() } pub unsafe fn GetProcessorTypeNames(&self, r#type: u32, fullnamebuffer: ::core::option::Option<&mut [u8]>, fullnamesize: ::core::option::Option<*mut u32>, abbrevnamebuffer: ::core::option::Option<&mut [u8]>, abbrevnamesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetProcessorTypeNames)( ::windows_core::Interface::as_raw(self), 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() as _), + fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(fullnamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(abbrevnamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len() as _), + abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(abbrevnamesize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -5850,7 +5850,7 @@ impl IDebugControl { (::windows_core::Interface::vtable(self).SetSystemErrorControl)(::windows_core::Interface::as_raw(self), outputlevel, breaklevel).ok() } pub unsafe fn GetTextMacro(&self, slot: u32, buffer: ::core::option::Option<&mut [u8]>, macrosize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetTextMacro)(::windows_core::Interface::as_raw(self), slot, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(macrosize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetTextMacro)(::windows_core::Interface::as_raw(self), slot, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(macrosize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetTextMacro(&self, slot: u32, r#macro: P0) -> ::windows_core::Result<()> where @@ -5966,10 +5966,10 @@ impl IDebugControl { (::windows_core::Interface::vtable(self).GetNumberEventFilters)(::windows_core::Interface::as_raw(self), specificevents, specificexceptions, arbitraryexceptions).ok() } pub unsafe fn GetEventFilterText(&self, index: u32, buffer: ::core::option::Option<&mut [u8]>, textsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetEventFilterText)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetEventFilterText)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetEventFilterCommand(&self, index: u32, buffer: ::core::option::Option<&mut [u8]>, commandsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetEventFilterCommand)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetEventFilterCommand)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetEventFilterCommand(&self, index: u32, command: P0) -> ::windows_core::Result<()> where @@ -5978,13 +5978,13 @@ impl IDebugControl { (::windows_core::Interface::vtable(self).SetEventFilterCommand)(::windows_core::Interface::as_raw(self), index, command.into_param().abi()).ok() } pub unsafe fn GetSpecificFilterParameters(&self, start: u32, params: &mut [DEBUG_SPECIFIC_FILTER_PARAMETERS]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSpecificFilterParameters)(::windows_core::Interface::as_raw(self), start, params.len() as _, ::core::mem::transmute(params.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetSpecificFilterParameters)(::windows_core::Interface::as_raw(self), start, params.len().try_into().unwrap(), ::core::mem::transmute(params.as_ptr())).ok() } pub unsafe fn SetSpecificFilterParameters(&self, start: u32, params: &[DEBUG_SPECIFIC_FILTER_PARAMETERS]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetSpecificFilterParameters)(::windows_core::Interface::as_raw(self), start, params.len() as _, ::core::mem::transmute(params.as_ptr())).ok() + (::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: ::core::option::Option<&mut [u8]>, argumentsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSpecificFilterArgument)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(argumentsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSpecificFilterArgument)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(argumentsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetSpecificFilterArgument(&self, index: u32, argument: P0) -> ::windows_core::Result<()> where @@ -5996,10 +5996,10 @@ impl IDebugControl { (::windows_core::Interface::vtable(self).GetExceptionFilterParameters)(::windows_core::Interface::as_raw(self), count, ::core::mem::transmute(codes.unwrap_or(::std::ptr::null())), start, params).ok() } pub unsafe fn SetExceptionFilterParameters(&self, params: &[DEBUG_EXCEPTION_FILTER_PARAMETERS]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetExceptionFilterParameters)(::windows_core::Interface::as_raw(self), params.len() as _, ::core::mem::transmute(params.as_ptr())).ok() + (::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: ::core::option::Option<&mut [u8]>, commandsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetExceptionFilterSecondCommand(&self, index: u32, command: P0) -> ::windows_core::Result<()> where @@ -6020,7 +6020,7 @@ impl IDebugControl { extrainformationsize, ::core::mem::transmute(extrainformationused.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(description.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - description.as_deref().map_or(0, |slice| slice.len() as _), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(descriptionused.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -6180,7 +6180,7 @@ impl IDebugControl2 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetLogFile(&self, buffer: ::core::option::Option<&mut [u8]>, filesize: ::core::option::Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLogFile)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), append).ok() + (::windows_core::Interface::vtable(self).GetLogFile)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), append).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -6202,7 +6202,7 @@ impl IDebugControl2 { (::windows_core::Interface::vtable(self).SetLogMask)(::windows_core::Interface::as_raw(self), mask).ok() } pub unsafe fn Input(&self, buffer: &mut [u8], inputsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Input)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, ::core::mem::transmute(inputsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Input)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ::core::mem::transmute(inputsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn ReturnInput(&self, buffer: P0) -> ::windows_core::Result<()> where @@ -6247,7 +6247,7 @@ impl IDebugControl2 { (::windows_core::Interface::vtable(self).OutputPromptVaList)(::windows_core::Interface::as_raw(self), outputcontrol, format.into_param().abi(), args).ok() } pub unsafe fn GetPromptText(&self, buffer: ::core::option::Option<&mut [u8]>, textsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPromptText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetPromptText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn OutputCurrentState(&self, outputcontrol: u32, flags: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).OutputCurrentState)(::windows_core::Interface::as_raw(self), outputcontrol, flags).ok() @@ -6270,7 +6270,7 @@ impl IDebugControl2 { (::windows_core::Interface::vtable(self).Assemble)(::windows_core::Interface::as_raw(self), offset, instr.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn Disassemble(&self, offset: u64, flags: u32, buffer: ::core::option::Option<&mut [u8]>, disassemblysize: ::core::option::Option<*mut u32>, endoffset: *mut u64) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Disassemble)(::windows_core::Interface::as_raw(self), offset, flags, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(disassemblysize.unwrap_or(::std::ptr::null_mut())), endoffset).ok() + (::windows_core::Interface::vtable(self).Disassemble)(::windows_core::Interface::as_raw(self), offset, flags, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(disassemblysize.unwrap_or(::std::ptr::null_mut())), endoffset).ok() } pub unsafe fn GetDisassembleEffectiveOffset(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -6281,7 +6281,7 @@ impl IDebugControl2 { (::windows_core::Interface::vtable(self).OutputDisassembly)(::windows_core::Interface::as_raw(self), outputcontrol, offset, flags, &mut result__).from_abi(result__) } pub unsafe fn OutputDisassemblyLines(&self, outputcontrol: u32, previouslines: u32, offset: u64, flags: u32, offsetline: ::core::option::Option<*mut u32>, startoffset: ::core::option::Option<*mut u64>, endoffset: ::core::option::Option<*mut u64>, lineoffsets: ::core::option::Option<&mut [u64]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).OutputDisassemblyLines)(::windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len() as _), offset, flags, ::core::mem::transmute(offsetline.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(startoffset.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(endoffset.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lineoffsets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + (::windows_core::Interface::vtable(self).OutputDisassemblyLines)(::windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, ::core::mem::transmute(offsetline.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(startoffset.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(endoffset.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lineoffsets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() } pub unsafe fn GetNearInstruction(&self, offset: u64, delta: i32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -6290,7 +6290,7 @@ impl IDebugControl2 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetStackTrace(&self, frameoffset: u64, stackoffset: u64, instructionoffset: u64, frames: &mut [DEBUG_STACK_FRAME], framesfilled: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetStackTrace)(::windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, ::core::mem::transmute(frames.as_ptr()), frames.len() as _, ::core::mem::transmute(framesfilled.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetStackTrace)(::windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, ::core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), ::core::mem::transmute(framesfilled.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetReturnOffset(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -6299,7 +6299,7 @@ impl IDebugControl2 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn OutputStackTrace(&self, outputcontrol: u32, frames: ::core::option::Option<&[DEBUG_STACK_FRAME]>, flags: u32) -> ::windows_core::Result<()> { - (::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() as _), flags).ok() + (::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<()> { (::windows_core::Interface::vtable(self).GetDebuggeeType)(::windows_core::Interface::as_raw(self), class, qualifier).ok() @@ -6317,7 +6317,7 @@ impl IDebugControl2 { (::windows_core::Interface::vtable(self).GetNumberPossibleExecutingProcessorTypes)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetPossibleExecutingProcessorTypes(&self, start: u32, types: &mut [u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPossibleExecutingProcessorTypes)(::windows_core::Interface::as_raw(self), start, types.len() as _, ::core::mem::transmute(types.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetPossibleExecutingProcessorTypes)(::windows_core::Interface::as_raw(self), start, types.len().try_into().unwrap(), ::core::mem::transmute(types.as_ptr())).ok() } pub unsafe fn GetNumberProcessors(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -6330,11 +6330,11 @@ impl IDebugControl2 { major, minor, ::core::mem::transmute(servicepackstring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - servicepackstring.as_deref().map_or(0, |slice| slice.len() as _), + servicepackstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(servicepackstringused.unwrap_or(::std::ptr::null_mut())), servicepacknumber, ::core::mem::transmute(buildstring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - buildstring.as_deref().map_or(0, |slice| slice.len() as _), + buildstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(buildstringused.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -6354,17 +6354,17 @@ impl IDebugControl2 { (::windows_core::Interface::vtable(self).GetNumberSupportedProcessorTypes)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetSupportedProcessorTypes(&self, start: u32, types: &mut [u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSupportedProcessorTypes)(::windows_core::Interface::as_raw(self), start, types.len() as _, ::core::mem::transmute(types.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetSupportedProcessorTypes)(::windows_core::Interface::as_raw(self), start, types.len().try_into().unwrap(), ::core::mem::transmute(types.as_ptr())).ok() } pub unsafe fn GetProcessorTypeNames(&self, r#type: u32, fullnamebuffer: ::core::option::Option<&mut [u8]>, fullnamesize: ::core::option::Option<*mut u32>, abbrevnamebuffer: ::core::option::Option<&mut [u8]>, abbrevnamesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetProcessorTypeNames)( ::windows_core::Interface::as_raw(self), 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() as _), + fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(fullnamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(abbrevnamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len() as _), + abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(abbrevnamesize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -6410,7 +6410,7 @@ impl IDebugControl2 { (::windows_core::Interface::vtable(self).SetSystemErrorControl)(::windows_core::Interface::as_raw(self), outputlevel, breaklevel).ok() } pub unsafe fn GetTextMacro(&self, slot: u32, buffer: ::core::option::Option<&mut [u8]>, macrosize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetTextMacro)(::windows_core::Interface::as_raw(self), slot, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(macrosize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetTextMacro)(::windows_core::Interface::as_raw(self), slot, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(macrosize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetTextMacro(&self, slot: u32, r#macro: P0) -> ::windows_core::Result<()> where @@ -6526,10 +6526,10 @@ impl IDebugControl2 { (::windows_core::Interface::vtable(self).GetNumberEventFilters)(::windows_core::Interface::as_raw(self), specificevents, specificexceptions, arbitraryexceptions).ok() } pub unsafe fn GetEventFilterText(&self, index: u32, buffer: ::core::option::Option<&mut [u8]>, textsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetEventFilterText)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetEventFilterText)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetEventFilterCommand(&self, index: u32, buffer: ::core::option::Option<&mut [u8]>, commandsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetEventFilterCommand)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetEventFilterCommand)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetEventFilterCommand(&self, index: u32, command: P0) -> ::windows_core::Result<()> where @@ -6538,13 +6538,13 @@ impl IDebugControl2 { (::windows_core::Interface::vtable(self).SetEventFilterCommand)(::windows_core::Interface::as_raw(self), index, command.into_param().abi()).ok() } pub unsafe fn GetSpecificFilterParameters(&self, start: u32, params: &mut [DEBUG_SPECIFIC_FILTER_PARAMETERS]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSpecificFilterParameters)(::windows_core::Interface::as_raw(self), start, params.len() as _, ::core::mem::transmute(params.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetSpecificFilterParameters)(::windows_core::Interface::as_raw(self), start, params.len().try_into().unwrap(), ::core::mem::transmute(params.as_ptr())).ok() } pub unsafe fn SetSpecificFilterParameters(&self, start: u32, params: &[DEBUG_SPECIFIC_FILTER_PARAMETERS]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetSpecificFilterParameters)(::windows_core::Interface::as_raw(self), start, params.len() as _, ::core::mem::transmute(params.as_ptr())).ok() + (::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: ::core::option::Option<&mut [u8]>, argumentsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSpecificFilterArgument)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(argumentsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSpecificFilterArgument)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(argumentsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetSpecificFilterArgument(&self, index: u32, argument: P0) -> ::windows_core::Result<()> where @@ -6556,10 +6556,10 @@ impl IDebugControl2 { (::windows_core::Interface::vtable(self).GetExceptionFilterParameters)(::windows_core::Interface::as_raw(self), count, ::core::mem::transmute(codes.unwrap_or(::std::ptr::null())), start, params).ok() } pub unsafe fn SetExceptionFilterParameters(&self, params: &[DEBUG_EXCEPTION_FILTER_PARAMETERS]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetExceptionFilterParameters)(::windows_core::Interface::as_raw(self), params.len() as _, ::core::mem::transmute(params.as_ptr())).ok() + (::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: ::core::option::Option<&mut [u8]>, commandsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetExceptionFilterSecondCommand(&self, index: u32, command: P0) -> ::windows_core::Result<()> where @@ -6580,7 +6580,7 @@ impl IDebugControl2 { extrainformationsize, ::core::mem::transmute(extrainformationused.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(description.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - description.as_deref().map_or(0, |slice| slice.len() as _), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(descriptionused.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -6610,10 +6610,10 @@ impl IDebugControl2 { srctext.into_param().abi(), 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() as _), + srcbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(srcsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(dstbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - dstbuffer.as_deref().map_or(0, |slice| slice.len() as _), + dstbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(dstsize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -6794,7 +6794,7 @@ impl IDebugControl3 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetLogFile(&self, buffer: ::core::option::Option<&mut [u8]>, filesize: ::core::option::Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLogFile)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), append).ok() + (::windows_core::Interface::vtable(self).GetLogFile)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), append).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -6816,7 +6816,7 @@ impl IDebugControl3 { (::windows_core::Interface::vtable(self).SetLogMask)(::windows_core::Interface::as_raw(self), mask).ok() } pub unsafe fn Input(&self, buffer: &mut [u8], inputsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Input)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, ::core::mem::transmute(inputsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Input)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ::core::mem::transmute(inputsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn ReturnInput(&self, buffer: P0) -> ::windows_core::Result<()> where @@ -6861,7 +6861,7 @@ impl IDebugControl3 { (::windows_core::Interface::vtable(self).OutputPromptVaList)(::windows_core::Interface::as_raw(self), outputcontrol, format.into_param().abi(), args).ok() } pub unsafe fn GetPromptText(&self, buffer: ::core::option::Option<&mut [u8]>, textsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPromptText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetPromptText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn OutputCurrentState(&self, outputcontrol: u32, flags: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).OutputCurrentState)(::windows_core::Interface::as_raw(self), outputcontrol, flags).ok() @@ -6884,7 +6884,7 @@ impl IDebugControl3 { (::windows_core::Interface::vtable(self).Assemble)(::windows_core::Interface::as_raw(self), offset, instr.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn Disassemble(&self, offset: u64, flags: u32, buffer: ::core::option::Option<&mut [u8]>, disassemblysize: ::core::option::Option<*mut u32>, endoffset: *mut u64) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Disassemble)(::windows_core::Interface::as_raw(self), offset, flags, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(disassemblysize.unwrap_or(::std::ptr::null_mut())), endoffset).ok() + (::windows_core::Interface::vtable(self).Disassemble)(::windows_core::Interface::as_raw(self), offset, flags, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(disassemblysize.unwrap_or(::std::ptr::null_mut())), endoffset).ok() } pub unsafe fn GetDisassembleEffectiveOffset(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -6895,7 +6895,7 @@ impl IDebugControl3 { (::windows_core::Interface::vtable(self).OutputDisassembly)(::windows_core::Interface::as_raw(self), outputcontrol, offset, flags, &mut result__).from_abi(result__) } pub unsafe fn OutputDisassemblyLines(&self, outputcontrol: u32, previouslines: u32, offset: u64, flags: u32, offsetline: ::core::option::Option<*mut u32>, startoffset: ::core::option::Option<*mut u64>, endoffset: ::core::option::Option<*mut u64>, lineoffsets: ::core::option::Option<&mut [u64]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).OutputDisassemblyLines)(::windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len() as _), offset, flags, ::core::mem::transmute(offsetline.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(startoffset.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(endoffset.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lineoffsets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + (::windows_core::Interface::vtable(self).OutputDisassemblyLines)(::windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, ::core::mem::transmute(offsetline.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(startoffset.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(endoffset.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lineoffsets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() } pub unsafe fn GetNearInstruction(&self, offset: u64, delta: i32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -6904,7 +6904,7 @@ impl IDebugControl3 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetStackTrace(&self, frameoffset: u64, stackoffset: u64, instructionoffset: u64, frames: &mut [DEBUG_STACK_FRAME], framesfilled: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetStackTrace)(::windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, ::core::mem::transmute(frames.as_ptr()), frames.len() as _, ::core::mem::transmute(framesfilled.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetStackTrace)(::windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, ::core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), ::core::mem::transmute(framesfilled.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetReturnOffset(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -6913,7 +6913,7 @@ impl IDebugControl3 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn OutputStackTrace(&self, outputcontrol: u32, frames: ::core::option::Option<&[DEBUG_STACK_FRAME]>, flags: u32) -> ::windows_core::Result<()> { - (::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() as _), flags).ok() + (::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<()> { (::windows_core::Interface::vtable(self).GetDebuggeeType)(::windows_core::Interface::as_raw(self), class, qualifier).ok() @@ -6931,7 +6931,7 @@ impl IDebugControl3 { (::windows_core::Interface::vtable(self).GetNumberPossibleExecutingProcessorTypes)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetPossibleExecutingProcessorTypes(&self, start: u32, types: &mut [u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPossibleExecutingProcessorTypes)(::windows_core::Interface::as_raw(self), start, types.len() as _, ::core::mem::transmute(types.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetPossibleExecutingProcessorTypes)(::windows_core::Interface::as_raw(self), start, types.len().try_into().unwrap(), ::core::mem::transmute(types.as_ptr())).ok() } pub unsafe fn GetNumberProcessors(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -6944,11 +6944,11 @@ impl IDebugControl3 { major, minor, ::core::mem::transmute(servicepackstring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - servicepackstring.as_deref().map_or(0, |slice| slice.len() as _), + servicepackstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(servicepackstringused.unwrap_or(::std::ptr::null_mut())), servicepacknumber, ::core::mem::transmute(buildstring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - buildstring.as_deref().map_or(0, |slice| slice.len() as _), + buildstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(buildstringused.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -6968,17 +6968,17 @@ impl IDebugControl3 { (::windows_core::Interface::vtable(self).GetNumberSupportedProcessorTypes)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetSupportedProcessorTypes(&self, start: u32, types: &mut [u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSupportedProcessorTypes)(::windows_core::Interface::as_raw(self), start, types.len() as _, ::core::mem::transmute(types.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetSupportedProcessorTypes)(::windows_core::Interface::as_raw(self), start, types.len().try_into().unwrap(), ::core::mem::transmute(types.as_ptr())).ok() } pub unsafe fn GetProcessorTypeNames(&self, r#type: u32, fullnamebuffer: ::core::option::Option<&mut [u8]>, fullnamesize: ::core::option::Option<*mut u32>, abbrevnamebuffer: ::core::option::Option<&mut [u8]>, abbrevnamesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetProcessorTypeNames)( ::windows_core::Interface::as_raw(self), 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() as _), + fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(fullnamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(abbrevnamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len() as _), + abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(abbrevnamesize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -7024,7 +7024,7 @@ impl IDebugControl3 { (::windows_core::Interface::vtable(self).SetSystemErrorControl)(::windows_core::Interface::as_raw(self), outputlevel, breaklevel).ok() } pub unsafe fn GetTextMacro(&self, slot: u32, buffer: ::core::option::Option<&mut [u8]>, macrosize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetTextMacro)(::windows_core::Interface::as_raw(self), slot, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(macrosize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetTextMacro)(::windows_core::Interface::as_raw(self), slot, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(macrosize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetTextMacro(&self, slot: u32, r#macro: P0) -> ::windows_core::Result<()> where @@ -7140,10 +7140,10 @@ impl IDebugControl3 { (::windows_core::Interface::vtable(self).GetNumberEventFilters)(::windows_core::Interface::as_raw(self), specificevents, specificexceptions, arbitraryexceptions).ok() } pub unsafe fn GetEventFilterText(&self, index: u32, buffer: ::core::option::Option<&mut [u8]>, textsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetEventFilterText)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetEventFilterText)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetEventFilterCommand(&self, index: u32, buffer: ::core::option::Option<&mut [u8]>, commandsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetEventFilterCommand)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetEventFilterCommand)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetEventFilterCommand(&self, index: u32, command: P0) -> ::windows_core::Result<()> where @@ -7152,13 +7152,13 @@ impl IDebugControl3 { (::windows_core::Interface::vtable(self).SetEventFilterCommand)(::windows_core::Interface::as_raw(self), index, command.into_param().abi()).ok() } pub unsafe fn GetSpecificFilterParameters(&self, start: u32, params: &mut [DEBUG_SPECIFIC_FILTER_PARAMETERS]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSpecificFilterParameters)(::windows_core::Interface::as_raw(self), start, params.len() as _, ::core::mem::transmute(params.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetSpecificFilterParameters)(::windows_core::Interface::as_raw(self), start, params.len().try_into().unwrap(), ::core::mem::transmute(params.as_ptr())).ok() } pub unsafe fn SetSpecificFilterParameters(&self, start: u32, params: &[DEBUG_SPECIFIC_FILTER_PARAMETERS]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetSpecificFilterParameters)(::windows_core::Interface::as_raw(self), start, params.len() as _, ::core::mem::transmute(params.as_ptr())).ok() + (::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: ::core::option::Option<&mut [u8]>, argumentsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSpecificFilterArgument)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(argumentsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSpecificFilterArgument)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(argumentsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetSpecificFilterArgument(&self, index: u32, argument: P0) -> ::windows_core::Result<()> where @@ -7170,10 +7170,10 @@ impl IDebugControl3 { (::windows_core::Interface::vtable(self).GetExceptionFilterParameters)(::windows_core::Interface::as_raw(self), count, ::core::mem::transmute(codes.unwrap_or(::std::ptr::null())), start, params).ok() } pub unsafe fn SetExceptionFilterParameters(&self, params: &[DEBUG_EXCEPTION_FILTER_PARAMETERS]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetExceptionFilterParameters)(::windows_core::Interface::as_raw(self), params.len() as _, ::core::mem::transmute(params.as_ptr())).ok() + (::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: ::core::option::Option<&mut [u8]>, commandsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetExceptionFilterSecondCommand(&self, index: u32, command: P0) -> ::windows_core::Result<()> where @@ -7194,7 +7194,7 @@ impl IDebugControl3 { extrainformationsize, ::core::mem::transmute(extrainformationused.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(description.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - description.as_deref().map_or(0, |slice| slice.len() as _), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(descriptionused.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -7224,10 +7224,10 @@ impl IDebugControl3 { srctext.into_param().abi(), 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() as _), + srcbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(srcsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(dstbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - dstbuffer.as_deref().map_or(0, |slice| slice.len() as _), + dstbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(dstsize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -7280,10 +7280,10 @@ impl IDebugControl3 { ::windows_core::Interface::as_raw(self), 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() as _), + fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(fullnamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(abbrevnamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len() as _), + abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(abbrevnamesize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -7482,7 +7482,7 @@ impl IDebugControl4 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetLogFile(&self, buffer: ::core::option::Option<&mut [u8]>, filesize: ::core::option::Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLogFile)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), append).ok() + (::windows_core::Interface::vtable(self).GetLogFile)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), append).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -7504,7 +7504,7 @@ impl IDebugControl4 { (::windows_core::Interface::vtable(self).SetLogMask)(::windows_core::Interface::as_raw(self), mask).ok() } pub unsafe fn Input(&self, buffer: &mut [u8], inputsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Input)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, ::core::mem::transmute(inputsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Input)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ::core::mem::transmute(inputsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn ReturnInput(&self, buffer: P0) -> ::windows_core::Result<()> where @@ -7549,7 +7549,7 @@ impl IDebugControl4 { (::windows_core::Interface::vtable(self).OutputPromptVaList)(::windows_core::Interface::as_raw(self), outputcontrol, format.into_param().abi(), args).ok() } pub unsafe fn GetPromptText(&self, buffer: ::core::option::Option<&mut [u8]>, textsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPromptText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetPromptText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn OutputCurrentState(&self, outputcontrol: u32, flags: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).OutputCurrentState)(::windows_core::Interface::as_raw(self), outputcontrol, flags).ok() @@ -7572,7 +7572,7 @@ impl IDebugControl4 { (::windows_core::Interface::vtable(self).Assemble)(::windows_core::Interface::as_raw(self), offset, instr.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn Disassemble(&self, offset: u64, flags: u32, buffer: ::core::option::Option<&mut [u8]>, disassemblysize: ::core::option::Option<*mut u32>, endoffset: *mut u64) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Disassemble)(::windows_core::Interface::as_raw(self), offset, flags, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(disassemblysize.unwrap_or(::std::ptr::null_mut())), endoffset).ok() + (::windows_core::Interface::vtable(self).Disassemble)(::windows_core::Interface::as_raw(self), offset, flags, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(disassemblysize.unwrap_or(::std::ptr::null_mut())), endoffset).ok() } pub unsafe fn GetDisassembleEffectiveOffset(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -7583,7 +7583,7 @@ impl IDebugControl4 { (::windows_core::Interface::vtable(self).OutputDisassembly)(::windows_core::Interface::as_raw(self), outputcontrol, offset, flags, &mut result__).from_abi(result__) } pub unsafe fn OutputDisassemblyLines(&self, outputcontrol: u32, previouslines: u32, offset: u64, flags: u32, offsetline: ::core::option::Option<*mut u32>, startoffset: ::core::option::Option<*mut u64>, endoffset: ::core::option::Option<*mut u64>, lineoffsets: ::core::option::Option<&mut [u64]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).OutputDisassemblyLines)(::windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len() as _), offset, flags, ::core::mem::transmute(offsetline.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(startoffset.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(endoffset.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lineoffsets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + (::windows_core::Interface::vtable(self).OutputDisassemblyLines)(::windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, ::core::mem::transmute(offsetline.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(startoffset.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(endoffset.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lineoffsets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() } pub unsafe fn GetNearInstruction(&self, offset: u64, delta: i32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -7592,7 +7592,7 @@ impl IDebugControl4 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetStackTrace(&self, frameoffset: u64, stackoffset: u64, instructionoffset: u64, frames: &mut [DEBUG_STACK_FRAME], framesfilled: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetStackTrace)(::windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, ::core::mem::transmute(frames.as_ptr()), frames.len() as _, ::core::mem::transmute(framesfilled.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetStackTrace)(::windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, ::core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), ::core::mem::transmute(framesfilled.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetReturnOffset(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -7601,7 +7601,7 @@ impl IDebugControl4 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn OutputStackTrace(&self, outputcontrol: u32, frames: ::core::option::Option<&[DEBUG_STACK_FRAME]>, flags: u32) -> ::windows_core::Result<()> { - (::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() as _), flags).ok() + (::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<()> { (::windows_core::Interface::vtable(self).GetDebuggeeType)(::windows_core::Interface::as_raw(self), class, qualifier).ok() @@ -7619,7 +7619,7 @@ impl IDebugControl4 { (::windows_core::Interface::vtable(self).GetNumberPossibleExecutingProcessorTypes)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetPossibleExecutingProcessorTypes(&self, start: u32, types: &mut [u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPossibleExecutingProcessorTypes)(::windows_core::Interface::as_raw(self), start, types.len() as _, ::core::mem::transmute(types.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetPossibleExecutingProcessorTypes)(::windows_core::Interface::as_raw(self), start, types.len().try_into().unwrap(), ::core::mem::transmute(types.as_ptr())).ok() } pub unsafe fn GetNumberProcessors(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -7632,11 +7632,11 @@ impl IDebugControl4 { major, minor, ::core::mem::transmute(servicepackstring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - servicepackstring.as_deref().map_or(0, |slice| slice.len() as _), + servicepackstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(servicepackstringused.unwrap_or(::std::ptr::null_mut())), servicepacknumber, ::core::mem::transmute(buildstring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - buildstring.as_deref().map_or(0, |slice| slice.len() as _), + buildstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(buildstringused.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -7656,17 +7656,17 @@ impl IDebugControl4 { (::windows_core::Interface::vtable(self).GetNumberSupportedProcessorTypes)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetSupportedProcessorTypes(&self, start: u32, types: &mut [u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSupportedProcessorTypes)(::windows_core::Interface::as_raw(self), start, types.len() as _, ::core::mem::transmute(types.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetSupportedProcessorTypes)(::windows_core::Interface::as_raw(self), start, types.len().try_into().unwrap(), ::core::mem::transmute(types.as_ptr())).ok() } pub unsafe fn GetProcessorTypeNames(&self, r#type: u32, fullnamebuffer: ::core::option::Option<&mut [u8]>, fullnamesize: ::core::option::Option<*mut u32>, abbrevnamebuffer: ::core::option::Option<&mut [u8]>, abbrevnamesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetProcessorTypeNames)( ::windows_core::Interface::as_raw(self), 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() as _), + fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(fullnamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(abbrevnamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len() as _), + abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(abbrevnamesize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -7712,7 +7712,7 @@ impl IDebugControl4 { (::windows_core::Interface::vtable(self).SetSystemErrorControl)(::windows_core::Interface::as_raw(self), outputlevel, breaklevel).ok() } pub unsafe fn GetTextMacro(&self, slot: u32, buffer: ::core::option::Option<&mut [u8]>, macrosize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetTextMacro)(::windows_core::Interface::as_raw(self), slot, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(macrosize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetTextMacro)(::windows_core::Interface::as_raw(self), slot, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(macrosize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetTextMacro(&self, slot: u32, r#macro: P0) -> ::windows_core::Result<()> where @@ -7828,10 +7828,10 @@ impl IDebugControl4 { (::windows_core::Interface::vtable(self).GetNumberEventFilters)(::windows_core::Interface::as_raw(self), specificevents, specificexceptions, arbitraryexceptions).ok() } pub unsafe fn GetEventFilterText(&self, index: u32, buffer: ::core::option::Option<&mut [u8]>, textsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetEventFilterText)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetEventFilterText)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetEventFilterCommand(&self, index: u32, buffer: ::core::option::Option<&mut [u8]>, commandsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetEventFilterCommand)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetEventFilterCommand)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetEventFilterCommand(&self, index: u32, command: P0) -> ::windows_core::Result<()> where @@ -7840,13 +7840,13 @@ impl IDebugControl4 { (::windows_core::Interface::vtable(self).SetEventFilterCommand)(::windows_core::Interface::as_raw(self), index, command.into_param().abi()).ok() } pub unsafe fn GetSpecificFilterParameters(&self, start: u32, params: &mut [DEBUG_SPECIFIC_FILTER_PARAMETERS]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSpecificFilterParameters)(::windows_core::Interface::as_raw(self), start, params.len() as _, ::core::mem::transmute(params.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetSpecificFilterParameters)(::windows_core::Interface::as_raw(self), start, params.len().try_into().unwrap(), ::core::mem::transmute(params.as_ptr())).ok() } pub unsafe fn SetSpecificFilterParameters(&self, start: u32, params: &[DEBUG_SPECIFIC_FILTER_PARAMETERS]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetSpecificFilterParameters)(::windows_core::Interface::as_raw(self), start, params.len() as _, ::core::mem::transmute(params.as_ptr())).ok() + (::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: ::core::option::Option<&mut [u8]>, argumentsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSpecificFilterArgument)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(argumentsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSpecificFilterArgument)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(argumentsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetSpecificFilterArgument(&self, index: u32, argument: P0) -> ::windows_core::Result<()> where @@ -7858,10 +7858,10 @@ impl IDebugControl4 { (::windows_core::Interface::vtable(self).GetExceptionFilterParameters)(::windows_core::Interface::as_raw(self), count, ::core::mem::transmute(codes.unwrap_or(::std::ptr::null())), start, params).ok() } pub unsafe fn SetExceptionFilterParameters(&self, params: &[DEBUG_EXCEPTION_FILTER_PARAMETERS]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetExceptionFilterParameters)(::windows_core::Interface::as_raw(self), params.len() as _, ::core::mem::transmute(params.as_ptr())).ok() + (::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: ::core::option::Option<&mut [u8]>, commandsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetExceptionFilterSecondCommand(&self, index: u32, command: P0) -> ::windows_core::Result<()> where @@ -7882,7 +7882,7 @@ impl IDebugControl4 { extrainformationsize, ::core::mem::transmute(extrainformationused.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(description.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - description.as_deref().map_or(0, |slice| slice.len() as _), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(descriptionused.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -7912,10 +7912,10 @@ impl IDebugControl4 { srctext.into_param().abi(), 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() as _), + srcbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(srcsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(dstbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - dstbuffer.as_deref().map_or(0, |slice| slice.len() as _), + dstbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(dstsize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -7968,10 +7968,10 @@ impl IDebugControl4 { ::windows_core::Interface::as_raw(self), 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() as _), + fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(fullnamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(abbrevnamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len() as _), + abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(abbrevnamesize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -7997,7 +7997,7 @@ impl IDebugControl4 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetLogFileWide(&self, buffer: ::core::option::Option<&mut [u16]>, filesize: ::core::option::Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLogFileWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), append).ok() + (::windows_core::Interface::vtable(self).GetLogFileWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), append).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -8009,7 +8009,7 @@ impl IDebugControl4 { (::windows_core::Interface::vtable(self).OpenLogFileWide)(::windows_core::Interface::as_raw(self), file.into_param().abi(), append.into_param().abi()).ok() } pub unsafe fn InputWide(&self, buffer: &mut [u16], inputsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).InputWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, ::core::mem::transmute(inputsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).InputWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ::core::mem::transmute(inputsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn ReturnInputWide(&self, buffer: P0) -> ::windows_core::Result<()> where @@ -8054,7 +8054,7 @@ impl IDebugControl4 { (::windows_core::Interface::vtable(self).OutputPromptVaListWide)(::windows_core::Interface::as_raw(self), outputcontrol, format.into_param().abi(), args).ok() } pub unsafe fn GetPromptTextWide(&self, buffer: ::core::option::Option<&mut [u16]>, textsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPromptTextWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetPromptTextWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn AssembleWide(&self, offset: u64, instr: P0) -> ::windows_core::Result where @@ -8064,23 +8064,23 @@ impl IDebugControl4 { (::windows_core::Interface::vtable(self).AssembleWide)(::windows_core::Interface::as_raw(self), offset, instr.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn DisassembleWide(&self, offset: u64, flags: u32, buffer: ::core::option::Option<&mut [u16]>, disassemblysize: ::core::option::Option<*mut u32>, endoffset: *mut u64) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).DisassembleWide)(::windows_core::Interface::as_raw(self), offset, flags, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(disassemblysize.unwrap_or(::std::ptr::null_mut())), endoffset).ok() + (::windows_core::Interface::vtable(self).DisassembleWide)(::windows_core::Interface::as_raw(self), offset, flags, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(disassemblysize.unwrap_or(::std::ptr::null_mut())), endoffset).ok() } pub unsafe fn GetProcessorTypeNamesWide(&self, r#type: u32, fullnamebuffer: ::core::option::Option<&mut [u16]>, fullnamesize: ::core::option::Option<*mut u32>, abbrevnamebuffer: ::core::option::Option<&mut [u16]>, abbrevnamesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetProcessorTypeNamesWide)( ::windows_core::Interface::as_raw(self), 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() as _), + fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(fullnamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(abbrevnamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len() as _), + abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(abbrevnamesize.unwrap_or(::std::ptr::null_mut())), ) .ok() } pub unsafe fn GetTextMacroWide(&self, slot: u32, buffer: ::core::option::Option<&mut [u16]>, macrosize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetTextMacroWide)(::windows_core::Interface::as_raw(self), slot, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(macrosize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetTextMacroWide)(::windows_core::Interface::as_raw(self), slot, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(macrosize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetTextMacroWide(&self, slot: u32, r#macro: P0) -> ::windows_core::Result<()> where @@ -8156,10 +8156,10 @@ impl IDebugControl4 { (::windows_core::Interface::vtable(self).GetExtensionFunctionWide)(::windows_core::Interface::as_raw(self), handle, funcname.into_param().abi(), function).ok() } pub unsafe fn GetEventFilterTextWide(&self, index: u32, buffer: ::core::option::Option<&mut [u16]>, textsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetEventFilterTextWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetEventFilterTextWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetEventFilterCommandWide(&self, index: u32, buffer: ::core::option::Option<&mut [u16]>, commandsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetEventFilterCommandWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetEventFilterCommandWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetEventFilterCommandWide(&self, index: u32, command: P0) -> ::windows_core::Result<()> where @@ -8168,7 +8168,7 @@ impl IDebugControl4 { (::windows_core::Interface::vtable(self).SetEventFilterCommandWide)(::windows_core::Interface::as_raw(self), index, command.into_param().abi()).ok() } pub unsafe fn GetSpecificFilterArgumentWide(&self, index: u32, buffer: ::core::option::Option<&mut [u16]>, argumentsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSpecificFilterArgumentWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(argumentsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSpecificFilterArgumentWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(argumentsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetSpecificFilterArgumentWide(&self, index: u32, argument: P0) -> ::windows_core::Result<()> where @@ -8177,7 +8177,7 @@ impl IDebugControl4 { (::windows_core::Interface::vtable(self).SetSpecificFilterArgumentWide)(::windows_core::Interface::as_raw(self), index, argument.into_param().abi()).ok() } pub unsafe fn GetExceptionFilterSecondCommandWide(&self, index: u32, buffer: ::core::option::Option<&mut [u16]>, commandsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetExceptionFilterSecondCommandWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetExceptionFilterSecondCommandWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetExceptionFilterSecondCommandWide(&self, index: u32, command: P0) -> ::windows_core::Result<()> where @@ -8195,7 +8195,7 @@ impl IDebugControl4 { extrainformationsize, ::core::mem::transmute(extrainformationused.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(description.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - description.as_deref().map_or(0, |slice| slice.len() as _), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(descriptionused.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -8209,10 +8209,10 @@ impl IDebugControl4 { srctext.into_param().abi(), 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() as _), + srcbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(srcsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(dstbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - dstbuffer.as_deref().map_or(0, |slice| slice.len() as _), + dstbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(dstsize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -8235,10 +8235,10 @@ impl IDebugControl4 { ::windows_core::Interface::as_raw(self), 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() as _), + fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(fullnamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(abbrevnamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len() as _), + abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(abbrevnamesize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -8250,7 +8250,7 @@ impl IDebugControl4 { (::windows_core::Interface::vtable(self).GetEventIndexDescriptionWide)(::windows_core::Interface::as_raw(self), index, which, buffer.into_param().abi(), buffersize, ::core::mem::transmute(descsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetLogFile2(&self, buffer: ::core::option::Option<&mut [u8]>, filesize: ::core::option::Option<*mut u32>, flags: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLogFile2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), flags).ok() + (::windows_core::Interface::vtable(self).GetLogFile2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), flags).ok() } pub unsafe fn OpenLogFile2(&self, file: P0, flags: u32) -> ::windows_core::Result<()> where @@ -8259,7 +8259,7 @@ impl IDebugControl4 { (::windows_core::Interface::vtable(self).OpenLogFile2)(::windows_core::Interface::as_raw(self), file.into_param().abi(), flags).ok() } pub unsafe fn GetLogFile2Wide(&self, buffer: ::core::option::Option<&mut [u16]>, filesize: ::core::option::Option<*mut u32>, flags: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLogFile2Wide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), flags).ok() + (::windows_core::Interface::vtable(self).GetLogFile2Wide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), flags).ok() } pub unsafe fn OpenLogFile2Wide(&self, file: P0, flags: u32) -> ::windows_core::Result<()> where @@ -8271,29 +8271,29 @@ impl IDebugControl4 { (::windows_core::Interface::vtable(self).GetSystemVersionValues)(::windows_core::Interface::as_raw(self), platformid, win32major, win32minor, ::core::mem::transmute(kdmajor.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(kdminor.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSystemVersionString(&self, which: u32, buffer: ::core::option::Option<&mut [u8]>, stringsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSystemVersionString)(::windows_core::Interface::as_raw(self), which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSystemVersionString)(::windows_core::Interface::as_raw(self), which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSystemVersionStringWide(&self, which: u32, buffer: ::core::option::Option<&mut [u16]>, stringsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSystemVersionStringWide)(::windows_core::Interface::as_raw(self), which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSystemVersionStringWide)(::windows_core::Interface::as_raw(self), which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetContextStackTrace(&self, startcontext: ::core::option::Option<*const ::core::ffi::c_void>, startcontextsize: u32, frames: ::core::option::Option<&mut [DEBUG_STACK_FRAME]>, framecontexts: ::core::option::Option<*mut ::core::ffi::c_void>, framecontextssize: u32, framecontextsentrysize: u32, framesfilled: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetContextStackTrace)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(startcontext.unwrap_or(::std::ptr::null())), startcontextsize, ::core::mem::transmute(frames.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(framecontexts.unwrap_or(::std::ptr::null_mut())), framecontextssize, framecontextsentrysize, ::core::mem::transmute(framesfilled.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetContextStackTrace)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(startcontext.unwrap_or(::std::ptr::null())), startcontextsize, ::core::mem::transmute(frames.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(framecontexts.unwrap_or(::std::ptr::null_mut())), framecontextssize, framecontextsentrysize, ::core::mem::transmute(framesfilled.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn OutputContextStackTrace(&self, outputcontrol: u32, frames: &[DEBUG_STACK_FRAME], framecontexts: *const ::core::ffi::c_void, framecontextssize: u32, framecontextsentrysize: u32, flags: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).OutputContextStackTrace)(::windows_core::Interface::as_raw(self), outputcontrol, ::core::mem::transmute(frames.as_ptr()), frames.len() as _, framecontexts, framecontextssize, framecontextsentrysize, flags).ok() + (::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: ::core::option::Option<*mut ::core::ffi::c_void>, contextsize: u32, contextused: ::core::option::Option<*mut u32>, extrainformation: ::core::option::Option<*mut ::core::ffi::c_void>, extrainformationsize: u32, extrainformationused: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetStoredEventInformation)(::windows_core::Interface::as_raw(self), r#type, processid, threadid, ::core::mem::transmute(context.unwrap_or(::std::ptr::null_mut())), contextsize, ::core::mem::transmute(contextused.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(extrainformation.unwrap_or(::std::ptr::null_mut())), extrainformationsize, ::core::mem::transmute(extrainformationused.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetManagedStatus(&self, flags: ::core::option::Option<*mut u32>, whichstring: u32, string: ::core::option::Option<&mut [u8]>, stringneeded: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetManagedStatus)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(flags.unwrap_or(::std::ptr::null_mut())), whichstring, ::core::mem::transmute(string.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), string.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringneeded.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetManagedStatus)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(flags.unwrap_or(::std::ptr::null_mut())), whichstring, ::core::mem::transmute(string.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), string.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringneeded.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetManagedStatusWide(&self, flags: ::core::option::Option<*mut u32>, whichstring: u32, string: ::core::option::Option<&mut [u16]>, stringneeded: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetManagedStatusWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(flags.unwrap_or(::std::ptr::null_mut())), whichstring, ::core::mem::transmute(string.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), string.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringneeded.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetManagedStatusWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(flags.unwrap_or(::std::ptr::null_mut())), whichstring, ::core::mem::transmute(string.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), string.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringneeded.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn ResetManagedStatus(&self, flags: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).ResetManagedStatus)(::windows_core::Interface::as_raw(self), flags).ok() @@ -8545,7 +8545,7 @@ impl IDebugControl5 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetLogFile(&self, buffer: ::core::option::Option<&mut [u8]>, filesize: ::core::option::Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLogFile)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), append).ok() + (::windows_core::Interface::vtable(self).GetLogFile)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), append).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -8567,7 +8567,7 @@ impl IDebugControl5 { (::windows_core::Interface::vtable(self).SetLogMask)(::windows_core::Interface::as_raw(self), mask).ok() } pub unsafe fn Input(&self, buffer: &mut [u8], inputsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Input)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, ::core::mem::transmute(inputsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Input)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ::core::mem::transmute(inputsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn ReturnInput(&self, buffer: P0) -> ::windows_core::Result<()> where @@ -8612,7 +8612,7 @@ impl IDebugControl5 { (::windows_core::Interface::vtable(self).OutputPromptVaList)(::windows_core::Interface::as_raw(self), outputcontrol, format.into_param().abi(), args).ok() } pub unsafe fn GetPromptText(&self, buffer: ::core::option::Option<&mut [u8]>, textsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPromptText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetPromptText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn OutputCurrentState(&self, outputcontrol: u32, flags: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).OutputCurrentState)(::windows_core::Interface::as_raw(self), outputcontrol, flags).ok() @@ -8635,7 +8635,7 @@ impl IDebugControl5 { (::windows_core::Interface::vtable(self).Assemble)(::windows_core::Interface::as_raw(self), offset, instr.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn Disassemble(&self, offset: u64, flags: u32, buffer: ::core::option::Option<&mut [u8]>, disassemblysize: ::core::option::Option<*mut u32>, endoffset: *mut u64) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Disassemble)(::windows_core::Interface::as_raw(self), offset, flags, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(disassemblysize.unwrap_or(::std::ptr::null_mut())), endoffset).ok() + (::windows_core::Interface::vtable(self).Disassemble)(::windows_core::Interface::as_raw(self), offset, flags, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(disassemblysize.unwrap_or(::std::ptr::null_mut())), endoffset).ok() } pub unsafe fn GetDisassembleEffectiveOffset(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -8646,7 +8646,7 @@ impl IDebugControl5 { (::windows_core::Interface::vtable(self).OutputDisassembly)(::windows_core::Interface::as_raw(self), outputcontrol, offset, flags, &mut result__).from_abi(result__) } pub unsafe fn OutputDisassemblyLines(&self, outputcontrol: u32, previouslines: u32, offset: u64, flags: u32, offsetline: ::core::option::Option<*mut u32>, startoffset: ::core::option::Option<*mut u64>, endoffset: ::core::option::Option<*mut u64>, lineoffsets: ::core::option::Option<&mut [u64]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).OutputDisassemblyLines)(::windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len() as _), offset, flags, ::core::mem::transmute(offsetline.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(startoffset.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(endoffset.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lineoffsets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + (::windows_core::Interface::vtable(self).OutputDisassemblyLines)(::windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, ::core::mem::transmute(offsetline.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(startoffset.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(endoffset.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lineoffsets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() } pub unsafe fn GetNearInstruction(&self, offset: u64, delta: i32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -8655,7 +8655,7 @@ impl IDebugControl5 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetStackTrace(&self, frameoffset: u64, stackoffset: u64, instructionoffset: u64, frames: &mut [DEBUG_STACK_FRAME], framesfilled: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetStackTrace)(::windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, ::core::mem::transmute(frames.as_ptr()), frames.len() as _, ::core::mem::transmute(framesfilled.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetStackTrace)(::windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, ::core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), ::core::mem::transmute(framesfilled.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetReturnOffset(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -8664,7 +8664,7 @@ impl IDebugControl5 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn OutputStackTrace(&self, outputcontrol: u32, frames: ::core::option::Option<&[DEBUG_STACK_FRAME]>, flags: u32) -> ::windows_core::Result<()> { - (::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() as _), flags).ok() + (::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<()> { (::windows_core::Interface::vtable(self).GetDebuggeeType)(::windows_core::Interface::as_raw(self), class, qualifier).ok() @@ -8682,7 +8682,7 @@ impl IDebugControl5 { (::windows_core::Interface::vtable(self).GetNumberPossibleExecutingProcessorTypes)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetPossibleExecutingProcessorTypes(&self, start: u32, types: &mut [u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPossibleExecutingProcessorTypes)(::windows_core::Interface::as_raw(self), start, types.len() as _, ::core::mem::transmute(types.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetPossibleExecutingProcessorTypes)(::windows_core::Interface::as_raw(self), start, types.len().try_into().unwrap(), ::core::mem::transmute(types.as_ptr())).ok() } pub unsafe fn GetNumberProcessors(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -8695,11 +8695,11 @@ impl IDebugControl5 { major, minor, ::core::mem::transmute(servicepackstring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - servicepackstring.as_deref().map_or(0, |slice| slice.len() as _), + servicepackstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(servicepackstringused.unwrap_or(::std::ptr::null_mut())), servicepacknumber, ::core::mem::transmute(buildstring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - buildstring.as_deref().map_or(0, |slice| slice.len() as _), + buildstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(buildstringused.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -8719,17 +8719,17 @@ impl IDebugControl5 { (::windows_core::Interface::vtable(self).GetNumberSupportedProcessorTypes)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetSupportedProcessorTypes(&self, start: u32, types: &mut [u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSupportedProcessorTypes)(::windows_core::Interface::as_raw(self), start, types.len() as _, ::core::mem::transmute(types.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetSupportedProcessorTypes)(::windows_core::Interface::as_raw(self), start, types.len().try_into().unwrap(), ::core::mem::transmute(types.as_ptr())).ok() } pub unsafe fn GetProcessorTypeNames(&self, r#type: u32, fullnamebuffer: ::core::option::Option<&mut [u8]>, fullnamesize: ::core::option::Option<*mut u32>, abbrevnamebuffer: ::core::option::Option<&mut [u8]>, abbrevnamesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetProcessorTypeNames)( ::windows_core::Interface::as_raw(self), 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() as _), + fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(fullnamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(abbrevnamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len() as _), + abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(abbrevnamesize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -8775,7 +8775,7 @@ impl IDebugControl5 { (::windows_core::Interface::vtable(self).SetSystemErrorControl)(::windows_core::Interface::as_raw(self), outputlevel, breaklevel).ok() } pub unsafe fn GetTextMacro(&self, slot: u32, buffer: ::core::option::Option<&mut [u8]>, macrosize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetTextMacro)(::windows_core::Interface::as_raw(self), slot, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(macrosize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetTextMacro)(::windows_core::Interface::as_raw(self), slot, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(macrosize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetTextMacro(&self, slot: u32, r#macro: P0) -> ::windows_core::Result<()> where @@ -8891,10 +8891,10 @@ impl IDebugControl5 { (::windows_core::Interface::vtable(self).GetNumberEventFilters)(::windows_core::Interface::as_raw(self), specificevents, specificexceptions, arbitraryexceptions).ok() } pub unsafe fn GetEventFilterText(&self, index: u32, buffer: ::core::option::Option<&mut [u8]>, textsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetEventFilterText)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetEventFilterText)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetEventFilterCommand(&self, index: u32, buffer: ::core::option::Option<&mut [u8]>, commandsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetEventFilterCommand)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetEventFilterCommand)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetEventFilterCommand(&self, index: u32, command: P0) -> ::windows_core::Result<()> where @@ -8903,13 +8903,13 @@ impl IDebugControl5 { (::windows_core::Interface::vtable(self).SetEventFilterCommand)(::windows_core::Interface::as_raw(self), index, command.into_param().abi()).ok() } pub unsafe fn GetSpecificFilterParameters(&self, start: u32, params: &mut [DEBUG_SPECIFIC_FILTER_PARAMETERS]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSpecificFilterParameters)(::windows_core::Interface::as_raw(self), start, params.len() as _, ::core::mem::transmute(params.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetSpecificFilterParameters)(::windows_core::Interface::as_raw(self), start, params.len().try_into().unwrap(), ::core::mem::transmute(params.as_ptr())).ok() } pub unsafe fn SetSpecificFilterParameters(&self, start: u32, params: &[DEBUG_SPECIFIC_FILTER_PARAMETERS]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetSpecificFilterParameters)(::windows_core::Interface::as_raw(self), start, params.len() as _, ::core::mem::transmute(params.as_ptr())).ok() + (::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: ::core::option::Option<&mut [u8]>, argumentsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSpecificFilterArgument)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(argumentsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSpecificFilterArgument)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(argumentsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetSpecificFilterArgument(&self, index: u32, argument: P0) -> ::windows_core::Result<()> where @@ -8921,10 +8921,10 @@ impl IDebugControl5 { (::windows_core::Interface::vtable(self).GetExceptionFilterParameters)(::windows_core::Interface::as_raw(self), count, ::core::mem::transmute(codes.unwrap_or(::std::ptr::null())), start, params).ok() } pub unsafe fn SetExceptionFilterParameters(&self, params: &[DEBUG_EXCEPTION_FILTER_PARAMETERS]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetExceptionFilterParameters)(::windows_core::Interface::as_raw(self), params.len() as _, ::core::mem::transmute(params.as_ptr())).ok() + (::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: ::core::option::Option<&mut [u8]>, commandsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetExceptionFilterSecondCommand(&self, index: u32, command: P0) -> ::windows_core::Result<()> where @@ -8945,7 +8945,7 @@ impl IDebugControl5 { extrainformationsize, ::core::mem::transmute(extrainformationused.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(description.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - description.as_deref().map_or(0, |slice| slice.len() as _), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(descriptionused.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -8975,10 +8975,10 @@ impl IDebugControl5 { srctext.into_param().abi(), 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() as _), + srcbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(srcsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(dstbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - dstbuffer.as_deref().map_or(0, |slice| slice.len() as _), + dstbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(dstsize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -9031,10 +9031,10 @@ impl IDebugControl5 { ::windows_core::Interface::as_raw(self), 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() as _), + fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(fullnamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(abbrevnamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len() as _), + abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(abbrevnamesize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -9060,7 +9060,7 @@ impl IDebugControl5 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetLogFileWide(&self, buffer: ::core::option::Option<&mut [u16]>, filesize: ::core::option::Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLogFileWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), append).ok() + (::windows_core::Interface::vtable(self).GetLogFileWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), append).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -9072,7 +9072,7 @@ impl IDebugControl5 { (::windows_core::Interface::vtable(self).OpenLogFileWide)(::windows_core::Interface::as_raw(self), file.into_param().abi(), append.into_param().abi()).ok() } pub unsafe fn InputWide(&self, buffer: &mut [u16], inputsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).InputWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, ::core::mem::transmute(inputsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).InputWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ::core::mem::transmute(inputsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn ReturnInputWide(&self, buffer: P0) -> ::windows_core::Result<()> where @@ -9117,7 +9117,7 @@ impl IDebugControl5 { (::windows_core::Interface::vtable(self).OutputPromptVaListWide)(::windows_core::Interface::as_raw(self), outputcontrol, format.into_param().abi(), args).ok() } pub unsafe fn GetPromptTextWide(&self, buffer: ::core::option::Option<&mut [u16]>, textsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPromptTextWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetPromptTextWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn AssembleWide(&self, offset: u64, instr: P0) -> ::windows_core::Result where @@ -9127,23 +9127,23 @@ impl IDebugControl5 { (::windows_core::Interface::vtable(self).AssembleWide)(::windows_core::Interface::as_raw(self), offset, instr.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn DisassembleWide(&self, offset: u64, flags: u32, buffer: ::core::option::Option<&mut [u16]>, disassemblysize: ::core::option::Option<*mut u32>, endoffset: *mut u64) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).DisassembleWide)(::windows_core::Interface::as_raw(self), offset, flags, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(disassemblysize.unwrap_or(::std::ptr::null_mut())), endoffset).ok() + (::windows_core::Interface::vtable(self).DisassembleWide)(::windows_core::Interface::as_raw(self), offset, flags, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(disassemblysize.unwrap_or(::std::ptr::null_mut())), endoffset).ok() } pub unsafe fn GetProcessorTypeNamesWide(&self, r#type: u32, fullnamebuffer: ::core::option::Option<&mut [u16]>, fullnamesize: ::core::option::Option<*mut u32>, abbrevnamebuffer: ::core::option::Option<&mut [u16]>, abbrevnamesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetProcessorTypeNamesWide)( ::windows_core::Interface::as_raw(self), 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() as _), + fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(fullnamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(abbrevnamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len() as _), + abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(abbrevnamesize.unwrap_or(::std::ptr::null_mut())), ) .ok() } pub unsafe fn GetTextMacroWide(&self, slot: u32, buffer: ::core::option::Option<&mut [u16]>, macrosize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetTextMacroWide)(::windows_core::Interface::as_raw(self), slot, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(macrosize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetTextMacroWide)(::windows_core::Interface::as_raw(self), slot, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(macrosize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetTextMacroWide(&self, slot: u32, r#macro: P0) -> ::windows_core::Result<()> where @@ -9219,10 +9219,10 @@ impl IDebugControl5 { (::windows_core::Interface::vtable(self).GetExtensionFunctionWide)(::windows_core::Interface::as_raw(self), handle, funcname.into_param().abi(), function).ok() } pub unsafe fn GetEventFilterTextWide(&self, index: u32, buffer: ::core::option::Option<&mut [u16]>, textsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetEventFilterTextWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetEventFilterTextWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetEventFilterCommandWide(&self, index: u32, buffer: ::core::option::Option<&mut [u16]>, commandsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetEventFilterCommandWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetEventFilterCommandWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetEventFilterCommandWide(&self, index: u32, command: P0) -> ::windows_core::Result<()> where @@ -9231,7 +9231,7 @@ impl IDebugControl5 { (::windows_core::Interface::vtable(self).SetEventFilterCommandWide)(::windows_core::Interface::as_raw(self), index, command.into_param().abi()).ok() } pub unsafe fn GetSpecificFilterArgumentWide(&self, index: u32, buffer: ::core::option::Option<&mut [u16]>, argumentsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSpecificFilterArgumentWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(argumentsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSpecificFilterArgumentWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(argumentsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetSpecificFilterArgumentWide(&self, index: u32, argument: P0) -> ::windows_core::Result<()> where @@ -9240,7 +9240,7 @@ impl IDebugControl5 { (::windows_core::Interface::vtable(self).SetSpecificFilterArgumentWide)(::windows_core::Interface::as_raw(self), index, argument.into_param().abi()).ok() } pub unsafe fn GetExceptionFilterSecondCommandWide(&self, index: u32, buffer: ::core::option::Option<&mut [u16]>, commandsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetExceptionFilterSecondCommandWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetExceptionFilterSecondCommandWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetExceptionFilterSecondCommandWide(&self, index: u32, command: P0) -> ::windows_core::Result<()> where @@ -9258,7 +9258,7 @@ impl IDebugControl5 { extrainformationsize, ::core::mem::transmute(extrainformationused.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(description.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - description.as_deref().map_or(0, |slice| slice.len() as _), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(descriptionused.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -9272,10 +9272,10 @@ impl IDebugControl5 { srctext.into_param().abi(), 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() as _), + srcbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(srcsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(dstbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - dstbuffer.as_deref().map_or(0, |slice| slice.len() as _), + dstbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(dstsize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -9298,10 +9298,10 @@ impl IDebugControl5 { ::windows_core::Interface::as_raw(self), 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() as _), + fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(fullnamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(abbrevnamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len() as _), + abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(abbrevnamesize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -9313,7 +9313,7 @@ impl IDebugControl5 { (::windows_core::Interface::vtable(self).GetEventIndexDescriptionWide)(::windows_core::Interface::as_raw(self), index, which, buffer.into_param().abi(), buffersize, ::core::mem::transmute(descsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetLogFile2(&self, buffer: ::core::option::Option<&mut [u8]>, filesize: ::core::option::Option<*mut u32>, flags: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLogFile2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), flags).ok() + (::windows_core::Interface::vtable(self).GetLogFile2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), flags).ok() } pub unsafe fn OpenLogFile2(&self, file: P0, flags: u32) -> ::windows_core::Result<()> where @@ -9322,7 +9322,7 @@ impl IDebugControl5 { (::windows_core::Interface::vtable(self).OpenLogFile2)(::windows_core::Interface::as_raw(self), file.into_param().abi(), flags).ok() } pub unsafe fn GetLogFile2Wide(&self, buffer: ::core::option::Option<&mut [u16]>, filesize: ::core::option::Option<*mut u32>, flags: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLogFile2Wide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), flags).ok() + (::windows_core::Interface::vtable(self).GetLogFile2Wide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), flags).ok() } pub unsafe fn OpenLogFile2Wide(&self, file: P0, flags: u32) -> ::windows_core::Result<()> where @@ -9334,29 +9334,29 @@ impl IDebugControl5 { (::windows_core::Interface::vtable(self).GetSystemVersionValues)(::windows_core::Interface::as_raw(self), platformid, win32major, win32minor, ::core::mem::transmute(kdmajor.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(kdminor.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSystemVersionString(&self, which: u32, buffer: ::core::option::Option<&mut [u8]>, stringsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSystemVersionString)(::windows_core::Interface::as_raw(self), which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSystemVersionString)(::windows_core::Interface::as_raw(self), which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSystemVersionStringWide(&self, which: u32, buffer: ::core::option::Option<&mut [u16]>, stringsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSystemVersionStringWide)(::windows_core::Interface::as_raw(self), which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSystemVersionStringWide)(::windows_core::Interface::as_raw(self), which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetContextStackTrace(&self, startcontext: ::core::option::Option<*const ::core::ffi::c_void>, startcontextsize: u32, frames: ::core::option::Option<&mut [DEBUG_STACK_FRAME]>, framecontexts: ::core::option::Option<*mut ::core::ffi::c_void>, framecontextssize: u32, framecontextsentrysize: u32, framesfilled: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetContextStackTrace)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(startcontext.unwrap_or(::std::ptr::null())), startcontextsize, ::core::mem::transmute(frames.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(framecontexts.unwrap_or(::std::ptr::null_mut())), framecontextssize, framecontextsentrysize, ::core::mem::transmute(framesfilled.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetContextStackTrace)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(startcontext.unwrap_or(::std::ptr::null())), startcontextsize, ::core::mem::transmute(frames.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(framecontexts.unwrap_or(::std::ptr::null_mut())), framecontextssize, framecontextsentrysize, ::core::mem::transmute(framesfilled.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn OutputContextStackTrace(&self, outputcontrol: u32, frames: &[DEBUG_STACK_FRAME], framecontexts: *const ::core::ffi::c_void, framecontextssize: u32, framecontextsentrysize: u32, flags: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).OutputContextStackTrace)(::windows_core::Interface::as_raw(self), outputcontrol, ::core::mem::transmute(frames.as_ptr()), frames.len() as _, framecontexts, framecontextssize, framecontextsentrysize, flags).ok() + (::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: ::core::option::Option<*mut ::core::ffi::c_void>, contextsize: u32, contextused: ::core::option::Option<*mut u32>, extrainformation: ::core::option::Option<*mut ::core::ffi::c_void>, extrainformationsize: u32, extrainformationused: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetStoredEventInformation)(::windows_core::Interface::as_raw(self), r#type, processid, threadid, ::core::mem::transmute(context.unwrap_or(::std::ptr::null_mut())), contextsize, ::core::mem::transmute(contextused.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(extrainformation.unwrap_or(::std::ptr::null_mut())), extrainformationsize, ::core::mem::transmute(extrainformationused.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetManagedStatus(&self, flags: ::core::option::Option<*mut u32>, whichstring: u32, string: ::core::option::Option<&mut [u8]>, stringneeded: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetManagedStatus)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(flags.unwrap_or(::std::ptr::null_mut())), whichstring, ::core::mem::transmute(string.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), string.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringneeded.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetManagedStatus)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(flags.unwrap_or(::std::ptr::null_mut())), whichstring, ::core::mem::transmute(string.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), string.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringneeded.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetManagedStatusWide(&self, flags: ::core::option::Option<*mut u32>, whichstring: u32, string: ::core::option::Option<&mut [u16]>, stringneeded: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetManagedStatusWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(flags.unwrap_or(::std::ptr::null_mut())), whichstring, ::core::mem::transmute(string.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), string.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringneeded.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetManagedStatusWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(flags.unwrap_or(::std::ptr::null_mut())), whichstring, ::core::mem::transmute(string.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), string.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringneeded.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn ResetManagedStatus(&self, flags: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).ResetManagedStatus)(::windows_core::Interface::as_raw(self), flags).ok() @@ -9364,22 +9364,22 @@ impl IDebugControl5 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetStackTraceEx(&self, frameoffset: u64, stackoffset: u64, instructionoffset: u64, frames: &mut [DEBUG_STACK_FRAME_EX], framesfilled: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetStackTraceEx)(::windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, ::core::mem::transmute(frames.as_ptr()), frames.len() as _, ::core::mem::transmute(framesfilled.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetStackTraceEx)(::windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, ::core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), ::core::mem::transmute(framesfilled.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn OutputStackTraceEx(&self, outputcontrol: u32, frames: ::core::option::Option<&[DEBUG_STACK_FRAME_EX]>, flags: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).OutputStackTraceEx)(::windows_core::Interface::as_raw(self), outputcontrol, ::core::mem::transmute(frames.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len() as _), flags).ok() + (::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() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetContextStackTraceEx(&self, startcontext: ::core::option::Option<*const ::core::ffi::c_void>, startcontextsize: u32, frames: ::core::option::Option<&mut [DEBUG_STACK_FRAME_EX]>, framecontexts: ::core::option::Option<*mut ::core::ffi::c_void>, framecontextssize: u32, framecontextsentrysize: u32, framesfilled: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetContextStackTraceEx)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(startcontext.unwrap_or(::std::ptr::null())), startcontextsize, ::core::mem::transmute(frames.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(framecontexts.unwrap_or(::std::ptr::null_mut())), framecontextssize, framecontextsentrysize, ::core::mem::transmute(framesfilled.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetContextStackTraceEx)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(startcontext.unwrap_or(::std::ptr::null())), startcontextsize, ::core::mem::transmute(frames.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(framecontexts.unwrap_or(::std::ptr::null_mut())), framecontextssize, framecontextsentrysize, ::core::mem::transmute(framesfilled.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn OutputContextStackTraceEx(&self, outputcontrol: u32, frames: &[DEBUG_STACK_FRAME_EX], framecontexts: *const ::core::ffi::c_void, framecontextssize: u32, framecontextsentrysize: u32, flags: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).OutputContextStackTraceEx)(::windows_core::Interface::as_raw(self), outputcontrol, ::core::mem::transmute(frames.as_ptr()), frames.len() as _, framecontexts, framecontextssize, framecontextsentrysize, flags).ok() + (::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() } pub unsafe fn GetBreakpointByGuid(&self, guid: *const ::windows_core::GUID) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -9649,7 +9649,7 @@ impl IDebugControl6 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetLogFile(&self, buffer: ::core::option::Option<&mut [u8]>, filesize: ::core::option::Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLogFile)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), append).ok() + (::windows_core::Interface::vtable(self).GetLogFile)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), append).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -9671,7 +9671,7 @@ impl IDebugControl6 { (::windows_core::Interface::vtable(self).SetLogMask)(::windows_core::Interface::as_raw(self), mask).ok() } pub unsafe fn Input(&self, buffer: &mut [u8], inputsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Input)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, ::core::mem::transmute(inputsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Input)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ::core::mem::transmute(inputsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn ReturnInput(&self, buffer: P0) -> ::windows_core::Result<()> where @@ -9716,7 +9716,7 @@ impl IDebugControl6 { (::windows_core::Interface::vtable(self).OutputPromptVaList)(::windows_core::Interface::as_raw(self), outputcontrol, format.into_param().abi(), args).ok() } pub unsafe fn GetPromptText(&self, buffer: ::core::option::Option<&mut [u8]>, textsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPromptText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetPromptText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn OutputCurrentState(&self, outputcontrol: u32, flags: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).OutputCurrentState)(::windows_core::Interface::as_raw(self), outputcontrol, flags).ok() @@ -9739,7 +9739,7 @@ impl IDebugControl6 { (::windows_core::Interface::vtable(self).Assemble)(::windows_core::Interface::as_raw(self), offset, instr.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn Disassemble(&self, offset: u64, flags: u32, buffer: ::core::option::Option<&mut [u8]>, disassemblysize: ::core::option::Option<*mut u32>, endoffset: *mut u64) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Disassemble)(::windows_core::Interface::as_raw(self), offset, flags, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(disassemblysize.unwrap_or(::std::ptr::null_mut())), endoffset).ok() + (::windows_core::Interface::vtable(self).Disassemble)(::windows_core::Interface::as_raw(self), offset, flags, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(disassemblysize.unwrap_or(::std::ptr::null_mut())), endoffset).ok() } pub unsafe fn GetDisassembleEffectiveOffset(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -9750,7 +9750,7 @@ impl IDebugControl6 { (::windows_core::Interface::vtable(self).OutputDisassembly)(::windows_core::Interface::as_raw(self), outputcontrol, offset, flags, &mut result__).from_abi(result__) } pub unsafe fn OutputDisassemblyLines(&self, outputcontrol: u32, previouslines: u32, offset: u64, flags: u32, offsetline: ::core::option::Option<*mut u32>, startoffset: ::core::option::Option<*mut u64>, endoffset: ::core::option::Option<*mut u64>, lineoffsets: ::core::option::Option<&mut [u64]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).OutputDisassemblyLines)(::windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len() as _), offset, flags, ::core::mem::transmute(offsetline.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(startoffset.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(endoffset.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lineoffsets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + (::windows_core::Interface::vtable(self).OutputDisassemblyLines)(::windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, ::core::mem::transmute(offsetline.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(startoffset.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(endoffset.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lineoffsets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() } pub unsafe fn GetNearInstruction(&self, offset: u64, delta: i32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -9759,7 +9759,7 @@ impl IDebugControl6 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetStackTrace(&self, frameoffset: u64, stackoffset: u64, instructionoffset: u64, frames: &mut [DEBUG_STACK_FRAME], framesfilled: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetStackTrace)(::windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, ::core::mem::transmute(frames.as_ptr()), frames.len() as _, ::core::mem::transmute(framesfilled.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetStackTrace)(::windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, ::core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), ::core::mem::transmute(framesfilled.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetReturnOffset(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -9768,7 +9768,7 @@ impl IDebugControl6 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn OutputStackTrace(&self, outputcontrol: u32, frames: ::core::option::Option<&[DEBUG_STACK_FRAME]>, flags: u32) -> ::windows_core::Result<()> { - (::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() as _), flags).ok() + (::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<()> { (::windows_core::Interface::vtable(self).GetDebuggeeType)(::windows_core::Interface::as_raw(self), class, qualifier).ok() @@ -9786,7 +9786,7 @@ impl IDebugControl6 { (::windows_core::Interface::vtable(self).GetNumberPossibleExecutingProcessorTypes)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetPossibleExecutingProcessorTypes(&self, start: u32, types: &mut [u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPossibleExecutingProcessorTypes)(::windows_core::Interface::as_raw(self), start, types.len() as _, ::core::mem::transmute(types.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetPossibleExecutingProcessorTypes)(::windows_core::Interface::as_raw(self), start, types.len().try_into().unwrap(), ::core::mem::transmute(types.as_ptr())).ok() } pub unsafe fn GetNumberProcessors(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -9799,11 +9799,11 @@ impl IDebugControl6 { major, minor, ::core::mem::transmute(servicepackstring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - servicepackstring.as_deref().map_or(0, |slice| slice.len() as _), + servicepackstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(servicepackstringused.unwrap_or(::std::ptr::null_mut())), servicepacknumber, ::core::mem::transmute(buildstring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - buildstring.as_deref().map_or(0, |slice| slice.len() as _), + buildstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(buildstringused.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -9823,17 +9823,17 @@ impl IDebugControl6 { (::windows_core::Interface::vtable(self).GetNumberSupportedProcessorTypes)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetSupportedProcessorTypes(&self, start: u32, types: &mut [u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSupportedProcessorTypes)(::windows_core::Interface::as_raw(self), start, types.len() as _, ::core::mem::transmute(types.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetSupportedProcessorTypes)(::windows_core::Interface::as_raw(self), start, types.len().try_into().unwrap(), ::core::mem::transmute(types.as_ptr())).ok() } pub unsafe fn GetProcessorTypeNames(&self, r#type: u32, fullnamebuffer: ::core::option::Option<&mut [u8]>, fullnamesize: ::core::option::Option<*mut u32>, abbrevnamebuffer: ::core::option::Option<&mut [u8]>, abbrevnamesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetProcessorTypeNames)( ::windows_core::Interface::as_raw(self), 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() as _), + fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(fullnamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(abbrevnamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len() as _), + abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(abbrevnamesize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -9879,7 +9879,7 @@ impl IDebugControl6 { (::windows_core::Interface::vtable(self).SetSystemErrorControl)(::windows_core::Interface::as_raw(self), outputlevel, breaklevel).ok() } pub unsafe fn GetTextMacro(&self, slot: u32, buffer: ::core::option::Option<&mut [u8]>, macrosize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetTextMacro)(::windows_core::Interface::as_raw(self), slot, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(macrosize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetTextMacro)(::windows_core::Interface::as_raw(self), slot, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(macrosize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetTextMacro(&self, slot: u32, r#macro: P0) -> ::windows_core::Result<()> where @@ -9995,10 +9995,10 @@ impl IDebugControl6 { (::windows_core::Interface::vtable(self).GetNumberEventFilters)(::windows_core::Interface::as_raw(self), specificevents, specificexceptions, arbitraryexceptions).ok() } pub unsafe fn GetEventFilterText(&self, index: u32, buffer: ::core::option::Option<&mut [u8]>, textsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetEventFilterText)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetEventFilterText)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetEventFilterCommand(&self, index: u32, buffer: ::core::option::Option<&mut [u8]>, commandsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetEventFilterCommand)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetEventFilterCommand)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetEventFilterCommand(&self, index: u32, command: P0) -> ::windows_core::Result<()> where @@ -10007,13 +10007,13 @@ impl IDebugControl6 { (::windows_core::Interface::vtable(self).SetEventFilterCommand)(::windows_core::Interface::as_raw(self), index, command.into_param().abi()).ok() } pub unsafe fn GetSpecificFilterParameters(&self, start: u32, params: &mut [DEBUG_SPECIFIC_FILTER_PARAMETERS]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSpecificFilterParameters)(::windows_core::Interface::as_raw(self), start, params.len() as _, ::core::mem::transmute(params.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetSpecificFilterParameters)(::windows_core::Interface::as_raw(self), start, params.len().try_into().unwrap(), ::core::mem::transmute(params.as_ptr())).ok() } pub unsafe fn SetSpecificFilterParameters(&self, start: u32, params: &[DEBUG_SPECIFIC_FILTER_PARAMETERS]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetSpecificFilterParameters)(::windows_core::Interface::as_raw(self), start, params.len() as _, ::core::mem::transmute(params.as_ptr())).ok() + (::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: ::core::option::Option<&mut [u8]>, argumentsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSpecificFilterArgument)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(argumentsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSpecificFilterArgument)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(argumentsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetSpecificFilterArgument(&self, index: u32, argument: P0) -> ::windows_core::Result<()> where @@ -10025,10 +10025,10 @@ impl IDebugControl6 { (::windows_core::Interface::vtable(self).GetExceptionFilterParameters)(::windows_core::Interface::as_raw(self), count, ::core::mem::transmute(codes.unwrap_or(::std::ptr::null())), start, params).ok() } pub unsafe fn SetExceptionFilterParameters(&self, params: &[DEBUG_EXCEPTION_FILTER_PARAMETERS]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetExceptionFilterParameters)(::windows_core::Interface::as_raw(self), params.len() as _, ::core::mem::transmute(params.as_ptr())).ok() + (::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: ::core::option::Option<&mut [u8]>, commandsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetExceptionFilterSecondCommand(&self, index: u32, command: P0) -> ::windows_core::Result<()> where @@ -10049,7 +10049,7 @@ impl IDebugControl6 { extrainformationsize, ::core::mem::transmute(extrainformationused.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(description.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - description.as_deref().map_or(0, |slice| slice.len() as _), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(descriptionused.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -10079,10 +10079,10 @@ impl IDebugControl6 { srctext.into_param().abi(), 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() as _), + srcbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(srcsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(dstbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - dstbuffer.as_deref().map_or(0, |slice| slice.len() as _), + dstbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(dstsize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -10135,10 +10135,10 @@ impl IDebugControl6 { ::windows_core::Interface::as_raw(self), 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() as _), + fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(fullnamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(abbrevnamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len() as _), + abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(abbrevnamesize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -10164,7 +10164,7 @@ impl IDebugControl6 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetLogFileWide(&self, buffer: ::core::option::Option<&mut [u16]>, filesize: ::core::option::Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLogFileWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), append).ok() + (::windows_core::Interface::vtable(self).GetLogFileWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), append).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -10176,7 +10176,7 @@ impl IDebugControl6 { (::windows_core::Interface::vtable(self).OpenLogFileWide)(::windows_core::Interface::as_raw(self), file.into_param().abi(), append.into_param().abi()).ok() } pub unsafe fn InputWide(&self, buffer: &mut [u16], inputsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).InputWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, ::core::mem::transmute(inputsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).InputWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ::core::mem::transmute(inputsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn ReturnInputWide(&self, buffer: P0) -> ::windows_core::Result<()> where @@ -10221,7 +10221,7 @@ impl IDebugControl6 { (::windows_core::Interface::vtable(self).OutputPromptVaListWide)(::windows_core::Interface::as_raw(self), outputcontrol, format.into_param().abi(), args).ok() } pub unsafe fn GetPromptTextWide(&self, buffer: ::core::option::Option<&mut [u16]>, textsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPromptTextWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetPromptTextWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn AssembleWide(&self, offset: u64, instr: P0) -> ::windows_core::Result where @@ -10231,23 +10231,23 @@ impl IDebugControl6 { (::windows_core::Interface::vtable(self).AssembleWide)(::windows_core::Interface::as_raw(self), offset, instr.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn DisassembleWide(&self, offset: u64, flags: u32, buffer: ::core::option::Option<&mut [u16]>, disassemblysize: ::core::option::Option<*mut u32>, endoffset: *mut u64) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).DisassembleWide)(::windows_core::Interface::as_raw(self), offset, flags, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(disassemblysize.unwrap_or(::std::ptr::null_mut())), endoffset).ok() + (::windows_core::Interface::vtable(self).DisassembleWide)(::windows_core::Interface::as_raw(self), offset, flags, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(disassemblysize.unwrap_or(::std::ptr::null_mut())), endoffset).ok() } pub unsafe fn GetProcessorTypeNamesWide(&self, r#type: u32, fullnamebuffer: ::core::option::Option<&mut [u16]>, fullnamesize: ::core::option::Option<*mut u32>, abbrevnamebuffer: ::core::option::Option<&mut [u16]>, abbrevnamesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetProcessorTypeNamesWide)( ::windows_core::Interface::as_raw(self), 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() as _), + fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(fullnamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(abbrevnamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len() as _), + abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(abbrevnamesize.unwrap_or(::std::ptr::null_mut())), ) .ok() } pub unsafe fn GetTextMacroWide(&self, slot: u32, buffer: ::core::option::Option<&mut [u16]>, macrosize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetTextMacroWide)(::windows_core::Interface::as_raw(self), slot, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(macrosize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetTextMacroWide)(::windows_core::Interface::as_raw(self), slot, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(macrosize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetTextMacroWide(&self, slot: u32, r#macro: P0) -> ::windows_core::Result<()> where @@ -10323,10 +10323,10 @@ impl IDebugControl6 { (::windows_core::Interface::vtable(self).GetExtensionFunctionWide)(::windows_core::Interface::as_raw(self), handle, funcname.into_param().abi(), function).ok() } pub unsafe fn GetEventFilterTextWide(&self, index: u32, buffer: ::core::option::Option<&mut [u16]>, textsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetEventFilterTextWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetEventFilterTextWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetEventFilterCommandWide(&self, index: u32, buffer: ::core::option::Option<&mut [u16]>, commandsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetEventFilterCommandWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetEventFilterCommandWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetEventFilterCommandWide(&self, index: u32, command: P0) -> ::windows_core::Result<()> where @@ -10335,7 +10335,7 @@ impl IDebugControl6 { (::windows_core::Interface::vtable(self).SetEventFilterCommandWide)(::windows_core::Interface::as_raw(self), index, command.into_param().abi()).ok() } pub unsafe fn GetSpecificFilterArgumentWide(&self, index: u32, buffer: ::core::option::Option<&mut [u16]>, argumentsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSpecificFilterArgumentWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(argumentsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSpecificFilterArgumentWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(argumentsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetSpecificFilterArgumentWide(&self, index: u32, argument: P0) -> ::windows_core::Result<()> where @@ -10344,7 +10344,7 @@ impl IDebugControl6 { (::windows_core::Interface::vtable(self).SetSpecificFilterArgumentWide)(::windows_core::Interface::as_raw(self), index, argument.into_param().abi()).ok() } pub unsafe fn GetExceptionFilterSecondCommandWide(&self, index: u32, buffer: ::core::option::Option<&mut [u16]>, commandsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetExceptionFilterSecondCommandWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetExceptionFilterSecondCommandWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetExceptionFilterSecondCommandWide(&self, index: u32, command: P0) -> ::windows_core::Result<()> where @@ -10362,7 +10362,7 @@ impl IDebugControl6 { extrainformationsize, ::core::mem::transmute(extrainformationused.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(description.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - description.as_deref().map_or(0, |slice| slice.len() as _), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(descriptionused.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -10376,10 +10376,10 @@ impl IDebugControl6 { srctext.into_param().abi(), 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() as _), + srcbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(srcsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(dstbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - dstbuffer.as_deref().map_or(0, |slice| slice.len() as _), + dstbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(dstsize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -10402,10 +10402,10 @@ impl IDebugControl6 { ::windows_core::Interface::as_raw(self), 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() as _), + fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(fullnamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(abbrevnamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len() as _), + abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(abbrevnamesize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -10417,7 +10417,7 @@ impl IDebugControl6 { (::windows_core::Interface::vtable(self).GetEventIndexDescriptionWide)(::windows_core::Interface::as_raw(self), index, which, buffer.into_param().abi(), buffersize, ::core::mem::transmute(descsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetLogFile2(&self, buffer: ::core::option::Option<&mut [u8]>, filesize: ::core::option::Option<*mut u32>, flags: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLogFile2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), flags).ok() + (::windows_core::Interface::vtable(self).GetLogFile2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), flags).ok() } pub unsafe fn OpenLogFile2(&self, file: P0, flags: u32) -> ::windows_core::Result<()> where @@ -10426,7 +10426,7 @@ impl IDebugControl6 { (::windows_core::Interface::vtable(self).OpenLogFile2)(::windows_core::Interface::as_raw(self), file.into_param().abi(), flags).ok() } pub unsafe fn GetLogFile2Wide(&self, buffer: ::core::option::Option<&mut [u16]>, filesize: ::core::option::Option<*mut u32>, flags: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLogFile2Wide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), flags).ok() + (::windows_core::Interface::vtable(self).GetLogFile2Wide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), flags).ok() } pub unsafe fn OpenLogFile2Wide(&self, file: P0, flags: u32) -> ::windows_core::Result<()> where @@ -10438,29 +10438,29 @@ impl IDebugControl6 { (::windows_core::Interface::vtable(self).GetSystemVersionValues)(::windows_core::Interface::as_raw(self), platformid, win32major, win32minor, ::core::mem::transmute(kdmajor.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(kdminor.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSystemVersionString(&self, which: u32, buffer: ::core::option::Option<&mut [u8]>, stringsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSystemVersionString)(::windows_core::Interface::as_raw(self), which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSystemVersionString)(::windows_core::Interface::as_raw(self), which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSystemVersionStringWide(&self, which: u32, buffer: ::core::option::Option<&mut [u16]>, stringsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSystemVersionStringWide)(::windows_core::Interface::as_raw(self), which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSystemVersionStringWide)(::windows_core::Interface::as_raw(self), which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetContextStackTrace(&self, startcontext: ::core::option::Option<*const ::core::ffi::c_void>, startcontextsize: u32, frames: ::core::option::Option<&mut [DEBUG_STACK_FRAME]>, framecontexts: ::core::option::Option<*mut ::core::ffi::c_void>, framecontextssize: u32, framecontextsentrysize: u32, framesfilled: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetContextStackTrace)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(startcontext.unwrap_or(::std::ptr::null())), startcontextsize, ::core::mem::transmute(frames.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(framecontexts.unwrap_or(::std::ptr::null_mut())), framecontextssize, framecontextsentrysize, ::core::mem::transmute(framesfilled.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetContextStackTrace)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(startcontext.unwrap_or(::std::ptr::null())), startcontextsize, ::core::mem::transmute(frames.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(framecontexts.unwrap_or(::std::ptr::null_mut())), framecontextssize, framecontextsentrysize, ::core::mem::transmute(framesfilled.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn OutputContextStackTrace(&self, outputcontrol: u32, frames: &[DEBUG_STACK_FRAME], framecontexts: *const ::core::ffi::c_void, framecontextssize: u32, framecontextsentrysize: u32, flags: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).OutputContextStackTrace)(::windows_core::Interface::as_raw(self), outputcontrol, ::core::mem::transmute(frames.as_ptr()), frames.len() as _, framecontexts, framecontextssize, framecontextsentrysize, flags).ok() + (::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: ::core::option::Option<*mut ::core::ffi::c_void>, contextsize: u32, contextused: ::core::option::Option<*mut u32>, extrainformation: ::core::option::Option<*mut ::core::ffi::c_void>, extrainformationsize: u32, extrainformationused: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetStoredEventInformation)(::windows_core::Interface::as_raw(self), r#type, processid, threadid, ::core::mem::transmute(context.unwrap_or(::std::ptr::null_mut())), contextsize, ::core::mem::transmute(contextused.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(extrainformation.unwrap_or(::std::ptr::null_mut())), extrainformationsize, ::core::mem::transmute(extrainformationused.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetManagedStatus(&self, flags: ::core::option::Option<*mut u32>, whichstring: u32, string: ::core::option::Option<&mut [u8]>, stringneeded: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetManagedStatus)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(flags.unwrap_or(::std::ptr::null_mut())), whichstring, ::core::mem::transmute(string.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), string.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringneeded.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetManagedStatus)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(flags.unwrap_or(::std::ptr::null_mut())), whichstring, ::core::mem::transmute(string.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), string.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringneeded.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetManagedStatusWide(&self, flags: ::core::option::Option<*mut u32>, whichstring: u32, string: ::core::option::Option<&mut [u16]>, stringneeded: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetManagedStatusWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(flags.unwrap_or(::std::ptr::null_mut())), whichstring, ::core::mem::transmute(string.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), string.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringneeded.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetManagedStatusWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(flags.unwrap_or(::std::ptr::null_mut())), whichstring, ::core::mem::transmute(string.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), string.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringneeded.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn ResetManagedStatus(&self, flags: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).ResetManagedStatus)(::windows_core::Interface::as_raw(self), flags).ok() @@ -10468,22 +10468,22 @@ impl IDebugControl6 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetStackTraceEx(&self, frameoffset: u64, stackoffset: u64, instructionoffset: u64, frames: &mut [DEBUG_STACK_FRAME_EX], framesfilled: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetStackTraceEx)(::windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, ::core::mem::transmute(frames.as_ptr()), frames.len() as _, ::core::mem::transmute(framesfilled.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetStackTraceEx)(::windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, ::core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), ::core::mem::transmute(framesfilled.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn OutputStackTraceEx(&self, outputcontrol: u32, frames: ::core::option::Option<&[DEBUG_STACK_FRAME_EX]>, flags: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).OutputStackTraceEx)(::windows_core::Interface::as_raw(self), outputcontrol, ::core::mem::transmute(frames.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len() as _), flags).ok() + (::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() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetContextStackTraceEx(&self, startcontext: ::core::option::Option<*const ::core::ffi::c_void>, startcontextsize: u32, frames: ::core::option::Option<&mut [DEBUG_STACK_FRAME_EX]>, framecontexts: ::core::option::Option<*mut ::core::ffi::c_void>, framecontextssize: u32, framecontextsentrysize: u32, framesfilled: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetContextStackTraceEx)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(startcontext.unwrap_or(::std::ptr::null())), startcontextsize, ::core::mem::transmute(frames.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(framecontexts.unwrap_or(::std::ptr::null_mut())), framecontextssize, framecontextsentrysize, ::core::mem::transmute(framesfilled.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetContextStackTraceEx)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(startcontext.unwrap_or(::std::ptr::null())), startcontextsize, ::core::mem::transmute(frames.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(framecontexts.unwrap_or(::std::ptr::null_mut())), framecontextssize, framecontextsentrysize, ::core::mem::transmute(framesfilled.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn OutputContextStackTraceEx(&self, outputcontrol: u32, frames: &[DEBUG_STACK_FRAME_EX], framecontexts: *const ::core::ffi::c_void, framecontextssize: u32, framecontextsentrysize: u32, flags: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).OutputContextStackTraceEx)(::windows_core::Interface::as_raw(self), outputcontrol, ::core::mem::transmute(frames.as_ptr()), frames.len() as _, framecontexts, framecontextssize, framecontextsentrysize, flags).ok() + (::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() } pub unsafe fn GetBreakpointByGuid(&self, guid: *const ::windows_core::GUID) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -10762,7 +10762,7 @@ impl IDebugControl7 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetLogFile(&self, buffer: ::core::option::Option<&mut [u8]>, filesize: ::core::option::Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLogFile)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), append).ok() + (::windows_core::Interface::vtable(self).GetLogFile)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), append).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -10784,7 +10784,7 @@ impl IDebugControl7 { (::windows_core::Interface::vtable(self).SetLogMask)(::windows_core::Interface::as_raw(self), mask).ok() } pub unsafe fn Input(&self, buffer: &mut [u8], inputsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Input)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, ::core::mem::transmute(inputsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Input)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ::core::mem::transmute(inputsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn ReturnInput(&self, buffer: P0) -> ::windows_core::Result<()> where @@ -10829,7 +10829,7 @@ impl IDebugControl7 { (::windows_core::Interface::vtable(self).OutputPromptVaList)(::windows_core::Interface::as_raw(self), outputcontrol, format.into_param().abi(), args).ok() } pub unsafe fn GetPromptText(&self, buffer: ::core::option::Option<&mut [u8]>, textsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPromptText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetPromptText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn OutputCurrentState(&self, outputcontrol: u32, flags: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).OutputCurrentState)(::windows_core::Interface::as_raw(self), outputcontrol, flags).ok() @@ -10852,7 +10852,7 @@ impl IDebugControl7 { (::windows_core::Interface::vtable(self).Assemble)(::windows_core::Interface::as_raw(self), offset, instr.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn Disassemble(&self, offset: u64, flags: u32, buffer: ::core::option::Option<&mut [u8]>, disassemblysize: ::core::option::Option<*mut u32>, endoffset: *mut u64) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Disassemble)(::windows_core::Interface::as_raw(self), offset, flags, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(disassemblysize.unwrap_or(::std::ptr::null_mut())), endoffset).ok() + (::windows_core::Interface::vtable(self).Disassemble)(::windows_core::Interface::as_raw(self), offset, flags, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(disassemblysize.unwrap_or(::std::ptr::null_mut())), endoffset).ok() } pub unsafe fn GetDisassembleEffectiveOffset(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -10863,7 +10863,7 @@ impl IDebugControl7 { (::windows_core::Interface::vtable(self).OutputDisassembly)(::windows_core::Interface::as_raw(self), outputcontrol, offset, flags, &mut result__).from_abi(result__) } pub unsafe fn OutputDisassemblyLines(&self, outputcontrol: u32, previouslines: u32, offset: u64, flags: u32, offsetline: ::core::option::Option<*mut u32>, startoffset: ::core::option::Option<*mut u64>, endoffset: ::core::option::Option<*mut u64>, lineoffsets: ::core::option::Option<&mut [u64]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).OutputDisassemblyLines)(::windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len() as _), offset, flags, ::core::mem::transmute(offsetline.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(startoffset.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(endoffset.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lineoffsets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + (::windows_core::Interface::vtable(self).OutputDisassemblyLines)(::windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, ::core::mem::transmute(offsetline.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(startoffset.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(endoffset.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lineoffsets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() } pub unsafe fn GetNearInstruction(&self, offset: u64, delta: i32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -10872,7 +10872,7 @@ impl IDebugControl7 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetStackTrace(&self, frameoffset: u64, stackoffset: u64, instructionoffset: u64, frames: &mut [DEBUG_STACK_FRAME], framesfilled: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetStackTrace)(::windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, ::core::mem::transmute(frames.as_ptr()), frames.len() as _, ::core::mem::transmute(framesfilled.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetStackTrace)(::windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, ::core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), ::core::mem::transmute(framesfilled.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetReturnOffset(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -10881,7 +10881,7 @@ impl IDebugControl7 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn OutputStackTrace(&self, outputcontrol: u32, frames: ::core::option::Option<&[DEBUG_STACK_FRAME]>, flags: u32) -> ::windows_core::Result<()> { - (::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() as _), flags).ok() + (::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<()> { (::windows_core::Interface::vtable(self).GetDebuggeeType)(::windows_core::Interface::as_raw(self), class, qualifier).ok() @@ -10899,7 +10899,7 @@ impl IDebugControl7 { (::windows_core::Interface::vtable(self).GetNumberPossibleExecutingProcessorTypes)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetPossibleExecutingProcessorTypes(&self, start: u32, types: &mut [u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPossibleExecutingProcessorTypes)(::windows_core::Interface::as_raw(self), start, types.len() as _, ::core::mem::transmute(types.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetPossibleExecutingProcessorTypes)(::windows_core::Interface::as_raw(self), start, types.len().try_into().unwrap(), ::core::mem::transmute(types.as_ptr())).ok() } pub unsafe fn GetNumberProcessors(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -10912,11 +10912,11 @@ impl IDebugControl7 { major, minor, ::core::mem::transmute(servicepackstring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - servicepackstring.as_deref().map_or(0, |slice| slice.len() as _), + servicepackstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(servicepackstringused.unwrap_or(::std::ptr::null_mut())), servicepacknumber, ::core::mem::transmute(buildstring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - buildstring.as_deref().map_or(0, |slice| slice.len() as _), + buildstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(buildstringused.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -10936,17 +10936,17 @@ impl IDebugControl7 { (::windows_core::Interface::vtable(self).GetNumberSupportedProcessorTypes)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetSupportedProcessorTypes(&self, start: u32, types: &mut [u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSupportedProcessorTypes)(::windows_core::Interface::as_raw(self), start, types.len() as _, ::core::mem::transmute(types.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetSupportedProcessorTypes)(::windows_core::Interface::as_raw(self), start, types.len().try_into().unwrap(), ::core::mem::transmute(types.as_ptr())).ok() } pub unsafe fn GetProcessorTypeNames(&self, r#type: u32, fullnamebuffer: ::core::option::Option<&mut [u8]>, fullnamesize: ::core::option::Option<*mut u32>, abbrevnamebuffer: ::core::option::Option<&mut [u8]>, abbrevnamesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetProcessorTypeNames)( ::windows_core::Interface::as_raw(self), 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() as _), + fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(fullnamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(abbrevnamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len() as _), + abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(abbrevnamesize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -10992,7 +10992,7 @@ impl IDebugControl7 { (::windows_core::Interface::vtable(self).SetSystemErrorControl)(::windows_core::Interface::as_raw(self), outputlevel, breaklevel).ok() } pub unsafe fn GetTextMacro(&self, slot: u32, buffer: ::core::option::Option<&mut [u8]>, macrosize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetTextMacro)(::windows_core::Interface::as_raw(self), slot, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(macrosize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetTextMacro)(::windows_core::Interface::as_raw(self), slot, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(macrosize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetTextMacro(&self, slot: u32, r#macro: P0) -> ::windows_core::Result<()> where @@ -11108,10 +11108,10 @@ impl IDebugControl7 { (::windows_core::Interface::vtable(self).GetNumberEventFilters)(::windows_core::Interface::as_raw(self), specificevents, specificexceptions, arbitraryexceptions).ok() } pub unsafe fn GetEventFilterText(&self, index: u32, buffer: ::core::option::Option<&mut [u8]>, textsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetEventFilterText)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetEventFilterText)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetEventFilterCommand(&self, index: u32, buffer: ::core::option::Option<&mut [u8]>, commandsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetEventFilterCommand)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetEventFilterCommand)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetEventFilterCommand(&self, index: u32, command: P0) -> ::windows_core::Result<()> where @@ -11120,13 +11120,13 @@ impl IDebugControl7 { (::windows_core::Interface::vtable(self).SetEventFilterCommand)(::windows_core::Interface::as_raw(self), index, command.into_param().abi()).ok() } pub unsafe fn GetSpecificFilterParameters(&self, start: u32, params: &mut [DEBUG_SPECIFIC_FILTER_PARAMETERS]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSpecificFilterParameters)(::windows_core::Interface::as_raw(self), start, params.len() as _, ::core::mem::transmute(params.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetSpecificFilterParameters)(::windows_core::Interface::as_raw(self), start, params.len().try_into().unwrap(), ::core::mem::transmute(params.as_ptr())).ok() } pub unsafe fn SetSpecificFilterParameters(&self, start: u32, params: &[DEBUG_SPECIFIC_FILTER_PARAMETERS]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetSpecificFilterParameters)(::windows_core::Interface::as_raw(self), start, params.len() as _, ::core::mem::transmute(params.as_ptr())).ok() + (::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: ::core::option::Option<&mut [u8]>, argumentsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSpecificFilterArgument)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(argumentsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSpecificFilterArgument)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(argumentsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetSpecificFilterArgument(&self, index: u32, argument: P0) -> ::windows_core::Result<()> where @@ -11138,10 +11138,10 @@ impl IDebugControl7 { (::windows_core::Interface::vtable(self).GetExceptionFilterParameters)(::windows_core::Interface::as_raw(self), count, ::core::mem::transmute(codes.unwrap_or(::std::ptr::null())), start, params).ok() } pub unsafe fn SetExceptionFilterParameters(&self, params: &[DEBUG_EXCEPTION_FILTER_PARAMETERS]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetExceptionFilterParameters)(::windows_core::Interface::as_raw(self), params.len() as _, ::core::mem::transmute(params.as_ptr())).ok() + (::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: ::core::option::Option<&mut [u8]>, commandsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetExceptionFilterSecondCommand(&self, index: u32, command: P0) -> ::windows_core::Result<()> where @@ -11162,7 +11162,7 @@ impl IDebugControl7 { extrainformationsize, ::core::mem::transmute(extrainformationused.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(description.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - description.as_deref().map_or(0, |slice| slice.len() as _), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(descriptionused.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -11192,10 +11192,10 @@ impl IDebugControl7 { srctext.into_param().abi(), 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() as _), + srcbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(srcsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(dstbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - dstbuffer.as_deref().map_or(0, |slice| slice.len() as _), + dstbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(dstsize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -11248,10 +11248,10 @@ impl IDebugControl7 { ::windows_core::Interface::as_raw(self), 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() as _), + fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(fullnamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(abbrevnamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len() as _), + abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(abbrevnamesize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -11277,7 +11277,7 @@ impl IDebugControl7 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetLogFileWide(&self, buffer: ::core::option::Option<&mut [u16]>, filesize: ::core::option::Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLogFileWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), append).ok() + (::windows_core::Interface::vtable(self).GetLogFileWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), append).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -11289,7 +11289,7 @@ impl IDebugControl7 { (::windows_core::Interface::vtable(self).OpenLogFileWide)(::windows_core::Interface::as_raw(self), file.into_param().abi(), append.into_param().abi()).ok() } pub unsafe fn InputWide(&self, buffer: &mut [u16], inputsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).InputWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, ::core::mem::transmute(inputsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).InputWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), ::core::mem::transmute(inputsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn ReturnInputWide(&self, buffer: P0) -> ::windows_core::Result<()> where @@ -11334,7 +11334,7 @@ impl IDebugControl7 { (::windows_core::Interface::vtable(self).OutputPromptVaListWide)(::windows_core::Interface::as_raw(self), outputcontrol, format.into_param().abi(), args).ok() } pub unsafe fn GetPromptTextWide(&self, buffer: ::core::option::Option<&mut [u16]>, textsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPromptTextWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetPromptTextWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn AssembleWide(&self, offset: u64, instr: P0) -> ::windows_core::Result where @@ -11344,23 +11344,23 @@ impl IDebugControl7 { (::windows_core::Interface::vtable(self).AssembleWide)(::windows_core::Interface::as_raw(self), offset, instr.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn DisassembleWide(&self, offset: u64, flags: u32, buffer: ::core::option::Option<&mut [u16]>, disassemblysize: ::core::option::Option<*mut u32>, endoffset: *mut u64) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).DisassembleWide)(::windows_core::Interface::as_raw(self), offset, flags, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(disassemblysize.unwrap_or(::std::ptr::null_mut())), endoffset).ok() + (::windows_core::Interface::vtable(self).DisassembleWide)(::windows_core::Interface::as_raw(self), offset, flags, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(disassemblysize.unwrap_or(::std::ptr::null_mut())), endoffset).ok() } pub unsafe fn GetProcessorTypeNamesWide(&self, r#type: u32, fullnamebuffer: ::core::option::Option<&mut [u16]>, fullnamesize: ::core::option::Option<*mut u32>, abbrevnamebuffer: ::core::option::Option<&mut [u16]>, abbrevnamesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetProcessorTypeNamesWide)( ::windows_core::Interface::as_raw(self), 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() as _), + fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(fullnamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(abbrevnamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len() as _), + abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(abbrevnamesize.unwrap_or(::std::ptr::null_mut())), ) .ok() } pub unsafe fn GetTextMacroWide(&self, slot: u32, buffer: ::core::option::Option<&mut [u16]>, macrosize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetTextMacroWide)(::windows_core::Interface::as_raw(self), slot, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(macrosize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetTextMacroWide)(::windows_core::Interface::as_raw(self), slot, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(macrosize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetTextMacroWide(&self, slot: u32, r#macro: P0) -> ::windows_core::Result<()> where @@ -11436,10 +11436,10 @@ impl IDebugControl7 { (::windows_core::Interface::vtable(self).GetExtensionFunctionWide)(::windows_core::Interface::as_raw(self), handle, funcname.into_param().abi(), function).ok() } pub unsafe fn GetEventFilterTextWide(&self, index: u32, buffer: ::core::option::Option<&mut [u16]>, textsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetEventFilterTextWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetEventFilterTextWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(textsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetEventFilterCommandWide(&self, index: u32, buffer: ::core::option::Option<&mut [u16]>, commandsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetEventFilterCommandWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetEventFilterCommandWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetEventFilterCommandWide(&self, index: u32, command: P0) -> ::windows_core::Result<()> where @@ -11448,7 +11448,7 @@ impl IDebugControl7 { (::windows_core::Interface::vtable(self).SetEventFilterCommandWide)(::windows_core::Interface::as_raw(self), index, command.into_param().abi()).ok() } pub unsafe fn GetSpecificFilterArgumentWide(&self, index: u32, buffer: ::core::option::Option<&mut [u16]>, argumentsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSpecificFilterArgumentWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(argumentsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSpecificFilterArgumentWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(argumentsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetSpecificFilterArgumentWide(&self, index: u32, argument: P0) -> ::windows_core::Result<()> where @@ -11457,7 +11457,7 @@ impl IDebugControl7 { (::windows_core::Interface::vtable(self).SetSpecificFilterArgumentWide)(::windows_core::Interface::as_raw(self), index, argument.into_param().abi()).ok() } pub unsafe fn GetExceptionFilterSecondCommandWide(&self, index: u32, buffer: ::core::option::Option<&mut [u16]>, commandsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetExceptionFilterSecondCommandWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetExceptionFilterSecondCommandWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(commandsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetExceptionFilterSecondCommandWide(&self, index: u32, command: P0) -> ::windows_core::Result<()> where @@ -11475,7 +11475,7 @@ impl IDebugControl7 { extrainformationsize, ::core::mem::transmute(extrainformationused.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(description.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - description.as_deref().map_or(0, |slice| slice.len() as _), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(descriptionused.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -11489,10 +11489,10 @@ impl IDebugControl7 { srctext.into_param().abi(), 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() as _), + srcbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(srcsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(dstbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - dstbuffer.as_deref().map_or(0, |slice| slice.len() as _), + dstbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(dstsize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -11515,10 +11515,10 @@ impl IDebugControl7 { ::windows_core::Interface::as_raw(self), 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() as _), + fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(fullnamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(abbrevnamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len() as _), + abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(abbrevnamesize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -11530,7 +11530,7 @@ impl IDebugControl7 { (::windows_core::Interface::vtable(self).GetEventIndexDescriptionWide)(::windows_core::Interface::as_raw(self), index, which, buffer.into_param().abi(), buffersize, ::core::mem::transmute(descsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetLogFile2(&self, buffer: ::core::option::Option<&mut [u8]>, filesize: ::core::option::Option<*mut u32>, flags: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLogFile2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), flags).ok() + (::windows_core::Interface::vtable(self).GetLogFile2)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), flags).ok() } pub unsafe fn OpenLogFile2(&self, file: P0, flags: u32) -> ::windows_core::Result<()> where @@ -11539,7 +11539,7 @@ impl IDebugControl7 { (::windows_core::Interface::vtable(self).OpenLogFile2)(::windows_core::Interface::as_raw(self), file.into_param().abi(), flags).ok() } pub unsafe fn GetLogFile2Wide(&self, buffer: ::core::option::Option<&mut [u16]>, filesize: ::core::option::Option<*mut u32>, flags: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLogFile2Wide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), flags).ok() + (::windows_core::Interface::vtable(self).GetLogFile2Wide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), flags).ok() } pub unsafe fn OpenLogFile2Wide(&self, file: P0, flags: u32) -> ::windows_core::Result<()> where @@ -11551,29 +11551,29 @@ impl IDebugControl7 { (::windows_core::Interface::vtable(self).GetSystemVersionValues)(::windows_core::Interface::as_raw(self), platformid, win32major, win32minor, ::core::mem::transmute(kdmajor.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(kdminor.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSystemVersionString(&self, which: u32, buffer: ::core::option::Option<&mut [u8]>, stringsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSystemVersionString)(::windows_core::Interface::as_raw(self), which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSystemVersionString)(::windows_core::Interface::as_raw(self), which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSystemVersionStringWide(&self, which: u32, buffer: ::core::option::Option<&mut [u16]>, stringsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSystemVersionStringWide)(::windows_core::Interface::as_raw(self), which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSystemVersionStringWide)(::windows_core::Interface::as_raw(self), which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetContextStackTrace(&self, startcontext: ::core::option::Option<*const ::core::ffi::c_void>, startcontextsize: u32, frames: ::core::option::Option<&mut [DEBUG_STACK_FRAME]>, framecontexts: ::core::option::Option<*mut ::core::ffi::c_void>, framecontextssize: u32, framecontextsentrysize: u32, framesfilled: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetContextStackTrace)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(startcontext.unwrap_or(::std::ptr::null())), startcontextsize, ::core::mem::transmute(frames.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(framecontexts.unwrap_or(::std::ptr::null_mut())), framecontextssize, framecontextsentrysize, ::core::mem::transmute(framesfilled.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetContextStackTrace)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(startcontext.unwrap_or(::std::ptr::null())), startcontextsize, ::core::mem::transmute(frames.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(framecontexts.unwrap_or(::std::ptr::null_mut())), framecontextssize, framecontextsentrysize, ::core::mem::transmute(framesfilled.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn OutputContextStackTrace(&self, outputcontrol: u32, frames: &[DEBUG_STACK_FRAME], framecontexts: *const ::core::ffi::c_void, framecontextssize: u32, framecontextsentrysize: u32, flags: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).OutputContextStackTrace)(::windows_core::Interface::as_raw(self), outputcontrol, ::core::mem::transmute(frames.as_ptr()), frames.len() as _, framecontexts, framecontextssize, framecontextsentrysize, flags).ok() + (::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: ::core::option::Option<*mut ::core::ffi::c_void>, contextsize: u32, contextused: ::core::option::Option<*mut u32>, extrainformation: ::core::option::Option<*mut ::core::ffi::c_void>, extrainformationsize: u32, extrainformationused: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetStoredEventInformation)(::windows_core::Interface::as_raw(self), r#type, processid, threadid, ::core::mem::transmute(context.unwrap_or(::std::ptr::null_mut())), contextsize, ::core::mem::transmute(contextused.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(extrainformation.unwrap_or(::std::ptr::null_mut())), extrainformationsize, ::core::mem::transmute(extrainformationused.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetManagedStatus(&self, flags: ::core::option::Option<*mut u32>, whichstring: u32, string: ::core::option::Option<&mut [u8]>, stringneeded: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetManagedStatus)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(flags.unwrap_or(::std::ptr::null_mut())), whichstring, ::core::mem::transmute(string.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), string.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringneeded.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetManagedStatus)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(flags.unwrap_or(::std::ptr::null_mut())), whichstring, ::core::mem::transmute(string.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), string.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringneeded.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetManagedStatusWide(&self, flags: ::core::option::Option<*mut u32>, whichstring: u32, string: ::core::option::Option<&mut [u16]>, stringneeded: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetManagedStatusWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(flags.unwrap_or(::std::ptr::null_mut())), whichstring, ::core::mem::transmute(string.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), string.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringneeded.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetManagedStatusWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(flags.unwrap_or(::std::ptr::null_mut())), whichstring, ::core::mem::transmute(string.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), string.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringneeded.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn ResetManagedStatus(&self, flags: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).ResetManagedStatus)(::windows_core::Interface::as_raw(self), flags).ok() @@ -11581,22 +11581,22 @@ impl IDebugControl7 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetStackTraceEx(&self, frameoffset: u64, stackoffset: u64, instructionoffset: u64, frames: &mut [DEBUG_STACK_FRAME_EX], framesfilled: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetStackTraceEx)(::windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, ::core::mem::transmute(frames.as_ptr()), frames.len() as _, ::core::mem::transmute(framesfilled.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetStackTraceEx)(::windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, ::core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), ::core::mem::transmute(framesfilled.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn OutputStackTraceEx(&self, outputcontrol: u32, frames: ::core::option::Option<&[DEBUG_STACK_FRAME_EX]>, flags: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).OutputStackTraceEx)(::windows_core::Interface::as_raw(self), outputcontrol, ::core::mem::transmute(frames.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len() as _), flags).ok() + (::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() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetContextStackTraceEx(&self, startcontext: ::core::option::Option<*const ::core::ffi::c_void>, startcontextsize: u32, frames: ::core::option::Option<&mut [DEBUG_STACK_FRAME_EX]>, framecontexts: ::core::option::Option<*mut ::core::ffi::c_void>, framecontextssize: u32, framecontextsentrysize: u32, framesfilled: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetContextStackTraceEx)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(startcontext.unwrap_or(::std::ptr::null())), startcontextsize, ::core::mem::transmute(frames.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(framecontexts.unwrap_or(::std::ptr::null_mut())), framecontextssize, framecontextsentrysize, ::core::mem::transmute(framesfilled.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetContextStackTraceEx)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(startcontext.unwrap_or(::std::ptr::null())), startcontextsize, ::core::mem::transmute(frames.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(framecontexts.unwrap_or(::std::ptr::null_mut())), framecontextssize, framecontextsentrysize, ::core::mem::transmute(framesfilled.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn OutputContextStackTraceEx(&self, outputcontrol: u32, frames: &[DEBUG_STACK_FRAME_EX], framecontexts: *const ::core::ffi::c_void, framecontextssize: u32, framecontextsentrysize: u32, flags: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).OutputContextStackTraceEx)(::windows_core::Interface::as_raw(self), outputcontrol, ::core::mem::transmute(frames.as_ptr()), frames.len() as _, framecontexts, framecontextssize, framecontextsentrysize, flags).ok() + (::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() } pub unsafe fn GetBreakpointByGuid(&self, guid: *const ::windows_core::GUID) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -11880,10 +11880,10 @@ impl IDebugDataSpaces { (::windows_core::Interface::vtable(self).WriteVirtualUncached)(::windows_core::Interface::as_raw(self), offset, buffer, buffersize, ::core::mem::transmute(byteswritten.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn ReadPointersVirtual(&self, offset: u64, ptrs: &mut [u64]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).ReadPointersVirtual)(::windows_core::Interface::as_raw(self), ptrs.len() as _, offset, ::core::mem::transmute(ptrs.as_ptr())).ok() + (::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() } pub unsafe fn WritePointersVirtual(&self, offset: u64, ptrs: &[u64]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).WritePointersVirtual)(::windows_core::Interface::as_raw(self), ptrs.len() as _, offset, ::core::mem::transmute(ptrs.as_ptr())).ok() + (::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: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).ReadPhysical)(::windows_core::Interface::as_raw(self), offset, buffer, buffersize, ::core::mem::transmute(bytesread.unwrap_or(::std::ptr::null_mut()))).ok() @@ -11979,10 +11979,10 @@ impl IDebugDataSpaces2 { (::windows_core::Interface::vtable(self).WriteVirtualUncached)(::windows_core::Interface::as_raw(self), offset, buffer, buffersize, ::core::mem::transmute(byteswritten.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn ReadPointersVirtual(&self, offset: u64, ptrs: &mut [u64]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).ReadPointersVirtual)(::windows_core::Interface::as_raw(self), ptrs.len() as _, offset, ::core::mem::transmute(ptrs.as_ptr())).ok() + (::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() } pub unsafe fn WritePointersVirtual(&self, offset: u64, ptrs: &[u64]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).WritePointersVirtual)(::windows_core::Interface::as_raw(self), ptrs.len() as _, offset, ::core::mem::transmute(ptrs.as_ptr())).ok() + (::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: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).ReadPhysical)(::windows_core::Interface::as_raw(self), offset, buffer, buffersize, ::core::mem::transmute(bytesread.unwrap_or(::std::ptr::null_mut()))).ok() @@ -12029,7 +12029,7 @@ impl IDebugDataSpaces2 { (::windows_core::Interface::vtable(self).VirtualToPhysical)(::windows_core::Interface::as_raw(self), r#virtual, &mut result__).from_abi(result__) } pub unsafe fn GetVirtualTranslationPhysicalOffsets(&self, r#virtual: u64, offsets: ::core::option::Option<&mut [u64]>, levels: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetVirtualTranslationPhysicalOffsets)(::windows_core::Interface::as_raw(self), r#virtual, ::core::mem::transmute(offsets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), offsets.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(levels.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetVirtualTranslationPhysicalOffsets)(::windows_core::Interface::as_raw(self), r#virtual, ::core::mem::transmute(offsets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), offsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(levels.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn ReadHandleData(&self, handle: u64, datatype: u32, buffer: ::core::option::Option<*mut ::core::ffi::c_void>, buffersize: u32, datasize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).ReadHandleData)(::windows_core::Interface::as_raw(self), handle, datatype, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize, ::core::mem::transmute(datasize.unwrap_or(::std::ptr::null_mut()))).ok() @@ -12108,10 +12108,10 @@ impl IDebugDataSpaces3 { (::windows_core::Interface::vtable(self).WriteVirtualUncached)(::windows_core::Interface::as_raw(self), offset, buffer, buffersize, ::core::mem::transmute(byteswritten.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn ReadPointersVirtual(&self, offset: u64, ptrs: &mut [u64]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).ReadPointersVirtual)(::windows_core::Interface::as_raw(self), ptrs.len() as _, offset, ::core::mem::transmute(ptrs.as_ptr())).ok() + (::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() } pub unsafe fn WritePointersVirtual(&self, offset: u64, ptrs: &[u64]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).WritePointersVirtual)(::windows_core::Interface::as_raw(self), ptrs.len() as _, offset, ::core::mem::transmute(ptrs.as_ptr())).ok() + (::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: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).ReadPhysical)(::windows_core::Interface::as_raw(self), offset, buffer, buffersize, ::core::mem::transmute(bytesread.unwrap_or(::std::ptr::null_mut()))).ok() @@ -12158,7 +12158,7 @@ impl IDebugDataSpaces3 { (::windows_core::Interface::vtable(self).VirtualToPhysical)(::windows_core::Interface::as_raw(self), r#virtual, &mut result__).from_abi(result__) } pub unsafe fn GetVirtualTranslationPhysicalOffsets(&self, r#virtual: u64, offsets: ::core::option::Option<&mut [u64]>, levels: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetVirtualTranslationPhysicalOffsets)(::windows_core::Interface::as_raw(self), r#virtual, ::core::mem::transmute(offsets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), offsets.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(levels.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetVirtualTranslationPhysicalOffsets)(::windows_core::Interface::as_raw(self), r#virtual, ::core::mem::transmute(offsets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), offsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(levels.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn ReadHandleData(&self, handle: u64, datatype: u32, buffer: ::core::option::Option<*mut ::core::ffi::c_void>, buffersize: u32, datasize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).ReadHandleData)(::windows_core::Interface::as_raw(self), handle, datatype, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize, ::core::mem::transmute(datasize.unwrap_or(::std::ptr::null_mut()))).ok() @@ -12263,10 +12263,10 @@ impl IDebugDataSpaces4 { (::windows_core::Interface::vtable(self).WriteVirtualUncached)(::windows_core::Interface::as_raw(self), offset, buffer, buffersize, ::core::mem::transmute(byteswritten.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn ReadPointersVirtual(&self, offset: u64, ptrs: &mut [u64]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).ReadPointersVirtual)(::windows_core::Interface::as_raw(self), ptrs.len() as _, offset, ::core::mem::transmute(ptrs.as_ptr())).ok() + (::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() } pub unsafe fn WritePointersVirtual(&self, offset: u64, ptrs: &[u64]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).WritePointersVirtual)(::windows_core::Interface::as_raw(self), ptrs.len() as _, offset, ::core::mem::transmute(ptrs.as_ptr())).ok() + (::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: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).ReadPhysical)(::windows_core::Interface::as_raw(self), offset, buffer, buffersize, ::core::mem::transmute(bytesread.unwrap_or(::std::ptr::null_mut()))).ok() @@ -12313,7 +12313,7 @@ impl IDebugDataSpaces4 { (::windows_core::Interface::vtable(self).VirtualToPhysical)(::windows_core::Interface::as_raw(self), r#virtual, &mut result__).from_abi(result__) } pub unsafe fn GetVirtualTranslationPhysicalOffsets(&self, r#virtual: u64, offsets: ::core::option::Option<&mut [u64]>, levels: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetVirtualTranslationPhysicalOffsets)(::windows_core::Interface::as_raw(self), r#virtual, ::core::mem::transmute(offsets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), offsets.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(levels.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetVirtualTranslationPhysicalOffsets)(::windows_core::Interface::as_raw(self), r#virtual, ::core::mem::transmute(offsets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), offsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(levels.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn ReadHandleData(&self, handle: u64, datatype: u32, buffer: ::core::option::Option<*mut ::core::ffi::c_void>, buffersize: u32, datasize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).ReadHandleData)(::windows_core::Interface::as_raw(self), handle, datatype, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize, ::core::mem::transmute(datasize.unwrap_or(::std::ptr::null_mut()))).ok() @@ -12362,16 +12362,16 @@ impl IDebugDataSpaces4 { (::windows_core::Interface::vtable(self).SearchVirtual2)(::windows_core::Interface::as_raw(self), offset, length, flags, pattern, patternsize, patterngranularity, &mut result__).from_abi(result__) } pub unsafe fn ReadMultiByteStringVirtual(&self, offset: u64, maxbytes: u32, buffer: ::core::option::Option<&mut [u8]>, stringbytes: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).ReadMultiByteStringVirtual)(::windows_core::Interface::as_raw(self), offset, maxbytes, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringbytes.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).ReadMultiByteStringVirtual)(::windows_core::Interface::as_raw(self), offset, maxbytes, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringbytes.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn ReadMultiByteStringVirtualWide(&self, offset: u64, maxbytes: u32, codepage: u32, buffer: ::core::option::Option<&mut [u16]>, stringbytes: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).ReadMultiByteStringVirtualWide)(::windows_core::Interface::as_raw(self), offset, maxbytes, codepage, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringbytes.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).ReadMultiByteStringVirtualWide)(::windows_core::Interface::as_raw(self), offset, maxbytes, codepage, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringbytes.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn ReadUnicodeStringVirtual(&self, offset: u64, maxbytes: u32, codepage: u32, buffer: ::core::option::Option<&mut [u8]>, stringbytes: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).ReadUnicodeStringVirtual)(::windows_core::Interface::as_raw(self), offset, maxbytes, codepage, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringbytes.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).ReadUnicodeStringVirtual)(::windows_core::Interface::as_raw(self), offset, maxbytes, codepage, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringbytes.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn ReadUnicodeStringVirtualWide(&self, offset: u64, maxbytes: u32, buffer: ::core::option::Option<&mut [u16]>, stringbytes: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).ReadUnicodeStringVirtualWide)(::windows_core::Interface::as_raw(self), offset, maxbytes, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringbytes.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).ReadUnicodeStringVirtualWide)(::windows_core::Interface::as_raw(self), offset, maxbytes, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringbytes.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn ReadPhysical2(&self, offset: u64, flags: u32, buffer: *mut ::core::ffi::c_void, buffersize: u32, bytesread: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).ReadPhysical2)(::windows_core::Interface::as_raw(self), offset, flags, buffer, buffersize, ::core::mem::transmute(bytesread.unwrap_or(::std::ptr::null_mut()))).ok() @@ -12788,7 +12788,7 @@ impl IDebugFailureAnalysis { (::windows_core::Interface::vtable(self).GetNext)(::windows_core::Interface::as_raw(self), entry, tag, tagmask) } pub unsafe fn GetString(&self, tag: DEBUG_FLR_PARAM_TYPE, str: &mut [u8]) -> *mut FA_ENTRY { - (::windows_core::Interface::vtable(self).GetString)(::windows_core::Interface::as_raw(self), tag, ::core::mem::transmute(str.as_ptr()), str.len() as _) + (::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 { (::windows_core::Interface::vtable(self).GetBuffer)(::windows_core::Interface::as_raw(self), tag, buf, size) @@ -12845,7 +12845,7 @@ impl IDebugFailureAnalysis2 { (::windows_core::Interface::vtable(self).GetNext)(::windows_core::Interface::as_raw(self), entry, tag, tagmask) } pub unsafe fn GetString(&self, tag: DEBUG_FLR_PARAM_TYPE, str: &mut [u8]) -> *mut FA_ENTRY { - (::windows_core::Interface::vtable(self).GetString)(::windows_core::Interface::as_raw(self), tag, ::core::mem::transmute(str.as_ptr()), str.len() as _) + (::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 { (::windows_core::Interface::vtable(self).GetBuffer)(::windows_core::Interface::as_raw(self), tag, buf, size) @@ -12976,7 +12976,7 @@ impl IDebugFailureAnalysis3 { (::windows_core::Interface::vtable(self).GetNext)(::windows_core::Interface::as_raw(self), entry, tag, tagmask) } pub unsafe fn GetString(&self, tag: DEBUG_FLR_PARAM_TYPE, str: &mut [u8]) -> *mut FA_ENTRY { - (::windows_core::Interface::vtable(self).GetString)(::windows_core::Interface::as_raw(self), tag, ::core::mem::transmute(str.as_ptr()), str.len() as _) + (::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 { (::windows_core::Interface::vtable(self).GetBuffer)(::windows_core::Interface::as_raw(self), tag, buf, size) @@ -13676,13 +13676,13 @@ impl IDebugHostMemory { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).ReadPointers)(::windows_core::Interface::as_raw(self), context.into_param().abi(), ::core::mem::transmute(location), pointers.len() as _, ::core::mem::transmute(pointers.as_ptr())).ok() + (::windows_core::Interface::vtable(self).ReadPointers)(::windows_core::Interface::as_raw(self), context.into_param().abi(), ::core::mem::transmute(location), pointers.len().try_into().unwrap(), ::core::mem::transmute(pointers.as_ptr())).ok() } pub unsafe fn WritePointers(&self, context: P0, location: Location, pointers: &[u64]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).WritePointers)(::windows_core::Interface::as_raw(self), context.into_param().abi(), ::core::mem::transmute(location), pointers.len() as _, ::core::mem::transmute(pointers.as_ptr())).ok() + (::windows_core::Interface::vtable(self).WritePointers)(::windows_core::Interface::as_raw(self), context.into_param().abi(), ::core::mem::transmute(location), pointers.len().try_into().unwrap(), ::core::mem::transmute(pointers.as_ptr())).ok() } pub unsafe fn GetDisplayStringForLocation(&self, context: P0, location: Location, verbose: u8) -> ::windows_core::Result<::windows_core::BSTR> where @@ -13729,13 +13729,13 @@ impl IDebugHostMemory2 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.ReadPointers)(::windows_core::Interface::as_raw(self), context.into_param().abi(), ::core::mem::transmute(location), pointers.len() as _, ::core::mem::transmute(pointers.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.ReadPointers)(::windows_core::Interface::as_raw(self), context.into_param().abi(), ::core::mem::transmute(location), pointers.len().try_into().unwrap(), ::core::mem::transmute(pointers.as_ptr())).ok() } pub unsafe fn WritePointers(&self, context: P0, location: Location, pointers: &[u64]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.WritePointers)(::windows_core::Interface::as_raw(self), context.into_param().abi(), ::core::mem::transmute(location), pointers.len() as _, ::core::mem::transmute(pointers.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.WritePointers)(::windows_core::Interface::as_raw(self), context.into_param().abi(), ::core::mem::transmute(location), pointers.len().try_into().unwrap(), ::core::mem::transmute(pointers.as_ptr())).ok() } pub unsafe fn GetDisplayStringForLocation(&self, context: P0, location: Location, verbose: u8) -> ::windows_core::Result<::windows_core::BSTR> where @@ -14365,11 +14365,11 @@ impl IDebugHostType { (::windows_core::Interface::vtable(self).GetArrayDimensionality)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetArrayDimensions(&self, pdimensions: &mut [ArrayDimension]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetArrayDimensions)(::windows_core::Interface::as_raw(self), pdimensions.len() as _, ::core::mem::transmute(pdimensions.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetArrayDimensions)(::windows_core::Interface::as_raw(self), pdimensions.len().try_into().unwrap(), ::core::mem::transmute(pdimensions.as_ptr())).ok() } pub unsafe fn CreateArrayOf(&self, pdimensions: &[ArrayDimension]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateArrayOf)(::windows_core::Interface::as_raw(self), pdimensions.len() as _, ::core::mem::transmute(pdimensions.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateArrayOf)(::windows_core::Interface::as_raw(self), pdimensions.len().try_into().unwrap(), ::core::mem::transmute(pdimensions.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn GetFunctionCallingConvention(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -14508,11 +14508,11 @@ impl IDebugHostType2 { (::windows_core::Interface::vtable(self).base__.GetArrayDimensionality)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetArrayDimensions(&self, pdimensions: &mut [ArrayDimension]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetArrayDimensions)(::windows_core::Interface::as_raw(self), pdimensions.len() as _, ::core::mem::transmute(pdimensions.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.GetArrayDimensions)(::windows_core::Interface::as_raw(self), pdimensions.len().try_into().unwrap(), ::core::mem::transmute(pdimensions.as_ptr())).ok() } pub unsafe fn CreateArrayOf(&self, pdimensions: &[ArrayDimension]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.CreateArrayOf)(::windows_core::Interface::as_raw(self), pdimensions.len() as _, ::core::mem::transmute(pdimensions.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateArrayOf)(::windows_core::Interface::as_raw(self), pdimensions.len().try_into().unwrap(), ::core::mem::transmute(pdimensions.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn GetFunctionCallingConvention(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -14920,7 +14920,7 @@ impl IDebugRegisters { (::windows_core::Interface::vtable(self).GetNumberRegisters)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetDescription(&self, register: u32, namebuffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>, desc: ::core::option::Option<*mut DEBUG_REGISTER_DESCRIPTION>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDescription)(::windows_core::Interface::as_raw(self), register, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(desc.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetDescription)(::windows_core::Interface::as_raw(self), register, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(desc.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetIndexByName(&self, name: P0) -> ::windows_core::Result where @@ -15009,7 +15009,7 @@ impl IDebugRegisters2 { (::windows_core::Interface::vtable(self).GetNumberRegisters)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetDescription(&self, register: u32, namebuffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>, desc: ::core::option::Option<*mut DEBUG_REGISTER_DESCRIPTION>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDescription)(::windows_core::Interface::as_raw(self), register, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(desc.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetDescription)(::windows_core::Interface::as_raw(self), register, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(desc.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetIndexByName(&self, name: P0) -> ::windows_core::Result where @@ -15054,7 +15054,7 @@ impl IDebugRegisters2 { (::windows_core::Interface::vtable(self).GetFrameOffset)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetDescriptionWide(&self, register: u32, namebuffer: ::core::option::Option<&mut [u16]>, namesize: ::core::option::Option<*mut u32>, desc: ::core::option::Option<*mut DEBUG_REGISTER_DESCRIPTION>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDescriptionWide)(::windows_core::Interface::as_raw(self), register, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(desc.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetDescriptionWide)(::windows_core::Interface::as_raw(self), register, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(desc.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetIndexByNameWide(&self, name: P0) -> ::windows_core::Result where @@ -15068,10 +15068,10 @@ impl IDebugRegisters2 { (::windows_core::Interface::vtable(self).GetNumberPseudoRegisters)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetPseudoDescription(&self, register: u32, namebuffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>, typemodule: ::core::option::Option<*mut u64>, typeid: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPseudoDescription)(::windows_core::Interface::as_raw(self), register, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(typemodule.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(typeid.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetPseudoDescription)(::windows_core::Interface::as_raw(self), register, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(typemodule.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(typeid.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetPseudoDescriptionWide(&self, register: u32, namebuffer: ::core::option::Option<&mut [u16]>, namesize: ::core::option::Option<*mut u32>, typemodule: ::core::option::Option<*mut u64>, typeid: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPseudoDescriptionWide)(::windows_core::Interface::as_raw(self), register, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(typemodule.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(typeid.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetPseudoDescriptionWide)(::windows_core::Interface::as_raw(self), register, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(typemodule.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(typeid.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetPseudoIndexByName(&self, name: P0) -> ::windows_core::Result where @@ -15209,10 +15209,10 @@ impl IDebugSymbolGroup { (::windows_core::Interface::vtable(self).RemoveSymbolByIndex)(::windows_core::Interface::as_raw(self), index).ok() } pub unsafe fn GetSymbolName(&self, index: u32, buffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSymbolName)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolName)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolParameters(&self, start: u32, params: &mut [DEBUG_SYMBOL_PARAMETERS]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSymbolParameters)(::windows_core::Interface::as_raw(self), start, params.len() as _, ::core::mem::transmute(params.as_ptr())).ok() + (::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() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -15287,10 +15287,10 @@ impl IDebugSymbolGroup2 { (::windows_core::Interface::vtable(self).RemoveSymbolByIndex)(::windows_core::Interface::as_raw(self), index).ok() } pub unsafe fn GetSymbolName(&self, index: u32, buffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSymbolName)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolName)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolParameters(&self, start: u32, params: &mut [DEBUG_SYMBOL_PARAMETERS]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSymbolParameters)(::windows_core::Interface::as_raw(self), start, params.len() as _, ::core::mem::transmute(params.as_ptr())).ok() + (::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() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -15328,7 +15328,7 @@ impl IDebugSymbolGroup2 { (::windows_core::Interface::vtable(self).RemoveSymbolByNameWide)(::windows_core::Interface::as_raw(self), name.into_param().abi()).ok() } pub unsafe fn GetSymbolNameWide(&self, index: u32, buffer: ::core::option::Option<&mut [u16]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSymbolNameWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolNameWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn WriteSymbolWide(&self, index: u32, value: P0) -> ::windows_core::Result<()> where @@ -15343,10 +15343,10 @@ impl IDebugSymbolGroup2 { (::windows_core::Interface::vtable(self).OutputAsTypeWide)(::windows_core::Interface::as_raw(self), index, r#type.into_param().abi()).ok() } pub unsafe fn GetSymbolTypeName(&self, index: u32, buffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSymbolTypeName)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolTypeName)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolTypeNameWide(&self, index: u32, buffer: ::core::option::Option<&mut [u16]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSymbolTypeNameWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolTypeNameWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolSize(&self, index: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -15361,10 +15361,10 @@ impl IDebugSymbolGroup2 { (::windows_core::Interface::vtable(self).GetSymbolRegister)(::windows_core::Interface::as_raw(self), index, &mut result__).from_abi(result__) } pub unsafe fn GetSymbolValueText(&self, index: u32, buffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSymbolValueText)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolValueText)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolValueTextWide(&self, index: u32, buffer: ::core::option::Option<&mut [u16]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSymbolValueTextWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolValueTextWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntryInformation(&self, index: u32, entry: *mut DEBUG_SYMBOL_ENTRY) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetSymbolEntryInformation)(::windows_core::Interface::as_raw(self), index, entry).ok() @@ -15426,7 +15426,7 @@ impl IDebugSymbols { (::windows_core::Interface::vtable(self).SetSymbolOptions)(::windows_core::Interface::as_raw(self), options).ok() } pub unsafe fn GetNameByOffset(&self, offset: u64, namebuffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>, displacement: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNameByOffset)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetNameByOffset)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetByName(&self, symbol: P0) -> ::windows_core::Result where @@ -15436,10 +15436,10 @@ impl IDebugSymbols { (::windows_core::Interface::vtable(self).GetOffsetByName)(::windows_core::Interface::as_raw(self), symbol.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn GetNearNameByOffset(&self, offset: u64, delta: i32, namebuffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>, displacement: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNearNameByOffset)(::windows_core::Interface::as_raw(self), offset, delta, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetNearNameByOffset)(::windows_core::Interface::as_raw(self), offset, delta, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetLineByOffset(&self, offset: u64, line: ::core::option::Option<*mut u32>, filebuffer: ::core::option::Option<&mut [u8]>, filesize: ::core::option::Option<*mut u32>, displacement: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLineByOffset)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(line.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(filebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetLineByOffset)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(line.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(filebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetByLine(&self, line: u32, file: P0) -> ::windows_core::Result where @@ -15470,13 +15470,13 @@ impl IDebugSymbols { index, 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() as _), + imagenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(imagenamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(modulenamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - modulenamebuffer.as_deref().map_or(0, |slice| slice.len() as _), + modulenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(modulenamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(loadedimagenamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - loadedimagenamebuffer.as_deref().map_or(0, |slice| slice.len() as _), + loadedimagenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(loadedimagenamesize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -15492,7 +15492,7 @@ impl IDebugSymbols { (::windows_core::Interface::vtable(self).GetSymbolModule)(::windows_core::Interface::as_raw(self), symbol.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn GetTypeName(&self, module: u64, typeid: u32, namebuffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetTypeName)(::windows_core::Interface::as_raw(self), module, typeid, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetTypeName)(::windows_core::Interface::as_raw(self), module, typeid, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetTypeId(&self, module: u64, name: P0) -> ::windows_core::Result where @@ -15571,7 +15571,7 @@ impl IDebugSymbols { (::windows_core::Interface::vtable(self).StartSymbolMatch)(::windows_core::Interface::as_raw(self), pattern.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn GetNextSymbolMatch(&self, handle: u64, buffer: ::core::option::Option<&mut [u8]>, matchsize: ::core::option::Option<*mut u32>, offset: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNextSymbolMatch)(::windows_core::Interface::as_raw(self), handle, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(matchsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(offset.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetNextSymbolMatch)(::windows_core::Interface::as_raw(self), handle, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(matchsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(offset.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn EndSymbolMatch(&self, handle: u64) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).EndSymbolMatch)(::windows_core::Interface::as_raw(self), handle).ok() @@ -15583,7 +15583,7 @@ impl IDebugSymbols { (::windows_core::Interface::vtable(self).Reload)(::windows_core::Interface::as_raw(self), module.into_param().abi()).ok() } pub unsafe fn GetSymbolPath(&self, buffer: ::core::option::Option<&mut [u8]>, pathsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSymbolPath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolPath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetSymbolPath(&self, path: P0) -> ::windows_core::Result<()> where @@ -15598,7 +15598,7 @@ impl IDebugSymbols { (::windows_core::Interface::vtable(self).AppendSymbolPath)(::windows_core::Interface::as_raw(self), addition.into_param().abi()).ok() } pub unsafe fn GetImagePath(&self, buffer: ::core::option::Option<&mut [u8]>, pathsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetImagePath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetImagePath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetImagePath(&self, path: P0) -> ::windows_core::Result<()> where @@ -15613,10 +15613,10 @@ impl IDebugSymbols { (::windows_core::Interface::vtable(self).AppendImagePath)(::windows_core::Interface::as_raw(self), addition.into_param().abi()).ok() } pub unsafe fn GetSourcePath(&self, buffer: ::core::option::Option<&mut [u8]>, pathsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSourcePath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourcePath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSourcePathElement(&self, index: u32, buffer: ::core::option::Option<&mut [u8]>, elementsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSourcePathElement)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(elementsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourcePathElement)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(elementsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetSourcePath(&self, path: P0) -> ::windows_core::Result<()> where @@ -15634,13 +15634,13 @@ impl IDebugSymbols { where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { - (::windows_core::Interface::vtable(self).FindSourceFile)(::windows_core::Interface::as_raw(self), startelement, file.into_param().abi(), flags, ::core::mem::transmute(foundelement.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(foundsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).FindSourceFile)(::windows_core::Interface::as_raw(self), startelement, file.into_param().abi(), flags, ::core::mem::transmute(foundelement.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(foundsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSourceFileLineOffsets(&self, file: P0, buffer: ::core::option::Option<&mut [u64]>, filelines: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { - (::windows_core::Interface::vtable(self).GetSourceFileLineOffsets)(::windows_core::Interface::as_raw(self), file.into_param().abi(), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filelines.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourceFileLineOffsets)(::windows_core::Interface::as_raw(self), file.into_param().abi(), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filelines.unwrap_or(::std::ptr::null_mut()))).ok() } } ::windows_core::imp::interface_hierarchy!(IDebugSymbols, ::windows_core::IUnknown); @@ -15728,7 +15728,7 @@ impl IDebugSymbols2 { (::windows_core::Interface::vtable(self).SetSymbolOptions)(::windows_core::Interface::as_raw(self), options).ok() } pub unsafe fn GetNameByOffset(&self, offset: u64, namebuffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>, displacement: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNameByOffset)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetNameByOffset)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetByName(&self, symbol: P0) -> ::windows_core::Result where @@ -15738,10 +15738,10 @@ impl IDebugSymbols2 { (::windows_core::Interface::vtable(self).GetOffsetByName)(::windows_core::Interface::as_raw(self), symbol.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn GetNearNameByOffset(&self, offset: u64, delta: i32, namebuffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>, displacement: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNearNameByOffset)(::windows_core::Interface::as_raw(self), offset, delta, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetNearNameByOffset)(::windows_core::Interface::as_raw(self), offset, delta, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetLineByOffset(&self, offset: u64, line: ::core::option::Option<*mut u32>, filebuffer: ::core::option::Option<&mut [u8]>, filesize: ::core::option::Option<*mut u32>, displacement: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLineByOffset)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(line.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(filebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetLineByOffset)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(line.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(filebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetByLine(&self, line: u32, file: P0) -> ::windows_core::Result where @@ -15772,13 +15772,13 @@ impl IDebugSymbols2 { index, 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() as _), + imagenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(imagenamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(modulenamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - modulenamebuffer.as_deref().map_or(0, |slice| slice.len() as _), + modulenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(modulenamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(loadedimagenamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - loadedimagenamebuffer.as_deref().map_or(0, |slice| slice.len() as _), + loadedimagenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(loadedimagenamesize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -15794,7 +15794,7 @@ impl IDebugSymbols2 { (::windows_core::Interface::vtable(self).GetSymbolModule)(::windows_core::Interface::as_raw(self), symbol.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn GetTypeName(&self, module: u64, typeid: u32, namebuffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetTypeName)(::windows_core::Interface::as_raw(self), module, typeid, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetTypeName)(::windows_core::Interface::as_raw(self), module, typeid, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetTypeId(&self, module: u64, name: P0) -> ::windows_core::Result where @@ -15873,7 +15873,7 @@ impl IDebugSymbols2 { (::windows_core::Interface::vtable(self).StartSymbolMatch)(::windows_core::Interface::as_raw(self), pattern.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn GetNextSymbolMatch(&self, handle: u64, buffer: ::core::option::Option<&mut [u8]>, matchsize: ::core::option::Option<*mut u32>, offset: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNextSymbolMatch)(::windows_core::Interface::as_raw(self), handle, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(matchsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(offset.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetNextSymbolMatch)(::windows_core::Interface::as_raw(self), handle, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(matchsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(offset.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn EndSymbolMatch(&self, handle: u64) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).EndSymbolMatch)(::windows_core::Interface::as_raw(self), handle).ok() @@ -15885,7 +15885,7 @@ impl IDebugSymbols2 { (::windows_core::Interface::vtable(self).Reload)(::windows_core::Interface::as_raw(self), module.into_param().abi()).ok() } pub unsafe fn GetSymbolPath(&self, buffer: ::core::option::Option<&mut [u8]>, pathsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSymbolPath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolPath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetSymbolPath(&self, path: P0) -> ::windows_core::Result<()> where @@ -15900,7 +15900,7 @@ impl IDebugSymbols2 { (::windows_core::Interface::vtable(self).AppendSymbolPath)(::windows_core::Interface::as_raw(self), addition.into_param().abi()).ok() } pub unsafe fn GetImagePath(&self, buffer: ::core::option::Option<&mut [u8]>, pathsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetImagePath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetImagePath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetImagePath(&self, path: P0) -> ::windows_core::Result<()> where @@ -15915,10 +15915,10 @@ impl IDebugSymbols2 { (::windows_core::Interface::vtable(self).AppendImagePath)(::windows_core::Interface::as_raw(self), addition.into_param().abi()).ok() } pub unsafe fn GetSourcePath(&self, buffer: ::core::option::Option<&mut [u8]>, pathsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSourcePath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourcePath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSourcePathElement(&self, index: u32, buffer: ::core::option::Option<&mut [u8]>, elementsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSourcePathElement)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(elementsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourcePathElement)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(elementsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetSourcePath(&self, path: P0) -> ::windows_core::Result<()> where @@ -15936,13 +15936,13 @@ impl IDebugSymbols2 { where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { - (::windows_core::Interface::vtable(self).FindSourceFile)(::windows_core::Interface::as_raw(self), startelement, file.into_param().abi(), flags, ::core::mem::transmute(foundelement.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(foundsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).FindSourceFile)(::windows_core::Interface::as_raw(self), startelement, file.into_param().abi(), flags, ::core::mem::transmute(foundelement.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(foundsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSourceFileLineOffsets(&self, file: P0, buffer: ::core::option::Option<&mut [u64]>, filelines: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { - (::windows_core::Interface::vtable(self).GetSourceFileLineOffsets)(::windows_core::Interface::as_raw(self), file.into_param().abi(), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filelines.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourceFileLineOffsets)(::windows_core::Interface::as_raw(self), file.into_param().abi(), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filelines.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetModuleVersionInformation(&self, index: u32, base: u64, item: P0, buffer: ::core::option::Option<*mut ::core::ffi::c_void>, buffersize: u32, verinfosize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where @@ -15951,13 +15951,13 @@ impl IDebugSymbols2 { (::windows_core::Interface::vtable(self).GetModuleVersionInformation)(::windows_core::Interface::as_raw(self), index, base, item.into_param().abi(), ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize, ::core::mem::transmute(verinfosize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetModuleNameString(&self, which: u32, index: u32, base: u64, buffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetModuleNameString)(::windows_core::Interface::as_raw(self), which, index, base, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetModuleNameString)(::windows_core::Interface::as_raw(self), which, index, base, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetConstantName(&self, module: u64, typeid: u32, value: u64, namebuffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetConstantName)(::windows_core::Interface::as_raw(self), module, typeid, value, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetConstantName)(::windows_core::Interface::as_raw(self), module, typeid, value, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetFieldName(&self, module: u64, typeid: u32, fieldindex: u32, namebuffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetFieldName)(::windows_core::Interface::as_raw(self), module, typeid, fieldindex, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetFieldName)(::windows_core::Interface::as_raw(self), module, typeid, fieldindex, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetTypeOptions(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -16066,7 +16066,7 @@ impl IDebugSymbols3 { (::windows_core::Interface::vtable(self).SetSymbolOptions)(::windows_core::Interface::as_raw(self), options).ok() } pub unsafe fn GetNameByOffset(&self, offset: u64, namebuffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>, displacement: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNameByOffset)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetNameByOffset)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetByName(&self, symbol: P0) -> ::windows_core::Result where @@ -16076,10 +16076,10 @@ impl IDebugSymbols3 { (::windows_core::Interface::vtable(self).GetOffsetByName)(::windows_core::Interface::as_raw(self), symbol.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn GetNearNameByOffset(&self, offset: u64, delta: i32, namebuffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>, displacement: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNearNameByOffset)(::windows_core::Interface::as_raw(self), offset, delta, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetNearNameByOffset)(::windows_core::Interface::as_raw(self), offset, delta, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetLineByOffset(&self, offset: u64, line: ::core::option::Option<*mut u32>, filebuffer: ::core::option::Option<&mut [u8]>, filesize: ::core::option::Option<*mut u32>, displacement: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLineByOffset)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(line.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(filebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetLineByOffset)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(line.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(filebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetByLine(&self, line: u32, file: P0) -> ::windows_core::Result where @@ -16110,13 +16110,13 @@ impl IDebugSymbols3 { index, 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() as _), + imagenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(imagenamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(modulenamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - modulenamebuffer.as_deref().map_or(0, |slice| slice.len() as _), + modulenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(modulenamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(loadedimagenamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - loadedimagenamebuffer.as_deref().map_or(0, |slice| slice.len() as _), + loadedimagenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(loadedimagenamesize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -16132,7 +16132,7 @@ impl IDebugSymbols3 { (::windows_core::Interface::vtable(self).GetSymbolModule)(::windows_core::Interface::as_raw(self), symbol.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn GetTypeName(&self, module: u64, typeid: u32, namebuffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetTypeName)(::windows_core::Interface::as_raw(self), module, typeid, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetTypeName)(::windows_core::Interface::as_raw(self), module, typeid, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetTypeId(&self, module: u64, name: P0) -> ::windows_core::Result where @@ -16211,7 +16211,7 @@ impl IDebugSymbols3 { (::windows_core::Interface::vtable(self).StartSymbolMatch)(::windows_core::Interface::as_raw(self), pattern.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn GetNextSymbolMatch(&self, handle: u64, buffer: ::core::option::Option<&mut [u8]>, matchsize: ::core::option::Option<*mut u32>, offset: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNextSymbolMatch)(::windows_core::Interface::as_raw(self), handle, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(matchsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(offset.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetNextSymbolMatch)(::windows_core::Interface::as_raw(self), handle, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(matchsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(offset.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn EndSymbolMatch(&self, handle: u64) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).EndSymbolMatch)(::windows_core::Interface::as_raw(self), handle).ok() @@ -16223,7 +16223,7 @@ impl IDebugSymbols3 { (::windows_core::Interface::vtable(self).Reload)(::windows_core::Interface::as_raw(self), module.into_param().abi()).ok() } pub unsafe fn GetSymbolPath(&self, buffer: ::core::option::Option<&mut [u8]>, pathsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSymbolPath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolPath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetSymbolPath(&self, path: P0) -> ::windows_core::Result<()> where @@ -16238,7 +16238,7 @@ impl IDebugSymbols3 { (::windows_core::Interface::vtable(self).AppendSymbolPath)(::windows_core::Interface::as_raw(self), addition.into_param().abi()).ok() } pub unsafe fn GetImagePath(&self, buffer: ::core::option::Option<&mut [u8]>, pathsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetImagePath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetImagePath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetImagePath(&self, path: P0) -> ::windows_core::Result<()> where @@ -16253,10 +16253,10 @@ impl IDebugSymbols3 { (::windows_core::Interface::vtable(self).AppendImagePath)(::windows_core::Interface::as_raw(self), addition.into_param().abi()).ok() } pub unsafe fn GetSourcePath(&self, buffer: ::core::option::Option<&mut [u8]>, pathsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSourcePath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourcePath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSourcePathElement(&self, index: u32, buffer: ::core::option::Option<&mut [u8]>, elementsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSourcePathElement)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(elementsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourcePathElement)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(elementsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetSourcePath(&self, path: P0) -> ::windows_core::Result<()> where @@ -16274,13 +16274,13 @@ impl IDebugSymbols3 { where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { - (::windows_core::Interface::vtable(self).FindSourceFile)(::windows_core::Interface::as_raw(self), startelement, file.into_param().abi(), flags, ::core::mem::transmute(foundelement.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(foundsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).FindSourceFile)(::windows_core::Interface::as_raw(self), startelement, file.into_param().abi(), flags, ::core::mem::transmute(foundelement.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(foundsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSourceFileLineOffsets(&self, file: P0, buffer: ::core::option::Option<&mut [u64]>, filelines: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { - (::windows_core::Interface::vtable(self).GetSourceFileLineOffsets)(::windows_core::Interface::as_raw(self), file.into_param().abi(), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filelines.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourceFileLineOffsets)(::windows_core::Interface::as_raw(self), file.into_param().abi(), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filelines.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetModuleVersionInformation(&self, index: u32, base: u64, item: P0, buffer: ::core::option::Option<*mut ::core::ffi::c_void>, buffersize: u32, verinfosize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where @@ -16289,13 +16289,13 @@ impl IDebugSymbols3 { (::windows_core::Interface::vtable(self).GetModuleVersionInformation)(::windows_core::Interface::as_raw(self), index, base, item.into_param().abi(), ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize, ::core::mem::transmute(verinfosize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetModuleNameString(&self, which: u32, index: u32, base: u64, buffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetModuleNameString)(::windows_core::Interface::as_raw(self), which, index, base, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetModuleNameString)(::windows_core::Interface::as_raw(self), which, index, base, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetConstantName(&self, module: u64, typeid: u32, value: u64, namebuffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetConstantName)(::windows_core::Interface::as_raw(self), module, typeid, value, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetConstantName)(::windows_core::Interface::as_raw(self), module, typeid, value, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetFieldName(&self, module: u64, typeid: u32, fieldindex: u32, namebuffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetFieldName)(::windows_core::Interface::as_raw(self), module, typeid, fieldindex, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetFieldName)(::windows_core::Interface::as_raw(self), module, typeid, fieldindex, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetTypeOptions(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -16311,7 +16311,7 @@ impl IDebugSymbols3 { (::windows_core::Interface::vtable(self).SetTypeOptions)(::windows_core::Interface::as_raw(self), options).ok() } pub unsafe fn GetNameByOffsetWide(&self, offset: u64, namebuffer: ::core::option::Option<&mut [u16]>, namesize: ::core::option::Option<*mut u32>, displacement: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNameByOffsetWide)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetNameByOffsetWide)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetByNameWide(&self, symbol: P0) -> ::windows_core::Result where @@ -16321,10 +16321,10 @@ impl IDebugSymbols3 { (::windows_core::Interface::vtable(self).GetOffsetByNameWide)(::windows_core::Interface::as_raw(self), symbol.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn GetNearNameByOffsetWide(&self, offset: u64, delta: i32, namebuffer: ::core::option::Option<&mut [u16]>, namesize: ::core::option::Option<*mut u32>, displacement: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNearNameByOffsetWide)(::windows_core::Interface::as_raw(self), offset, delta, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetNearNameByOffsetWide)(::windows_core::Interface::as_raw(self), offset, delta, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetLineByOffsetWide(&self, offset: u64, line: ::core::option::Option<*mut u32>, filebuffer: ::core::option::Option<&mut [u16]>, filesize: ::core::option::Option<*mut u32>, displacement: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLineByOffsetWide)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(line.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(filebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetLineByOffsetWide)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(line.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(filebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetByLineWide(&self, line: u32, file: P0) -> ::windows_core::Result where @@ -16347,7 +16347,7 @@ impl IDebugSymbols3 { (::windows_core::Interface::vtable(self).GetSymbolModuleWide)(::windows_core::Interface::as_raw(self), symbol.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn GetTypeNameWide(&self, module: u64, typeid: u32, namebuffer: ::core::option::Option<&mut [u16]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetTypeNameWide)(::windows_core::Interface::as_raw(self), module, typeid, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetTypeNameWide)(::windows_core::Interface::as_raw(self), module, typeid, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetTypeIdWide(&self, module: u64, name: P0) -> ::windows_core::Result where @@ -16388,7 +16388,7 @@ impl IDebugSymbols3 { (::windows_core::Interface::vtable(self).StartSymbolMatchWide)(::windows_core::Interface::as_raw(self), pattern.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn GetNextSymbolMatchWide(&self, handle: u64, buffer: ::core::option::Option<&mut [u16]>, matchsize: ::core::option::Option<*mut u32>, offset: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNextSymbolMatchWide)(::windows_core::Interface::as_raw(self), handle, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(matchsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(offset.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetNextSymbolMatchWide)(::windows_core::Interface::as_raw(self), handle, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(matchsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(offset.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn ReloadWide(&self, module: P0) -> ::windows_core::Result<()> where @@ -16397,7 +16397,7 @@ impl IDebugSymbols3 { (::windows_core::Interface::vtable(self).ReloadWide)(::windows_core::Interface::as_raw(self), module.into_param().abi()).ok() } pub unsafe fn GetSymbolPathWide(&self, buffer: ::core::option::Option<&mut [u16]>, pathsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSymbolPathWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolPathWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetSymbolPathWide(&self, path: P0) -> ::windows_core::Result<()> where @@ -16412,7 +16412,7 @@ impl IDebugSymbols3 { (::windows_core::Interface::vtable(self).AppendSymbolPathWide)(::windows_core::Interface::as_raw(self), addition.into_param().abi()).ok() } pub unsafe fn GetImagePathWide(&self, buffer: ::core::option::Option<&mut [u16]>, pathsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetImagePathWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetImagePathWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetImagePathWide(&self, path: P0) -> ::windows_core::Result<()> where @@ -16427,10 +16427,10 @@ impl IDebugSymbols3 { (::windows_core::Interface::vtable(self).AppendImagePathWide)(::windows_core::Interface::as_raw(self), addition.into_param().abi()).ok() } pub unsafe fn GetSourcePathWide(&self, buffer: ::core::option::Option<&mut [u16]>, pathsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSourcePathWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourcePathWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSourcePathElementWide(&self, index: u32, buffer: ::core::option::Option<&mut [u16]>, elementsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSourcePathElementWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(elementsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourcePathElementWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(elementsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetSourcePathWide(&self, path: P0) -> ::windows_core::Result<()> where @@ -16448,13 +16448,13 @@ impl IDebugSymbols3 { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).FindSourceFileWide)(::windows_core::Interface::as_raw(self), startelement, file.into_param().abi(), flags, ::core::mem::transmute(foundelement.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(foundsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).FindSourceFileWide)(::windows_core::Interface::as_raw(self), startelement, file.into_param().abi(), flags, ::core::mem::transmute(foundelement.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(foundsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSourceFileLineOffsetsWide(&self, file: P0, buffer: ::core::option::Option<&mut [u64]>, filelines: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).GetSourceFileLineOffsetsWide)(::windows_core::Interface::as_raw(self), file.into_param().abi(), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filelines.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourceFileLineOffsetsWide)(::windows_core::Interface::as_raw(self), file.into_param().abi(), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filelines.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetModuleVersionInformationWide(&self, index: u32, base: u64, item: P0, buffer: ::core::option::Option<*mut ::core::ffi::c_void>, buffersize: u32, verinfosize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where @@ -16463,13 +16463,13 @@ impl IDebugSymbols3 { (::windows_core::Interface::vtable(self).GetModuleVersionInformationWide)(::windows_core::Interface::as_raw(self), index, base, item.into_param().abi(), ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize, ::core::mem::transmute(verinfosize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetModuleNameStringWide(&self, which: u32, index: u32, base: u64, buffer: ::core::option::Option<&mut [u16]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetModuleNameStringWide)(::windows_core::Interface::as_raw(self), which, index, base, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetModuleNameStringWide)(::windows_core::Interface::as_raw(self), which, index, base, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetConstantNameWide(&self, module: u64, typeid: u32, value: u64, namebuffer: ::core::option::Option<&mut [u16]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetConstantNameWide)(::windows_core::Interface::as_raw(self), module, typeid, value, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetConstantNameWide)(::windows_core::Interface::as_raw(self), module, typeid, value, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetFieldNameWide(&self, module: u64, typeid: u32, fieldindex: u32, namebuffer: ::core::option::Option<&mut [u16]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetFieldNameWide)(::windows_core::Interface::as_raw(self), module, typeid, fieldindex, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetFieldNameWide)(::windows_core::Interface::as_raw(self), module, typeid, fieldindex, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn IsManagedModule(&self, index: u32, base: u64) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).IsManagedModule)(::windows_core::Interface::as_raw(self), index, base).ok() @@ -16559,13 +16559,13 @@ impl IDebugSymbols3 { where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { - (::windows_core::Interface::vtable(self).GetSymbolEntriesByName)(::windows_core::Interface::as_raw(self), symbol.into_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() as _), ::core::mem::transmute(entries.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolEntriesByName)(::windows_core::Interface::as_raw(self), symbol.into_param().abi(), flags, ::core::mem::transmute(ids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(entries.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntriesByNameWide(&self, symbol: P0, flags: u32, ids: ::core::option::Option<&mut [DEBUG_MODULE_AND_ID]>, entries: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).GetSymbolEntriesByNameWide)(::windows_core::Interface::as_raw(self), symbol.into_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() as _), ::core::mem::transmute(entries.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolEntriesByNameWide)(::windows_core::Interface::as_raw(self), symbol.into_param().abi(), flags, ::core::mem::transmute(ids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(entries.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntryByToken(&self, modulebase: u64, token: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -16575,41 +16575,41 @@ impl IDebugSymbols3 { (::windows_core::Interface::vtable(self).GetSymbolEntryInformation)(::windows_core::Interface::as_raw(self), id, info).ok() } pub unsafe fn GetSymbolEntryString(&self, id: *const DEBUG_MODULE_AND_ID, which: u32, buffer: ::core::option::Option<&mut [u8]>, stringsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSymbolEntryString)(::windows_core::Interface::as_raw(self), id, which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolEntryString)(::windows_core::Interface::as_raw(self), id, which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntryStringWide(&self, id: *const DEBUG_MODULE_AND_ID, which: u32, buffer: ::core::option::Option<&mut [u16]>, stringsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSymbolEntryStringWide)(::windows_core::Interface::as_raw(self), id, which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolEntryStringWide)(::windows_core::Interface::as_raw(self), id, which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntryOffsetRegions(&self, id: *const DEBUG_MODULE_AND_ID, flags: u32, regions: ::core::option::Option<&mut [DEBUG_OFFSET_REGION]>, regionsavail: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSymbolEntryOffsetRegions)(::windows_core::Interface::as_raw(self), id, flags, ::core::mem::transmute(regions.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(regionsavail.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolEntryOffsetRegions)(::windows_core::Interface::as_raw(self), id, flags, ::core::mem::transmute(regions.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(regionsavail.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntryBySymbolEntry(&self, fromid: *const DEBUG_MODULE_AND_ID, flags: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).GetSymbolEntryBySymbolEntry)(::windows_core::Interface::as_raw(self), fromid, flags, &mut result__).from_abi(result__) } pub unsafe fn GetSourceEntriesByOffset(&self, offset: u64, flags: u32, entries: ::core::option::Option<&mut [DEBUG_SYMBOL_SOURCE_ENTRY]>, entriesavail: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSourceEntriesByOffset)(::windows_core::Interface::as_raw(self), offset, flags, ::core::mem::transmute(entries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(entriesavail.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourceEntriesByOffset)(::windows_core::Interface::as_raw(self), offset, flags, ::core::mem::transmute(entries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(entriesavail.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntriesByLine(&self, line: u32, file: P0, flags: u32, entries: ::core::option::Option<&mut [DEBUG_SYMBOL_SOURCE_ENTRY]>, entriesavail: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { - (::windows_core::Interface::vtable(self).GetSourceEntriesByLine)(::windows_core::Interface::as_raw(self), line, file.into_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() as _), ::core::mem::transmute(entriesavail.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourceEntriesByLine)(::windows_core::Interface::as_raw(self), line, file.into_param().abi(), flags, ::core::mem::transmute(entries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(entriesavail.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntriesByLineWide(&self, line: u32, file: P0, flags: u32, entries: ::core::option::Option<&mut [DEBUG_SYMBOL_SOURCE_ENTRY]>, entriesavail: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).GetSourceEntriesByLineWide)(::windows_core::Interface::as_raw(self), line, file.into_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() as _), ::core::mem::transmute(entriesavail.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourceEntriesByLineWide)(::windows_core::Interface::as_raw(self), line, file.into_param().abi(), flags, ::core::mem::transmute(entries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(entriesavail.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntryString(&self, entry: *const DEBUG_SYMBOL_SOURCE_ENTRY, which: u32, buffer: ::core::option::Option<&mut [u8]>, stringsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSourceEntryString)(::windows_core::Interface::as_raw(self), entry, which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourceEntryString)(::windows_core::Interface::as_raw(self), entry, which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntryStringWide(&self, entry: *const DEBUG_SYMBOL_SOURCE_ENTRY, which: u32, buffer: ::core::option::Option<&mut [u16]>, stringsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSourceEntryStringWide)(::windows_core::Interface::as_raw(self), entry, which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourceEntryStringWide)(::windows_core::Interface::as_raw(self), entry, which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntryOffsetRegions(&self, entry: *const DEBUG_SYMBOL_SOURCE_ENTRY, flags: u32, regions: ::core::option::Option<&mut [DEBUG_OFFSET_REGION]>, regionsavail: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSourceEntryOffsetRegions)(::windows_core::Interface::as_raw(self), entry, flags, ::core::mem::transmute(regions.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(regionsavail.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourceEntryOffsetRegions)(::windows_core::Interface::as_raw(self), entry, flags, ::core::mem::transmute(regions.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(regionsavail.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntryBySourceEntry(&self, fromentry: *const DEBUG_SYMBOL_SOURCE_ENTRY, flags: u32, toentry: *mut DEBUG_SYMBOL_SOURCE_ENTRY) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetSourceEntryBySourceEntry)(::windows_core::Interface::as_raw(self), fromentry, flags, toentry).ok() @@ -16774,7 +16774,7 @@ impl IDebugSymbols4 { (::windows_core::Interface::vtable(self).SetSymbolOptions)(::windows_core::Interface::as_raw(self), options).ok() } pub unsafe fn GetNameByOffset(&self, offset: u64, namebuffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>, displacement: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNameByOffset)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetNameByOffset)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetByName(&self, symbol: P0) -> ::windows_core::Result where @@ -16784,10 +16784,10 @@ impl IDebugSymbols4 { (::windows_core::Interface::vtable(self).GetOffsetByName)(::windows_core::Interface::as_raw(self), symbol.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn GetNearNameByOffset(&self, offset: u64, delta: i32, namebuffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>, displacement: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNearNameByOffset)(::windows_core::Interface::as_raw(self), offset, delta, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetNearNameByOffset)(::windows_core::Interface::as_raw(self), offset, delta, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetLineByOffset(&self, offset: u64, line: ::core::option::Option<*mut u32>, filebuffer: ::core::option::Option<&mut [u8]>, filesize: ::core::option::Option<*mut u32>, displacement: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLineByOffset)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(line.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(filebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetLineByOffset)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(line.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(filebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetByLine(&self, line: u32, file: P0) -> ::windows_core::Result where @@ -16818,13 +16818,13 @@ impl IDebugSymbols4 { index, 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() as _), + imagenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(imagenamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(modulenamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - modulenamebuffer.as_deref().map_or(0, |slice| slice.len() as _), + modulenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(modulenamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(loadedimagenamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - loadedimagenamebuffer.as_deref().map_or(0, |slice| slice.len() as _), + loadedimagenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(loadedimagenamesize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -16840,7 +16840,7 @@ impl IDebugSymbols4 { (::windows_core::Interface::vtable(self).GetSymbolModule)(::windows_core::Interface::as_raw(self), symbol.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn GetTypeName(&self, module: u64, typeid: u32, namebuffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetTypeName)(::windows_core::Interface::as_raw(self), module, typeid, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetTypeName)(::windows_core::Interface::as_raw(self), module, typeid, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetTypeId(&self, module: u64, name: P0) -> ::windows_core::Result where @@ -16919,7 +16919,7 @@ impl IDebugSymbols4 { (::windows_core::Interface::vtable(self).StartSymbolMatch)(::windows_core::Interface::as_raw(self), pattern.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn GetNextSymbolMatch(&self, handle: u64, buffer: ::core::option::Option<&mut [u8]>, matchsize: ::core::option::Option<*mut u32>, offset: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNextSymbolMatch)(::windows_core::Interface::as_raw(self), handle, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(matchsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(offset.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetNextSymbolMatch)(::windows_core::Interface::as_raw(self), handle, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(matchsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(offset.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn EndSymbolMatch(&self, handle: u64) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).EndSymbolMatch)(::windows_core::Interface::as_raw(self), handle).ok() @@ -16931,7 +16931,7 @@ impl IDebugSymbols4 { (::windows_core::Interface::vtable(self).Reload)(::windows_core::Interface::as_raw(self), module.into_param().abi()).ok() } pub unsafe fn GetSymbolPath(&self, buffer: ::core::option::Option<&mut [u8]>, pathsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSymbolPath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolPath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetSymbolPath(&self, path: P0) -> ::windows_core::Result<()> where @@ -16946,7 +16946,7 @@ impl IDebugSymbols4 { (::windows_core::Interface::vtable(self).AppendSymbolPath)(::windows_core::Interface::as_raw(self), addition.into_param().abi()).ok() } pub unsafe fn GetImagePath(&self, buffer: ::core::option::Option<&mut [u8]>, pathsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetImagePath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetImagePath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetImagePath(&self, path: P0) -> ::windows_core::Result<()> where @@ -16961,10 +16961,10 @@ impl IDebugSymbols4 { (::windows_core::Interface::vtable(self).AppendImagePath)(::windows_core::Interface::as_raw(self), addition.into_param().abi()).ok() } pub unsafe fn GetSourcePath(&self, buffer: ::core::option::Option<&mut [u8]>, pathsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSourcePath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourcePath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSourcePathElement(&self, index: u32, buffer: ::core::option::Option<&mut [u8]>, elementsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSourcePathElement)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(elementsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourcePathElement)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(elementsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetSourcePath(&self, path: P0) -> ::windows_core::Result<()> where @@ -16982,13 +16982,13 @@ impl IDebugSymbols4 { where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { - (::windows_core::Interface::vtable(self).FindSourceFile)(::windows_core::Interface::as_raw(self), startelement, file.into_param().abi(), flags, ::core::mem::transmute(foundelement.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(foundsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).FindSourceFile)(::windows_core::Interface::as_raw(self), startelement, file.into_param().abi(), flags, ::core::mem::transmute(foundelement.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(foundsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSourceFileLineOffsets(&self, file: P0, buffer: ::core::option::Option<&mut [u64]>, filelines: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { - (::windows_core::Interface::vtable(self).GetSourceFileLineOffsets)(::windows_core::Interface::as_raw(self), file.into_param().abi(), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filelines.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourceFileLineOffsets)(::windows_core::Interface::as_raw(self), file.into_param().abi(), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filelines.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetModuleVersionInformation(&self, index: u32, base: u64, item: P0, buffer: ::core::option::Option<*mut ::core::ffi::c_void>, buffersize: u32, verinfosize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where @@ -16997,13 +16997,13 @@ impl IDebugSymbols4 { (::windows_core::Interface::vtable(self).GetModuleVersionInformation)(::windows_core::Interface::as_raw(self), index, base, item.into_param().abi(), ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize, ::core::mem::transmute(verinfosize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetModuleNameString(&self, which: u32, index: u32, base: u64, buffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetModuleNameString)(::windows_core::Interface::as_raw(self), which, index, base, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetModuleNameString)(::windows_core::Interface::as_raw(self), which, index, base, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetConstantName(&self, module: u64, typeid: u32, value: u64, namebuffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetConstantName)(::windows_core::Interface::as_raw(self), module, typeid, value, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetConstantName)(::windows_core::Interface::as_raw(self), module, typeid, value, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetFieldName(&self, module: u64, typeid: u32, fieldindex: u32, namebuffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetFieldName)(::windows_core::Interface::as_raw(self), module, typeid, fieldindex, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetFieldName)(::windows_core::Interface::as_raw(self), module, typeid, fieldindex, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetTypeOptions(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -17019,7 +17019,7 @@ impl IDebugSymbols4 { (::windows_core::Interface::vtable(self).SetTypeOptions)(::windows_core::Interface::as_raw(self), options).ok() } pub unsafe fn GetNameByOffsetWide(&self, offset: u64, namebuffer: ::core::option::Option<&mut [u16]>, namesize: ::core::option::Option<*mut u32>, displacement: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNameByOffsetWide)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetNameByOffsetWide)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetByNameWide(&self, symbol: P0) -> ::windows_core::Result where @@ -17029,10 +17029,10 @@ impl IDebugSymbols4 { (::windows_core::Interface::vtable(self).GetOffsetByNameWide)(::windows_core::Interface::as_raw(self), symbol.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn GetNearNameByOffsetWide(&self, offset: u64, delta: i32, namebuffer: ::core::option::Option<&mut [u16]>, namesize: ::core::option::Option<*mut u32>, displacement: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNearNameByOffsetWide)(::windows_core::Interface::as_raw(self), offset, delta, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetNearNameByOffsetWide)(::windows_core::Interface::as_raw(self), offset, delta, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetLineByOffsetWide(&self, offset: u64, line: ::core::option::Option<*mut u32>, filebuffer: ::core::option::Option<&mut [u16]>, filesize: ::core::option::Option<*mut u32>, displacement: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLineByOffsetWide)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(line.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(filebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetLineByOffsetWide)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(line.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(filebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetByLineWide(&self, line: u32, file: P0) -> ::windows_core::Result where @@ -17055,7 +17055,7 @@ impl IDebugSymbols4 { (::windows_core::Interface::vtable(self).GetSymbolModuleWide)(::windows_core::Interface::as_raw(self), symbol.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn GetTypeNameWide(&self, module: u64, typeid: u32, namebuffer: ::core::option::Option<&mut [u16]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetTypeNameWide)(::windows_core::Interface::as_raw(self), module, typeid, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetTypeNameWide)(::windows_core::Interface::as_raw(self), module, typeid, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetTypeIdWide(&self, module: u64, name: P0) -> ::windows_core::Result where @@ -17096,7 +17096,7 @@ impl IDebugSymbols4 { (::windows_core::Interface::vtable(self).StartSymbolMatchWide)(::windows_core::Interface::as_raw(self), pattern.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn GetNextSymbolMatchWide(&self, handle: u64, buffer: ::core::option::Option<&mut [u16]>, matchsize: ::core::option::Option<*mut u32>, offset: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNextSymbolMatchWide)(::windows_core::Interface::as_raw(self), handle, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(matchsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(offset.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetNextSymbolMatchWide)(::windows_core::Interface::as_raw(self), handle, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(matchsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(offset.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn ReloadWide(&self, module: P0) -> ::windows_core::Result<()> where @@ -17105,7 +17105,7 @@ impl IDebugSymbols4 { (::windows_core::Interface::vtable(self).ReloadWide)(::windows_core::Interface::as_raw(self), module.into_param().abi()).ok() } pub unsafe fn GetSymbolPathWide(&self, buffer: ::core::option::Option<&mut [u16]>, pathsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSymbolPathWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolPathWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetSymbolPathWide(&self, path: P0) -> ::windows_core::Result<()> where @@ -17120,7 +17120,7 @@ impl IDebugSymbols4 { (::windows_core::Interface::vtable(self).AppendSymbolPathWide)(::windows_core::Interface::as_raw(self), addition.into_param().abi()).ok() } pub unsafe fn GetImagePathWide(&self, buffer: ::core::option::Option<&mut [u16]>, pathsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetImagePathWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetImagePathWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetImagePathWide(&self, path: P0) -> ::windows_core::Result<()> where @@ -17135,10 +17135,10 @@ impl IDebugSymbols4 { (::windows_core::Interface::vtable(self).AppendImagePathWide)(::windows_core::Interface::as_raw(self), addition.into_param().abi()).ok() } pub unsafe fn GetSourcePathWide(&self, buffer: ::core::option::Option<&mut [u16]>, pathsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSourcePathWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourcePathWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSourcePathElementWide(&self, index: u32, buffer: ::core::option::Option<&mut [u16]>, elementsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSourcePathElementWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(elementsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourcePathElementWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(elementsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetSourcePathWide(&self, path: P0) -> ::windows_core::Result<()> where @@ -17156,13 +17156,13 @@ impl IDebugSymbols4 { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).FindSourceFileWide)(::windows_core::Interface::as_raw(self), startelement, file.into_param().abi(), flags, ::core::mem::transmute(foundelement.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(foundsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).FindSourceFileWide)(::windows_core::Interface::as_raw(self), startelement, file.into_param().abi(), flags, ::core::mem::transmute(foundelement.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(foundsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSourceFileLineOffsetsWide(&self, file: P0, buffer: ::core::option::Option<&mut [u64]>, filelines: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).GetSourceFileLineOffsetsWide)(::windows_core::Interface::as_raw(self), file.into_param().abi(), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filelines.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourceFileLineOffsetsWide)(::windows_core::Interface::as_raw(self), file.into_param().abi(), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filelines.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetModuleVersionInformationWide(&self, index: u32, base: u64, item: P0, buffer: ::core::option::Option<*mut ::core::ffi::c_void>, buffersize: u32, verinfosize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where @@ -17171,13 +17171,13 @@ impl IDebugSymbols4 { (::windows_core::Interface::vtable(self).GetModuleVersionInformationWide)(::windows_core::Interface::as_raw(self), index, base, item.into_param().abi(), ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize, ::core::mem::transmute(verinfosize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetModuleNameStringWide(&self, which: u32, index: u32, base: u64, buffer: ::core::option::Option<&mut [u16]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetModuleNameStringWide)(::windows_core::Interface::as_raw(self), which, index, base, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetModuleNameStringWide)(::windows_core::Interface::as_raw(self), which, index, base, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetConstantNameWide(&self, module: u64, typeid: u32, value: u64, namebuffer: ::core::option::Option<&mut [u16]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetConstantNameWide)(::windows_core::Interface::as_raw(self), module, typeid, value, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetConstantNameWide)(::windows_core::Interface::as_raw(self), module, typeid, value, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetFieldNameWide(&self, module: u64, typeid: u32, fieldindex: u32, namebuffer: ::core::option::Option<&mut [u16]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetFieldNameWide)(::windows_core::Interface::as_raw(self), module, typeid, fieldindex, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetFieldNameWide)(::windows_core::Interface::as_raw(self), module, typeid, fieldindex, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn IsManagedModule(&self, index: u32, base: u64) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).IsManagedModule)(::windows_core::Interface::as_raw(self), index, base).ok() @@ -17267,13 +17267,13 @@ impl IDebugSymbols4 { where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { - (::windows_core::Interface::vtable(self).GetSymbolEntriesByName)(::windows_core::Interface::as_raw(self), symbol.into_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() as _), ::core::mem::transmute(entries.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolEntriesByName)(::windows_core::Interface::as_raw(self), symbol.into_param().abi(), flags, ::core::mem::transmute(ids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(entries.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntriesByNameWide(&self, symbol: P0, flags: u32, ids: ::core::option::Option<&mut [DEBUG_MODULE_AND_ID]>, entries: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).GetSymbolEntriesByNameWide)(::windows_core::Interface::as_raw(self), symbol.into_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() as _), ::core::mem::transmute(entries.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolEntriesByNameWide)(::windows_core::Interface::as_raw(self), symbol.into_param().abi(), flags, ::core::mem::transmute(ids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(entries.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntryByToken(&self, modulebase: u64, token: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -17283,41 +17283,41 @@ impl IDebugSymbols4 { (::windows_core::Interface::vtable(self).GetSymbolEntryInformation)(::windows_core::Interface::as_raw(self), id, info).ok() } pub unsafe fn GetSymbolEntryString(&self, id: *const DEBUG_MODULE_AND_ID, which: u32, buffer: ::core::option::Option<&mut [u8]>, stringsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSymbolEntryString)(::windows_core::Interface::as_raw(self), id, which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolEntryString)(::windows_core::Interface::as_raw(self), id, which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntryStringWide(&self, id: *const DEBUG_MODULE_AND_ID, which: u32, buffer: ::core::option::Option<&mut [u16]>, stringsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSymbolEntryStringWide)(::windows_core::Interface::as_raw(self), id, which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolEntryStringWide)(::windows_core::Interface::as_raw(self), id, which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntryOffsetRegions(&self, id: *const DEBUG_MODULE_AND_ID, flags: u32, regions: ::core::option::Option<&mut [DEBUG_OFFSET_REGION]>, regionsavail: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSymbolEntryOffsetRegions)(::windows_core::Interface::as_raw(self), id, flags, ::core::mem::transmute(regions.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(regionsavail.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolEntryOffsetRegions)(::windows_core::Interface::as_raw(self), id, flags, ::core::mem::transmute(regions.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(regionsavail.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntryBySymbolEntry(&self, fromid: *const DEBUG_MODULE_AND_ID, flags: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).GetSymbolEntryBySymbolEntry)(::windows_core::Interface::as_raw(self), fromid, flags, &mut result__).from_abi(result__) } pub unsafe fn GetSourceEntriesByOffset(&self, offset: u64, flags: u32, entries: ::core::option::Option<&mut [DEBUG_SYMBOL_SOURCE_ENTRY]>, entriesavail: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSourceEntriesByOffset)(::windows_core::Interface::as_raw(self), offset, flags, ::core::mem::transmute(entries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(entriesavail.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourceEntriesByOffset)(::windows_core::Interface::as_raw(self), offset, flags, ::core::mem::transmute(entries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(entriesavail.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntriesByLine(&self, line: u32, file: P0, flags: u32, entries: ::core::option::Option<&mut [DEBUG_SYMBOL_SOURCE_ENTRY]>, entriesavail: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { - (::windows_core::Interface::vtable(self).GetSourceEntriesByLine)(::windows_core::Interface::as_raw(self), line, file.into_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() as _), ::core::mem::transmute(entriesavail.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourceEntriesByLine)(::windows_core::Interface::as_raw(self), line, file.into_param().abi(), flags, ::core::mem::transmute(entries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(entriesavail.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntriesByLineWide(&self, line: u32, file: P0, flags: u32, entries: ::core::option::Option<&mut [DEBUG_SYMBOL_SOURCE_ENTRY]>, entriesavail: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).GetSourceEntriesByLineWide)(::windows_core::Interface::as_raw(self), line, file.into_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() as _), ::core::mem::transmute(entriesavail.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourceEntriesByLineWide)(::windows_core::Interface::as_raw(self), line, file.into_param().abi(), flags, ::core::mem::transmute(entries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(entriesavail.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntryString(&self, entry: *const DEBUG_SYMBOL_SOURCE_ENTRY, which: u32, buffer: ::core::option::Option<&mut [u8]>, stringsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSourceEntryString)(::windows_core::Interface::as_raw(self), entry, which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourceEntryString)(::windows_core::Interface::as_raw(self), entry, which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntryStringWide(&self, entry: *const DEBUG_SYMBOL_SOURCE_ENTRY, which: u32, buffer: ::core::option::Option<&mut [u16]>, stringsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSourceEntryStringWide)(::windows_core::Interface::as_raw(self), entry, which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourceEntryStringWide)(::windows_core::Interface::as_raw(self), entry, which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntryOffsetRegions(&self, entry: *const DEBUG_SYMBOL_SOURCE_ENTRY, flags: u32, regions: ::core::option::Option<&mut [DEBUG_OFFSET_REGION]>, regionsavail: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSourceEntryOffsetRegions)(::windows_core::Interface::as_raw(self), entry, flags, ::core::mem::transmute(regions.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(regionsavail.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourceEntryOffsetRegions)(::windows_core::Interface::as_raw(self), entry, flags, ::core::mem::transmute(regions.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(regionsavail.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntryBySourceEntry(&self, fromentry: *const DEBUG_SYMBOL_SOURCE_ENTRY, flags: u32, toentry: *mut DEBUG_SYMBOL_SOURCE_ENTRY) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetSourceEntryBySourceEntry)(::windows_core::Interface::as_raw(self), fromentry, flags, toentry).ok() @@ -17333,16 +17333,16 @@ impl IDebugSymbols4 { (::windows_core::Interface::vtable(self).SetScopeEx)(::windows_core::Interface::as_raw(self), instructionoffset, ::core::mem::transmute(scopeframe.unwrap_or(::std::ptr::null())), ::core::mem::transmute(scopecontext.unwrap_or(::std::ptr::null())), scopecontextsize).ok() } pub unsafe fn GetNameByInlineContext(&self, offset: u64, inlinecontext: u32, namebuffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>, displacement: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNameByInlineContext)(::windows_core::Interface::as_raw(self), offset, inlinecontext, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetNameByInlineContext)(::windows_core::Interface::as_raw(self), offset, inlinecontext, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetNameByInlineContextWide(&self, offset: u64, inlinecontext: u32, namebuffer: ::core::option::Option<&mut [u16]>, namesize: ::core::option::Option<*mut u32>, displacement: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNameByInlineContextWide)(::windows_core::Interface::as_raw(self), offset, inlinecontext, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetNameByInlineContextWide)(::windows_core::Interface::as_raw(self), offset, inlinecontext, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetLineByInlineContext(&self, offset: u64, inlinecontext: u32, line: ::core::option::Option<*mut u32>, filebuffer: ::core::option::Option<&mut [u8]>, filesize: ::core::option::Option<*mut u32>, displacement: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLineByInlineContext)(::windows_core::Interface::as_raw(self), offset, inlinecontext, ::core::mem::transmute(line.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(filebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetLineByInlineContext)(::windows_core::Interface::as_raw(self), offset, inlinecontext, ::core::mem::transmute(line.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(filebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetLineByInlineContextWide(&self, offset: u64, inlinecontext: u32, line: ::core::option::Option<*mut u32>, filebuffer: ::core::option::Option<&mut [u16]>, filesize: ::core::option::Option<*mut u32>, displacement: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLineByInlineContextWide)(::windows_core::Interface::as_raw(self), offset, inlinecontext, ::core::mem::transmute(line.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(filebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetLineByInlineContextWide)(::windows_core::Interface::as_raw(self), offset, inlinecontext, ::core::mem::transmute(line.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(filebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn OutputSymbolByInlineContext(&self, outputcontrol: u32, flags: u32, offset: u64, inlinecontext: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).OutputSymbolByInlineContext)(::windows_core::Interface::as_raw(self), outputcontrol, flags, offset, inlinecontext).ok() @@ -17520,7 +17520,7 @@ impl IDebugSymbols5 { (::windows_core::Interface::vtable(self).SetSymbolOptions)(::windows_core::Interface::as_raw(self), options).ok() } pub unsafe fn GetNameByOffset(&self, offset: u64, namebuffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>, displacement: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNameByOffset)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetNameByOffset)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetByName(&self, symbol: P0) -> ::windows_core::Result where @@ -17530,10 +17530,10 @@ impl IDebugSymbols5 { (::windows_core::Interface::vtable(self).GetOffsetByName)(::windows_core::Interface::as_raw(self), symbol.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn GetNearNameByOffset(&self, offset: u64, delta: i32, namebuffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>, displacement: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNearNameByOffset)(::windows_core::Interface::as_raw(self), offset, delta, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetNearNameByOffset)(::windows_core::Interface::as_raw(self), offset, delta, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetLineByOffset(&self, offset: u64, line: ::core::option::Option<*mut u32>, filebuffer: ::core::option::Option<&mut [u8]>, filesize: ::core::option::Option<*mut u32>, displacement: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLineByOffset)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(line.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(filebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetLineByOffset)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(line.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(filebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetByLine(&self, line: u32, file: P0) -> ::windows_core::Result where @@ -17564,13 +17564,13 @@ impl IDebugSymbols5 { index, 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() as _), + imagenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(imagenamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(modulenamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - modulenamebuffer.as_deref().map_or(0, |slice| slice.len() as _), + modulenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(modulenamesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(loadedimagenamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - loadedimagenamebuffer.as_deref().map_or(0, |slice| slice.len() as _), + loadedimagenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(loadedimagenamesize.unwrap_or(::std::ptr::null_mut())), ) .ok() @@ -17586,7 +17586,7 @@ impl IDebugSymbols5 { (::windows_core::Interface::vtable(self).GetSymbolModule)(::windows_core::Interface::as_raw(self), symbol.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn GetTypeName(&self, module: u64, typeid: u32, namebuffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetTypeName)(::windows_core::Interface::as_raw(self), module, typeid, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetTypeName)(::windows_core::Interface::as_raw(self), module, typeid, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetTypeId(&self, module: u64, name: P0) -> ::windows_core::Result where @@ -17665,7 +17665,7 @@ impl IDebugSymbols5 { (::windows_core::Interface::vtable(self).StartSymbolMatch)(::windows_core::Interface::as_raw(self), pattern.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn GetNextSymbolMatch(&self, handle: u64, buffer: ::core::option::Option<&mut [u8]>, matchsize: ::core::option::Option<*mut u32>, offset: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNextSymbolMatch)(::windows_core::Interface::as_raw(self), handle, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(matchsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(offset.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetNextSymbolMatch)(::windows_core::Interface::as_raw(self), handle, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(matchsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(offset.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn EndSymbolMatch(&self, handle: u64) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).EndSymbolMatch)(::windows_core::Interface::as_raw(self), handle).ok() @@ -17677,7 +17677,7 @@ impl IDebugSymbols5 { (::windows_core::Interface::vtable(self).Reload)(::windows_core::Interface::as_raw(self), module.into_param().abi()).ok() } pub unsafe fn GetSymbolPath(&self, buffer: ::core::option::Option<&mut [u8]>, pathsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSymbolPath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolPath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetSymbolPath(&self, path: P0) -> ::windows_core::Result<()> where @@ -17692,7 +17692,7 @@ impl IDebugSymbols5 { (::windows_core::Interface::vtable(self).AppendSymbolPath)(::windows_core::Interface::as_raw(self), addition.into_param().abi()).ok() } pub unsafe fn GetImagePath(&self, buffer: ::core::option::Option<&mut [u8]>, pathsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetImagePath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetImagePath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetImagePath(&self, path: P0) -> ::windows_core::Result<()> where @@ -17707,10 +17707,10 @@ impl IDebugSymbols5 { (::windows_core::Interface::vtable(self).AppendImagePath)(::windows_core::Interface::as_raw(self), addition.into_param().abi()).ok() } pub unsafe fn GetSourcePath(&self, buffer: ::core::option::Option<&mut [u8]>, pathsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSourcePath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourcePath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSourcePathElement(&self, index: u32, buffer: ::core::option::Option<&mut [u8]>, elementsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSourcePathElement)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(elementsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourcePathElement)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(elementsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetSourcePath(&self, path: P0) -> ::windows_core::Result<()> where @@ -17728,13 +17728,13 @@ impl IDebugSymbols5 { where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { - (::windows_core::Interface::vtable(self).FindSourceFile)(::windows_core::Interface::as_raw(self), startelement, file.into_param().abi(), flags, ::core::mem::transmute(foundelement.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(foundsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).FindSourceFile)(::windows_core::Interface::as_raw(self), startelement, file.into_param().abi(), flags, ::core::mem::transmute(foundelement.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(foundsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSourceFileLineOffsets(&self, file: P0, buffer: ::core::option::Option<&mut [u64]>, filelines: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { - (::windows_core::Interface::vtable(self).GetSourceFileLineOffsets)(::windows_core::Interface::as_raw(self), file.into_param().abi(), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filelines.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourceFileLineOffsets)(::windows_core::Interface::as_raw(self), file.into_param().abi(), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filelines.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetModuleVersionInformation(&self, index: u32, base: u64, item: P0, buffer: ::core::option::Option<*mut ::core::ffi::c_void>, buffersize: u32, verinfosize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where @@ -17743,13 +17743,13 @@ impl IDebugSymbols5 { (::windows_core::Interface::vtable(self).GetModuleVersionInformation)(::windows_core::Interface::as_raw(self), index, base, item.into_param().abi(), ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize, ::core::mem::transmute(verinfosize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetModuleNameString(&self, which: u32, index: u32, base: u64, buffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetModuleNameString)(::windows_core::Interface::as_raw(self), which, index, base, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetModuleNameString)(::windows_core::Interface::as_raw(self), which, index, base, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetConstantName(&self, module: u64, typeid: u32, value: u64, namebuffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetConstantName)(::windows_core::Interface::as_raw(self), module, typeid, value, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetConstantName)(::windows_core::Interface::as_raw(self), module, typeid, value, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetFieldName(&self, module: u64, typeid: u32, fieldindex: u32, namebuffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetFieldName)(::windows_core::Interface::as_raw(self), module, typeid, fieldindex, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetFieldName)(::windows_core::Interface::as_raw(self), module, typeid, fieldindex, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetTypeOptions(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -17765,7 +17765,7 @@ impl IDebugSymbols5 { (::windows_core::Interface::vtable(self).SetTypeOptions)(::windows_core::Interface::as_raw(self), options).ok() } pub unsafe fn GetNameByOffsetWide(&self, offset: u64, namebuffer: ::core::option::Option<&mut [u16]>, namesize: ::core::option::Option<*mut u32>, displacement: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNameByOffsetWide)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetNameByOffsetWide)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetByNameWide(&self, symbol: P0) -> ::windows_core::Result where @@ -17775,10 +17775,10 @@ impl IDebugSymbols5 { (::windows_core::Interface::vtable(self).GetOffsetByNameWide)(::windows_core::Interface::as_raw(self), symbol.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn GetNearNameByOffsetWide(&self, offset: u64, delta: i32, namebuffer: ::core::option::Option<&mut [u16]>, namesize: ::core::option::Option<*mut u32>, displacement: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNearNameByOffsetWide)(::windows_core::Interface::as_raw(self), offset, delta, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetNearNameByOffsetWide)(::windows_core::Interface::as_raw(self), offset, delta, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetLineByOffsetWide(&self, offset: u64, line: ::core::option::Option<*mut u32>, filebuffer: ::core::option::Option<&mut [u16]>, filesize: ::core::option::Option<*mut u32>, displacement: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLineByOffsetWide)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(line.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(filebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetLineByOffsetWide)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(line.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(filebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetByLineWide(&self, line: u32, file: P0) -> ::windows_core::Result where @@ -17801,7 +17801,7 @@ impl IDebugSymbols5 { (::windows_core::Interface::vtable(self).GetSymbolModuleWide)(::windows_core::Interface::as_raw(self), symbol.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn GetTypeNameWide(&self, module: u64, typeid: u32, namebuffer: ::core::option::Option<&mut [u16]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetTypeNameWide)(::windows_core::Interface::as_raw(self), module, typeid, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetTypeNameWide)(::windows_core::Interface::as_raw(self), module, typeid, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetTypeIdWide(&self, module: u64, name: P0) -> ::windows_core::Result where @@ -17842,7 +17842,7 @@ impl IDebugSymbols5 { (::windows_core::Interface::vtable(self).StartSymbolMatchWide)(::windows_core::Interface::as_raw(self), pattern.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn GetNextSymbolMatchWide(&self, handle: u64, buffer: ::core::option::Option<&mut [u16]>, matchsize: ::core::option::Option<*mut u32>, offset: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNextSymbolMatchWide)(::windows_core::Interface::as_raw(self), handle, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(matchsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(offset.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetNextSymbolMatchWide)(::windows_core::Interface::as_raw(self), handle, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(matchsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(offset.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn ReloadWide(&self, module: P0) -> ::windows_core::Result<()> where @@ -17851,7 +17851,7 @@ impl IDebugSymbols5 { (::windows_core::Interface::vtable(self).ReloadWide)(::windows_core::Interface::as_raw(self), module.into_param().abi()).ok() } pub unsafe fn GetSymbolPathWide(&self, buffer: ::core::option::Option<&mut [u16]>, pathsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSymbolPathWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolPathWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetSymbolPathWide(&self, path: P0) -> ::windows_core::Result<()> where @@ -17866,7 +17866,7 @@ impl IDebugSymbols5 { (::windows_core::Interface::vtable(self).AppendSymbolPathWide)(::windows_core::Interface::as_raw(self), addition.into_param().abi()).ok() } pub unsafe fn GetImagePathWide(&self, buffer: ::core::option::Option<&mut [u16]>, pathsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetImagePathWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetImagePathWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetImagePathWide(&self, path: P0) -> ::windows_core::Result<()> where @@ -17881,10 +17881,10 @@ impl IDebugSymbols5 { (::windows_core::Interface::vtable(self).AppendImagePathWide)(::windows_core::Interface::as_raw(self), addition.into_param().abi()).ok() } pub unsafe fn GetSourcePathWide(&self, buffer: ::core::option::Option<&mut [u16]>, pathsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSourcePathWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourcePathWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pathsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSourcePathElementWide(&self, index: u32, buffer: ::core::option::Option<&mut [u16]>, elementsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSourcePathElementWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(elementsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourcePathElementWide)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(elementsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetSourcePathWide(&self, path: P0) -> ::windows_core::Result<()> where @@ -17902,13 +17902,13 @@ impl IDebugSymbols5 { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).FindSourceFileWide)(::windows_core::Interface::as_raw(self), startelement, file.into_param().abi(), flags, ::core::mem::transmute(foundelement.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(foundsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).FindSourceFileWide)(::windows_core::Interface::as_raw(self), startelement, file.into_param().abi(), flags, ::core::mem::transmute(foundelement.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(foundsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSourceFileLineOffsetsWide(&self, file: P0, buffer: ::core::option::Option<&mut [u64]>, filelines: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).GetSourceFileLineOffsetsWide)(::windows_core::Interface::as_raw(self), file.into_param().abi(), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filelines.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourceFileLineOffsetsWide)(::windows_core::Interface::as_raw(self), file.into_param().abi(), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filelines.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetModuleVersionInformationWide(&self, index: u32, base: u64, item: P0, buffer: ::core::option::Option<*mut ::core::ffi::c_void>, buffersize: u32, verinfosize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where @@ -17917,13 +17917,13 @@ impl IDebugSymbols5 { (::windows_core::Interface::vtable(self).GetModuleVersionInformationWide)(::windows_core::Interface::as_raw(self), index, base, item.into_param().abi(), ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize, ::core::mem::transmute(verinfosize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetModuleNameStringWide(&self, which: u32, index: u32, base: u64, buffer: ::core::option::Option<&mut [u16]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetModuleNameStringWide)(::windows_core::Interface::as_raw(self), which, index, base, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetModuleNameStringWide)(::windows_core::Interface::as_raw(self), which, index, base, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetConstantNameWide(&self, module: u64, typeid: u32, value: u64, namebuffer: ::core::option::Option<&mut [u16]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetConstantNameWide)(::windows_core::Interface::as_raw(self), module, typeid, value, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetConstantNameWide)(::windows_core::Interface::as_raw(self), module, typeid, value, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetFieldNameWide(&self, module: u64, typeid: u32, fieldindex: u32, namebuffer: ::core::option::Option<&mut [u16]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetFieldNameWide)(::windows_core::Interface::as_raw(self), module, typeid, fieldindex, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetFieldNameWide)(::windows_core::Interface::as_raw(self), module, typeid, fieldindex, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn IsManagedModule(&self, index: u32, base: u64) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).IsManagedModule)(::windows_core::Interface::as_raw(self), index, base).ok() @@ -18013,13 +18013,13 @@ impl IDebugSymbols5 { where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { - (::windows_core::Interface::vtable(self).GetSymbolEntriesByName)(::windows_core::Interface::as_raw(self), symbol.into_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() as _), ::core::mem::transmute(entries.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolEntriesByName)(::windows_core::Interface::as_raw(self), symbol.into_param().abi(), flags, ::core::mem::transmute(ids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(entries.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntriesByNameWide(&self, symbol: P0, flags: u32, ids: ::core::option::Option<&mut [DEBUG_MODULE_AND_ID]>, entries: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).GetSymbolEntriesByNameWide)(::windows_core::Interface::as_raw(self), symbol.into_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() as _), ::core::mem::transmute(entries.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolEntriesByNameWide)(::windows_core::Interface::as_raw(self), symbol.into_param().abi(), flags, ::core::mem::transmute(ids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(entries.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntryByToken(&self, modulebase: u64, token: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -18029,41 +18029,41 @@ impl IDebugSymbols5 { (::windows_core::Interface::vtable(self).GetSymbolEntryInformation)(::windows_core::Interface::as_raw(self), id, info).ok() } pub unsafe fn GetSymbolEntryString(&self, id: *const DEBUG_MODULE_AND_ID, which: u32, buffer: ::core::option::Option<&mut [u8]>, stringsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSymbolEntryString)(::windows_core::Interface::as_raw(self), id, which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolEntryString)(::windows_core::Interface::as_raw(self), id, which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntryStringWide(&self, id: *const DEBUG_MODULE_AND_ID, which: u32, buffer: ::core::option::Option<&mut [u16]>, stringsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSymbolEntryStringWide)(::windows_core::Interface::as_raw(self), id, which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolEntryStringWide)(::windows_core::Interface::as_raw(self), id, which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntryOffsetRegions(&self, id: *const DEBUG_MODULE_AND_ID, flags: u32, regions: ::core::option::Option<&mut [DEBUG_OFFSET_REGION]>, regionsavail: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSymbolEntryOffsetRegions)(::windows_core::Interface::as_raw(self), id, flags, ::core::mem::transmute(regions.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(regionsavail.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSymbolEntryOffsetRegions)(::windows_core::Interface::as_raw(self), id, flags, ::core::mem::transmute(regions.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(regionsavail.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntryBySymbolEntry(&self, fromid: *const DEBUG_MODULE_AND_ID, flags: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).GetSymbolEntryBySymbolEntry)(::windows_core::Interface::as_raw(self), fromid, flags, &mut result__).from_abi(result__) } pub unsafe fn GetSourceEntriesByOffset(&self, offset: u64, flags: u32, entries: ::core::option::Option<&mut [DEBUG_SYMBOL_SOURCE_ENTRY]>, entriesavail: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSourceEntriesByOffset)(::windows_core::Interface::as_raw(self), offset, flags, ::core::mem::transmute(entries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(entriesavail.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourceEntriesByOffset)(::windows_core::Interface::as_raw(self), offset, flags, ::core::mem::transmute(entries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(entriesavail.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntriesByLine(&self, line: u32, file: P0, flags: u32, entries: ::core::option::Option<&mut [DEBUG_SYMBOL_SOURCE_ENTRY]>, entriesavail: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { - (::windows_core::Interface::vtable(self).GetSourceEntriesByLine)(::windows_core::Interface::as_raw(self), line, file.into_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() as _), ::core::mem::transmute(entriesavail.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourceEntriesByLine)(::windows_core::Interface::as_raw(self), line, file.into_param().abi(), flags, ::core::mem::transmute(entries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(entriesavail.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntriesByLineWide(&self, line: u32, file: P0, flags: u32, entries: ::core::option::Option<&mut [DEBUG_SYMBOL_SOURCE_ENTRY]>, entriesavail: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).GetSourceEntriesByLineWide)(::windows_core::Interface::as_raw(self), line, file.into_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() as _), ::core::mem::transmute(entriesavail.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourceEntriesByLineWide)(::windows_core::Interface::as_raw(self), line, file.into_param().abi(), flags, ::core::mem::transmute(entries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(entriesavail.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntryString(&self, entry: *const DEBUG_SYMBOL_SOURCE_ENTRY, which: u32, buffer: ::core::option::Option<&mut [u8]>, stringsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSourceEntryString)(::windows_core::Interface::as_raw(self), entry, which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourceEntryString)(::windows_core::Interface::as_raw(self), entry, which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntryStringWide(&self, entry: *const DEBUG_SYMBOL_SOURCE_ENTRY, which: u32, buffer: ::core::option::Option<&mut [u16]>, stringsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSourceEntryStringWide)(::windows_core::Interface::as_raw(self), entry, which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourceEntryStringWide)(::windows_core::Interface::as_raw(self), entry, which, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringsize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntryOffsetRegions(&self, entry: *const DEBUG_SYMBOL_SOURCE_ENTRY, flags: u32, regions: ::core::option::Option<&mut [DEBUG_OFFSET_REGION]>, regionsavail: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSourceEntryOffsetRegions)(::windows_core::Interface::as_raw(self), entry, flags, ::core::mem::transmute(regions.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(regionsavail.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetSourceEntryOffsetRegions)(::windows_core::Interface::as_raw(self), entry, flags, ::core::mem::transmute(regions.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(regionsavail.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntryBySourceEntry(&self, fromentry: *const DEBUG_SYMBOL_SOURCE_ENTRY, flags: u32, toentry: *mut DEBUG_SYMBOL_SOURCE_ENTRY) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetSourceEntryBySourceEntry)(::windows_core::Interface::as_raw(self), fromentry, flags, toentry).ok() @@ -18079,16 +18079,16 @@ impl IDebugSymbols5 { (::windows_core::Interface::vtable(self).SetScopeEx)(::windows_core::Interface::as_raw(self), instructionoffset, ::core::mem::transmute(scopeframe.unwrap_or(::std::ptr::null())), ::core::mem::transmute(scopecontext.unwrap_or(::std::ptr::null())), scopecontextsize).ok() } pub unsafe fn GetNameByInlineContext(&self, offset: u64, inlinecontext: u32, namebuffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>, displacement: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNameByInlineContext)(::windows_core::Interface::as_raw(self), offset, inlinecontext, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetNameByInlineContext)(::windows_core::Interface::as_raw(self), offset, inlinecontext, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetNameByInlineContextWide(&self, offset: u64, inlinecontext: u32, namebuffer: ::core::option::Option<&mut [u16]>, namesize: ::core::option::Option<*mut u32>, displacement: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNameByInlineContextWide)(::windows_core::Interface::as_raw(self), offset, inlinecontext, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetNameByInlineContextWide)(::windows_core::Interface::as_raw(self), offset, inlinecontext, ::core::mem::transmute(namebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetLineByInlineContext(&self, offset: u64, inlinecontext: u32, line: ::core::option::Option<*mut u32>, filebuffer: ::core::option::Option<&mut [u8]>, filesize: ::core::option::Option<*mut u32>, displacement: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLineByInlineContext)(::windows_core::Interface::as_raw(self), offset, inlinecontext, ::core::mem::transmute(line.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(filebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetLineByInlineContext)(::windows_core::Interface::as_raw(self), offset, inlinecontext, ::core::mem::transmute(line.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(filebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetLineByInlineContextWide(&self, offset: u64, inlinecontext: u32, line: ::core::option::Option<*mut u32>, filebuffer: ::core::option::Option<&mut [u16]>, filesize: ::core::option::Option<*mut u32>, displacement: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLineByInlineContextWide)(::windows_core::Interface::as_raw(self), offset, inlinecontext, ::core::mem::transmute(line.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(filebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetLineByInlineContextWide)(::windows_core::Interface::as_raw(self), offset, inlinecontext, ::core::mem::transmute(line.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(filebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(filesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn OutputSymbolByInlineContext(&self, outputcontrol: u32, flags: u32, offset: u64, inlinecontext: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).OutputSymbolByInlineContext)(::windows_core::Interface::as_raw(self), outputcontrol, flags, offset, inlinecontext).ok() @@ -18369,7 +18369,7 @@ impl IDebugSystemObjects { (::windows_core::Interface::vtable(self).GetProcessIdByHandle)(::windows_core::Interface::as_raw(self), handle, &mut result__).from_abi(result__) } pub unsafe fn GetCurrentProcessExecutableName(&self, buffer: ::core::option::Option<&mut [u8]>, exesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetCurrentProcessExecutableName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(exesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetCurrentProcessExecutableName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(exesize.unwrap_or(::std::ptr::null_mut()))).ok() } } ::windows_core::imp::interface_hierarchy!(IDebugSystemObjects, ::windows_core::IUnknown); @@ -18525,7 +18525,7 @@ impl IDebugSystemObjects2 { (::windows_core::Interface::vtable(self).GetProcessIdByHandle)(::windows_core::Interface::as_raw(self), handle, &mut result__).from_abi(result__) } pub unsafe fn GetCurrentProcessExecutableName(&self, buffer: ::core::option::Option<&mut [u8]>, exesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetCurrentProcessExecutableName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(exesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetCurrentProcessExecutableName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(exesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetCurrentProcessUpTime(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -18704,7 +18704,7 @@ impl IDebugSystemObjects3 { (::windows_core::Interface::vtable(self).GetProcessIdByHandle)(::windows_core::Interface::as_raw(self), handle, &mut result__).from_abi(result__) } pub unsafe fn GetCurrentProcessExecutableName(&self, buffer: ::core::option::Option<&mut [u8]>, exesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetCurrentProcessExecutableName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(exesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetCurrentProcessExecutableName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(exesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetCurrentProcessUpTime(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -18740,7 +18740,7 @@ impl IDebugSystemObjects3 { (::windows_core::Interface::vtable(self).GetNumberSystems)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetSystemIdsByIndex(&self, start: u32, ids: &mut [u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSystemIdsByIndex)(::windows_core::Interface::as_raw(self), start, ids.len() as _, ::core::mem::transmute(ids.as_ptr())).ok() + (::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<()> { (::windows_core::Interface::vtable(self).GetTotalNumberThreadsAndProcesses)(::windows_core::Interface::as_raw(self), totalthreads, totalprocesses, largestprocessthreads, largestsystemthreads, largestsystemprocesses).ok() @@ -18754,7 +18754,7 @@ impl IDebugSystemObjects3 { (::windows_core::Interface::vtable(self).GetSystemByServer)(::windows_core::Interface::as_raw(self), server, &mut result__).from_abi(result__) } pub unsafe fn GetCurrentSystemServerName(&self, buffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetCurrentSystemServerName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetCurrentSystemServerName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } } ::windows_core::imp::interface_hierarchy!(IDebugSystemObjects3, ::windows_core::IUnknown); @@ -18924,7 +18924,7 @@ impl IDebugSystemObjects4 { (::windows_core::Interface::vtable(self).GetProcessIdByHandle)(::windows_core::Interface::as_raw(self), handle, &mut result__).from_abi(result__) } pub unsafe fn GetCurrentProcessExecutableName(&self, buffer: ::core::option::Option<&mut [u8]>, exesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetCurrentProcessExecutableName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(exesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetCurrentProcessExecutableName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(exesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetCurrentProcessUpTime(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -18960,7 +18960,7 @@ impl IDebugSystemObjects4 { (::windows_core::Interface::vtable(self).GetNumberSystems)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetSystemIdsByIndex(&self, start: u32, ids: &mut [u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSystemIdsByIndex)(::windows_core::Interface::as_raw(self), start, ids.len() as _, ::core::mem::transmute(ids.as_ptr())).ok() + (::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<()> { (::windows_core::Interface::vtable(self).GetTotalNumberThreadsAndProcesses)(::windows_core::Interface::as_raw(self), totalthreads, totalprocesses, largestprocessthreads, largestsystemthreads, largestsystemprocesses).ok() @@ -18974,13 +18974,13 @@ impl IDebugSystemObjects4 { (::windows_core::Interface::vtable(self).GetSystemByServer)(::windows_core::Interface::as_raw(self), server, &mut result__).from_abi(result__) } pub unsafe fn GetCurrentSystemServerName(&self, buffer: ::core::option::Option<&mut [u8]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetCurrentSystemServerName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetCurrentSystemServerName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetCurrentProcessExecutableNameWide(&self, buffer: ::core::option::Option<&mut [u16]>, exesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetCurrentProcessExecutableNameWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(exesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetCurrentProcessExecutableNameWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(exesize.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn GetCurrentSystemServerNameWide(&self, buffer: ::core::option::Option<&mut [u16]>, namesize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetCurrentSystemServerNameWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetCurrentSystemServerNameWide)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namesize.unwrap_or(::std::ptr::null_mut()))).ok() } } ::windows_core::imp::interface_hierarchy!(IDebugSystemObjects4, ::windows_core::IUnknown); @@ -19196,14 +19196,14 @@ impl IIndexableConcept { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).GetAt)(::windows_core::Interface::as_raw(self), contextobject.into_param().abi(), indexers.len() as _, ::core::mem::transmute(indexers.as_ptr()), ::core::mem::transmute(object), ::core::mem::transmute(metadata.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetAt)(::windows_core::Interface::as_raw(self), contextobject.into_param().abi(), indexers.len().try_into().unwrap(), ::core::mem::transmute(indexers.as_ptr()), ::core::mem::transmute(object), ::core::mem::transmute(metadata.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn SetAt(&self, contextobject: P0, indexers: &[::core::option::Option], value: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).SetAt)(::windows_core::Interface::as_raw(self), contextobject.into_param().abi(), indexers.len() as _, ::core::mem::transmute(indexers.as_ptr()), value.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).SetAt)(::windows_core::Interface::as_raw(self), contextobject.into_param().abi(), indexers.len().try_into().unwrap(), ::core::mem::transmute(indexers.as_ptr()), value.into_param().abi()).ok() } } ::windows_core::imp::interface_hierarchy!(IIndexableConcept, ::windows_core::IUnknown); @@ -19339,7 +19339,7 @@ impl IModelIterator { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() } pub unsafe fn GetNext(&self, object: *mut ::core::option::Option, indexers: ::core::option::Option<&mut [::core::option::Option]>, metadata: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNext)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(object), indexers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(indexers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(metadata.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetNext)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(object), indexers.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(indexers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(metadata.unwrap_or(::std::ptr::null_mut()))).ok() } } ::windows_core::imp::interface_hierarchy!(IModelIterator, ::windows_core::IUnknown); @@ -19474,7 +19474,7 @@ impl IModelMethod { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).Call)(::windows_core::Interface::as_raw(self), pcontextobject.into_param().abi(), pparguments.len() as _, ::core::mem::transmute(pparguments.as_ptr()), ::core::mem::transmute(ppresult), ::core::mem::transmute(ppmetadata.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Call)(::windows_core::Interface::as_raw(self), pcontextobject.into_param().abi(), pparguments.len().try_into().unwrap(), ::core::mem::transmute(pparguments.as_ptr()), ::core::mem::transmute(ppresult), ::core::mem::transmute(ppmetadata.unwrap_or(::std::ptr::null_mut()))).ok() } } ::windows_core::imp::interface_hierarchy!(IModelMethod, ::windows_core::IUnknown); 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 8a91f8bcc9..b4109d675e 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 @@ -535,7 +535,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("imagehlp.dll" "system" fn ImageEnumerateCertificates(filehandle : super::super::super::Foundation:: HANDLE, typefilter : u16, certificatecount : *mut u32, indices : *mut u32, indexcount : u32) -> super::super::super::Foundation:: BOOL); - ImageEnumerateCertificates(filehandle.into_param().abi(), typefilter, certificatecount, ::core::mem::transmute(indices.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), indices.as_deref().map_or(0, |slice| slice.len() as _)).ok() + ImageEnumerateCertificates(filehandle.into_param().abi(), typefilter, certificatecount, ::core::mem::transmute(indices.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), indices.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Security_WinTrust\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_WinTrust"))] @@ -772,7 +772,7 @@ where #[inline] pub unsafe fn RaiseException(dwexceptioncode: u32, dwexceptionflags: u32, lparguments: ::core::option::Option<&[usize]>) { ::windows_targets::link!("kernel32.dll" "system" fn RaiseException(dwexceptioncode : u32, dwexceptionflags : u32, nnumberofarguments : u32, lparguments : *const usize) -> ()); - RaiseException(dwexceptioncode, dwexceptionflags, lparguments.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lparguments.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + RaiseException(dwexceptioncode, dwexceptionflags, lparguments.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lparguments.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Kernel\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Kernel"))] @@ -902,7 +902,7 @@ where #[inline] pub unsafe fn RtlAddFunctionTable(functiontable: &[IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY], baseaddress: usize) -> super::super::super::Foundation::BOOLEAN { ::windows_targets::link!("kernel32.dll" "system" fn RtlAddFunctionTable(functiontable : *const IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY, entrycount : u32, baseaddress : usize) -> super::super::super::Foundation:: BOOLEAN); - RtlAddFunctionTable(::core::mem::transmute(functiontable.as_ptr()), functiontable.len() as _, baseaddress) + RtlAddFunctionTable(::core::mem::transmute(functiontable.as_ptr()), functiontable.len().try_into().unwrap(), baseaddress) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(target_arch = "x86_64")] @@ -910,19 +910,19 @@ pub unsafe fn RtlAddFunctionTable(functiontable: &[IMAGE_ARM64_RUNTIME_FUNCTION_ #[inline] pub unsafe fn RtlAddFunctionTable(functiontable: &[IMAGE_RUNTIME_FUNCTION_ENTRY], baseaddress: u64) -> super::super::super::Foundation::BOOLEAN { ::windows_targets::link!("kernel32.dll" "system" fn RtlAddFunctionTable(functiontable : *const IMAGE_RUNTIME_FUNCTION_ENTRY, entrycount : u32, baseaddress : u64) -> super::super::super::Foundation:: BOOLEAN); - RtlAddFunctionTable(::core::mem::transmute(functiontable.as_ptr()), functiontable.len() as _, baseaddress) + RtlAddFunctionTable(::core::mem::transmute(functiontable.as_ptr()), functiontable.len().try_into().unwrap(), baseaddress) } #[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); - RtlAddGrowableFunctionTable(dynamictable, ::core::mem::transmute(functiontable.as_ptr()), entrycount, functiontable.len() as _, rangebase, rangeend) + RtlAddGrowableFunctionTable(dynamictable, ::core::mem::transmute(functiontable.as_ptr()), entrycount, functiontable.len().try_into().unwrap(), rangebase, rangeend) } #[cfg(target_arch = "x86_64")] #[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); - RtlAddGrowableFunctionTable(dynamictable, ::core::mem::transmute(functiontable.as_ptr()), entrycount, functiontable.len() as _, rangebase, rangeend) + RtlAddGrowableFunctionTable(dynamictable, ::core::mem::transmute(functiontable.as_ptr()), entrycount, functiontable.len().try_into().unwrap(), rangebase, rangeend) } #[doc = "Required features: `\"Win32_System_Kernel\"`"] #[cfg(feature = "Win32_System_Kernel")] @@ -942,7 +942,7 @@ pub unsafe fn RtlCaptureContext2(contextrecord: *mut CONTEXT) { #[inline] pub unsafe fn RtlCaptureStackBackTrace(framestoskip: u32, backtrace: &mut [*mut ::core::ffi::c_void], backtracehash: ::core::option::Option<*mut u32>) -> u16 { ::windows_targets::link!("kernel32.dll" "system" fn RtlCaptureStackBackTrace(framestoskip : u32, framestocapture : u32, backtrace : *mut *mut ::core::ffi::c_void, backtracehash : *mut u32) -> u16); - RtlCaptureStackBackTrace(framestoskip, backtrace.len() as _, ::core::mem::transmute(backtrace.as_ptr()), ::core::mem::transmute(backtracehash.unwrap_or(::std::ptr::null_mut()))) + RtlCaptureStackBackTrace(framestoskip, backtrace.len().try_into().unwrap(), ::core::mem::transmute(backtrace.as_ptr()), ::core::mem::transmute(backtracehash.unwrap_or(::std::ptr::null_mut()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(target_arch = "aarch64")] @@ -1195,7 +1195,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymAddSourceStream(hprocess : super::super::super::Foundation:: HANDLE, base : u64, streamfile : ::windows_core::PCSTR, buffer : *const u8, size : usize) -> super::super::super::Foundation:: BOOL); - SymAddSourceStream(hprocess.into_param().abi(), base, streamfile.into_param().abi(), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _)).ok() + SymAddSourceStream(hprocess.into_param().abi(), base, streamfile.into_param().abi(), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1206,7 +1206,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymAddSourceStreamA(hprocess : super::super::super::Foundation:: HANDLE, base : u64, streamfile : ::windows_core::PCSTR, buffer : *const u8, size : usize) -> super::super::super::Foundation:: BOOL); - SymAddSourceStreamA(hprocess.into_param().abi(), base, streamfile.into_param().abi(), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _)) + SymAddSourceStreamA(hprocess.into_param().abi(), base, streamfile.into_param().abi(), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1217,7 +1217,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymAddSourceStreamW(hprocess : super::super::super::Foundation:: HANDLE, base : u64, filespec : ::windows_core::PCWSTR, buffer : *const u8, size : usize) -> super::super::super::Foundation:: BOOL); - SymAddSourceStreamW(hprocess.into_param().abi(), base, filespec.into_param().abi(), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _)).ok() + SymAddSourceStreamW(hprocess.into_param().abi(), base, filespec.into_param().abi(), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1791,17 +1791,17 @@ where P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetFileLineOffsets64(hprocess : super::super::super::Foundation:: HANDLE, modulename : ::windows_core::PCSTR, filename : ::windows_core::PCSTR, buffer : *mut u64, bufferlines : u32) -> u32); - SymGetFileLineOffsets64(hprocess.into_param().abi(), modulename.into_param().abi(), filename.into_param().abi(), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _) + SymGetFileLineOffsets64(hprocess.into_param().abi(), modulename.into_param().abi(), filename.into_param().abi(), ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()) } #[inline] pub unsafe fn SymGetHomeDirectory(r#type: IMAGEHLP_HD_TYPE, dir: &mut [u8]) -> ::windows_core::PSTR { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetHomeDirectory(r#type : u32, dir : ::windows_core::PSTR, size : usize) -> ::windows_core::PSTR); - SymGetHomeDirectory(r#type.0 as _, ::core::mem::transmute(dir.as_ptr()), dir.len() as _) + SymGetHomeDirectory(r#type.0 as _, ::core::mem::transmute(dir.as_ptr()), dir.len().try_into().unwrap()) } #[inline] pub unsafe fn SymGetHomeDirectoryW(r#type: IMAGEHLP_HD_TYPE, dir: &mut [u16]) -> ::windows_core::PWSTR { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetHomeDirectoryW(r#type : u32, dir : ::windows_core::PWSTR, size : usize) -> ::windows_core::PWSTR); - SymGetHomeDirectoryW(r#type.0 as _, ::core::mem::transmute(dir.as_ptr()), dir.len() as _) + SymGetHomeDirectoryW(r#type.0 as _, ::core::mem::transmute(dir.as_ptr()), dir.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(target_arch = "x86")] @@ -2059,7 +2059,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSearchPath(hprocess : super::super::super::Foundation:: HANDLE, searchpatha : ::windows_core::PSTR, searchpathlength : u32) -> super::super::super::Foundation:: BOOL); - SymGetSearchPath(hprocess.into_param().abi(), ::core::mem::transmute(searchpatha.as_ptr()), searchpatha.len() as _).ok() + SymGetSearchPath(hprocess.into_param().abi(), ::core::mem::transmute(searchpatha.as_ptr()), searchpatha.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2069,7 +2069,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSearchPathW(hprocess : super::super::super::Foundation:: HANDLE, searchpatha : ::windows_core::PWSTR, searchpathlength : u32) -> super::super::super::Foundation:: BOOL); - SymGetSearchPathW(hprocess.into_param().abi(), ::core::mem::transmute(searchpatha.as_ptr()), searchpatha.len() as _).ok() + SymGetSearchPathW(hprocess.into_param().abi(), ::core::mem::transmute(searchpatha.as_ptr()), searchpatha.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2081,7 +2081,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSourceFile(hprocess : super::super::super::Foundation:: HANDLE, base : u64, params : ::windows_core::PCSTR, filespec : ::windows_core::PCSTR, filepath : ::windows_core::PSTR, size : u32) -> super::super::super::Foundation:: BOOL); - SymGetSourceFile(hprocess.into_param().abi(), base, params.into_param().abi(), filespec.into_param().abi(), ::core::mem::transmute(filepath.as_ptr()), filepath.len() as _).ok() + SymGetSourceFile(hprocess.into_param().abi(), base, params.into_param().abi(), filespec.into_param().abi(), ::core::mem::transmute(filepath.as_ptr()), filepath.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2092,7 +2092,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSourceFileChecksum(hprocess : super::super::super::Foundation:: HANDLE, base : u64, filespec : ::windows_core::PCSTR, pchecksumtype : *mut u32, pchecksum : *mut u8, checksumsize : u32, pactualbyteswritten : *mut u32) -> super::super::super::Foundation:: BOOL); - SymGetSourceFileChecksum(hprocess.into_param().abi(), base, filespec.into_param().abi(), pchecksumtype, ::core::mem::transmute(pchecksum.as_ptr()), pchecksum.len() as _, pactualbyteswritten).ok() + SymGetSourceFileChecksum(hprocess.into_param().abi(), base, filespec.into_param().abi(), pchecksumtype, ::core::mem::transmute(pchecksum.as_ptr()), pchecksum.len().try_into().unwrap(), pactualbyteswritten).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2103,7 +2103,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSourceFileChecksumW(hprocess : super::super::super::Foundation:: HANDLE, base : u64, filespec : ::windows_core::PCWSTR, pchecksumtype : *mut u32, pchecksum : *mut u8, checksumsize : u32, pactualbyteswritten : *mut u32) -> super::super::super::Foundation:: BOOL); - SymGetSourceFileChecksumW(hprocess.into_param().abi(), base, filespec.into_param().abi(), pchecksumtype, ::core::mem::transmute(pchecksum.as_ptr()), pchecksum.len() as _, pactualbyteswritten).ok() + SymGetSourceFileChecksumW(hprocess.into_param().abi(), base, filespec.into_param().abi(), pchecksumtype, ::core::mem::transmute(pchecksum.as_ptr()), pchecksum.len().try_into().unwrap(), pactualbyteswritten).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2114,7 +2114,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSourceFileFromToken(hprocess : super::super::super::Foundation:: HANDLE, token : *const ::core::ffi::c_void, params : ::windows_core::PCSTR, filepath : ::windows_core::PSTR, size : u32) -> super::super::super::Foundation:: BOOL); - SymGetSourceFileFromToken(hprocess.into_param().abi(), token, params.into_param().abi(), ::core::mem::transmute(filepath.as_ptr()), filepath.len() as _).ok() + SymGetSourceFileFromToken(hprocess.into_param().abi(), token, params.into_param().abi(), ::core::mem::transmute(filepath.as_ptr()), filepath.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2126,7 +2126,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSourceFileFromTokenByTokenName(hprocess : super::super::super::Foundation:: HANDLE, token : *const ::core::ffi::c_void, tokenname : ::windows_core::PCSTR, params : ::windows_core::PCSTR, filepath : ::windows_core::PSTR, size : u32) -> super::super::super::Foundation:: BOOL); - SymGetSourceFileFromTokenByTokenName(hprocess.into_param().abi(), token, tokenname.into_param().abi(), params.into_param().abi(), ::core::mem::transmute(filepath.as_ptr()), filepath.len() as _) + SymGetSourceFileFromTokenByTokenName(hprocess.into_param().abi(), token, tokenname.into_param().abi(), params.into_param().abi(), ::core::mem::transmute(filepath.as_ptr()), filepath.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2138,7 +2138,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSourceFileFromTokenByTokenNameW(hprocess : super::super::super::Foundation:: HANDLE, token : *const ::core::ffi::c_void, tokenname : ::windows_core::PCWSTR, params : ::windows_core::PCWSTR, filepath : ::windows_core::PWSTR, size : u32) -> super::super::super::Foundation:: BOOL); - SymGetSourceFileFromTokenByTokenNameW(hprocess.into_param().abi(), token, tokenname.into_param().abi(), params.into_param().abi(), ::core::mem::transmute(filepath.as_ptr()), filepath.len() as _) + SymGetSourceFileFromTokenByTokenNameW(hprocess.into_param().abi(), token, tokenname.into_param().abi(), params.into_param().abi(), ::core::mem::transmute(filepath.as_ptr()), filepath.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2149,7 +2149,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSourceFileFromTokenW(hprocess : super::super::super::Foundation:: HANDLE, token : *const ::core::ffi::c_void, params : ::windows_core::PCWSTR, filepath : ::windows_core::PWSTR, size : u32) -> super::super::super::Foundation:: BOOL); - SymGetSourceFileFromTokenW(hprocess.into_param().abi(), token, params.into_param().abi(), ::core::mem::transmute(filepath.as_ptr()), filepath.len() as _).ok() + SymGetSourceFileFromTokenW(hprocess.into_param().abi(), token, params.into_param().abi(), ::core::mem::transmute(filepath.as_ptr()), filepath.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2209,7 +2209,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSourceFileW(hprocess : super::super::super::Foundation:: HANDLE, base : u64, params : ::windows_core::PCWSTR, filespec : ::windows_core::PCWSTR, filepath : ::windows_core::PWSTR, size : u32) -> super::super::super::Foundation:: BOOL); - SymGetSourceFileW(hprocess.into_param().abi(), base, params.into_param().abi(), filespec.into_param().abi(), ::core::mem::transmute(filepath.as_ptr()), filepath.len() as _).ok() + SymGetSourceFileW(hprocess.into_param().abi(), base, params.into_param().abi(), filespec.into_param().abi(), ::core::mem::transmute(filepath.as_ptr()), filepath.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2221,7 +2221,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSourceVarFromToken(hprocess : super::super::super::Foundation:: HANDLE, token : *const ::core::ffi::c_void, params : ::windows_core::PCSTR, varname : ::windows_core::PCSTR, value : ::windows_core::PSTR, size : u32) -> super::super::super::Foundation:: BOOL); - SymGetSourceVarFromToken(hprocess.into_param().abi(), token, params.into_param().abi(), varname.into_param().abi(), ::core::mem::transmute(value.as_ptr()), value.len() as _).ok() + SymGetSourceVarFromToken(hprocess.into_param().abi(), token, params.into_param().abi(), varname.into_param().abi(), ::core::mem::transmute(value.as_ptr()), value.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2233,7 +2233,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSourceVarFromTokenW(hprocess : super::super::super::Foundation:: HANDLE, token : *const ::core::ffi::c_void, params : ::windows_core::PCWSTR, varname : ::windows_core::PCWSTR, value : ::windows_core::PWSTR, size : u32) -> super::super::super::Foundation:: BOOL); - SymGetSourceVarFromTokenW(hprocess.into_param().abi(), token, params.into_param().abi(), varname.into_param().abi(), ::core::mem::transmute(value.as_ptr()), value.len() as _).ok() + SymGetSourceVarFromTokenW(hprocess.into_param().abi(), token, params.into_param().abi(), varname.into_param().abi(), ::core::mem::transmute(value.as_ptr()), value.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(target_arch = "x86")] @@ -2331,7 +2331,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSymbolFile(hprocess : super::super::super::Foundation:: HANDLE, sympath : ::windows_core::PCSTR, imagefile : ::windows_core::PCSTR, r#type : u32, symbolfile : ::windows_core::PSTR, csymbolfile : usize, dbgfile : ::windows_core::PSTR, cdbgfile : usize) -> super::super::super::Foundation:: BOOL); - SymGetSymbolFile(hprocess.into_param().abi(), sympath.into_param().abi(), imagefile.into_param().abi(), r#type.0 as _, ::core::mem::transmute(symbolfile.as_ptr()), symbolfile.len() as _, ::core::mem::transmute(dbgfile.as_ptr()), dbgfile.len() as _).ok() + SymGetSymbolFile(hprocess.into_param().abi(), sympath.into_param().abi(), imagefile.into_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() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2343,7 +2343,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSymbolFileW(hprocess : super::super::super::Foundation:: HANDLE, sympath : ::windows_core::PCWSTR, imagefile : ::windows_core::PCWSTR, r#type : u32, symbolfile : ::windows_core::PWSTR, csymbolfile : usize, dbgfile : ::windows_core::PWSTR, cdbgfile : usize) -> super::super::super::Foundation:: BOOL); - SymGetSymbolFileW(hprocess.into_param().abi(), sympath.into_param().abi(), imagefile.into_param().abi(), r#type.0 as _, ::core::mem::transmute(symbolfile.as_ptr()), symbolfile.len() as _, ::core::mem::transmute(dbgfile.as_ptr()), dbgfile.len() as _).ok() + SymGetSymbolFileW(hprocess.into_param().abi(), sympath.into_param().abi(), imagefile.into_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() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2833,7 +2833,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymSrvGetFileIndexString(hprocess : super::super::super::Foundation:: HANDLE, srvpath : ::windows_core::PCSTR, file : ::windows_core::PCSTR, index : ::windows_core::PSTR, size : usize, flags : u32) -> super::super::super::Foundation:: BOOL); - SymSrvGetFileIndexString(hprocess.into_param().abi(), srvpath.into_param().abi(), file.into_param().abi(), ::core::mem::transmute(index.as_ptr()), index.len() as _, flags).ok() + SymSrvGetFileIndexString(hprocess.into_param().abi(), srvpath.into_param().abi(), file.into_param().abi(), ::core::mem::transmute(index.as_ptr()), index.len().try_into().unwrap(), flags).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2845,7 +2845,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymSrvGetFileIndexStringW(hprocess : super::super::super::Foundation:: HANDLE, srvpath : ::windows_core::PCWSTR, file : ::windows_core::PCWSTR, index : ::windows_core::PWSTR, size : usize, flags : u32) -> super::super::super::Foundation:: BOOL); - SymSrvGetFileIndexStringW(hprocess.into_param().abi(), srvpath.into_param().abi(), file.into_param().abi(), ::core::mem::transmute(index.as_ptr()), index.len() as _, flags).ok() + SymSrvGetFileIndexStringW(hprocess.into_param().abi(), srvpath.into_param().abi(), file.into_param().abi(), ::core::mem::transmute(index.as_ptr()), index.len().try_into().unwrap(), flags).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2971,14 +2971,14 @@ where #[inline] pub unsafe fn SymUnDName(sym: *const IMAGEHLP_SYMBOL, undecname: &mut [u8]) -> ::windows_core::Result<()> { ::windows_targets::link!("dbghelp.dll" "system" fn SymUnDName(sym : *const IMAGEHLP_SYMBOL, undecname : ::windows_core::PSTR, undecnamelength : u32) -> super::super::super::Foundation:: BOOL); - SymUnDName(sym, ::core::mem::transmute(undecname.as_ptr()), undecname.len() as _).ok() + SymUnDName(sym, ::core::mem::transmute(undecname.as_ptr()), undecname.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn SymUnDName64(sym: *const IMAGEHLP_SYMBOL64, undecname: &mut [u8]) -> ::windows_core::Result<()> { ::windows_targets::link!("dbghelp.dll" "system" fn SymUnDName64(sym : *const IMAGEHLP_SYMBOL64, undecname : ::windows_core::PSTR, undecnamelength : u32) -> super::super::super::Foundation:: BOOL); - SymUnDName64(sym, ::core::mem::transmute(undecname.as_ptr()), undecname.len() as _).ok() + SymUnDName64(sym, ::core::mem::transmute(undecname.as_ptr()), undecname.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(target_arch = "x86")] @@ -3022,7 +3022,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn UnDecorateSymbolName(name : ::windows_core::PCSTR, outputstring : ::windows_core::PSTR, maxstringlength : u32, flags : u32) -> u32); - UnDecorateSymbolName(name.into_param().abi(), ::core::mem::transmute(outputstring.as_ptr()), outputstring.len() as _, flags) + UnDecorateSymbolName(name.into_param().abi(), ::core::mem::transmute(outputstring.as_ptr()), outputstring.len().try_into().unwrap(), flags) } #[inline] pub unsafe fn UnDecorateSymbolNameW(name: P0, outputstring: &mut [u16], flags: u32) -> u32 @@ -3030,7 +3030,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn UnDecorateSymbolNameW(name : ::windows_core::PCWSTR, outputstring : ::windows_core::PWSTR, maxstringlength : u32, flags : u32) -> u32); - UnDecorateSymbolNameW(name.into_param().abi(), ::core::mem::transmute(outputstring.as_ptr()), outputstring.len() as _, flags) + UnDecorateSymbolNameW(name.into_param().abi(), ::core::mem::transmute(outputstring.as_ptr()), outputstring.len().try_into().unwrap(), flags) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Kernel\"`, `\"Win32_System_SystemInformation\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Kernel", feature = "Win32_System_SystemInformation"))] @@ -3335,7 +3335,7 @@ impl IEnumDebugExtendedPropertyInfo { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", 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<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgextendedpropertyinfo.len() as _, ::core::mem::transmute(rgextendedpropertyinfo.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgextendedpropertyinfo.len().try_into().unwrap(), ::core::mem::transmute(rgextendedpropertyinfo.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -3377,7 +3377,7 @@ pub struct IEnumDebugExtendedPropertyInfo_Vtbl { pub struct IEnumDebugPropertyInfo(::windows_core::IUnknown); impl IEnumDebugPropertyInfo { pub unsafe fn Next(&self, pi: &mut [DebugPropertyInfo], pceltsfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), pi.len() as _, ::core::mem::transmute(pi.as_ptr()), pceltsfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), pi.len().try_into().unwrap(), ::core::mem::transmute(pi.as_ptr()), pceltsfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() diff --git a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Etw/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Etw/mod.rs index 356056d1f7..5dd6c75c8b 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 @@ -70,7 +70,7 @@ pub unsafe fn EnableTraceEx2(tracehandle: CONTROLTRACE_HANDLE, providerid: *cons #[inline] pub unsafe fn EnumerateTraceGuids(guidpropertiesarray: &mut [*mut TRACE_GUID_PROPERTIES], guidcount: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn EnumerateTraceGuids(guidpropertiesarray : *mut *mut TRACE_GUID_PROPERTIES, propertyarraycount : u32, guidcount : *mut u32) -> super::super::super::Foundation:: WIN32_ERROR); - EnumerateTraceGuids(::core::mem::transmute(guidpropertiesarray.as_ptr()), guidpropertiesarray.len() as _, guidcount).ok() + EnumerateTraceGuids(::core::mem::transmute(guidpropertiesarray.as_ptr()), guidpropertiesarray.len().try_into().unwrap(), guidcount).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -139,12 +139,12 @@ pub unsafe fn EventUnregister(reghandle: u64) -> u32 { #[inline] pub unsafe fn EventWrite(reghandle: u64, eventdescriptor: *const EVENT_DESCRIPTOR, userdata: ::core::option::Option<&[EVENT_DATA_DESCRIPTOR]>) -> u32 { ::windows_targets::link!("advapi32.dll" "system" fn EventWrite(reghandle : u64, eventdescriptor : *const EVENT_DESCRIPTOR, userdatacount : u32, userdata : *const EVENT_DATA_DESCRIPTOR) -> u32); - EventWrite(reghandle, eventdescriptor, userdata.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(userdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + EventWrite(reghandle, eventdescriptor, userdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(userdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] pub unsafe fn EventWriteEx(reghandle: u64, eventdescriptor: *const EVENT_DESCRIPTOR, filter: u64, flags: u32, activityid: ::core::option::Option<*const ::windows_core::GUID>, relatedactivityid: ::core::option::Option<*const ::windows_core::GUID>, userdata: ::core::option::Option<&[EVENT_DATA_DESCRIPTOR]>) -> u32 { ::windows_targets::link!("advapi32.dll" "system" fn EventWriteEx(reghandle : u64, eventdescriptor : *const EVENT_DESCRIPTOR, filter : u64, flags : u32, activityid : *const ::windows_core::GUID, relatedactivityid : *const ::windows_core::GUID, userdatacount : u32, userdata : *const EVENT_DATA_DESCRIPTOR) -> u32); - EventWriteEx(reghandle, eventdescriptor, filter, flags, ::core::mem::transmute(activityid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(relatedactivityid.unwrap_or(::std::ptr::null())), userdata.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(userdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + EventWriteEx(reghandle, eventdescriptor, filter, flags, ::core::mem::transmute(activityid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(relatedactivityid.unwrap_or(::std::ptr::null())), userdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(userdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] pub unsafe fn EventWriteString(reghandle: u64, level: u8, keyword: u64, string: P0) -> u32 @@ -157,7 +157,7 @@ where #[inline] pub unsafe fn EventWriteTransfer(reghandle: u64, eventdescriptor: *const EVENT_DESCRIPTOR, activityid: ::core::option::Option<*const ::windows_core::GUID>, relatedactivityid: ::core::option::Option<*const ::windows_core::GUID>, userdata: ::core::option::Option<&[EVENT_DATA_DESCRIPTOR]>) -> u32 { ::windows_targets::link!("advapi32.dll" "system" fn EventWriteTransfer(reghandle : u64, eventdescriptor : *const EVENT_DESCRIPTOR, activityid : *const ::windows_core::GUID, relatedactivityid : *const ::windows_core::GUID, userdatacount : u32, userdata : *const EVENT_DATA_DESCRIPTOR) -> u32); - EventWriteTransfer(reghandle, eventdescriptor, ::core::mem::transmute(activityid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(relatedactivityid.unwrap_or(::std::ptr::null())), userdata.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(userdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + EventWriteTransfer(reghandle, eventdescriptor, ::core::mem::transmute(activityid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(relatedactivityid.unwrap_or(::std::ptr::null())), userdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(userdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -251,7 +251,7 @@ pub unsafe fn OpenTraceW(logfile: *mut EVENT_TRACE_LOGFILEW) -> PROCESSTRACE_HAN #[inline] pub unsafe fn ProcessTrace(handlearray: &[PROCESSTRACE_HANDLE], starttime: ::core::option::Option<*const super::super::super::Foundation::FILETIME>, endtime: ::core::option::Option<*const super::super::super::Foundation::FILETIME>) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn ProcessTrace(handlearray : *const PROCESSTRACE_HANDLE, handlecount : u32, starttime : *const super::super::super::Foundation:: FILETIME, endtime : *const super::super::super::Foundation:: FILETIME) -> super::super::super::Foundation:: WIN32_ERROR); - ProcessTrace(::core::mem::transmute(handlearray.as_ptr()), handlearray.len() as _, ::core::mem::transmute(starttime.unwrap_or(::std::ptr::null())), ::core::mem::transmute(endtime.unwrap_or(::std::ptr::null()))).ok() + ProcessTrace(::core::mem::transmute(handlearray.as_ptr()), handlearray.len().try_into().unwrap(), ::core::mem::transmute(starttime.unwrap_or(::std::ptr::null())), ::core::mem::transmute(endtime.unwrap_or(::std::ptr::null()))).ok() } #[inline] pub unsafe fn ProcessTraceAddBufferToBufferStream(tracehandle: u64, buffer: *const ETW_BUFFER_HEADER, buffersize: u32) -> u32 { @@ -273,14 +273,14 @@ pub unsafe fn ProcessTraceBufferIncrementReference(tracehandle: u64, buffer: *co #[inline] pub unsafe fn QueryAllTracesA(propertyarray: &mut [*mut EVENT_TRACE_PROPERTIES], loggercount: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn QueryAllTracesA(propertyarray : *mut *mut EVENT_TRACE_PROPERTIES, propertyarraycount : u32, loggercount : *mut u32) -> super::super::super::Foundation:: WIN32_ERROR); - QueryAllTracesA(::core::mem::transmute(propertyarray.as_ptr()), propertyarray.len() as _, loggercount).ok() + QueryAllTracesA(::core::mem::transmute(propertyarray.as_ptr()), propertyarray.len().try_into().unwrap(), loggercount).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn QueryAllTracesW(propertyarray: &mut [*mut EVENT_TRACE_PROPERTIES], loggercount: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn QueryAllTracesW(propertyarray : *mut *mut EVENT_TRACE_PROPERTIES, propertyarraycount : u32, loggercount : *mut u32) -> super::super::super::Foundation:: WIN32_ERROR); - QueryAllTracesW(::core::mem::transmute(propertyarray.as_ptr()), propertyarray.len() as _, loggercount).ok() + QueryAllTracesW(::core::mem::transmute(propertyarray.as_ptr()), propertyarray.len().try_into().unwrap(), loggercount).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -318,7 +318,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegisterTraceGuidsA(requestaddress : WMIDPREQUEST, requestcontext : *const ::core::ffi::c_void, controlguid : *const ::windows_core::GUID, guidcount : u32, traceguidreg : *const TRACE_GUID_REGISTRATION, mofimagepath : ::windows_core::PCSTR, mofresourcename : ::windows_core::PCSTR, registrationhandle : *mut u64) -> u32); - RegisterTraceGuidsA(requestaddress, ::core::mem::transmute(requestcontext.unwrap_or(::std::ptr::null())), controlguid, traceguidreg.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(traceguidreg.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), mofimagepath.into_param().abi(), mofresourcename.into_param().abi(), registrationhandle) + RegisterTraceGuidsA(requestaddress, ::core::mem::transmute(requestcontext.unwrap_or(::std::ptr::null())), controlguid, traceguidreg.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(traceguidreg.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), mofimagepath.into_param().abi(), mofresourcename.into_param().abi(), registrationhandle) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -329,7 +329,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegisterTraceGuidsW(requestaddress : WMIDPREQUEST, requestcontext : *const ::core::ffi::c_void, controlguid : *const ::windows_core::GUID, guidcount : u32, traceguidreg : *const TRACE_GUID_REGISTRATION, mofimagepath : ::windows_core::PCWSTR, mofresourcename : ::windows_core::PCWSTR, registrationhandle : *mut u64) -> u32); - RegisterTraceGuidsW(requestaddress, ::core::mem::transmute(requestcontext.unwrap_or(::std::ptr::null())), controlguid, traceguidreg.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(traceguidreg.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), mofimagepath.into_param().abi(), mofresourcename.into_param().abi(), registrationhandle) + RegisterTraceGuidsW(requestaddress, ::core::mem::transmute(requestcontext.unwrap_or(::std::ptr::null())), controlguid, traceguidreg.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(traceguidreg.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), mofimagepath.into_param().abi(), mofresourcename.into_param().abi(), registrationhandle) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -413,7 +413,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("tdh.dll" "system" fn TdhCreatePayloadFilter(providerguid : *const ::windows_core::GUID, eventdescriptor : *const EVENT_DESCRIPTOR, eventmatchany : super::super::super::Foundation:: BOOLEAN, payloadpredicatecount : u32, payloadpredicates : *const PAYLOAD_FILTER_PREDICATE, payloadfilter : *mut *mut ::core::ffi::c_void) -> u32); - TdhCreatePayloadFilter(providerguid, eventdescriptor, eventmatchany.into_param().abi(), payloadpredicates.len() as _, ::core::mem::transmute(payloadpredicates.as_ptr()), payloadfilter) + TdhCreatePayloadFilter(providerguid, eventdescriptor, eventmatchany.into_param().abi(), payloadpredicates.len().try_into().unwrap(), ::core::mem::transmute(payloadpredicates.as_ptr()), payloadfilter) } #[inline] pub unsafe fn TdhDeletePayloadFilter(payloadfilter: *mut *mut ::core::ffi::c_void) -> u32 { @@ -433,7 +433,7 @@ pub unsafe fn TdhEnumerateProviderFieldInformation(pguid: *const ::windows_core: #[inline] pub unsafe fn TdhEnumerateProviderFilters(guid: *const ::windows_core::GUID, tdhcontext: ::core::option::Option<&[TDH_CONTEXT]>, filtercount: *mut u32, buffer: ::core::option::Option<*mut *mut PROVIDER_FILTER_INFO>, buffersize: *mut u32) -> u32 { ::windows_targets::link!("tdh.dll" "system" fn TdhEnumerateProviderFilters(guid : *const ::windows_core::GUID, tdhcontextcount : u32, tdhcontext : *const TDH_CONTEXT, filtercount : *mut u32, buffer : *mut *mut PROVIDER_FILTER_INFO, buffersize : *mut u32) -> u32); - TdhEnumerateProviderFilters(guid, tdhcontext.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(tdhcontext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), filtercount, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize) + TdhEnumerateProviderFilters(guid, tdhcontext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(tdhcontext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), filtercount, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize) } #[inline] pub unsafe fn TdhEnumerateProviders(pbuffer: ::core::option::Option<*mut PROVIDER_ENUMERATION_INFO>, pbuffersize: *mut u32) -> u32 { @@ -448,7 +448,7 @@ pub unsafe fn TdhEnumerateProvidersForDecodingSource(filter: DECODING_SOURCE, bu #[inline] pub unsafe fn TdhFormatProperty(eventinfo: *const TRACE_EVENT_INFO, mapinfo: ::core::option::Option<*const EVENT_MAP_INFO>, pointersize: u32, propertyintype: u16, propertyouttype: u16, propertylength: u16, userdata: &[u8], buffersize: *mut u32, buffer: ::windows_core::PWSTR, userdataconsumed: *mut u16) -> u32 { ::windows_targets::link!("tdh.dll" "system" fn TdhFormatProperty(eventinfo : *const TRACE_EVENT_INFO, mapinfo : *const EVENT_MAP_INFO, pointersize : u32, propertyintype : u16, propertyouttype : u16, propertylength : u16, userdatalength : u16, userdata : *const u8, buffersize : *mut u32, buffer : ::windows_core::PWSTR, userdataconsumed : *mut u16) -> u32); - TdhFormatProperty(eventinfo, ::core::mem::transmute(mapinfo.unwrap_or(::std::ptr::null())), pointersize, propertyintype, propertyouttype, propertylength, userdata.len() as _, ::core::mem::transmute(userdata.as_ptr()), buffersize, ::core::mem::transmute(buffer), userdataconsumed) + TdhFormatProperty(eventinfo, ::core::mem::transmute(mapinfo.unwrap_or(::std::ptr::null())), pointersize, propertyintype, propertyouttype, propertylength, userdata.len().try_into().unwrap(), ::core::mem::transmute(userdata.as_ptr()), buffersize, ::core::mem::transmute(buffer), userdataconsumed) } #[inline] pub unsafe fn TdhGetDecodingParameter(handle: P0, tdhcontext: *mut TDH_CONTEXT) -> u32 @@ -461,7 +461,7 @@ where #[inline] pub unsafe fn TdhGetEventInformation(event: *const EVENT_RECORD, tdhcontext: ::core::option::Option<&[TDH_CONTEXT]>, buffer: ::core::option::Option<*mut TRACE_EVENT_INFO>, buffersize: *mut u32) -> u32 { ::windows_targets::link!("tdh.dll" "system" fn TdhGetEventInformation(event : *const EVENT_RECORD, tdhcontextcount : u32, tdhcontext : *const TDH_CONTEXT, buffer : *mut TRACE_EVENT_INFO, buffersize : *mut u32) -> u32); - TdhGetEventInformation(event, tdhcontext.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(tdhcontext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize) + TdhGetEventInformation(event, tdhcontext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(tdhcontext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize) } #[inline] pub unsafe fn TdhGetEventMapInformation(pevent: *const EVENT_RECORD, pmapname: P0, pbuffer: ::core::option::Option<*mut EVENT_MAP_INFO>, pbuffersize: *mut u32) -> u32 @@ -479,12 +479,12 @@ pub unsafe fn TdhGetManifestEventInformation(providerguid: *const ::windows_core #[inline] pub unsafe fn TdhGetProperty(pevent: *const EVENT_RECORD, ptdhcontext: ::core::option::Option<&[TDH_CONTEXT]>, ppropertydata: &[PROPERTY_DATA_DESCRIPTOR], pbuffer: &mut [u8]) -> u32 { ::windows_targets::link!("tdh.dll" "system" fn TdhGetProperty(pevent : *const EVENT_RECORD, tdhcontextcount : u32, ptdhcontext : *const TDH_CONTEXT, propertydatacount : u32, ppropertydata : *const PROPERTY_DATA_DESCRIPTOR, buffersize : u32, pbuffer : *mut u8) -> u32); - TdhGetProperty(pevent, ptdhcontext.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ptdhcontext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppropertydata.len() as _, ::core::mem::transmute(ppropertydata.as_ptr()), pbuffer.len() as _, ::core::mem::transmute(pbuffer.as_ptr())) + TdhGetProperty(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()), pbuffer.len().try_into().unwrap(), ::core::mem::transmute(pbuffer.as_ptr())) } #[inline] pub unsafe fn TdhGetPropertySize(pevent: *const EVENT_RECORD, ptdhcontext: ::core::option::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); - TdhGetPropertySize(pevent, ptdhcontext.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ptdhcontext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ppropertydata.len() as _, ::core::mem::transmute(ppropertydata.as_ptr()), ppropertysize) + 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) } #[inline] pub unsafe fn TdhGetWppMessage(handle: P0, eventrecord: *const EVENT_RECORD, buffersize: *mut u32, buffer: *mut u8) -> u32 @@ -639,7 +639,7 @@ impl ITraceEvent { (::windows_core::Interface::vtable(self).GetEventRecord)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn SetPayload(&self, payload: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetPayload)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(payload.as_ptr()), payload.len() as _).ok() + (::windows_core::Interface::vtable(self).SetPayload)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(payload.as_ptr()), payload.len().try_into().unwrap()).ok() } pub unsafe fn SetEventDescriptor(&self, eventdescriptor: *const EVENT_DESCRIPTOR) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).SetEventDescriptor)(::windows_core::Interface::as_raw(self), eventdescriptor).ok() 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 ab6db7e9a3..f03cab2b5d 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 @@ -83,7 +83,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn PssWalkSnapshot(snapshothandle : HPSS, informationclass : PSS_WALK_INFORMATION_CLASS, walkmarkerhandle : HPSSWALK, buffer : *mut ::core::ffi::c_void, bufferlength : u32) -> u32); - PssWalkSnapshot(snapshothandle.into_param().abi(), informationclass, walkmarkerhandle.into_param().abi(), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _)) + PssWalkSnapshot(snapshothandle.into_param().abi(), informationclass, walkmarkerhandle.into_param().abi(), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } pub const PSS_CAPTURE_HANDLES: PSS_CAPTURE_FLAGS = PSS_CAPTURE_FLAGS(4u32); pub const PSS_CAPTURE_HANDLE_BASIC_INFORMATION: PSS_CAPTURE_FLAGS = PSS_CAPTURE_FLAGS(16u32); 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 fc6f0b5f84..a420a49222 100644 --- a/crates/libs/windows/src/Windows/Win32/System/DistributedTransactionCoordinator/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/DistributedTransactionCoordinator/mod.rs @@ -39,10 +39,10 @@ where pub struct IDtcLuConfigure(::windows_core::IUnknown); impl IDtcLuConfigure { pub unsafe fn Add(&self, puclupair: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Add)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(puclupair.as_ptr()), puclupair.len() as _).ok() + (::windows_core::Interface::vtable(self).Add)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(puclupair.as_ptr()), puclupair.len().try_into().unwrap()).ok() } pub unsafe fn Delete(&self, puclupair: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Delete)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(puclupair.as_ptr()), puclupair.len() as _).ok() + (::windows_core::Interface::vtable(self).Delete)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(puclupair.as_ptr()), puclupair.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(IDtcLuConfigure, ::windows_core::IUnknown); @@ -81,7 +81,7 @@ pub struct IDtcLuRecoveryFactory(::windows_core::IUnknown); impl IDtcLuRecoveryFactory { pub unsafe fn Create(&self, puclupair: &[u8]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).Create)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(puclupair.as_ptr()), puclupair.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).Create)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(puclupair.as_ptr()), puclupair.len().try_into().unwrap(), &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IDtcLuRecoveryFactory, ::windows_core::IUnknown); @@ -1211,7 +1211,7 @@ pub struct IKernelTransaction_Vtbl { pub struct ILastResourceManager(::windows_core::IUnknown); impl ILastResourceManager { pub unsafe fn TransactionCommitted(&self, pprepinfo: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).TransactionCommitted)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pprepinfo.as_ptr()), pprepinfo.len() as _).ok() + (::windows_core::Interface::vtable(self).TransactionCommitted)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pprepinfo.as_ptr()), pprepinfo.len().try_into().unwrap()).ok() } pub unsafe fn RecoveryDone(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).RecoveryDone)(::windows_core::Interface::as_raw(self)).ok() @@ -1265,7 +1265,7 @@ impl IPrepareInfo2 { (::windows_core::Interface::vtable(self).GetPrepareInfoSize)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetPrepareInfo(&self, pprepinfo: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPrepareInfo)(::windows_core::Interface::as_raw(self), pprepinfo.len() as _, ::core::mem::transmute(pprepinfo.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetPrepareInfo)(::windows_core::Interface::as_raw(self), pprepinfo.len().try_into().unwrap(), ::core::mem::transmute(pprepinfo.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IPrepareInfo2, ::windows_core::IUnknown); @@ -1330,7 +1330,7 @@ impl IResourceManager { } pub unsafe fn Reenlist(&self, pprepinfo: &[u8], ltimeout: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).Reenlist)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pprepinfo.as_ptr()), pprepinfo.len() as _, ltimeout, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).Reenlist)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pprepinfo.as_ptr()), pprepinfo.len().try_into().unwrap(), ltimeout, &mut result__).from_abi(result__) } pub unsafe fn ReenlistmentComplete(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).ReenlistmentComplete)(::windows_core::Interface::as_raw(self)).ok() @@ -1368,7 +1368,7 @@ impl IResourceManager2 { } pub unsafe fn Reenlist(&self, pprepinfo: &[u8], ltimeout: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.Reenlist)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pprepinfo.as_ptr()), pprepinfo.len() as _, ltimeout, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.Reenlist)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pprepinfo.as_ptr()), pprepinfo.len().try_into().unwrap(), ltimeout, &mut result__).from_abi(result__) } pub unsafe fn ReenlistmentComplete(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.ReenlistmentComplete)(::windows_core::Interface::as_raw(self)).ok() @@ -1474,7 +1474,7 @@ impl IResourceManagerRejoinable { } pub unsafe fn Reenlist(&self, pprepinfo: &[u8], ltimeout: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.Reenlist)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pprepinfo.as_ptr()), pprepinfo.len() as _, ltimeout, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.Reenlist)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pprepinfo.as_ptr()), pprepinfo.len().try_into().unwrap(), ltimeout, &mut result__).from_abi(result__) } pub unsafe fn ReenlistmentComplete(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.ReenlistmentComplete)(::windows_core::Interface::as_raw(self)).ok() @@ -1495,7 +1495,7 @@ impl IResourceManagerRejoinable { } pub unsafe fn Rejoin(&self, pprepinfo: &[u8], ltimeout: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).Rejoin)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pprepinfo.as_ptr()), pprepinfo.len() as _, ltimeout, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).Rejoin)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pprepinfo.as_ptr()), pprepinfo.len().try_into().unwrap(), ltimeout, &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IResourceManagerRejoinable, ::windows_core::IUnknown, IResourceManager, IResourceManager2); @@ -1857,7 +1857,7 @@ impl ITransactionExport { where P0: ::windows_core::IntoParam<::windows_core::IUnknown>, { - (::windows_core::Interface::vtable(self).GetTransactionCookie)(::windows_core::Interface::as_raw(self), punktransaction.into_param().abi(), rgbtransactioncookie.len() as _, ::core::mem::transmute(rgbtransactioncookie.as_ptr()), pcbused).ok() + (::windows_core::Interface::vtable(self).GetTransactionCookie)(::windows_core::Interface::as_raw(self), punktransaction.into_param().abi(), rgbtransactioncookie.len().try_into().unwrap(), ::core::mem::transmute(rgbtransactioncookie.as_ptr()), pcbused).ok() } } ::windows_core::imp::interface_hierarchy!(ITransactionExport, ::windows_core::IUnknown); @@ -1884,7 +1884,7 @@ impl ITransactionExportFactory { } pub unsafe fn Create(&self, rgbwhereabouts: &[u8]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).Create)(::windows_core::Interface::as_raw(self), rgbwhereabouts.len() as _, ::core::mem::transmute(rgbwhereabouts.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).Create)(::windows_core::Interface::as_raw(self), rgbwhereabouts.len().try_into().unwrap(), ::core::mem::transmute(rgbwhereabouts.as_ptr()), &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(ITransactionExportFactory, ::windows_core::IUnknown); @@ -1910,7 +1910,7 @@ impl ITransactionImport { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).Import)(::windows_core::Interface::as_raw(self), rgbtransactioncookie.len() as _, ::core::mem::transmute(rgbtransactioncookie.as_ptr()), &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).Import)(::windows_core::Interface::as_raw(self), rgbtransactioncookie.len().try_into().unwrap(), ::core::mem::transmute(rgbtransactioncookie.as_ptr()), &::IID, &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(ITransactionImport, ::windows_core::IUnknown); @@ -1935,7 +1935,7 @@ impl ITransactionImportWhereabouts { (::windows_core::Interface::vtable(self).GetWhereaboutsSize)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetWhereabouts(&self, rgbwhereabouts: &mut [u8], pcbused: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetWhereabouts)(::windows_core::Interface::as_raw(self), rgbwhereabouts.len() as _, ::core::mem::transmute(rgbwhereabouts.as_ptr()), pcbused).ok() + (::windows_core::Interface::vtable(self).GetWhereabouts)(::windows_core::Interface::as_raw(self), rgbwhereabouts.len().try_into().unwrap(), ::core::mem::transmute(rgbwhereabouts.as_ptr()), pcbused).ok() } } ::windows_core::imp::interface_hierarchy!(ITransactionImportWhereabouts, ::windows_core::IUnknown); @@ -2174,14 +2174,14 @@ pub struct ITransactionReceiver(::windows_core::IUnknown); impl ITransactionReceiver { pub unsafe fn UnmarshalPropagationToken(&self, rgbtoken: &[u8]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).UnmarshalPropagationToken)(::windows_core::Interface::as_raw(self), rgbtoken.len() as _, ::core::mem::transmute(rgbtoken.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).UnmarshalPropagationToken)(::windows_core::Interface::as_raw(self), rgbtoken.len().try_into().unwrap(), ::core::mem::transmute(rgbtoken.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn GetReturnTokenSize(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).GetReturnTokenSize)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn MarshalReturnToken(&self, rgbreturntoken: &mut [u8], pcbused: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).MarshalReturnToken)(::windows_core::Interface::as_raw(self), rgbreturntoken.len() as _, ::core::mem::transmute(rgbreturntoken.as_ptr()), pcbused).ok() + (::windows_core::Interface::vtable(self).MarshalReturnToken)(::windows_core::Interface::as_raw(self), rgbreturntoken.len().try_into().unwrap(), ::core::mem::transmute(rgbreturntoken.as_ptr()), pcbused).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -2342,10 +2342,10 @@ impl ITransactionTransmitter { (::windows_core::Interface::vtable(self).GetPropagationTokenSize)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn MarshalPropagationToken(&self, rgbtoken: &mut [u8], pcbused: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).MarshalPropagationToken)(::windows_core::Interface::as_raw(self), rgbtoken.len() as _, ::core::mem::transmute(rgbtoken.as_ptr()), pcbused).ok() + (::windows_core::Interface::vtable(self).MarshalPropagationToken)(::windows_core::Interface::as_raw(self), rgbtoken.len().try_into().unwrap(), ::core::mem::transmute(rgbtoken.as_ptr()), pcbused).ok() } pub unsafe fn UnmarshalReturnToken(&self, rgbreturntoken: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).UnmarshalReturnToken)(::windows_core::Interface::as_raw(self), rgbreturntoken.len() as _, ::core::mem::transmute(rgbreturntoken.as_ptr())).ok() + (::windows_core::Interface::vtable(self).UnmarshalReturnToken)(::windows_core::Interface::as_raw(self), rgbreturntoken.len().try_into().unwrap(), ::core::mem::transmute(rgbreturntoken.as_ptr())).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/System/Environment/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Environment/mod.rs index 1b6f408f5f..3ea8d31be1 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Environment/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Environment/mod.rs @@ -74,7 +74,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn ExpandEnvironmentStringsA(lpsrc : ::windows_core::PCSTR, lpdst : ::windows_core::PSTR, nsize : u32) -> u32); - ExpandEnvironmentStringsA(lpsrc.into_param().abi(), ::core::mem::transmute(lpdst.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpdst.as_deref().map_or(0, |slice| slice.len() as _)) + ExpandEnvironmentStringsA(lpsrc.into_param().abi(), ::core::mem::transmute(lpdst.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpdst.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -85,7 +85,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("userenv.dll" "system" fn ExpandEnvironmentStringsForUserA(htoken : super::super::Foundation:: HANDLE, lpsrc : ::windows_core::PCSTR, lpdest : ::windows_core::PSTR, dwsize : u32) -> super::super::Foundation:: BOOL); - ExpandEnvironmentStringsForUserA(htoken.into_param().abi(), lpsrc.into_param().abi(), ::core::mem::transmute(lpdest.as_ptr()), lpdest.len() as _).ok() + ExpandEnvironmentStringsForUserA(htoken.into_param().abi(), lpsrc.into_param().abi(), ::core::mem::transmute(lpdest.as_ptr()), lpdest.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -96,7 +96,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("userenv.dll" "system" fn ExpandEnvironmentStringsForUserW(htoken : super::super::Foundation:: HANDLE, lpsrc : ::windows_core::PCWSTR, lpdest : ::windows_core::PWSTR, dwsize : u32) -> super::super::Foundation:: BOOL); - ExpandEnvironmentStringsForUserW(htoken.into_param().abi(), lpsrc.into_param().abi(), ::core::mem::transmute(lpdest.as_ptr()), lpdest.len() as _).ok() + ExpandEnvironmentStringsForUserW(htoken.into_param().abi(), lpsrc.into_param().abi(), ::core::mem::transmute(lpdest.as_ptr()), lpdest.len().try_into().unwrap()).ok() } #[inline] pub unsafe fn ExpandEnvironmentStringsW(lpsrc: P0, lpdst: ::core::option::Option<&mut [u16]>) -> u32 @@ -104,7 +104,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn ExpandEnvironmentStringsW(lpsrc : ::windows_core::PCWSTR, lpdst : ::windows_core::PWSTR, nsize : u32) -> u32); - ExpandEnvironmentStringsW(lpsrc.into_param().abi(), ::core::mem::transmute(lpdst.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpdst.as_deref().map_or(0, |slice| slice.len() as _)) + ExpandEnvironmentStringsW(lpsrc.into_param().abi(), ::core::mem::transmute(lpdst.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpdst.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -139,12 +139,12 @@ pub unsafe fn GetCommandLineW() -> ::windows_core::PCWSTR { #[inline] pub unsafe fn GetCurrentDirectoryA(lpbuffer: ::core::option::Option<&mut [u8]>) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn GetCurrentDirectoryA(nbufferlength : u32, lpbuffer : ::windows_core::PSTR) -> u32); - GetCurrentDirectoryA(lpbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + GetCurrentDirectoryA(lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] pub unsafe fn GetCurrentDirectoryW(lpbuffer: ::core::option::Option<&mut [u16]>) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn GetCurrentDirectoryW(nbufferlength : u32, lpbuffer : ::windows_core::PWSTR) -> u32); - GetCurrentDirectoryW(lpbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + GetCurrentDirectoryW(lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] pub unsafe fn GetEnvironmentStrings() -> ::windows_core::PSTR { @@ -162,7 +162,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetEnvironmentVariableA(lpname : ::windows_core::PCSTR, lpbuffer : ::windows_core::PSTR, nsize : u32) -> u32); - GetEnvironmentVariableA(lpname.into_param().abi(), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _)) + GetEnvironmentVariableA(lpname.into_param().abi(), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetEnvironmentVariableW(lpname: P0, lpbuffer: ::core::option::Option<&mut [u16]>) -> u32 @@ -170,7 +170,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetEnvironmentVariableW(lpname : ::windows_core::PCWSTR, lpbuffer : ::windows_core::PWSTR, nsize : u32) -> u32); - GetEnvironmentVariableW(lpname.into_param().abi(), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _)) + GetEnvironmentVariableW(lpname.into_param().abi(), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 4ef7840643..140423dfad 100644 --- a/crates/libs/windows/src/Windows/Win32/System/EventCollector/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/EventCollector/mod.rs @@ -20,7 +20,7 @@ where #[inline] pub unsafe fn EcEnumNextSubscription(subscriptionenum: isize, subscriptionnamebuffer: ::core::option::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); - EcEnumNextSubscription(subscriptionenum, subscriptionnamebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(subscriptionnamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), subscriptionnamebufferused) + 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) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 1bf651aad3..c15ea2fe5f 100644 --- a/crates/libs/windows/src/Windows/Win32/System/EventLog/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/EventLog/mod.rs @@ -117,7 +117,7 @@ where #[inline] pub unsafe fn EvtCreateRenderContext(valuepaths: ::core::option::Option<&[::windows_core::PCWSTR]>, flags: u32) -> ::windows_core::Result { ::windows_targets::link!("wevtapi.dll" "system" fn EvtCreateRenderContext(valuepathscount : u32, valuepaths : *const ::windows_core::PCWSTR, flags : u32) -> EVT_HANDLE); - let result__ = EvtCreateRenderContext(valuepaths.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(valuepaths.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), flags); + let result__ = EvtCreateRenderContext(valuepaths.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(valuepaths.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), flags); (!result__.is_invalid()).then(|| result__).ok_or_else(::windows_core::Error::from_win32) } #[doc = "Required features: `\"Win32_Foundation\"`"] @@ -142,7 +142,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("wevtapi.dll" "system" fn EvtFormatMessage(publishermetadata : EVT_HANDLE, event : EVT_HANDLE, messageid : u32, valuecount : u32, values : *const EVT_VARIANT, flags : u32, buffersize : u32, buffer : ::windows_core::PWSTR, bufferused : *mut u32) -> super::super::Foundation:: BOOL); - EvtFormatMessage(publishermetadata.into_param().abi(), event.into_param().abi(), messageid, values.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(values.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), flags, buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), bufferused).ok() + EvtFormatMessage(publishermetadata.into_param().abi(), event.into_param().abi(), 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).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -177,7 +177,7 @@ where #[inline] pub unsafe fn EvtGetExtendedStatus(buffer: ::core::option::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); - EvtGetExtendedStatus(buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), bufferused) + 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) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -231,7 +231,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wevtapi.dll" "system" fn EvtNext(resultset : EVT_HANDLE, eventssize : u32, events : *mut isize, timeout : u32, flags : u32, returned : *mut u32) -> super::super::Foundation:: BOOL); - EvtNext(resultset.into_param().abi(), events.len() as _, ::core::mem::transmute(events.as_ptr()), timeout, flags, returned).ok() + EvtNext(resultset.into_param().abi(), events.len().try_into().unwrap(), ::core::mem::transmute(events.as_ptr()), timeout, flags, returned).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -241,7 +241,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wevtapi.dll" "system" fn EvtNextChannelPath(channelenum : EVT_HANDLE, channelpathbuffersize : u32, channelpathbuffer : ::windows_core::PWSTR, channelpathbufferused : *mut u32) -> super::super::Foundation:: BOOL); - EvtNextChannelPath(channelenum.into_param().abi(), channelpathbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(channelpathbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), channelpathbufferused).ok() + EvtNextChannelPath(channelenum.into_param().abi(), channelpathbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(channelpathbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), channelpathbufferused).ok() } #[inline] pub unsafe fn EvtNextEventMetadata(eventmetadataenum: P0, flags: u32) -> ::windows_core::Result @@ -260,7 +260,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wevtapi.dll" "system" fn EvtNextPublisherId(publisherenum : EVT_HANDLE, publisheridbuffersize : u32, publisheridbuffer : ::windows_core::PWSTR, publisheridbufferused : *mut u32) -> super::super::Foundation:: BOOL); - EvtNextPublisherId(publisherenum.into_param().abi(), publisheridbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(publisheridbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), publisheridbufferused).ok() + EvtNextPublisherId(publisherenum.into_param().abi(), publisheridbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(publisheridbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), publisheridbufferused).ok() } #[inline] pub unsafe fn EvtOpenChannelConfig(session: P0, channelpath: P1, flags: u32) -> ::windows_core::Result @@ -547,7 +547,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn ReportEventA(heventlog : super::super::Foundation:: HANDLE, wtype : REPORT_EVENT_TYPE, wcategory : u16, dweventid : u32, lpusersid : super::super::Foundation:: PSID, wnumstrings : u16, dwdatasize : u32, lpstrings : *const ::windows_core::PCSTR, lprawdata : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - ReportEventA(heventlog.into_param().abi(), wtype, wcategory, dweventid, lpusersid.into_param().abi(), lpstrings.as_deref().map_or(0, |slice| slice.len() as _), dwdatasize, ::core::mem::transmute(lpstrings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(lprawdata.unwrap_or(::std::ptr::null()))).ok() + ReportEventA(heventlog.into_param().abi(), wtype, wcategory, dweventid, lpusersid.into_param().abi(), lpstrings.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), dwdatasize, ::core::mem::transmute(lpstrings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(lprawdata.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -558,7 +558,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn ReportEventW(heventlog : super::super::Foundation:: HANDLE, wtype : REPORT_EVENT_TYPE, wcategory : u16, dweventid : u32, lpusersid : super::super::Foundation:: PSID, wnumstrings : u16, dwdatasize : u32, lpstrings : *const ::windows_core::PCWSTR, lprawdata : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - ReportEventW(heventlog.into_param().abi(), wtype, wcategory, dweventid, lpusersid.into_param().abi(), lpstrings.as_deref().map_or(0, |slice| slice.len() as _), dwdatasize, ::core::mem::transmute(lpstrings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(lprawdata.unwrap_or(::std::ptr::null()))).ok() + ReportEventW(heventlog.into_param().abi(), wtype, wcategory, dweventid, lpusersid.into_param().abi(), lpstrings.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), dwdatasize, ::core::mem::transmute(lpstrings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(lprawdata.unwrap_or(::std::ptr::null()))).ok() } pub const EVENTLOG_AUDIT_FAILURE: REPORT_EVENT_TYPE = REPORT_EVENT_TYPE(16u16); pub const EVENTLOG_AUDIT_SUCCESS: REPORT_EVENT_TYPE = REPORT_EVENT_TYPE(8u16); diff --git a/crates/libs/windows/src/Windows/Win32/System/GroupPolicy/mod.rs b/crates/libs/windows/src/Windows/Win32/System/GroupPolicy/mod.rs index 2730c77cd4..da32444f59 100644 --- a/crates/libs/windows/src/Windows/Win32/System/GroupPolicy/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/GroupPolicy/mod.rs @@ -241,7 +241,20 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("userenv.dll" "system" fn RsopAccessCheckByType(psecuritydescriptor : super::super::Security:: PSECURITY_DESCRIPTOR, pprincipalselfsid : super::super::Foundation:: PSID, prsoptoken : *const ::core::ffi::c_void, dwdesiredaccessmask : u32, pobjecttypelist : *const super::super::Security:: OBJECT_TYPE_LIST, objecttypelistlength : u32, pgenericmapping : *const super::super::Security:: GENERIC_MAPPING, pprivilegeset : *const super::super::Security:: PRIVILEGE_SET, pdwprivilegesetlength : *const u32, pdwgrantedaccessmask : *mut u32, pbaccessstatus : *mut super::super::Foundation:: BOOL) -> ::windows_core::HRESULT); - RsopAccessCheckByType(psecuritydescriptor.into_param().abi(), pprincipalselfsid.into_param().abi(), prsoptoken, dwdesiredaccessmask, ::core::mem::transmute(pobjecttypelist.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pobjecttypelist.as_deref().map_or(0, |slice| slice.len() as _), pgenericmapping, ::core::mem::transmute(pprivilegeset.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pdwprivilegesetlength.unwrap_or(::std::ptr::null())), pdwgrantedaccessmask, pbaccessstatus).ok() + RsopAccessCheckByType( + psecuritydescriptor.into_param().abi(), + pprincipalselfsid.into_param().abi(), + prsoptoken, + dwdesiredaccessmask, + ::core::mem::transmute(pobjecttypelist.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), + pobjecttypelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), + pgenericmapping, + ::core::mem::transmute(pprivilegeset.unwrap_or(::std::ptr::null())), + ::core::mem::transmute(pdwprivilegesetlength.unwrap_or(::std::ptr::null())), + pdwgrantedaccessmask, + pbaccessstatus, + ) + .ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -273,7 +286,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("userenv.dll" "system" fn RsopSetPolicySettingStatus(dwflags : u32, pservices : * mut::core::ffi::c_void, psettinginstance : * mut::core::ffi::c_void, ninfo : u32, pstatus : *const POLICYSETTINGSTATUSINFO) -> ::windows_core::HRESULT); - RsopSetPolicySettingStatus(dwflags, pservices.into_param().abi(), psettinginstance.into_param().abi(), pstatus.len() as _, ::core::mem::transmute(pstatus.as_ptr())).ok() + RsopSetPolicySettingStatus(dwflags, pservices.into_param().abi(), psettinginstance.into_param().abi(), pstatus.len().try_into().unwrap(), ::core::mem::transmute(pstatus.as_ptr())).ok() } #[inline] pub unsafe fn UninstallApplication(productcode: P0, dwstatus: u32) -> u32 @@ -298,10 +311,10 @@ where pub struct IGPEInformation(::windows_core::IUnknown); impl IGPEInformation { pub unsafe fn GetName(&self, pszname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszname.as_ptr()), pszname.len() as _).ok() + (::windows_core::Interface::vtable(self).GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszname.as_ptr()), pszname.len().try_into().unwrap()).ok() } pub unsafe fn GetDisplayName(&self, pszname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDisplayName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszname.as_ptr()), pszname.len() as _).ok() + (::windows_core::Interface::vtable(self).GetDisplayName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszname.as_ptr()), pszname.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_System_Registry\"`"] #[cfg(feature = "Win32_System_Registry")] @@ -309,10 +322,10 @@ impl IGPEInformation { (::windows_core::Interface::vtable(self).GetRegistryKey)(::windows_core::Interface::as_raw(self), dwsection, hkey).ok() } pub unsafe fn GetDSPath(&self, dwsection: u32, pszpath: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDSPath)(::windows_core::Interface::as_raw(self), dwsection, ::core::mem::transmute(pszpath.as_ptr()), pszpath.len() as _).ok() + (::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() } pub unsafe fn GetFileSysPath(&self, dwsection: u32, pszpath: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetFileSysPath)(::windows_core::Interface::as_raw(self), dwsection, ::core::mem::transmute(pszpath.as_ptr()), pszpath.len() as _).ok() + (::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<()> { (::windows_core::Interface::vtable(self).GetOptions)(::windows_core::Interface::as_raw(self), dwoptions).ok() @@ -4757,10 +4770,10 @@ impl IGroupPolicyObject { (::windows_core::Interface::vtable(self).Delete)(::windows_core::Interface::as_raw(self)).ok() } pub unsafe fn GetName(&self, pszname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszname.as_ptr()), pszname.len() as _).ok() + (::windows_core::Interface::vtable(self).GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszname.as_ptr()), pszname.len().try_into().unwrap()).ok() } pub unsafe fn GetDisplayName(&self, pszname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDisplayName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszname.as_ptr()), pszname.len() as _).ok() + (::windows_core::Interface::vtable(self).GetDisplayName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszname.as_ptr()), pszname.len().try_into().unwrap()).ok() } pub unsafe fn SetDisplayName(&self, pszname: P0) -> ::windows_core::Result<()> where @@ -4769,13 +4782,13 @@ impl IGroupPolicyObject { (::windows_core::Interface::vtable(self).SetDisplayName)(::windows_core::Interface::as_raw(self), pszname.into_param().abi()).ok() } pub unsafe fn GetPath(&self, pszpath: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszpath.as_ptr()), pszpath.len() as _).ok() + (::windows_core::Interface::vtable(self).GetPath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszpath.as_ptr()), pszpath.len().try_into().unwrap()).ok() } pub unsafe fn GetDSPath(&self, dwsection: u32, pszpath: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDSPath)(::windows_core::Interface::as_raw(self), dwsection, ::core::mem::transmute(pszpath.as_ptr()), pszpath.len() as _).ok() + (::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() } pub unsafe fn GetFileSysPath(&self, dwsection: u32, pszpath: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetFileSysPath)(::windows_core::Interface::as_raw(self), dwsection, ::core::mem::transmute(pszpath.as_ptr()), pszpath.len() as _).ok() + (::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() } #[doc = "Required features: `\"Win32_System_Registry\"`"] #[cfg(feature = "Win32_System_Registry")] @@ -4792,7 +4805,7 @@ impl IGroupPolicyObject { (::windows_core::Interface::vtable(self).GetType)(::windows_core::Interface::as_raw(self), gpotype).ok() } pub unsafe fn GetMachineName(&self, pszname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetMachineName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszname.as_ptr()), pszname.len() as _).ok() + (::windows_core::Interface::vtable(self).GetMachineName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszname.as_ptr()), pszname.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_UI_Controls\"`"] #[cfg(feature = "Win32_UI_Controls")] @@ -4844,7 +4857,7 @@ pub struct IGroupPolicyObject_Vtbl { pub struct IRSOPInformation(::windows_core::IUnknown); impl IRSOPInformation { pub unsafe fn GetNamespace(&self, dwsection: u32, pszname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNamespace)(::windows_core::Interface::as_raw(self), dwsection, ::core::mem::transmute(pszname.as_ptr()), pszname.len() as _).ok() + (::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<()> { (::windows_core::Interface::vtable(self).GetFlags)(::windows_core::Interface::as_raw(self), pdwflags).ok() 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 7380582d69..97013c2fde 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Hypervisor/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Hypervisor/mod.rs @@ -210,7 +210,7 @@ where #[inline] pub unsafe fn HdvReadGuestMemory(requestor: *const ::core::ffi::c_void, guestphysicaladdress: u64, buffer: &mut [u8]) -> ::windows_core::Result<()> { ::windows_targets::link!("vmdevicehost.dll" "system" fn HdvReadGuestMemory(requestor : *const ::core::ffi::c_void, guestphysicaladdress : u64, bytecount : u32, buffer : *mut u8) -> ::windows_core::HRESULT); - HdvReadGuestMemory(requestor, guestphysicaladdress, buffer.len() as _, ::core::mem::transmute(buffer.as_ptr())).ok() + HdvReadGuestMemory(requestor, guestphysicaladdress, buffer.len().try_into().unwrap(), ::core::mem::transmute(buffer.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -235,7 +235,7 @@ pub unsafe fn HdvUnregisterDoorbell(requestor: *const ::core::ffi::c_void, barin #[inline] pub unsafe fn HdvWriteGuestMemory(requestor: *const ::core::ffi::c_void, guestphysicaladdress: u64, buffer: &[u8]) -> ::windows_core::Result<()> { ::windows_targets::link!("vmdevicehost.dll" "system" fn HdvWriteGuestMemory(requestor : *const ::core::ffi::c_void, guestphysicaladdress : u64, bytecount : u32, buffer : *const u8) -> ::windows_core::HRESULT); - HdvWriteGuestMemory(requestor, guestphysicaladdress, buffer.len() as _, ::core::mem::transmute(buffer.as_ptr())).ok() + HdvWriteGuestMemory(requestor, guestphysicaladdress, buffer.len().try_into().unwrap(), ::core::mem::transmute(buffer.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -383,7 +383,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winhvplatform.dll" "system" fn WHvAdviseGpaRange(partition : WHV_PARTITION_HANDLE, gparanges : *const WHV_MEMORY_RANGE_ENTRY, gparangescount : u32, advice : WHV_ADVISE_GPA_RANGE_CODE, advicebuffer : *const ::core::ffi::c_void, advicebuffersizeinbytes : u32) -> ::windows_core::HRESULT); - WHvAdviseGpaRange(partition.into_param().abi(), ::core::mem::transmute(gparanges.as_ptr()), gparanges.len() as _, advice, advicebuffer, advicebuffersizeinbytes).ok() + WHvAdviseGpaRange(partition.into_param().abi(), ::core::mem::transmute(gparanges.as_ptr()), gparanges.len().try_into().unwrap(), advice, advicebuffer, advicebuffersizeinbytes).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -391,7 +391,7 @@ where pub unsafe fn WHvAllocateVpciResource(providerid: ::core::option::Option<*const ::windows_core::GUID>, flags: WHV_ALLOCATE_VPCI_RESOURCE_FLAGS, resourcedescriptor: ::core::option::Option<&[u8]>) -> ::windows_core::Result { ::windows_targets::link!("winhvplatform.dll" "system" fn WHvAllocateVpciResource(providerid : *const ::windows_core::GUID, flags : WHV_ALLOCATE_VPCI_RESOURCE_FLAGS, resourcedescriptor : *const ::core::ffi::c_void, resourcedescriptorsizeinbytes : u32, vpciresource : *mut super::super::Foundation:: HANDLE) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - WHvAllocateVpciResource(::core::mem::transmute(providerid.unwrap_or(::std::ptr::null())), flags, ::core::mem::transmute(resourcedescriptor.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), resourcedescriptor.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + WHvAllocateVpciResource(::core::mem::transmute(providerid.unwrap_or(::std::ptr::null())), flags, ::core::mem::transmute(resourcedescriptor.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), resourcedescriptor.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } #[inline] pub unsafe fn WHvCancelPartitionMigration(partition: P0) -> ::windows_core::Result<()> @@ -458,7 +458,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winhvplatform.dll" "system" fn WHvCreateVirtualProcessor2(partition : WHV_PARTITION_HANDLE, vpindex : u32, properties : *const WHV_VIRTUAL_PROCESSOR_PROPERTY, propertycount : u32) -> ::windows_core::HRESULT); - WHvCreateVirtualProcessor2(partition.into_param().abi(), vpindex, ::core::mem::transmute(properties.as_ptr()), properties.len() as _).ok() + WHvCreateVirtualProcessor2(partition.into_param().abi(), vpindex, ::core::mem::transmute(properties.as_ptr()), properties.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -545,7 +545,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winhvplatform.dll" "system" fn WHvGetInterruptTargetVpSet(partition : WHV_PARTITION_HANDLE, destination : u64, destinationmode : WHV_INTERRUPT_DESTINATION_MODE, targetvps : *mut u32, vpcount : u32, targetvpcount : *mut u32) -> ::windows_core::HRESULT); - WHvGetInterruptTargetVpSet(partition.into_param().abi(), destination, destinationmode, ::core::mem::transmute(targetvps.as_ptr()), targetvps.len() as _, targetvpcount).ok() + WHvGetInterruptTargetVpSet(partition.into_param().abi(), destination, destinationmode, ::core::mem::transmute(targetvps.as_ptr()), targetvps.len().try_into().unwrap(), targetvpcount).ok() } #[inline] pub unsafe fn WHvGetPartitionCounters(partition: P0, counterset: WHV_PARTITION_COUNTER_SET, buffer: *mut ::core::ffi::c_void, buffersizeinbytes: u32, byteswritten: ::core::option::Option<*mut u32>) -> ::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 a0d78fa214..f79557f356 100644 --- a/crates/libs/windows/src/Windows/Win32/System/IO/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/IO/mod.rs @@ -101,7 +101,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetQueuedCompletionStatusEx(completionport : super::super::Foundation:: HANDLE, lpcompletionportentries : *mut OVERLAPPED_ENTRY, ulcount : u32, ulnumentriesremoved : *mut u32, dwmilliseconds : u32, falertable : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - GetQueuedCompletionStatusEx(completionport.into_param().abi(), ::core::mem::transmute(lpcompletionportentries.as_ptr()), lpcompletionportentries.len() as _, ulnumentriesremoved, dwmilliseconds, falertable.into_param().abi()).ok() + GetQueuedCompletionStatusEx(completionport.into_param().abi(), ::core::mem::transmute(lpcompletionportentries.as_ptr()), lpcompletionportentries.len().try_into().unwrap(), ulnumentriesremoved, dwmilliseconds, falertable.into_param().abi()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 a0248d17b3..fbd59d1936 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Iis/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Iis/mod.rs @@ -254,7 +254,7 @@ pub struct AsyncIFtpRoleProvider_Vtbl { pub struct AsyncIMSAdminBaseSinkW(::windows_core::IUnknown); impl AsyncIMSAdminBaseSinkW { pub unsafe fn Begin_SinkNotify(&self, pcochangelist: &[MD_CHANGE_OBJECT_W]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Begin_SinkNotify)(::windows_core::Interface::as_raw(self), pcochangelist.len() as _, ::core::mem::transmute(pcochangelist.as_ptr())).ok() + (::windows_core::Interface::vtable(self).Begin_SinkNotify)(::windows_core::Interface::as_raw(self), pcochangelist.len().try_into().unwrap(), ::core::mem::transmute(pcochangelist.as_ptr())).ok() } pub unsafe fn Finish_SinkNotify(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Finish_SinkNotify)(::windows_core::Interface::as_raw(self)).ok() @@ -628,7 +628,7 @@ impl IMSAdminBase2W { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).base__.GetDataPaths)(::windows_core::Interface::as_raw(self), hmdhandle, pszmdpath.into_param().abi(), dwmdidentifier, dwmddatatype, pszbuffer.len() as _, ::core::mem::transmute(pszbuffer.as_ptr()), pdwmdrequiredbuffersize).ok() + (::windows_core::Interface::vtable(self).base__.GetDataPaths)(::windows_core::Interface::as_raw(self), hmdhandle, pszmdpath.into_param().abi(), dwmdidentifier, dwmddatatype, pszbuffer.len().try_into().unwrap(), ::core::mem::transmute(pszbuffer.as_ptr()), pdwmdrequiredbuffersize).ok() } pub unsafe fn OpenKey(&self, hmdhandle: u32, pszmdpath: P0, dwmdaccessrequested: u32, dwmdtimeout: u32) -> ::windows_core::Result where @@ -875,7 +875,7 @@ impl IMSAdminBase3W { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).base__.base__.GetDataPaths)(::windows_core::Interface::as_raw(self), hmdhandle, pszmdpath.into_param().abi(), dwmdidentifier, dwmddatatype, pszbuffer.len() as _, ::core::mem::transmute(pszbuffer.as_ptr()), pdwmdrequiredbuffersize).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetDataPaths)(::windows_core::Interface::as_raw(self), hmdhandle, pszmdpath.into_param().abi(), dwmdidentifier, dwmddatatype, pszbuffer.len().try_into().unwrap(), ::core::mem::transmute(pszbuffer.as_ptr()), pdwmdrequiredbuffersize).ok() } pub unsafe fn OpenKey(&self, hmdhandle: u32, pszmdpath: P0, dwmdaccessrequested: u32, dwmdtimeout: u32) -> ::windows_core::Result where @@ -1008,7 +1008,7 @@ impl IMSAdminBase3W { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).GetChildPaths)(::windows_core::Interface::as_raw(self), hmdhandle, pszmdpath.into_param().abi(), pszbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pszbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(pcchmdrequiredbuffersize.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetChildPaths)(::windows_core::Interface::as_raw(self), hmdhandle, pszmdpath.into_param().abi(), pszbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pszbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(pcchmdrequiredbuffersize.unwrap_or(::std::ptr::null_mut()))).ok() } } ::windows_core::imp::interface_hierarchy!(IMSAdminBase3W, ::windows_core::IUnknown, IMSAdminBaseW, IMSAdminBase2W); @@ -1029,7 +1029,7 @@ pub struct IMSAdminBase3W_Vtbl { pub struct IMSAdminBaseSinkW(::windows_core::IUnknown); impl IMSAdminBaseSinkW { pub unsafe fn SinkNotify(&self, pcochangelist: &[MD_CHANGE_OBJECT_W]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SinkNotify)(::windows_core::Interface::as_raw(self), pcochangelist.len() as _, ::core::mem::transmute(pcochangelist.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SinkNotify)(::windows_core::Interface::as_raw(self), pcochangelist.len().try_into().unwrap(), ::core::mem::transmute(pcochangelist.as_ptr())).ok() } pub unsafe fn ShutdownNotify(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).ShutdownNotify)(::windows_core::Interface::as_raw(self)).ok() @@ -1145,7 +1145,7 @@ impl IMSAdminBaseW { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).GetDataPaths)(::windows_core::Interface::as_raw(self), hmdhandle, pszmdpath.into_param().abi(), dwmdidentifier, dwmddatatype, pszbuffer.len() as _, ::core::mem::transmute(pszbuffer.as_ptr()), pdwmdrequiredbuffersize).ok() + (::windows_core::Interface::vtable(self).GetDataPaths)(::windows_core::Interface::as_raw(self), hmdhandle, pszmdpath.into_param().abi(), dwmdidentifier, dwmddatatype, pszbuffer.len().try_into().unwrap(), ::core::mem::transmute(pszbuffer.as_ptr()), pdwmdrequiredbuffersize).ok() } pub unsafe fn OpenKey(&self, hmdhandle: u32, pszmdpath: P0, dwmdaccessrequested: u32, dwmdtimeout: u32) -> ::windows_core::Result where @@ -1300,7 +1300,7 @@ impl IMSImpExpHelpW { P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).EnumeratePathsInFile)(::windows_core::Interface::as_raw(self), pszfilename.into_param().abi(), pszkeytype.into_param().abi(), pszbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pszbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdwmdrequiredbuffersize).ok() + (::windows_core::Interface::vtable(self).EnumeratePathsInFile)(::windows_core::Interface::as_raw(self), pszfilename.into_param().abi(), pszkeytype.into_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).ok() } } ::windows_core::imp::interface_hierarchy!(IMSImpExpHelpW, ::windows_core::IUnknown); 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 4e6a65d81b..225a6beb71 100644 --- a/crates/libs/windows/src/Windows/Win32/System/JobObjects/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/JobObjects/mod.rs @@ -36,7 +36,7 @@ where #[inline] pub unsafe fn CreateJobSet(userjobset: &[JOB_SET_ARRAY], flags: u32) -> super::super::Foundation::BOOL { ::windows_targets::link!("kernel32.dll" "system" fn CreateJobSet(numjob : u32, userjobset : *const JOB_SET_ARRAY, flags : u32) -> super::super::Foundation:: BOOL); - CreateJobSet(userjobset.len() as _, ::core::mem::transmute(userjobset.as_ptr()), flags) + CreateJobSet(userjobset.len().try_into().unwrap(), ::core::mem::transmute(userjobset.as_ptr()), flags) } #[inline] pub unsafe fn FreeMemoryJobObject(buffer: *const ::core::ffi::c_void) { 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 620fdbf680..9924691423 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Js/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Js/mod.rs @@ -16,7 +16,7 @@ pub unsafe fn JsBooleanToBool(value: *const ::core::ffi::c_void, boolvalue: *mut #[inline] pub unsafe fn JsCallFunction(function: *const ::core::ffi::c_void, arguments: &[*const ::core::ffi::c_void], result: ::core::option::Option<*mut *mut ::core::ffi::c_void>) -> JsErrorCode { ::windows_targets::link!("chakra.dll" "system" fn JsCallFunction(function : *const ::core::ffi::c_void, arguments : *const *const ::core::ffi::c_void, argumentcount : u16, result : *mut *mut ::core::ffi::c_void) -> JsErrorCode); - JsCallFunction(function, ::core::mem::transmute(arguments.as_ptr()), arguments.len() as _, ::core::mem::transmute(result.unwrap_or(::std::ptr::null_mut()))) + JsCallFunction(function, ::core::mem::transmute(arguments.as_ptr()), arguments.len().try_into().unwrap(), ::core::mem::transmute(result.unwrap_or(::std::ptr::null_mut()))) } #[inline] pub unsafe fn JsCollectGarbage(runtime: *const ::core::ffi::c_void) -> JsErrorCode { @@ -26,7 +26,7 @@ pub unsafe fn JsCollectGarbage(runtime: *const ::core::ffi::c_void) -> JsErrorCo #[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); - JsConstructObject(function, ::core::mem::transmute(arguments.as_ptr()), arguments.len() as _, result) + JsConstructObject(function, ::core::mem::transmute(arguments.as_ptr()), arguments.len().try_into().unwrap(), result) } #[inline] pub unsafe fn JsConvertValueToBoolean(value: *const ::core::ffi::c_void, booleanvalue: *mut *mut ::core::ffi::c_void) -> JsErrorCode { @@ -346,7 +346,7 @@ where #[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); - JsPointerToString(::core::mem::transmute(stringvalue.as_ptr()), stringvalue.len() as _, value) + JsPointerToString(::core::mem::transmute(stringvalue.as_ptr()), stringvalue.len().try_into().unwrap(), value) } #[inline] pub unsafe fn JsPreventExtension(object: *const ::core::ffi::c_void) -> JsErrorCode { diff --git a/crates/libs/windows/src/Windows/Win32/System/LibraryLoader/mod.rs b/crates/libs/windows/src/Windows/Win32/System/LibraryLoader/mod.rs index 20f645c57f..6de0faf520 100644 --- a/crates/libs/windows/src/Windows/Win32/System/LibraryLoader/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/LibraryLoader/mod.rs @@ -267,12 +267,12 @@ where #[inline] pub unsafe fn GetDllDirectoryA(lpbuffer: ::core::option::Option<&mut [u8]>) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn GetDllDirectoryA(nbufferlength : u32, lpbuffer : ::windows_core::PSTR) -> u32); - GetDllDirectoryA(lpbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + GetDllDirectoryA(lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] pub unsafe fn GetDllDirectoryW(lpbuffer: ::core::option::Option<&mut [u16]>) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn GetDllDirectoryW(nbufferlength : u32, lpbuffer : ::windows_core::PWSTR) -> u32); - GetDllDirectoryW(lpbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + GetDllDirectoryW(lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -282,7 +282,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetModuleFileNameA(hmodule : super::super::Foundation:: HMODULE, lpfilename : ::windows_core::PSTR, nsize : u32) -> u32); - GetModuleFileNameA(hmodule.into_param().abi(), ::core::mem::transmute(lpfilename.as_ptr()), lpfilename.len() as _) + GetModuleFileNameA(hmodule.into_param().abi(), ::core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -292,7 +292,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetModuleFileNameW(hmodule : super::super::Foundation:: HMODULE, lpfilename : ::windows_core::PWSTR, nsize : u32) -> u32); - GetModuleFileNameW(hmodule.into_param().abi(), ::core::mem::transmute(lpfilename.as_ptr()), lpfilename.len() as _) + GetModuleFileNameW(hmodule.into_param().abi(), ::core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 16d0013ddf..71706c5b6f 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 @@ -20,7 +20,7 @@ pub unsafe fn RtlFlushNonVolatileMemory(nvtoken: *const ::core::ffi::c_void, nvb #[inline] pub unsafe fn RtlFlushNonVolatileMemoryRanges(nvtoken: *const ::core::ffi::c_void, nvranges: &[NV_MEMORY_RANGE], flags: u32) -> u32 { ::windows_targets::link!("ntdll.dll" "system" fn RtlFlushNonVolatileMemoryRanges(nvtoken : *const ::core::ffi::c_void, nvranges : *const NV_MEMORY_RANGE, numranges : usize, flags : u32) -> u32); - RtlFlushNonVolatileMemoryRanges(nvtoken, ::core::mem::transmute(nvranges.as_ptr()), nvranges.len() as _, flags) + RtlFlushNonVolatileMemoryRanges(nvtoken, ::core::mem::transmute(nvranges.as_ptr()), nvranges.len().try_into().unwrap(), flags) } #[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))] #[inline] 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 8d16df492c..a94956a8a4 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Memory/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Memory/mod.rs @@ -26,7 +26,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("api-ms-win-core-memory-l1-1-8.dll" "system" fn AllocateUserPhysicalPages2(objecthandle : super::super::Foundation:: HANDLE, numberofpages : *mut usize, pagearray : *mut usize, extendedparameters : *mut MEM_EXTENDED_PARAMETER, extendedparametercount : u32) -> super::super::Foundation:: BOOL); - AllocateUserPhysicalPages2(objecthandle.into_param().abi(), numberofpages, 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() as _)) + AllocateUserPhysicalPages2(objecthandle.into_param().abi(), numberofpages, 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())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -47,7 +47,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("api-ms-win-core-memory-l1-1-7.dll" "system" fn CreateFileMapping2(file : super::super::Foundation:: HANDLE, securityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, desiredaccess : u32, pageprotection : PAGE_PROTECTION_FLAGS, allocationattributes : u32, maximumsize : u64, name : ::windows_core::PCWSTR, extendedparameters : *mut MEM_EXTENDED_PARAMETER, parametercount : u32) -> super::super::Foundation:: HANDLE); - let result__ = CreateFileMapping2(file.into_param().abi(), ::core::mem::transmute(securityattributes.unwrap_or(::std::ptr::null())), desiredaccess, pageprotection, allocationattributes, maximumsize, name.into_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() as _)); + let result__ = CreateFileMapping2(file.into_param().abi(), ::core::mem::transmute(securityattributes.unwrap_or(::std::ptr::null())), desiredaccess, pageprotection, allocationattributes, maximumsize, name.into_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(|| result__).ok_or_else(::windows_core::Error::from_win32) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Security\"`"] @@ -121,7 +121,7 @@ pub unsafe fn CreateMemoryResourceNotification(notificationtype: MEMORY_RESOURCE #[inline] pub unsafe fn DiscardVirtualMemory(virtualaddress: &mut [u8]) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn DiscardVirtualMemory(virtualaddress : *mut ::core::ffi::c_void, size : usize) -> u32); - DiscardVirtualMemory(::core::mem::transmute(virtualaddress.as_ptr()), virtualaddress.len() as _) + DiscardVirtualMemory(::core::mem::transmute(virtualaddress.as_ptr()), virtualaddress.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -165,7 +165,7 @@ pub unsafe fn GetProcessHeap() -> ::windows_core::Result u32 { ::windows_targets::link!("kernel32.dll" "system" fn GetProcessHeaps(numberofheaps : u32, processheaps : *mut super::super::Foundation:: HANDLE) -> u32); - GetProcessHeaps(processheaps.len() as _, ::core::mem::transmute(processheaps.as_ptr())) + GetProcessHeaps(processheaps.len().try_into().unwrap(), ::core::mem::transmute(processheaps.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -507,7 +507,7 @@ where #[inline] pub unsafe fn MapUserPhysicalPages(virtualaddress: *const ::core::ffi::c_void, pagearray: ::core::option::Option<&[usize]>) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn MapUserPhysicalPages(virtualaddress : *const ::core::ffi::c_void, numberofpages : usize, pagearray : *const usize) -> super::super::Foundation:: BOOL); - MapUserPhysicalPages(virtualaddress, pagearray.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pagearray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + MapUserPhysicalPages(virtualaddress, pagearray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pagearray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -535,7 +535,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("api-ms-win-core-memory-l1-1-6.dll" "system" fn MapViewOfFile3(filemapping : super::super::Foundation:: HANDLE, process : super::super::Foundation:: HANDLE, baseaddress : *const ::core::ffi::c_void, offset : u64, viewsize : usize, allocationtype : VIRTUAL_ALLOCATION_TYPE, pageprotection : u32, extendedparameters : *mut MEM_EXTENDED_PARAMETER, parametercount : u32) -> MEMORY_MAPPED_VIEW_ADDRESS); - MapViewOfFile3(filemapping.into_param().abi(), process.into_param().abi(), ::core::mem::transmute(baseaddress.unwrap_or(::std::ptr::null())), offset, viewsize, allocationtype, pageprotection, ::core::mem::transmute(extendedparameters.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len() as _)) + MapViewOfFile3(filemapping.into_param().abi(), process.into_param().abi(), ::core::mem::transmute(baseaddress.unwrap_or(::std::ptr::null())), offset, viewsize, allocationtype, pageprotection, ::core::mem::transmute(extendedparameters.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -546,7 +546,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("api-ms-win-core-memory-l1-1-6.dll" "system" fn MapViewOfFile3FromApp(filemapping : super::super::Foundation:: HANDLE, process : super::super::Foundation:: HANDLE, baseaddress : *const ::core::ffi::c_void, offset : u64, viewsize : usize, allocationtype : VIRTUAL_ALLOCATION_TYPE, pageprotection : u32, extendedparameters : *mut MEM_EXTENDED_PARAMETER, parametercount : u32) -> MEMORY_MAPPED_VIEW_ADDRESS); - MapViewOfFile3FromApp(filemapping.into_param().abi(), process.into_param().abi(), ::core::mem::transmute(baseaddress.unwrap_or(::std::ptr::null())), offset, viewsize, allocationtype, pageprotection, ::core::mem::transmute(extendedparameters.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len() as _)) + MapViewOfFile3FromApp(filemapping.into_param().abi(), process.into_param().abi(), ::core::mem::transmute(baseaddress.unwrap_or(::std::ptr::null())), offset, viewsize, allocationtype, pageprotection, ::core::mem::transmute(extendedparameters.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -592,7 +592,7 @@ where #[inline] pub unsafe fn OfferVirtualMemory(virtualaddress: &mut [u8], priority: OFFER_PRIORITY) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn OfferVirtualMemory(virtualaddress : *mut ::core::ffi::c_void, size : usize, priority : OFFER_PRIORITY) -> u32); - OfferVirtualMemory(::core::mem::transmute(virtualaddress.as_ptr()), virtualaddress.len() as _, priority) + OfferVirtualMemory(::core::mem::transmute(virtualaddress.as_ptr()), virtualaddress.len().try_into().unwrap(), priority) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -649,7 +649,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn PrefetchVirtualMemory(hprocess : super::super::Foundation:: HANDLE, numberofentries : usize, virtualaddresses : *const WIN32_MEMORY_RANGE_ENTRY, flags : u32) -> super::super::Foundation:: BOOL); - PrefetchVirtualMemory(hprocess.into_param().abi(), virtualaddresses.len() as _, ::core::mem::transmute(virtualaddresses.as_ptr()), flags).ok() + PrefetchVirtualMemory(hprocess.into_param().abi(), virtualaddresses.len().try_into().unwrap(), ::core::mem::transmute(virtualaddresses.as_ptr()), flags).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -684,7 +684,7 @@ where #[inline] pub unsafe fn ReclaimVirtualMemory(virtualaddress: &[u8]) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn ReclaimVirtualMemory(virtualaddress : *const ::core::ffi::c_void, size : usize) -> u32); - ReclaimVirtualMemory(::core::mem::transmute(virtualaddress.as_ptr()), virtualaddress.len() as _) + ReclaimVirtualMemory(::core::mem::transmute(virtualaddress.as_ptr()), virtualaddress.len().try_into().unwrap()) } #[inline] pub unsafe fn RegisterBadMemoryNotification(callback: PBAD_MEMORY_CALLBACK_ROUTINE) -> *mut ::core::ffi::c_void { @@ -733,7 +733,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("api-ms-win-core-memory-l1-1-3.dll" "system" fn SetProcessValidCallTargets(hprocess : super::super::Foundation:: HANDLE, virtualaddress : *const ::core::ffi::c_void, regionsize : usize, numberofoffsets : u32, offsetinformation : *mut CFG_CALL_TARGET_INFO) -> super::super::Foundation:: BOOL); - SetProcessValidCallTargets(hprocess.into_param().abi(), virtualaddress, regionsize, offsetinformation.len() as _, ::core::mem::transmute(offsetinformation.as_ptr())).ok() + SetProcessValidCallTargets(hprocess.into_param().abi(), virtualaddress, regionsize, offsetinformation.len().try_into().unwrap(), ::core::mem::transmute(offsetinformation.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -744,7 +744,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("api-ms-win-core-memory-l1-1-7.dll" "system" fn SetProcessValidCallTargetsForMappedView(process : super::super::Foundation:: HANDLE, virtualaddress : *const ::core::ffi::c_void, regionsize : usize, numberofoffsets : u32, offsetinformation : *mut CFG_CALL_TARGET_INFO, section : super::super::Foundation:: HANDLE, expectedfileoffset : u64) -> super::super::Foundation:: BOOL); - SetProcessValidCallTargetsForMappedView(process.into_param().abi(), virtualaddress, regionsize, offsetinformation.len() as _, ::core::mem::transmute(offsetinformation.as_ptr()), section.into_param().abi(), expectedfileoffset) + SetProcessValidCallTargetsForMappedView(process.into_param().abi(), virtualaddress, regionsize, offsetinformation.len().try_into().unwrap(), ::core::mem::transmute(offsetinformation.as_ptr()), section.into_param().abi(), expectedfileoffset) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -807,7 +807,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("api-ms-win-core-memory-l1-1-6.dll" "system" fn VirtualAlloc2(process : super::super::Foundation:: HANDLE, baseaddress : *const ::core::ffi::c_void, size : usize, allocationtype : VIRTUAL_ALLOCATION_TYPE, pageprotection : u32, extendedparameters : *mut MEM_EXTENDED_PARAMETER, parametercount : u32) -> *mut ::core::ffi::c_void); - VirtualAlloc2(process.into_param().abi(), ::core::mem::transmute(baseaddress.unwrap_or(::std::ptr::null())), size, allocationtype, pageprotection, ::core::mem::transmute(extendedparameters.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len() as _)) + VirtualAlloc2(process.into_param().abi(), ::core::mem::transmute(baseaddress.unwrap_or(::std::ptr::null())), size, allocationtype, pageprotection, ::core::mem::transmute(extendedparameters.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -817,7 +817,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("api-ms-win-core-memory-l1-1-6.dll" "system" fn VirtualAlloc2FromApp(process : super::super::Foundation:: HANDLE, baseaddress : *const ::core::ffi::c_void, size : usize, allocationtype : VIRTUAL_ALLOCATION_TYPE, pageprotection : u32, extendedparameters : *mut MEM_EXTENDED_PARAMETER, parametercount : u32) -> *mut ::core::ffi::c_void); - VirtualAlloc2FromApp(process.into_param().abi(), ::core::mem::transmute(baseaddress.unwrap_or(::std::ptr::null())), size, allocationtype, pageprotection, ::core::mem::transmute(extendedparameters.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len() as _)) + VirtualAlloc2FromApp(process.into_param().abi(), ::core::mem::transmute(baseaddress.unwrap_or(::std::ptr::null())), size, allocationtype, pageprotection, ::core::mem::transmute(extendedparameters.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 85836f8a7f..1f79e4b151 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Mmc/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Mmc/mod.rs @@ -1548,7 +1548,7 @@ pub struct IDisplayHelp_Vtbl { pub struct IEnumTASK(::windows_core::IUnknown); impl IEnumTASK { pub unsafe fn Next(&self, rgelt: &mut [MMC_TASK], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -2681,7 +2681,7 @@ impl ISnapinProperties { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn PropertiesChanged(&self, pproperties: &[MMC_SNAPIN_PROPERTY]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).PropertiesChanged)(::windows_core::Interface::as_raw(self), pproperties.len() as _, ::core::mem::transmute(pproperties.as_ptr())).ok() + (::windows_core::Interface::vtable(self).PropertiesChanged)(::windows_core::Interface::as_raw(self), pproperties.len().try_into().unwrap(), ::core::mem::transmute(pproperties.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(ISnapinProperties, ::windows_core::IUnknown); @@ -2741,7 +2741,7 @@ impl IStringTable { (::windows_core::Interface::vtable(self).AddString)(::windows_core::Interface::as_raw(self), pszadd.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn GetString(&self, stringid: u32, lpbuffer: &mut [u16], pcchout: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetString)(::windows_core::Interface::as_raw(self), stringid, lpbuffer.len() as _, ::core::mem::transmute(lpbuffer.as_ptr()), pcchout).ok() + (::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).ok() } pub unsafe fn GetStringLength(&self, stringid: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); 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 9b5e6ba11a..66ddc608fc 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Ole/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Ole/mod.rs @@ -3060,7 +3060,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("oleaut32.dll" "system" fn VarTokenizeFormatString(pstrformat : ::windows_core::PCWSTR, rgbtok : *mut u8, cbtok : i32, ifirstday : VARFORMAT_FIRST_DAY, ifirstweek : VARFORMAT_FIRST_WEEK, lcid : u32, pcbactual : *const i32) -> ::windows_core::HRESULT); - VarTokenizeFormatString(pstrformat.into_param().abi(), ::core::mem::transmute(rgbtok.as_ptr()), rgbtok.len() as _, ifirstday, ifirstweek, lcid, ::core::mem::transmute(pcbactual.unwrap_or(::std::ptr::null()))).ok() + VarTokenizeFormatString(pstrformat.into_param().abi(), ::core::mem::transmute(rgbtok.as_ptr()), rgbtok.len().try_into().unwrap(), ifirstday, ifirstweek, lcid, ::core::mem::transmute(pcbactual.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3817,7 +3817,7 @@ impl ICreateTypeInfo { (::windows_core::Interface::vtable(self).AddVarDesc)(::windows_core::Interface::as_raw(self), index, pvardesc).ok() } pub unsafe fn SetFuncAndParamNames(&self, index: u32, rgsznames: &[::windows_core::PCWSTR]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetFuncAndParamNames)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(rgsznames.as_ptr()), rgsznames.len() as _).ok() + (::windows_core::Interface::vtable(self).SetFuncAndParamNames)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(rgsznames.as_ptr()), rgsznames.len().try_into().unwrap()).ok() } pub unsafe fn SetVarName(&self, index: u32, szname: P0) -> ::windows_core::Result<()> where @@ -3981,7 +3981,7 @@ impl ICreateTypeInfo2 { (::windows_core::Interface::vtable(self).base__.AddVarDesc)(::windows_core::Interface::as_raw(self), index, pvardesc).ok() } pub unsafe fn SetFuncAndParamNames(&self, index: u32, rgsznames: &[::windows_core::PCWSTR]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetFuncAndParamNames)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(rgsznames.as_ptr()), rgsznames.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.SetFuncAndParamNames)(::windows_core::Interface::as_raw(self), index, ::core::mem::transmute(rgsznames.as_ptr()), rgsznames.len().try_into().unwrap()).ok() } pub unsafe fn SetVarName(&self, index: u32, szname: P0) -> ::windows_core::Result<()> where @@ -4585,7 +4585,7 @@ impl IEnumOLEVERB { #[doc = "Required features: `\"Win32_UI_WindowsAndMessaging\"`"] #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn Next(&self, rgelt: &mut [OLEVERB], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -4656,7 +4656,7 @@ pub struct IEnumOleDocumentViews_Vtbl { pub struct IEnumOleUndoUnits(::windows_core::IUnknown); impl IEnumOleUndoUnits { pub unsafe fn Next(&self, rgelt: &mut [::core::option::Option], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -4692,7 +4692,7 @@ impl IEnumVARIANT { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Variant"))] pub unsafe fn Next(&self, rgvar: &mut [super::Variant::VARIANT], pceltfetched: *mut u32) -> ::windows_core::HRESULT { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgvar.len() as _, ::core::mem::transmute(rgvar.as_ptr()), pceltfetched) + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgvar.len().try_into().unwrap(), ::core::mem::transmute(rgvar.as_ptr()), pceltfetched) } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::HRESULT { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt) @@ -8153,7 +8153,7 @@ impl IPropertyPage { (::windows_core::Interface::vtable(self).GetPageInfo)(::windows_core::Interface::as_raw(self), ppageinfo).ok() } pub unsafe fn SetObjects(&self, ppunk: &[::core::option::Option<::windows_core::IUnknown>]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetObjects)(::windows_core::Interface::as_raw(self), ppunk.len() as _, ::core::mem::transmute(ppunk.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetObjects)(::windows_core::Interface::as_raw(self), ppunk.len().try_into().unwrap(), ::core::mem::transmute(ppunk.as_ptr())).ok() } pub unsafe fn Show(&self, ncmdshow: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Show)(::windows_core::Interface::as_raw(self), ncmdshow).ok() @@ -8244,7 +8244,7 @@ impl IPropertyPage2 { (::windows_core::Interface::vtable(self).base__.GetPageInfo)(::windows_core::Interface::as_raw(self), ppageinfo).ok() } pub unsafe fn SetObjects(&self, ppunk: &[::core::option::Option<::windows_core::IUnknown>]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetObjects)(::windows_core::Interface::as_raw(self), ppunk.len() as _, ::core::mem::transmute(ppunk.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.SetObjects)(::windows_core::Interface::as_raw(self), ppunk.len().try_into().unwrap(), ::core::mem::transmute(ppunk.as_ptr())).ok() } pub unsafe fn Show(&self, ncmdshow: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.Show)(::windows_core::Interface::as_raw(self), ncmdshow).ok() @@ -8857,10 +8857,10 @@ impl ITypeMarshal { (::windows_core::Interface::vtable(self).Size)(::windows_core::Interface::as_raw(self), pvtype, dwdestcontext, pvdestcontext, &mut result__).from_abi(result__) } 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<()> { - (::windows_core::Interface::vtable(self).Marshal)(::windows_core::Interface::as_raw(self), pvtype, dwdestcontext, pvdestcontext, pbuffer.len() as _, ::core::mem::transmute(pbuffer.as_ptr()), pcbwritten).ok() + (::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).ok() } pub unsafe fn Unmarshal(&self, pvtype: *mut ::core::ffi::c_void, dwflags: u32, pbuffer: &[u8], pcbread: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Unmarshal)(::windows_core::Interface::as_raw(self), pvtype, dwflags, pbuffer.len() as _, ::core::mem::transmute(pbuffer.as_ptr()), pcbread).ok() + (::windows_core::Interface::vtable(self).Unmarshal)(::windows_core::Interface::as_raw(self), pvtype, dwflags, pbuffer.len().try_into().unwrap(), ::core::mem::transmute(pbuffer.as_ptr()), pcbread).ok() } pub unsafe fn Free(&self, pvtype: *const ::core::ffi::c_void) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Free)(::windows_core::Interface::as_raw(self), pvtype).ok() 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 ee83153390..79b14a491b 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ParentalControls/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ParentalControls/mod.rs @@ -208,7 +208,7 @@ impl IWPCWebSettings { P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).RequestURLOverride)(::windows_core::Interface::as_raw(self), hwnd.into_param().abi(), pcszurl.into_param().abi(), ppcszsuburls.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppcszsuburls.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).RequestURLOverride)(::windows_core::Interface::as_raw(self), hwnd.into_param().abi(), pcszurl.into_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__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IWPCWebSettings, ::windows_core::IUnknown, IWPCSettings); 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 e4ba5bd515..386c73560e 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Performance/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Performance/mod.rs @@ -874,7 +874,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn PerfEnumerateCounterSet(szmachine : ::windows_core::PCWSTR, pcountersetids : *mut ::windows_core::GUID, ccountersetids : u32, pccountersetidsactual : *mut u32) -> u32); - PerfEnumerateCounterSet(szmachine.into_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() as _), pccountersetidsactual) + PerfEnumerateCounterSet(szmachine.into_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) } #[inline] pub unsafe fn PerfEnumerateCounterSetInstances(szmachine: P0, pcountersetid: *const ::windows_core::GUID, pinstances: ::core::option::Option<*mut PERF_INSTANCE_HEADER>, cbinstances: u32, pcbinstancesactual: *mut u32) -> u32 @@ -940,7 +940,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::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); - PerfQueryCounterSetRegistrationInfo(szmachine.into_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() as _), pcbreginfoactual) + PerfQueryCounterSetRegistrationInfo(szmachine.into_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) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 31d65e4b39..db7e684c4d 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Pipes/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Pipes/mod.rs @@ -74,7 +74,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetNamedPipeClientComputerNameA(pipe : super::super::Foundation:: HANDLE, clientcomputername : ::windows_core::PSTR, clientcomputernamelength : u32) -> super::super::Foundation:: BOOL); - GetNamedPipeClientComputerNameA(pipe.into_param().abi(), ::core::mem::transmute(clientcomputername.as_ptr()), clientcomputername.len() as _).ok() + GetNamedPipeClientComputerNameA(pipe.into_param().abi(), ::core::mem::transmute(clientcomputername.as_ptr()), clientcomputername.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -121,7 +121,7 @@ where ::core::mem::transmute(lpmaxcollectioncount.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpcollectdatatimeout.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpusername.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - lpusername.as_deref().map_or(0, |slice| slice.len() as _), + lpusername.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ) .ok() } @@ -140,7 +140,7 @@ where ::core::mem::transmute(lpmaxcollectioncount.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpcollectdatatimeout.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpusername.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - lpusername.as_deref().map_or(0, |slice| slice.len() as _), + lpusername.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ) } #[doc = "Required features: `\"Win32_Foundation\"`"] diff --git a/crates/libs/windows/src/Windows/Win32/System/Power/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Power/mod.rs index 2a98157d23..460c148f48 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Power/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Power/mod.rs @@ -601,7 +601,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerWriteDescription(rootpowerkey : super::Registry:: HKEY, schemeguid : *const ::windows_core::GUID, subgroupofpowersettingsguid : *const ::windows_core::GUID, powersettingguid : *const ::windows_core::GUID, buffer : *const u8, buffersize : u32) -> super::super::Foundation:: WIN32_ERROR); - PowerWriteDescription(rootpowerkey.into_param().abi(), schemeguid, ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _).ok() + PowerWriteDescription(rootpowerkey.into_param().abi(), schemeguid, ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] @@ -611,7 +611,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerWriteFriendlyName(rootpowerkey : super::Registry:: HKEY, schemeguid : *const ::windows_core::GUID, subgroupofpowersettingsguid : *const ::windows_core::GUID, powersettingguid : *const ::windows_core::GUID, buffer : *const u8, buffersize : u32) -> super::super::Foundation:: WIN32_ERROR); - PowerWriteFriendlyName(rootpowerkey.into_param().abi(), schemeguid, ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _).ok() + PowerWriteFriendlyName(rootpowerkey.into_param().abi(), schemeguid, ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] @@ -621,7 +621,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerWriteIconResourceSpecifier(rootpowerkey : super::Registry:: HKEY, schemeguid : *const ::windows_core::GUID, subgroupofpowersettingsguid : *const ::windows_core::GUID, powersettingguid : *const ::windows_core::GUID, buffer : *const u8, buffersize : u32) -> super::super::Foundation:: WIN32_ERROR); - PowerWriteIconResourceSpecifier(rootpowerkey.into_param().abi(), schemeguid, ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _).ok() + PowerWriteIconResourceSpecifier(rootpowerkey.into_param().abi(), schemeguid, ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] @@ -631,7 +631,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerWritePossibleDescription(rootpowerkey : super::Registry:: HKEY, subgroupofpowersettingsguid : *const ::windows_core::GUID, powersettingguid : *const ::windows_core::GUID, possiblesettingindex : u32, buffer : *const u8, buffersize : u32) -> super::super::Foundation:: WIN32_ERROR); - PowerWritePossibleDescription(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), possiblesettingindex, ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _).ok() + PowerWritePossibleDescription(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), possiblesettingindex, ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] @@ -641,7 +641,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerWritePossibleFriendlyName(rootpowerkey : super::Registry:: HKEY, subgroupofpowersettingsguid : *const ::windows_core::GUID, powersettingguid : *const ::windows_core::GUID, possiblesettingindex : u32, buffer : *const u8, buffersize : u32) -> super::super::Foundation:: WIN32_ERROR); - PowerWritePossibleFriendlyName(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), possiblesettingindex, ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _).ok() + PowerWritePossibleFriendlyName(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), possiblesettingindex, ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] @@ -651,7 +651,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerWritePossibleValue(rootpowerkey : super::Registry:: HKEY, subgroupofpowersettingsguid : *const ::windows_core::GUID, powersettingguid : *const ::windows_core::GUID, r#type : u32, possiblesettingindex : u32, buffer : *const u8, buffersize : u32) -> super::super::Foundation:: WIN32_ERROR); - PowerWritePossibleValue(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), r#type, possiblesettingindex, ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _).ok() + PowerWritePossibleValue(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), r#type, possiblesettingindex, ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -698,7 +698,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerWriteValueUnitsSpecifier(rootpowerkey : super::Registry:: HKEY, subgroupofpowersettingsguid : *const ::windows_core::GUID, powersettingguid : *const ::windows_core::GUID, buffer : *const u8, buffersize : u32) -> super::super::Foundation:: WIN32_ERROR); - PowerWriteValueUnitsSpecifier(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _).ok() + PowerWriteValueUnitsSpecifier(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] diff --git a/crates/libs/windows/src/Windows/Win32/System/ProcessStatus/mod.rs b/crates/libs/windows/src/Windows/Win32/System/ProcessStatus/mod.rs index 54de1e086e..28973e106b 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ProcessStatus/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ProcessStatus/mod.rs @@ -59,22 +59,22 @@ pub unsafe fn EnumProcesses(lpidprocess: *mut u32, cb: u32, lpcbneeded: *mut u32 #[inline] pub unsafe fn GetDeviceDriverBaseNameA(imagebase: *const ::core::ffi::c_void, lpfilename: &mut [u8]) -> u32 { ::windows_targets::link!("psapi.dll" "system" fn GetDeviceDriverBaseNameA(imagebase : *const ::core::ffi::c_void, lpfilename : ::windows_core::PSTR, nsize : u32) -> u32); - GetDeviceDriverBaseNameA(imagebase, ::core::mem::transmute(lpfilename.as_ptr()), lpfilename.len() as _) + GetDeviceDriverBaseNameA(imagebase, ::core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } #[inline] pub unsafe fn GetDeviceDriverBaseNameW(imagebase: *const ::core::ffi::c_void, lpbasename: &mut [u16]) -> u32 { ::windows_targets::link!("psapi.dll" "system" fn GetDeviceDriverBaseNameW(imagebase : *const ::core::ffi::c_void, lpbasename : ::windows_core::PWSTR, nsize : u32) -> u32); - GetDeviceDriverBaseNameW(imagebase, ::core::mem::transmute(lpbasename.as_ptr()), lpbasename.len() as _) + GetDeviceDriverBaseNameW(imagebase, ::core::mem::transmute(lpbasename.as_ptr()), lpbasename.len().try_into().unwrap()) } #[inline] pub unsafe fn GetDeviceDriverFileNameA(imagebase: *const ::core::ffi::c_void, lpfilename: &mut [u8]) -> u32 { ::windows_targets::link!("psapi.dll" "system" fn GetDeviceDriverFileNameA(imagebase : *const ::core::ffi::c_void, lpfilename : ::windows_core::PSTR, nsize : u32) -> u32); - GetDeviceDriverFileNameA(imagebase, ::core::mem::transmute(lpfilename.as_ptr()), lpfilename.len() as _) + GetDeviceDriverFileNameA(imagebase, ::core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } #[inline] pub unsafe fn GetDeviceDriverFileNameW(imagebase: *const ::core::ffi::c_void, lpfilename: &mut [u16]) -> u32 { ::windows_targets::link!("psapi.dll" "system" fn GetDeviceDriverFileNameW(imagebase : *const ::core::ffi::c_void, lpfilename : ::windows_core::PWSTR, nsize : u32) -> u32); - GetDeviceDriverFileNameW(imagebase, ::core::mem::transmute(lpfilename.as_ptr()), lpfilename.len() as _) + GetDeviceDriverFileNameW(imagebase, ::core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -84,7 +84,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("psapi.dll" "system" fn GetMappedFileNameA(hprocess : super::super::Foundation:: HANDLE, lpv : *const ::core::ffi::c_void, lpfilename : ::windows_core::PSTR, nsize : u32) -> u32); - GetMappedFileNameA(hprocess.into_param().abi(), lpv, ::core::mem::transmute(lpfilename.as_ptr()), lpfilename.len() as _) + GetMappedFileNameA(hprocess.into_param().abi(), lpv, ::core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -94,7 +94,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("psapi.dll" "system" fn GetMappedFileNameW(hprocess : super::super::Foundation:: HANDLE, lpv : *const ::core::ffi::c_void, lpfilename : ::windows_core::PWSTR, nsize : u32) -> u32); - GetMappedFileNameW(hprocess.into_param().abi(), lpv, ::core::mem::transmute(lpfilename.as_ptr()), lpfilename.len() as _) + GetMappedFileNameW(hprocess.into_param().abi(), lpv, ::core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -105,7 +105,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("psapi.dll" "system" fn GetModuleBaseNameA(hprocess : super::super::Foundation:: HANDLE, hmodule : super::super::Foundation:: HMODULE, lpbasename : ::windows_core::PSTR, nsize : u32) -> u32); - GetModuleBaseNameA(hprocess.into_param().abi(), hmodule.into_param().abi(), ::core::mem::transmute(lpbasename.as_ptr()), lpbasename.len() as _) + GetModuleBaseNameA(hprocess.into_param().abi(), hmodule.into_param().abi(), ::core::mem::transmute(lpbasename.as_ptr()), lpbasename.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -116,7 +116,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("psapi.dll" "system" fn GetModuleBaseNameW(hprocess : super::super::Foundation:: HANDLE, hmodule : super::super::Foundation:: HMODULE, lpbasename : ::windows_core::PWSTR, nsize : u32) -> u32); - GetModuleBaseNameW(hprocess.into_param().abi(), hmodule.into_param().abi(), ::core::mem::transmute(lpbasename.as_ptr()), lpbasename.len() as _) + GetModuleBaseNameW(hprocess.into_param().abi(), hmodule.into_param().abi(), ::core::mem::transmute(lpbasename.as_ptr()), lpbasename.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -127,7 +127,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("psapi.dll" "system" fn GetModuleFileNameExA(hprocess : super::super::Foundation:: HANDLE, hmodule : super::super::Foundation:: HMODULE, lpfilename : ::windows_core::PSTR, nsize : u32) -> u32); - GetModuleFileNameExA(hprocess.into_param().abi(), hmodule.into_param().abi(), ::core::mem::transmute(lpfilename.as_ptr()), lpfilename.len() as _) + GetModuleFileNameExA(hprocess.into_param().abi(), hmodule.into_param().abi(), ::core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -138,7 +138,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("psapi.dll" "system" fn GetModuleFileNameExW(hprocess : super::super::Foundation:: HANDLE, hmodule : super::super::Foundation:: HMODULE, lpfilename : ::windows_core::PWSTR, nsize : u32) -> u32); - GetModuleFileNameExW(hprocess.into_param().abi(), hmodule.into_param().abi(), ::core::mem::transmute(lpfilename.as_ptr()), lpfilename.len() as _) + GetModuleFileNameExW(hprocess.into_param().abi(), hmodule.into_param().abi(), ::core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -166,7 +166,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("psapi.dll" "system" fn GetProcessImageFileNameA(hprocess : super::super::Foundation:: HANDLE, lpimagefilename : ::windows_core::PSTR, nsize : u32) -> u32); - GetProcessImageFileNameA(hprocess.into_param().abi(), ::core::mem::transmute(lpimagefilename.as_ptr()), lpimagefilename.len() as _) + GetProcessImageFileNameA(hprocess.into_param().abi(), ::core::mem::transmute(lpimagefilename.as_ptr()), lpimagefilename.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -176,7 +176,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("psapi.dll" "system" fn GetProcessImageFileNameW(hprocess : super::super::Foundation:: HANDLE, lpimagefilename : ::windows_core::PWSTR, nsize : u32) -> u32); - GetProcessImageFileNameW(hprocess.into_param().abi(), ::core::mem::transmute(lpimagefilename.as_ptr()), lpimagefilename.len() as _) + GetProcessImageFileNameW(hprocess.into_param().abi(), ::core::mem::transmute(lpimagefilename.as_ptr()), lpimagefilename.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -279,22 +279,22 @@ pub unsafe fn K32EnumProcesses(lpidprocess: *mut u32, cb: u32, lpcbneeded: *mut #[inline] pub unsafe fn K32GetDeviceDriverBaseNameA(imagebase: *const ::core::ffi::c_void, lpfilename: &mut [u8]) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn K32GetDeviceDriverBaseNameA(imagebase : *const ::core::ffi::c_void, lpfilename : ::windows_core::PSTR, nsize : u32) -> u32); - K32GetDeviceDriverBaseNameA(imagebase, ::core::mem::transmute(lpfilename.as_ptr()), lpfilename.len() as _) + K32GetDeviceDriverBaseNameA(imagebase, ::core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } #[inline] pub unsafe fn K32GetDeviceDriverBaseNameW(imagebase: *const ::core::ffi::c_void, lpbasename: &mut [u16]) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn K32GetDeviceDriverBaseNameW(imagebase : *const ::core::ffi::c_void, lpbasename : ::windows_core::PWSTR, nsize : u32) -> u32); - K32GetDeviceDriverBaseNameW(imagebase, ::core::mem::transmute(lpbasename.as_ptr()), lpbasename.len() as _) + K32GetDeviceDriverBaseNameW(imagebase, ::core::mem::transmute(lpbasename.as_ptr()), lpbasename.len().try_into().unwrap()) } #[inline] pub unsafe fn K32GetDeviceDriverFileNameA(imagebase: *const ::core::ffi::c_void, lpfilename: &mut [u8]) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn K32GetDeviceDriverFileNameA(imagebase : *const ::core::ffi::c_void, lpfilename : ::windows_core::PSTR, nsize : u32) -> u32); - K32GetDeviceDriverFileNameA(imagebase, ::core::mem::transmute(lpfilename.as_ptr()), lpfilename.len() as _) + K32GetDeviceDriverFileNameA(imagebase, ::core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } #[inline] pub unsafe fn K32GetDeviceDriverFileNameW(imagebase: *const ::core::ffi::c_void, lpfilename: &mut [u16]) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn K32GetDeviceDriverFileNameW(imagebase : *const ::core::ffi::c_void, lpfilename : ::windows_core::PWSTR, nsize : u32) -> u32); - K32GetDeviceDriverFileNameW(imagebase, ::core::mem::transmute(lpfilename.as_ptr()), lpfilename.len() as _) + K32GetDeviceDriverFileNameW(imagebase, ::core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -304,7 +304,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn K32GetMappedFileNameA(hprocess : super::super::Foundation:: HANDLE, lpv : *const ::core::ffi::c_void, lpfilename : ::windows_core::PSTR, nsize : u32) -> u32); - K32GetMappedFileNameA(hprocess.into_param().abi(), lpv, ::core::mem::transmute(lpfilename.as_ptr()), lpfilename.len() as _) + K32GetMappedFileNameA(hprocess.into_param().abi(), lpv, ::core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -314,7 +314,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn K32GetMappedFileNameW(hprocess : super::super::Foundation:: HANDLE, lpv : *const ::core::ffi::c_void, lpfilename : ::windows_core::PWSTR, nsize : u32) -> u32); - K32GetMappedFileNameW(hprocess.into_param().abi(), lpv, ::core::mem::transmute(lpfilename.as_ptr()), lpfilename.len() as _) + K32GetMappedFileNameW(hprocess.into_param().abi(), lpv, ::core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -325,7 +325,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn K32GetModuleBaseNameA(hprocess : super::super::Foundation:: HANDLE, hmodule : super::super::Foundation:: HMODULE, lpbasename : ::windows_core::PSTR, nsize : u32) -> u32); - K32GetModuleBaseNameA(hprocess.into_param().abi(), hmodule.into_param().abi(), ::core::mem::transmute(lpbasename.as_ptr()), lpbasename.len() as _) + K32GetModuleBaseNameA(hprocess.into_param().abi(), hmodule.into_param().abi(), ::core::mem::transmute(lpbasename.as_ptr()), lpbasename.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -336,7 +336,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn K32GetModuleBaseNameW(hprocess : super::super::Foundation:: HANDLE, hmodule : super::super::Foundation:: HMODULE, lpbasename : ::windows_core::PWSTR, nsize : u32) -> u32); - K32GetModuleBaseNameW(hprocess.into_param().abi(), hmodule.into_param().abi(), ::core::mem::transmute(lpbasename.as_ptr()), lpbasename.len() as _) + K32GetModuleBaseNameW(hprocess.into_param().abi(), hmodule.into_param().abi(), ::core::mem::transmute(lpbasename.as_ptr()), lpbasename.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -347,7 +347,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn K32GetModuleFileNameExA(hprocess : super::super::Foundation:: HANDLE, hmodule : super::super::Foundation:: HMODULE, lpfilename : ::windows_core::PSTR, nsize : u32) -> u32); - K32GetModuleFileNameExA(hprocess.into_param().abi(), hmodule.into_param().abi(), ::core::mem::transmute(lpfilename.as_ptr()), lpfilename.len() as _) + K32GetModuleFileNameExA(hprocess.into_param().abi(), hmodule.into_param().abi(), ::core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -358,7 +358,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn K32GetModuleFileNameExW(hprocess : super::super::Foundation:: HANDLE, hmodule : super::super::Foundation:: HMODULE, lpfilename : ::windows_core::PWSTR, nsize : u32) -> u32); - K32GetModuleFileNameExW(hprocess.into_param().abi(), hmodule.into_param().abi(), ::core::mem::transmute(lpfilename.as_ptr()), lpfilename.len() as _) + K32GetModuleFileNameExW(hprocess.into_param().abi(), hmodule.into_param().abi(), ::core::mem::transmute(lpfilename.as_ptr()), lpfilename.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -386,7 +386,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn K32GetProcessImageFileNameA(hprocess : super::super::Foundation:: HANDLE, lpimagefilename : ::windows_core::PSTR, nsize : u32) -> u32); - K32GetProcessImageFileNameA(hprocess.into_param().abi(), ::core::mem::transmute(lpimagefilename.as_ptr()), lpimagefilename.len() as _) + K32GetProcessImageFileNameA(hprocess.into_param().abi(), ::core::mem::transmute(lpimagefilename.as_ptr()), lpimagefilename.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -396,7 +396,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn K32GetProcessImageFileNameW(hprocess : super::super::Foundation:: HANDLE, lpimagefilename : ::windows_core::PWSTR, nsize : u32) -> u32); - K32GetProcessImageFileNameW(hprocess.into_param().abi(), ::core::mem::transmute(lpimagefilename.as_ptr()), lpimagefilename.len() as _) + K32GetProcessImageFileNameW(hprocess.into_param().abi(), ::core::mem::transmute(lpimagefilename.as_ptr()), lpimagefilename.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 c46d093833..00bd1f4168 100644 --- a/crates/libs/windows/src/Windows/Win32/System/RealTimeCommunications/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/RealTimeCommunications/mod.rs @@ -5,12 +5,12 @@ impl INetworkTransportSettings { #[doc = "Required features: `\"Win32_Networking_WinSock\"`"] #[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<()> { - (::windows_core::Interface::vtable(self).ApplySetting)(::windows_core::Interface::as_raw(self), settingid, valuein.len() as _, ::core::mem::transmute(valuein.as_ptr()), lengthout, valueout).ok() + (::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, valueout).ok() } #[doc = "Required features: `\"Win32_Networking_WinSock\"`"] #[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<()> { - (::windows_core::Interface::vtable(self).QuerySetting)(::windows_core::Interface::as_raw(self), settingid, valuein.len() as _, ::core::mem::transmute(valuein.as_ptr()), lengthout, valueout).ok() + (::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, valueout).ok() } } ::windows_core::imp::interface_hierarchy!(INetworkTransportSettings, ::windows_core::IUnknown); @@ -1723,7 +1723,7 @@ pub struct IRTCDispatchEventNotification_Vtbl { pub struct IRTCEnumBuddies(::windows_core::IUnknown); impl IRTCEnumBuddies { pub unsafe fn Next(&self, ppelements: &mut [::core::option::Option], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppelements.len() as _, ::core::mem::transmute(ppelements.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), ::core::mem::transmute(ppelements.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -1757,7 +1757,7 @@ pub struct IRTCEnumBuddies_Vtbl { pub struct IRTCEnumGroups(::windows_core::IUnknown); impl IRTCEnumGroups { pub unsafe fn Next(&self, ppelements: &mut [::core::option::Option], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppelements.len() as _, ::core::mem::transmute(ppelements.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), ::core::mem::transmute(ppelements.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -1791,7 +1791,7 @@ pub struct IRTCEnumGroups_Vtbl { pub struct IRTCEnumParticipants(::windows_core::IUnknown); impl IRTCEnumParticipants { pub unsafe fn Next(&self, ppelements: &mut [::core::option::Option], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppelements.len() as _, ::core::mem::transmute(ppelements.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), ::core::mem::transmute(ppelements.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -1825,7 +1825,7 @@ pub struct IRTCEnumParticipants_Vtbl { pub struct IRTCEnumPresenceDevices(::windows_core::IUnknown); impl IRTCEnumPresenceDevices { pub unsafe fn Next(&self, ppelements: &mut [::core::option::Option], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppelements.len() as _, ::core::mem::transmute(ppelements.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), ::core::mem::transmute(ppelements.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -1859,7 +1859,7 @@ pub struct IRTCEnumPresenceDevices_Vtbl { pub struct IRTCEnumProfiles(::windows_core::IUnknown); impl IRTCEnumProfiles { pub unsafe fn Next(&self, ppelements: &mut [::core::option::Option], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppelements.len() as _, ::core::mem::transmute(ppelements.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), ::core::mem::transmute(ppelements.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -1893,7 +1893,7 @@ pub struct IRTCEnumProfiles_Vtbl { pub struct IRTCEnumUserSearchResults(::windows_core::IUnknown); impl IRTCEnumUserSearchResults { pub unsafe fn Next(&self, ppelements: &mut [::core::option::Option], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppelements.len() as _, ::core::mem::transmute(ppelements.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), ::core::mem::transmute(ppelements.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -1927,7 +1927,7 @@ pub struct IRTCEnumUserSearchResults_Vtbl { pub struct IRTCEnumWatchers(::windows_core::IUnknown); impl IRTCEnumWatchers { pub unsafe fn Next(&self, ppelements: &mut [::core::option::Option], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppelements.len() as _, ::core::mem::transmute(ppelements.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), ::core::mem::transmute(ppelements.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/System/Registry/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Registry/mod.rs index d79888c9fe..16299b1ff4 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Registry/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Registry/mod.rs @@ -336,7 +336,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn RegEnumKeyA(hkey : HKEY, dwindex : u32, lpname : ::windows_core::PSTR, cchname : u32) -> super::super::Foundation:: WIN32_ERROR); - RegEnumKeyA(hkey.into_param().abi(), dwindex, ::core::mem::transmute(lpname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpname.as_deref().map_or(0, |slice| slice.len() as _)).ok() + RegEnumKeyA(hkey.into_param().abi(), dwindex, ::core::mem::transmute(lpname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -366,7 +366,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn RegEnumKeyW(hkey : HKEY, dwindex : u32, lpname : ::windows_core::PWSTR, cchname : u32) -> super::super::Foundation:: WIN32_ERROR); - RegEnumKeyW(hkey.into_param().abi(), dwindex, ::core::mem::transmute(lpname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpname.as_deref().map_or(0, |slice| slice.len() as _)).ok() + RegEnumKeyW(hkey.into_param().abi(), dwindex, ::core::mem::transmute(lpname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -486,7 +486,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegLoadMUIStringA(hkey : HKEY, pszvalue : ::windows_core::PCSTR, pszoutbuf : ::windows_core::PSTR, cboutbuf : u32, pcbdata : *mut u32, flags : u32, pszdirectory : ::windows_core::PCSTR) -> super::super::Foundation:: WIN32_ERROR); - RegLoadMUIStringA(hkey.into_param().abi(), pszvalue.into_param().abi(), ::core::mem::transmute(pszoutbuf.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszoutbuf.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut())), flags, pszdirectory.into_param().abi()).ok() + RegLoadMUIStringA(hkey.into_param().abi(), pszvalue.into_param().abi(), ::core::mem::transmute(pszoutbuf.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszoutbuf.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut())), flags, pszdirectory.into_param().abi()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -665,7 +665,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn RegQueryMultipleValuesA(hkey : HKEY, val_list : *mut VALENTA, num_vals : u32, lpvaluebuf : ::windows_core::PSTR, ldwtotsize : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - RegQueryMultipleValuesA(hkey.into_param().abi(), ::core::mem::transmute(val_list.as_ptr()), val_list.len() as _, ::core::mem::transmute(lpvaluebuf), ::core::mem::transmute(ldwtotsize.unwrap_or(::std::ptr::null_mut()))).ok() + RegQueryMultipleValuesA(hkey.into_param().abi(), ::core::mem::transmute(val_list.as_ptr()), val_list.len().try_into().unwrap(), ::core::mem::transmute(lpvaluebuf), ::core::mem::transmute(ldwtotsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -675,7 +675,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn RegQueryMultipleValuesW(hkey : HKEY, val_list : *mut VALENTW, num_vals : u32, lpvaluebuf : ::windows_core::PWSTR, ldwtotsize : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - RegQueryMultipleValuesW(hkey.into_param().abi(), ::core::mem::transmute(val_list.as_ptr()), val_list.len() as _, ::core::mem::transmute(lpvaluebuf), ::core::mem::transmute(ldwtotsize.unwrap_or(::std::ptr::null_mut()))).ok() + RegQueryMultipleValuesW(hkey.into_param().abi(), ::core::mem::transmute(val_list.as_ptr()), val_list.len().try_into().unwrap(), ::core::mem::transmute(lpvaluebuf), ::core::mem::transmute(ldwtotsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -879,7 +879,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegSetValueA(hkey : HKEY, lpsubkey : ::windows_core::PCSTR, dwtype : REG_VALUE_TYPE, lpdata : ::windows_core::PCSTR, cbdata : u32) -> super::super::Foundation:: WIN32_ERROR); - RegSetValueA(hkey.into_param().abi(), lpsubkey.into_param().abi(), dwtype, ::core::mem::transmute(lpdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpdata.as_deref().map_or(0, |slice| slice.len() as _)).ok() + RegSetValueA(hkey.into_param().abi(), lpsubkey.into_param().abi(), dwtype, ::core::mem::transmute(lpdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -890,7 +890,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegSetValueExA(hkey : HKEY, lpvaluename : ::windows_core::PCSTR, reserved : u32, dwtype : REG_VALUE_TYPE, lpdata : *const u8, cbdata : u32) -> super::super::Foundation:: WIN32_ERROR); - RegSetValueExA(hkey.into_param().abi(), lpvaluename.into_param().abi(), reserved, dwtype, ::core::mem::transmute(lpdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpdata.as_deref().map_or(0, |slice| slice.len() as _)).ok() + RegSetValueExA(hkey.into_param().abi(), lpvaluename.into_param().abi(), reserved, dwtype, ::core::mem::transmute(lpdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -901,7 +901,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegSetValueExW(hkey : HKEY, lpvaluename : ::windows_core::PCWSTR, reserved : u32, dwtype : REG_VALUE_TYPE, lpdata : *const u8, cbdata : u32) -> super::super::Foundation:: WIN32_ERROR); - RegSetValueExW(hkey.into_param().abi(), lpvaluename.into_param().abi(), reserved, dwtype, ::core::mem::transmute(lpdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpdata.as_deref().map_or(0, |slice| slice.len() as _)).ok() + RegSetValueExW(hkey.into_param().abi(), lpvaluename.into_param().abi(), reserved, dwtype, ::core::mem::transmute(lpdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 83b8fe3d57..a401b92daf 100644 --- a/crates/libs/windows/src/Windows/Win32/System/RemoteDesktop/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/RemoteDesktop/mod.rs @@ -412,7 +412,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSSendMessageA(hserver : super::super::Foundation:: HANDLE, sessionid : u32, ptitle : ::windows_core::PCSTR, titlelength : u32, pmessage : ::windows_core::PCSTR, messagelength : u32, style : super::super::UI::WindowsAndMessaging:: MESSAGEBOX_STYLE, timeout : u32, presponse : *mut super::super::UI::WindowsAndMessaging:: MESSAGEBOX_RESULT, bwait : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - WTSSendMessageA(hserver.into_param().abi(), sessionid, ::core::mem::transmute(ptitle.as_ptr()), ptitle.len() as _, ::core::mem::transmute(pmessage.as_ptr()), pmessage.len() as _, style, timeout, presponse, bwait.into_param().abi()).ok() + WTSSendMessageA(hserver.into_param().abi(), 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, bwait.into_param().abi()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] @@ -459,7 +459,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSSetRenderHint(prenderhintid : *mut u64, hwndowner : super::super::Foundation:: HWND, renderhinttype : u32, cbhintdatalength : u32, phintdata : *const u8) -> ::windows_core::HRESULT); - WTSSetRenderHint(prenderhintid, hwndowner.into_param().abi(), renderhinttype, phintdata.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(phintdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + WTSSetRenderHint(prenderhintid, hwndowner.into_param().abi(), 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() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -470,7 +470,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSSetUserConfigA(pservername : ::windows_core::PCSTR, pusername : ::windows_core::PCSTR, wtsconfigclass : WTS_CONFIG_CLASS, pbuffer : ::windows_core::PCSTR, datalength : u32) -> super::super::Foundation:: BOOL); - WTSSetUserConfigA(pservername.into_param().abi(), pusername.into_param().abi(), wtsconfigclass, ::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len() as _).ok() + WTSSetUserConfigA(pservername.into_param().abi(), pusername.into_param().abi(), wtsconfigclass, ::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -623,7 +623,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSVirtualChannelRead(hchannelhandle : super::super::Foundation:: HANDLE, timeout : u32, buffer : ::windows_core::PSTR, buffersize : u32, pbytesread : *mut u32) -> super::super::Foundation:: BOOL); - WTSVirtualChannelRead(hchannelhandle.into_param().abi(), timeout, ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, pbytesread).ok() + WTSVirtualChannelRead(hchannelhandle.into_param().abi(), timeout, ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), pbytesread).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -633,7 +633,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSVirtualChannelWrite(hchannelhandle : super::super::Foundation:: HANDLE, buffer : ::windows_core::PCSTR, length : u32, pbyteswritten : *mut u32) -> super::super::Foundation:: BOOL); - WTSVirtualChannelWrite(hchannelhandle.into_param().abi(), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, pbyteswritten).ok() + WTSVirtualChannelWrite(hchannelhandle.into_param().abi(), ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), pbyteswritten).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1451,7 +1451,7 @@ pub struct ITSGAuthenticationEngine_Vtbl { pub struct ITSGAuthorizeConnectionSink(::windows_core::IUnknown); impl ITSGAuthorizeConnectionSink { pub unsafe fn OnConnectionAuthorized(&self, hrin: ::windows_core::HRESULT, mainsessionid: ::windows_core::GUID, pbsohresponse: &[u8], idletimeout: u32, sessiontimeout: u32, sessiontimeoutaction: SESSION_TIMEOUT_ACTION_TYPE, trustclass: AATrustClassID, policyattributes: *const u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).OnConnectionAuthorized)(::windows_core::Interface::as_raw(self), hrin, ::core::mem::transmute(mainsessionid), pbsohresponse.len() as _, ::core::mem::transmute(pbsohresponse.as_ptr()), idletimeout, sessiontimeout, sessiontimeoutaction, trustclass, policyattributes).ok() + (::windows_core::Interface::vtable(self).OnConnectionAuthorized)(::windows_core::Interface::as_raw(self), hrin, ::core::mem::transmute(mainsessionid), pbsohresponse.len().try_into().unwrap(), ::core::mem::transmute(pbsohresponse.as_ptr()), idletimeout, sessiontimeout, sessiontimeoutaction, trustclass, policyattributes).ok() } } ::windows_core::imp::interface_hierarchy!(ITSGAuthorizeConnectionSink, ::windows_core::IUnknown); @@ -1472,7 +1472,7 @@ pub struct ITSGAuthorizeConnectionSink_Vtbl { pub struct ITSGAuthorizeResourceSink(::windows_core::IUnknown); impl ITSGAuthorizeResourceSink { pub unsafe fn OnChannelAuthorized(&self, hrin: ::windows_core::HRESULT, mainsessionid: ::windows_core::GUID, subsessionid: i32, allowedresourcenames: &[::windows_core::BSTR], failedresourcenames: &[::windows_core::BSTR]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).OnChannelAuthorized)(::windows_core::Interface::as_raw(self), hrin, ::core::mem::transmute(mainsessionid), subsessionid, ::core::mem::transmute(allowedresourcenames.as_ptr()), allowedresourcenames.len() as _, ::core::mem::transmute(failedresourcenames.as_ptr()), failedresourcenames.len() as _).ok() + (::windows_core::Interface::vtable(self).OnChannelAuthorized)(::windows_core::Interface::as_raw(self), hrin, ::core::mem::transmute(mainsessionid), subsessionid, ::core::mem::transmute(allowedresourcenames.as_ptr()), allowedresourcenames.len().try_into().unwrap(), ::core::mem::transmute(failedresourcenames.as_ptr()), failedresourcenames.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(ITSGAuthorizeResourceSink, ::windows_core::IUnknown); @@ -1502,7 +1502,7 @@ impl ITSGPolicyEngine { P3: ::windows_core::IntoParam, P4: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).AuthorizeConnection)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(mainsessionid), username.into_param().abi(), authtype, clientmachineip.into_param().abi(), clientmachinename.into_param().abi(), ::core::mem::transmute(sohdata.as_ptr()), sohdata.len() as _, ::core::mem::transmute(cookiedata.as_ptr()), cookiedata.len() as _, usertoken.into_param().abi(), psink.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).AuthorizeConnection)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(mainsessionid), username.into_param().abi(), authtype, clientmachineip.into_param().abi(), clientmachinename.into_param().abi(), ::core::mem::transmute(sohdata.as_ptr()), sohdata.len().try_into().unwrap(), ::core::mem::transmute(cookiedata.as_ptr()), cookiedata.len().try_into().unwrap(), usertoken.into_param().abi(), psink.into_param().abi()).ok() } pub unsafe fn AuthorizeResource(&self, mainsessionid: ::windows_core::GUID, subsessionid: i32, username: P0, resourcenames: &[::windows_core::BSTR], alternateresourcenames: &[::windows_core::BSTR], portnumber: u32, operation: P1, cookie: &[u8], psink: P2) -> ::windows_core::Result<()> where @@ -1510,7 +1510,7 @@ impl ITSGPolicyEngine { P1: ::windows_core::IntoParam<::windows_core::BSTR>, P2: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).AuthorizeResource)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(mainsessionid), subsessionid, username.into_param().abi(), ::core::mem::transmute(resourcenames.as_ptr()), resourcenames.len() as _, ::core::mem::transmute(alternateresourcenames.as_ptr()), alternateresourcenames.len() as _, portnumber, operation.into_param().abi(), ::core::mem::transmute(cookie.as_ptr()), cookie.len() as _, psink.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).AuthorizeResource)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(mainsessionid), subsessionid, username.into_param().abi(), ::core::mem::transmute(resourcenames.as_ptr()), resourcenames.len().try_into().unwrap(), ::core::mem::transmute(alternateresourcenames.as_ptr()), alternateresourcenames.len().try_into().unwrap(), portnumber, operation.into_param().abi(), ::core::mem::transmute(cookie.as_ptr()), cookie.len().try_into().unwrap(), psink.into_param().abi()).ok() } pub unsafe fn Refresh(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Refresh)(::windows_core::Interface::as_raw(self)).ok() @@ -3173,7 +3173,7 @@ impl ITsSbTarget { (::windows_core::Interface::vtable(self).get_IpAddresses)(::windows_core::Interface::as_raw(self), sockaddr, numaddresses).ok() } pub unsafe fn put_IpAddresses(&self, sockaddr: &[TSSD_ConnectionPoint]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).put_IpAddresses)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(sockaddr.as_ptr()), sockaddr.len() as _).ok() + (::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() } pub unsafe fn TargetState(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -3406,7 +3406,7 @@ impl ITsSbTaskPlugin { where P0: ::windows_core::IntoParam<::windows_core::BSTR>, { - (::windows_core::Interface::vtable(self).SetTaskQueue)(::windows_core::Interface::as_raw(self), pszhostname.into_param().abi(), pitssbtaskinfo.len() as _, ::core::mem::transmute(pitssbtaskinfo.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetTaskQueue)(::windows_core::Interface::as_raw(self), pszhostname.into_param().abi(), pitssbtaskinfo.len().try_into().unwrap(), ::core::mem::transmute(pitssbtaskinfo.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(ITsSbTaskPlugin, ::windows_core::IUnknown, ITsSbPlugin); @@ -3723,7 +3723,7 @@ impl IWRdsProtocolConnection { (::windows_core::Interface::vtable(self).CreateVirtualChannel)(::windows_core::Interface::as_raw(self), szendpointname.into_param().abi(), bstatic.into_param().abi(), requestedpriority, &mut result__).from_abi(result__) } pub unsafe fn QueryProperty(&self, querytype: ::windows_core::GUID, ppropertyentriesin: &[WTS_PROPERTY_VALUE], ppropertyentriesout: &mut [WTS_PROPERTY_VALUE]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).QueryProperty)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(querytype), ppropertyentriesin.len() as _, ppropertyentriesout.len() as _, ::core::mem::transmute(ppropertyentriesin.as_ptr()), ::core::mem::transmute(ppropertyentriesout.as_ptr())).ok() + (::windows_core::Interface::vtable(self).QueryProperty)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(querytype), ppropertyentriesin.len().try_into().unwrap(), ppropertyentriesout.len().try_into().unwrap(), ::core::mem::transmute(ppropertyentriesin.as_ptr()), ::core::mem::transmute(ppropertyentriesout.as_ptr())).ok() } pub unsafe fn GetShadowConnection(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -3866,10 +3866,10 @@ impl IWRdsProtocolLicenseConnection { (::windows_core::Interface::vtable(self).RequestLicensingCapabilities)(::windows_core::Interface::as_raw(self), pplicensecapabilities, pcblicensecapabilities).ok() } pub unsafe fn SendClientLicense(&self, pclientlicense: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SendClientLicense)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pclientlicense.as_ptr()), pclientlicense.len() as _).ok() + (::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<()> { - (::windows_core::Interface::vtable(self).RequestClientLicense)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(reserve1.as_ptr()), reserve1.len() as _, ppclientlicense, pcbclientlicense).ok() + (::windows_core::Interface::vtable(self).RequestClientLicense)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(reserve1.as_ptr()), reserve1.len().try_into().unwrap(), ppclientlicense, pcbclientlicense).ok() } pub unsafe fn ProtocolComplete(&self, ulcomplete: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).ProtocolComplete)(::windows_core::Interface::as_raw(self), ulcomplete).ok() @@ -4117,7 +4117,7 @@ impl IWRdsProtocolShadowCallback { P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).InvokeTargetShadow)(::windows_core::Interface::as_raw(self), ptargetservername.into_param().abi(), targetsessionid, ::core::mem::transmute(pparam1.as_ptr()), pparam1.len() as _, ::core::mem::transmute(pparam2.as_ptr()), pparam2.len() as _, ::core::mem::transmute(pparam3.as_ptr()), pparam3.len() as _, ::core::mem::transmute(pparam4.as_ptr()), pparam4.len() as _, pclientname.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).InvokeTargetShadow)(::windows_core::Interface::as_raw(self), ptargetservername.into_param().abi(), targetsessionid, ::core::mem::transmute(pparam1.as_ptr()), pparam1.len().try_into().unwrap(), ::core::mem::transmute(pparam2.as_ptr()), pparam2.len().try_into().unwrap(), ::core::mem::transmute(pparam3.as_ptr()), pparam3.len().try_into().unwrap(), ::core::mem::transmute(pparam4.as_ptr()), pparam4.len().try_into().unwrap(), pclientname.into_param().abi()).ok() } } ::windows_core::imp::interface_hierarchy!(IWRdsProtocolShadowCallback, ::windows_core::IUnknown); @@ -4152,7 +4152,7 @@ impl IWRdsProtocolShadowConnection { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).DoTarget)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pparam1.as_ptr()), pparam1.len() as _, ::core::mem::transmute(pparam2.as_ptr()), pparam2.len() as _, ::core::mem::transmute(pparam3.as_ptr()), pparam3.len() as _, ::core::mem::transmute(pparam4.as_ptr()), pparam4.len() as _, pclientname.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).DoTarget)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pparam1.as_ptr()), pparam1.len().try_into().unwrap(), ::core::mem::transmute(pparam2.as_ptr()), pparam2.len().try_into().unwrap(), ::core::mem::transmute(pparam3.as_ptr()), pparam3.len().try_into().unwrap(), ::core::mem::transmute(pparam4.as_ptr()), pparam4.len().try_into().unwrap(), pclientname.into_param().abi()).ok() } } ::windows_core::imp::interface_hierarchy!(IWRdsProtocolShadowConnection, ::windows_core::IUnknown); @@ -4175,7 +4175,7 @@ pub struct IWRdsProtocolShadowConnection_Vtbl { pub struct IWRdsWddmIddProps(::windows_core::IUnknown); impl IWRdsWddmIddProps { pub unsafe fn GetHardwareId(&self, pdisplaydriverhardwareid: &[u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetHardwareId)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdisplaydriverhardwareid.as_ptr()), pdisplaydriverhardwareid.len() as _).ok() + (::windows_core::Interface::vtable(self).GetHardwareId)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pdisplaydriverhardwareid.as_ptr()), pdisplaydriverhardwareid.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -4249,7 +4249,7 @@ pub struct IWTSBitmapRenderService_Vtbl { pub struct IWTSBitmapRenderer(::windows_core::IUnknown); impl IWTSBitmapRenderer { pub unsafe fn Render(&self, imageformat: ::windows_core::GUID, dwwidth: u32, dwheight: u32, cbstride: i32, pimagebuffer: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Render)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(imageformat), dwwidth, dwheight, cbstride, pimagebuffer.len() as _, ::core::mem::transmute(pimagebuffer.as_ptr())).ok() + (::windows_core::Interface::vtable(self).Render)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(imageformat), dwwidth, dwheight, cbstride, pimagebuffer.len().try_into().unwrap(), ::core::mem::transmute(pimagebuffer.as_ptr())).ok() } pub unsafe fn GetRendererStatistics(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -4521,7 +4521,7 @@ impl IWTSProtocolConnection { (::windows_core::Interface::vtable(self).CreateVirtualChannel)(::windows_core::Interface::as_raw(self), szendpointname.into_param().abi(), bstatic.into_param().abi(), requestedpriority, &mut result__).from_abi(result__) } pub unsafe fn QueryProperty(&self, querytype: ::windows_core::GUID, ppropertyentriesin: &[WTS_PROPERTY_VALUE], ppropertyentriesout: &mut [WTS_PROPERTY_VALUE]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).QueryProperty)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(querytype), ppropertyentriesin.len() as _, ppropertyentriesout.len() as _, ::core::mem::transmute(ppropertyentriesin.as_ptr()), ::core::mem::transmute(ppropertyentriesout.as_ptr())).ok() + (::windows_core::Interface::vtable(self).QueryProperty)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(querytype), ppropertyentriesin.len().try_into().unwrap(), ppropertyentriesout.len().try_into().unwrap(), ::core::mem::transmute(ppropertyentriesin.as_ptr()), ::core::mem::transmute(ppropertyentriesout.as_ptr())).ok() } pub unsafe fn GetShadowConnection(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -4634,10 +4634,10 @@ impl IWTSProtocolLicenseConnection { (::windows_core::Interface::vtable(self).RequestLicensingCapabilities)(::windows_core::Interface::as_raw(self), pplicensecapabilities, pcblicensecapabilities).ok() } pub unsafe fn SendClientLicense(&self, pclientlicense: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SendClientLicense)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pclientlicense.as_ptr()), pclientlicense.len() as _).ok() + (::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<()> { - (::windows_core::Interface::vtable(self).RequestClientLicense)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(reserve1.as_ptr()), reserve1.len() as _, ppclientlicense, pcbclientlicense).ok() + (::windows_core::Interface::vtable(self).RequestClientLicense)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(reserve1.as_ptr()), reserve1.len().try_into().unwrap(), ppclientlicense, pcbclientlicense).ok() } pub unsafe fn ProtocolComplete(&self, ulcomplete: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).ProtocolComplete)(::windows_core::Interface::as_raw(self), ulcomplete).ok() @@ -4815,7 +4815,7 @@ impl IWTSProtocolShadowCallback { P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).InvokeTargetShadow)(::windows_core::Interface::as_raw(self), ptargetservername.into_param().abi(), targetsessionid, ::core::mem::transmute(pparam1.as_ptr()), pparam1.len() as _, ::core::mem::transmute(pparam2.as_ptr()), pparam2.len() as _, ::core::mem::transmute(pparam3.as_ptr()), pparam3.len() as _, ::core::mem::transmute(pparam4.as_ptr()), pparam4.len() as _, pclientname.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).InvokeTargetShadow)(::windows_core::Interface::as_raw(self), ptargetservername.into_param().abi(), targetsessionid, ::core::mem::transmute(pparam1.as_ptr()), pparam1.len().try_into().unwrap(), ::core::mem::transmute(pparam2.as_ptr()), pparam2.len().try_into().unwrap(), ::core::mem::transmute(pparam3.as_ptr()), pparam3.len().try_into().unwrap(), ::core::mem::transmute(pparam4.as_ptr()), pparam4.len().try_into().unwrap(), pclientname.into_param().abi()).ok() } } ::windows_core::imp::interface_hierarchy!(IWTSProtocolShadowCallback, ::windows_core::IUnknown); @@ -4850,7 +4850,7 @@ impl IWTSProtocolShadowConnection { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).DoTarget)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pparam1.as_ptr()), pparam1.len() as _, ::core::mem::transmute(pparam2.as_ptr()), pparam2.len() as _, ::core::mem::transmute(pparam3.as_ptr()), pparam3.len() as _, ::core::mem::transmute(pparam4.as_ptr()), pparam4.len() as _, pclientname.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).DoTarget)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pparam1.as_ptr()), pparam1.len().try_into().unwrap(), ::core::mem::transmute(pparam2.as_ptr()), pparam2.len().try_into().unwrap(), ::core::mem::transmute(pparam3.as_ptr()), pparam3.len().try_into().unwrap(), ::core::mem::transmute(pparam4.as_ptr()), pparam4.len().try_into().unwrap(), pclientname.into_param().abi()).ok() } } ::windows_core::imp::interface_hierarchy!(IWTSProtocolShadowConnection, ::windows_core::IUnknown); @@ -4882,7 +4882,7 @@ impl IWTSSBPlugin { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn WTSSBX_SessionChangeNotification(&self, notificationtype: WTSSBX_NOTIFICATION_TYPE, machineid: i32, sessioninfo: &[WTSSBX_SESSION_INFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).WTSSBX_SessionChangeNotification)(::windows_core::Interface::as_raw(self), notificationtype, machineid, sessioninfo.len() as _, ::core::mem::transmute(sessioninfo.as_ptr())).ok() + (::windows_core::Interface::vtable(self).WTSSBX_SessionChangeNotification)(::windows_core::Interface::as_raw(self), notificationtype, machineid, sessioninfo.len().try_into().unwrap(), ::core::mem::transmute(sessioninfo.as_ptr())).ok() } pub unsafe fn WTSSBX_GetMostSuitableServer(&self, username: P0, domainname: P1, applicationtype: P2, farmname: P3, pmachineid: *mut i32) -> ::windows_core::Result<()> where @@ -4934,7 +4934,7 @@ impl IWTSVirtualChannel { where P0: ::windows_core::IntoParam<::windows_core::IUnknown>, { - (::windows_core::Interface::vtable(self).Write)(::windows_core::Interface::as_raw(self), pbuffer.len() as _, ::core::mem::transmute(pbuffer.as_ptr()), preserved.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).Write)(::windows_core::Interface::as_raw(self), pbuffer.len().try_into().unwrap(), ::core::mem::transmute(pbuffer.as_ptr()), preserved.into_param().abi()).ok() } pub unsafe fn Close(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Close)(::windows_core::Interface::as_raw(self)).ok() @@ -4959,7 +4959,7 @@ pub struct IWTSVirtualChannel_Vtbl { pub struct IWTSVirtualChannelCallback(::windows_core::IUnknown); impl IWTSVirtualChannelCallback { pub unsafe fn OnDataReceived(&self, pbuffer: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).OnDataReceived)(::windows_core::Interface::as_raw(self), pbuffer.len() as _, ::core::mem::transmute(pbuffer.as_ptr())).ok() + (::windows_core::Interface::vtable(self).OnDataReceived)(::windows_core::Interface::as_raw(self), pbuffer.len().try_into().unwrap(), ::core::mem::transmute(pbuffer.as_ptr())).ok() } pub unsafe fn OnClose(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).OnClose)(::windows_core::Interface::as_raw(self)).ok() 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 e13b8f36f0..cc044b8fba 100644 --- a/crates/libs/windows/src/Windows/Win32/System/RemoteManagement/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/RemoteManagement/mod.rs @@ -116,7 +116,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wsmsvc.dll" "system" fn WSManGetErrorMessage(apihandle : WSMAN_API_HANDLE, flags : u32, languagecode : ::windows_core::PCWSTR, errorcode : u32, messagelength : u32, message : ::windows_core::PWSTR, messagelengthused : *mut u32) -> u32); - WSManGetErrorMessage(apihandle.into_param().abi(), flags, languagecode.into_param().abi(), errorcode, message.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(message.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), messagelengthused) + WSManGetErrorMessage(apihandle.into_param().abi(), flags, languagecode.into_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) } #[inline] pub unsafe fn WSManGetSessionOptionAsDword(session: P0, option: WSManSessionOption, value: *mut u32) -> u32 @@ -132,7 +132,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wsmsvc.dll" "system" fn WSManGetSessionOptionAsString(session : WSMAN_SESSION_HANDLE, option : WSManSessionOption, stringlength : u32, string : ::windows_core::PWSTR, stringlengthused : *mut u32) -> u32); - WSManGetSessionOptionAsString(session.into_param().abi(), option, string.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(string.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), stringlengthused) + WSManGetSessionOptionAsString(session.into_param().abi(), 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) } #[inline] pub unsafe fn WSManInitialize(flags: u32, apihandle: *mut WSMAN_API_HANDLE) -> u32 { 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 694e179ab8..47b78da6a6 100644 --- a/crates/libs/windows/src/Windows/Win32/System/RestartManager/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/RestartManager/mod.rs @@ -28,7 +28,7 @@ pub unsafe fn RmEndSession(dwsessionhandle: u32) -> ::windows_core::Result<()> { #[inline] pub unsafe fn RmGetFilterList(dwsessionhandle: u32, pbfilterbuf: ::core::option::Option<&mut [u8]>, cbfilterbufneeded: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("rstrtmgr.dll" "system" fn RmGetFilterList(dwsessionhandle : u32, pbfilterbuf : *mut u8, cbfilterbuf : u32, cbfilterbufneeded : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - 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() as _), cbfilterbufneeded).ok() + 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).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -54,11 +54,11 @@ pub unsafe fn RmRegisterResources(dwsessionhandle: u32, rgsfilenames: ::core::op ::windows_targets::link!("rstrtmgr.dll" "system" fn RmRegisterResources(dwsessionhandle : u32, nfiles : u32, rgsfilenames : *const ::windows_core::PCWSTR, napplications : u32, rgapplications : *const RM_UNIQUE_PROCESS, nservices : u32, rgsservicenames : *const ::windows_core::PCWSTR) -> super::super::Foundation:: WIN32_ERROR); RmRegisterResources( dwsessionhandle, - rgsfilenames.as_deref().map_or(0, |slice| slice.len() as _), + rgsfilenames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(rgsfilenames.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - rgapplications.as_deref().map_or(0, |slice| slice.len() as _), + rgapplications.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(rgapplications.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - rgsservicenames.as_deref().map_or(0, |slice| slice.len() as _), + rgsservicenames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(rgsservicenames.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ) .ok() 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 476554a266..b5d330e7c7 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Rpc/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Rpc/mod.rs @@ -434,12 +434,12 @@ pub unsafe fn I_UuidCreate(uuid: *mut ::windows_core::GUID) -> RPC_STATUS { #[inline] pub unsafe fn MesBufferHandleReset(handle: *const ::core::ffi::c_void, handlestyle: u32, operation: MIDL_ES_CODE, pbuffer: ::core::option::Option<&[u8]>, pencodedsize: ::core::option::Option<*mut u32>) -> RPC_STATUS { ::windows_targets::link!("rpcrt4.dll" "system" fn MesBufferHandleReset(handle : *const ::core::ffi::c_void, handlestyle : u32, operation : MIDL_ES_CODE, pbuffer : *const *const i8, buffersize : u32, pencodedsize : *mut u32) -> RPC_STATUS); - MesBufferHandleReset(handle, handlestyle, operation, ::core::mem::transmute(pbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pencodedsize.unwrap_or(::std::ptr::null_mut()))) + MesBufferHandleReset(handle, handlestyle, operation, ::core::mem::transmute(pbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pencodedsize.unwrap_or(::std::ptr::null_mut()))) } #[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); - MesDecodeBufferHandleCreate(::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, phandle) + MesDecodeBufferHandleCreate(::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), phandle) } #[inline] pub unsafe fn MesDecodeIncrementalHandleCreate(userstate: *mut ::core::ffi::c_void, readfn: MIDL_ES_READ, phandle: *mut *mut ::core::ffi::c_void) -> RPC_STATUS { @@ -454,7 +454,7 @@ pub unsafe fn MesEncodeDynBufferHandleCreate(pbuffer: *mut *mut i8, pencodedsize #[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); - MesEncodeFixedBufferHandleCreate(::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len() as _, pencodedsize, phandle) + MesEncodeFixedBufferHandleCreate(::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap(), pencodedsize, phandle) } #[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 { @@ -2746,12 +2746,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); - RpcServerInterfaceGroupCreateA(::core::mem::transmute(interfaces.as_ptr()), interfaces.len() as _, ::core::mem::transmute(endpoints.as_ptr()), endpoints.len() as _, idleperiod, idlecallbackfn, idlecallbackcontext, ifgroup) + 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) } #[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); - RpcServerInterfaceGroupCreateW(::core::mem::transmute(interfaces.as_ptr()), interfaces.len() as _, ::core::mem::transmute(endpoints.as_ptr()), endpoints.len() as _, idleperiod, idlecallbackfn, idlecallbackcontext, ifgroup) + 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) } #[inline] pub unsafe fn RpcServerInterfaceGroupDeactivate(ifgroup: *const ::core::ffi::c_void, forcedeactivation: u32) -> RPC_STATUS { diff --git a/crates/libs/windows/src/Windows/Win32/System/Search/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Search/mod.rs index 9243df5b33..4b0ade4bb3 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Search/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Search/mod.rs @@ -77,17 +77,17 @@ pub unsafe fn SQLBindParameter(hstmt: *mut ::core::ffi::c_void, ipar: u16, fpara #[inline] pub unsafe fn SQLBrowseConnect(hdbc: *mut ::core::ffi::c_void, szconnstrin: &[u8], szconnstrout: ::core::option::Option<&mut [u8]>, pcchconnstrout: ::core::option::Option<*mut i16>) -> i16 { ::windows_targets::link!("odbc32.dll" "system" fn SQLBrowseConnect(hdbc : *mut ::core::ffi::c_void, szconnstrin : *const u8, cchconnstrin : i16, szconnstrout : *mut u8, cchconnstroutmax : i16, pcchconnstrout : *mut i16) -> i16); - SQLBrowseConnect(hdbc, ::core::mem::transmute(szconnstrin.as_ptr()), szconnstrin.len() as _, ::core::mem::transmute(szconnstrout.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), szconnstrout.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcchconnstrout.unwrap_or(::std::ptr::null_mut()))) + SQLBrowseConnect(hdbc, ::core::mem::transmute(szconnstrin.as_ptr()), szconnstrin.len().try_into().unwrap(), ::core::mem::transmute(szconnstrout.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), szconnstrout.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcchconnstrout.unwrap_or(::std::ptr::null_mut()))) } #[inline] pub unsafe fn SQLBrowseConnectA(hdbc: *mut ::core::ffi::c_void, szconnstrin: &[u8], szconnstrout: ::core::option::Option<&mut [u8]>, pcbconnstrout: ::core::option::Option<*mut i16>) -> i16 { ::windows_targets::link!("odbc32.dll" "system" fn SQLBrowseConnectA(hdbc : *mut ::core::ffi::c_void, szconnstrin : *const u8, cbconnstrin : i16, szconnstrout : *mut u8, cbconnstroutmax : i16, pcbconnstrout : *mut i16) -> i16); - SQLBrowseConnectA(hdbc, ::core::mem::transmute(szconnstrin.as_ptr()), szconnstrin.len() as _, ::core::mem::transmute(szconnstrout.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), szconnstrout.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcbconnstrout.unwrap_or(::std::ptr::null_mut()))) + SQLBrowseConnectA(hdbc, ::core::mem::transmute(szconnstrin.as_ptr()), szconnstrin.len().try_into().unwrap(), ::core::mem::transmute(szconnstrout.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), szconnstrout.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcbconnstrout.unwrap_or(::std::ptr::null_mut()))) } #[inline] pub unsafe fn SQLBrowseConnectW(hdbc: *mut ::core::ffi::c_void, szconnstrin: &[u16], szconnstrout: ::core::option::Option<&mut [u16]>, pcchconnstrout: ::core::option::Option<*mut i16>) -> i16 { ::windows_targets::link!("odbc32.dll" "system" fn SQLBrowseConnectW(hdbc : *mut ::core::ffi::c_void, szconnstrin : *const u16, cchconnstrin : i16, szconnstrout : *mut u16, cchconnstroutmax : i16, pcchconnstrout : *mut i16) -> i16); - SQLBrowseConnectW(hdbc, ::core::mem::transmute(szconnstrin.as_ptr()), szconnstrin.len() as _, ::core::mem::transmute(szconnstrout.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), szconnstrout.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcchconnstrout.unwrap_or(::std::ptr::null_mut()))) + SQLBrowseConnectW(hdbc, ::core::mem::transmute(szconnstrin.as_ptr()), szconnstrin.len().try_into().unwrap(), ::core::mem::transmute(szconnstrout.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), szconnstrout.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcchconnstrout.unwrap_or(::std::ptr::null_mut()))) } #[inline] pub unsafe fn SQLBulkOperations(statementhandle: *mut ::core::ffi::c_void, operation: i16) -> i16 { @@ -197,13 +197,13 @@ pub unsafe fn SQLColumnPrivileges(hstmt: *mut ::core::ffi::c_void, szcatalogname SQLColumnPrivileges( hstmt, ::core::mem::transmute(szcatalogname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szcatalogname.as_deref().map_or(0, |slice| slice.len() as _), + 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())), - szschemaname.as_deref().map_or(0, |slice| slice.len() as _), + szschemaname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(sztablename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - sztablename.as_deref().map_or(0, |slice| slice.len() as _), + sztablename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(szcolumnname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szcolumnname.as_deref().map_or(0, |slice| slice.len() as _), + szcolumnname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ) } #[inline] @@ -212,13 +212,13 @@ pub unsafe fn SQLColumnPrivilegesA(hstmt: *mut ::core::ffi::c_void, szcatalognam SQLColumnPrivilegesA( hstmt, ::core::mem::transmute(szcatalogname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szcatalogname.as_deref().map_or(0, |slice| slice.len() as _), + 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())), - szschemaname.as_deref().map_or(0, |slice| slice.len() as _), + szschemaname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(sztablename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - sztablename.as_deref().map_or(0, |slice| slice.len() as _), + sztablename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(szcolumnname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szcolumnname.as_deref().map_or(0, |slice| slice.len() as _), + szcolumnname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ) } #[inline] @@ -227,13 +227,13 @@ pub unsafe fn SQLColumnPrivilegesW(hstmt: *mut ::core::ffi::c_void, szcatalognam SQLColumnPrivilegesW( hstmt, ::core::mem::transmute(szcatalogname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szcatalogname.as_deref().map_or(0, |slice| slice.len() as _), + 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())), - szschemaname.as_deref().map_or(0, |slice| slice.len() as _), + szschemaname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(sztablename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - sztablename.as_deref().map_or(0, |slice| slice.len() as _), + sztablename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(szcolumnname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szcolumnname.as_deref().map_or(0, |slice| slice.len() as _), + szcolumnname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ) } #[inline] @@ -242,13 +242,13 @@ pub unsafe fn SQLColumns(statementhandle: *mut ::core::ffi::c_void, catalogname: SQLColumns( statementhandle, ::core::mem::transmute(catalogname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - catalogname.as_deref().map_or(0, |slice| slice.len() as _), + 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())), - schemaname.as_deref().map_or(0, |slice| slice.len() as _), + schemaname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(tablename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - tablename.as_deref().map_or(0, |slice| slice.len() as _), + tablename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(columnname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - columnname.as_deref().map_or(0, |slice| slice.len() as _), + columnname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ) } #[inline] @@ -257,13 +257,13 @@ pub unsafe fn SQLColumnsA(hstmt: *mut ::core::ffi::c_void, szcatalogname: ::core SQLColumnsA( hstmt, ::core::mem::transmute(szcatalogname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szcatalogname.as_deref().map_or(0, |slice| slice.len() as _), + 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())), - szschemaname.as_deref().map_or(0, |slice| slice.len() as _), + szschemaname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(sztablename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - sztablename.as_deref().map_or(0, |slice| slice.len() as _), + sztablename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(szcolumnname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szcolumnname.as_deref().map_or(0, |slice| slice.len() as _), + szcolumnname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ) } #[inline] @@ -272,13 +272,13 @@ pub unsafe fn SQLColumnsW(hstmt: *mut ::core::ffi::c_void, szcatalogname: ::core SQLColumnsW( hstmt, ::core::mem::transmute(szcatalogname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szcatalogname.as_deref().map_or(0, |slice| slice.len() as _), + 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())), - szschemaname.as_deref().map_or(0, |slice| slice.len() as _), + szschemaname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(sztablename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - sztablename.as_deref().map_or(0, |slice| slice.len() as _), + sztablename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(szcolumnname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szcolumnname.as_deref().map_or(0, |slice| slice.len() as _), + szcolumnname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ) } #[inline] @@ -289,17 +289,17 @@ pub unsafe fn SQLCompleteAsync(handletype: i16, handle: *mut ::core::ffi::c_void #[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); - SQLConnect(connectionhandle, ::core::mem::transmute(servername.as_ptr()), servername.len() as _, ::core::mem::transmute(username.as_ptr()), username.len() as _, ::core::mem::transmute(authentication.as_ptr()), authentication.len() as _) + SQLConnect(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()) } #[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); - SQLConnectA(hdbc, ::core::mem::transmute(szdsn.as_ptr()), szdsn.len() as _, ::core::mem::transmute(szuid.as_ptr()), szuid.len() as _, ::core::mem::transmute(szauthstr.as_ptr()), szauthstr.len() as _) + SQLConnectA(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()) } #[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); - SQLConnectW(hdbc, ::core::mem::transmute(szdsn.as_ptr()), szdsn.len() as _, ::core::mem::transmute(szuid.as_ptr()), szuid.len() as _, ::core::mem::transmute(szauthstr.as_ptr()), szauthstr.len() as _) + SQLConnectW(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()) } #[inline] pub unsafe fn SQLCopyDesc(sourcedeschandle: *mut ::core::ffi::c_void, targetdeschandle: *mut ::core::ffi::c_void) -> i16 { @@ -313,22 +313,31 @@ pub unsafe fn SQLDataSources(environmenthandle: *mut ::core::ffi::c_void, direct 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() as _), + servername.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namelength1ptr.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(description.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - description.as_deref().map_or(0, |slice| slice.len() as _), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namelength2ptr.unwrap_or(::std::ptr::null_mut())), ) } #[inline] pub unsafe fn SQLDataSourcesA(henv: *mut ::core::ffi::c_void, fdirection: u16, szdsn: ::core::option::Option<&mut [u8]>, pcbdsn: *mut i16, szdescription: ::core::option::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); - SQLDataSourcesA(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() as _), 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() as _), pcbdescription) + SQLDataSourcesA(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()), 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()), pcbdescription) } #[inline] pub unsafe fn SQLDataSourcesW(henv: *mut ::core::ffi::c_void, fdirection: u16, szdsn: ::core::option::Option<&mut [u16]>, pcchdsn: ::core::option::Option<*mut i16>, wszdescription: ::core::option::Option<&mut [u16]>, pcchdescription: ::core::option::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); - SQLDataSourcesW(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() as _), ::core::mem::transmute(pcchdsn.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(wszdescription.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), wszdescription.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcchdescription.unwrap_or(::std::ptr::null_mut()))) + SQLDataSourcesW( + 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(::std::ptr::null_mut())), + ::core::mem::transmute(wszdescription.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), + wszdescription.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), + ::core::mem::transmute(pcchdescription.unwrap_or(::std::ptr::null_mut())), + ) } #[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))] #[inline] @@ -338,7 +347,7 @@ pub unsafe fn SQLDescribeCol(statementhandle: *mut ::core::ffi::c_void, columnnu 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() as _), + columnname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namelength.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(datatype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(columnsize.unwrap_or(::std::ptr::null_mut())), @@ -354,7 +363,7 @@ pub unsafe fn SQLDescribeCol(statementhandle: *mut ::core::ffi::c_void, columnnu 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() as _), + columnname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namelength.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(datatype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(columnsize.unwrap_or(::std::ptr::null_mut())), @@ -370,7 +379,7 @@ pub unsafe fn SQLDescribeColA(hstmt: *mut ::core::ffi::c_void, icol: u16, szcoln 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() as _), + szcolname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcbcolname.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pfsqltype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbcoldef.unwrap_or(::std::ptr::null_mut())), @@ -386,7 +395,7 @@ pub unsafe fn SQLDescribeColA(hstmt: *mut ::core::ffi::c_void, icol: u16, szcoln 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() as _), + szcolname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcbcolname.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pfsqltype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbcoldef.unwrap_or(::std::ptr::null_mut())), @@ -402,7 +411,7 @@ pub unsafe fn SQLDescribeColW(hstmt: *mut ::core::ffi::c_void, icol: u16, szcoln 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() as _), + szcolname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcchcolname.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pfsqltype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbcoldef.unwrap_or(::std::ptr::null_mut())), @@ -418,7 +427,7 @@ pub unsafe fn SQLDescribeColW(hstmt: *mut ::core::ffi::c_void, icol: u16, szcoln 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() as _), + szcolname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcchcolname.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pfsqltype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbcoldef.unwrap_or(::std::ptr::null_mut())), @@ -446,17 +455,17 @@ pub unsafe fn SQLDisconnect(connectionhandle: *mut ::core::ffi::c_void) -> i16 { #[inline] pub unsafe fn SQLDriverConnect(hdbc: *mut ::core::ffi::c_void, hwnd: isize, szconnstrin: &[u8], szconnstrout: ::core::option::Option<&mut [u8]>, pcchconnstrout: ::core::option::Option<*mut i16>, fdrivercompletion: u16) -> i16 { ::windows_targets::link!("odbc32.dll" "system" fn SQLDriverConnect(hdbc : *mut ::core::ffi::c_void, hwnd : isize, szconnstrin : *const u8, cchconnstrin : i16, szconnstrout : *mut u8, cchconnstroutmax : i16, pcchconnstrout : *mut i16, fdrivercompletion : u16) -> i16); - SQLDriverConnect(hdbc, hwnd, ::core::mem::transmute(szconnstrin.as_ptr()), szconnstrin.len() as _, ::core::mem::transmute(szconnstrout.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), szconnstrout.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcchconnstrout.unwrap_or(::std::ptr::null_mut())), fdrivercompletion) + SQLDriverConnect(hdbc, hwnd, ::core::mem::transmute(szconnstrin.as_ptr()), szconnstrin.len().try_into().unwrap(), ::core::mem::transmute(szconnstrout.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), szconnstrout.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcchconnstrout.unwrap_or(::std::ptr::null_mut())), fdrivercompletion) } #[inline] pub unsafe fn SQLDriverConnectA(hdbc: *mut ::core::ffi::c_void, hwnd: isize, szconnstrin: &[u8], szconnstrout: ::core::option::Option<&mut [u8]>, pcbconnstrout: ::core::option::Option<*mut i16>, fdrivercompletion: u16) -> i16 { ::windows_targets::link!("odbc32.dll" "system" fn SQLDriverConnectA(hdbc : *mut ::core::ffi::c_void, hwnd : isize, szconnstrin : *const u8, cbconnstrin : i16, szconnstrout : *mut u8, cbconnstroutmax : i16, pcbconnstrout : *mut i16, fdrivercompletion : u16) -> i16); - SQLDriverConnectA(hdbc, hwnd, ::core::mem::transmute(szconnstrin.as_ptr()), szconnstrin.len() as _, ::core::mem::transmute(szconnstrout.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), szconnstrout.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcbconnstrout.unwrap_or(::std::ptr::null_mut())), fdrivercompletion) + SQLDriverConnectA(hdbc, hwnd, ::core::mem::transmute(szconnstrin.as_ptr()), szconnstrin.len().try_into().unwrap(), ::core::mem::transmute(szconnstrout.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), szconnstrout.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcbconnstrout.unwrap_or(::std::ptr::null_mut())), fdrivercompletion) } #[inline] pub unsafe fn SQLDriverConnectW(hdbc: *mut ::core::ffi::c_void, hwnd: isize, szconnstrin: &[u16], szconnstrout: ::core::option::Option<&mut [u16]>, pcchconnstrout: ::core::option::Option<*mut i16>, fdrivercompletion: u16) -> i16 { ::windows_targets::link!("odbc32.dll" "system" fn SQLDriverConnectW(hdbc : *mut ::core::ffi::c_void, hwnd : isize, szconnstrin : *const u16, cchconnstrin : i16, szconnstrout : *mut u16, cchconnstroutmax : i16, pcchconnstrout : *mut i16, fdrivercompletion : u16) -> i16); - SQLDriverConnectW(hdbc, hwnd, ::core::mem::transmute(szconnstrin.as_ptr()), szconnstrin.len() as _, ::core::mem::transmute(szconnstrout.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), szconnstrout.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcchconnstrout.unwrap_or(::std::ptr::null_mut())), fdrivercompletion) + SQLDriverConnectW(hdbc, hwnd, ::core::mem::transmute(szconnstrin.as_ptr()), szconnstrin.len().try_into().unwrap(), ::core::mem::transmute(szconnstrout.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), szconnstrout.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcchconnstrout.unwrap_or(::std::ptr::null_mut())), fdrivercompletion) } #[inline] pub unsafe fn SQLDrivers(henv: *mut ::core::ffi::c_void, fdirection: u16, szdriverdesc: ::core::option::Option<&mut [u8]>, pcchdriverdesc: ::core::option::Option<*mut i16>, szdriverattributes: ::core::option::Option<&mut [u8]>, pcchdrvrattr: ::core::option::Option<*mut i16>) -> i16 { @@ -465,10 +474,10 @@ pub unsafe fn SQLDrivers(henv: *mut ::core::ffi::c_void, fdirection: u16, szdriv 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() as _), + szdriverdesc.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcchdriverdesc.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(szdriverattributes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szdriverattributes.as_deref().map_or(0, |slice| slice.len() as _), + szdriverattributes.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcchdrvrattr.unwrap_or(::std::ptr::null_mut())), ) } @@ -479,10 +488,10 @@ pub unsafe fn SQLDriversA(henv: *mut ::core::ffi::c_void, fdirection: u16, szdri 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() as _), + szdriverdesc.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcbdriverdesc.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(szdriverattributes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szdriverattributes.as_deref().map_or(0, |slice| slice.len() as _), + szdriverattributes.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcbdrvrattr.unwrap_or(::std::ptr::null_mut())), ) } @@ -493,10 +502,10 @@ pub unsafe fn SQLDriversW(henv: *mut ::core::ffi::c_void, fdirection: u16, szdri 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() as _), + szdriverdesc.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcchdriverdesc.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(szdriverattributes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szdriverattributes.as_deref().map_or(0, |slice| slice.len() as _), + szdriverattributes.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcchdrvrattr.unwrap_or(::std::ptr::null_mut())), ) } @@ -508,32 +517,32 @@ pub unsafe fn SQLEndTran(handletype: i16, handle: *mut ::core::ffi::c_void, comp #[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: ::core::option::Option<*mut i32>, messagetext: ::core::option::Option<&mut [u8]>, textlength: ::core::option::Option<*mut i16>) -> i16 { ::windows_targets::link!("odbc32.dll" "system" fn SQLError(environmenthandle : *mut ::core::ffi::c_void, connectionhandle : *mut ::core::ffi::c_void, statementhandle : *mut ::core::ffi::c_void, sqlstate : *mut u8, nativeerror : *mut i32, messagetext : *mut u8, bufferlength : i16, textlength : *mut i16) -> i16); - SQLError(environmenthandle, connectionhandle, statementhandle, ::core::mem::transmute(sqlstate.as_ptr()), ::core::mem::transmute(nativeerror.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(messagetext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), messagetext.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(textlength.unwrap_or(::std::ptr::null_mut()))) + SQLError(environmenthandle, connectionhandle, statementhandle, ::core::mem::transmute(sqlstate.as_ptr()), ::core::mem::transmute(nativeerror.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(messagetext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), messagetext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(textlength.unwrap_or(::std::ptr::null_mut()))) } #[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: ::core::option::Option<*mut i32>, szerrormsg: ::core::option::Option<&mut [u8]>, pcberrormsg: ::core::option::Option<*mut i16>) -> i16 { ::windows_targets::link!("odbc32.dll" "system" fn SQLErrorA(henv : *mut ::core::ffi::c_void, hdbc : *mut ::core::ffi::c_void, hstmt : *mut ::core::ffi::c_void, szsqlstate : *mut u8, pfnativeerror : *mut i32, szerrormsg : *mut u8, cberrormsgmax : i16, pcberrormsg : *mut i16) -> i16); - SQLErrorA(henv, hdbc, hstmt, szsqlstate, ::core::mem::transmute(pfnativeerror.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(szerrormsg.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), szerrormsg.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcberrormsg.unwrap_or(::std::ptr::null_mut()))) + SQLErrorA(henv, hdbc, hstmt, szsqlstate, ::core::mem::transmute(pfnativeerror.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(szerrormsg.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), szerrormsg.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcberrormsg.unwrap_or(::std::ptr::null_mut()))) } #[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: ::core::option::Option<*mut i32>, wszerrormsg: ::core::option::Option<&mut [u16]>, pccherrormsg: ::core::option::Option<*mut i16>) -> i16 { ::windows_targets::link!("odbc32.dll" "system" fn SQLErrorW(henv : *mut ::core::ffi::c_void, hdbc : *mut ::core::ffi::c_void, hstmt : *mut ::core::ffi::c_void, wszsqlstate : *mut u16, pfnativeerror : *mut i32, wszerrormsg : *mut u16, ccherrormsgmax : i16, pccherrormsg : *mut i16) -> i16); - SQLErrorW(henv, hdbc, hstmt, ::core::mem::transmute(wszsqlstate.as_ptr()), ::core::mem::transmute(pfnativeerror.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(wszerrormsg.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), wszerrormsg.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pccherrormsg.unwrap_or(::std::ptr::null_mut()))) + SQLErrorW(henv, hdbc, hstmt, ::core::mem::transmute(wszsqlstate.as_ptr()), ::core::mem::transmute(pfnativeerror.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(wszerrormsg.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), wszerrormsg.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pccherrormsg.unwrap_or(::std::ptr::null_mut()))) } #[inline] pub unsafe fn SQLExecDirect(statementhandle: *mut ::core::ffi::c_void, statementtext: ::core::option::Option<&[u8]>) -> i16 { ::windows_targets::link!("odbc32.dll" "system" fn SQLExecDirect(statementhandle : *mut ::core::ffi::c_void, statementtext : *const u8, textlength : i32) -> i16); - SQLExecDirect(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() as _)) + SQLExecDirect(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())) } #[inline] pub unsafe fn SQLExecDirectA(hstmt: *mut ::core::ffi::c_void, szsqlstr: ::core::option::Option<&[u8]>) -> i16 { ::windows_targets::link!("odbc32.dll" "system" fn SQLExecDirectA(hstmt : *mut ::core::ffi::c_void, szsqlstr : *const u8, cbsqlstr : i32) -> i16); - SQLExecDirectA(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() as _)) + SQLExecDirectA(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())) } #[inline] pub unsafe fn SQLExecDirectW(hstmt: *mut ::core::ffi::c_void, szsqlstr: ::core::option::Option<&[u16]>) -> i16 { ::windows_targets::link!("odbc32.dll" "system" fn SQLExecDirectW(hstmt : *mut ::core::ffi::c_void, szsqlstr : *const u16, textlength : i32) -> i16); - SQLExecDirectW(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() as _)) + SQLExecDirectW(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())) } #[inline] pub unsafe fn SQLExecute(statementhandle: *mut ::core::ffi::c_void) -> i16 { @@ -575,17 +584,17 @@ pub unsafe fn SQLForeignKeys(hstmt: *mut ::core::ffi::c_void, szpkcatalogname: : SQLForeignKeys( hstmt, ::core::mem::transmute(szpkcatalogname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szpkcatalogname.as_deref().map_or(0, |slice| slice.len() as _), + 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())), - szpkschemaname.as_deref().map_or(0, |slice| slice.len() as _), + szpkschemaname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(szpktablename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szpktablename.as_deref().map_or(0, |slice| slice.len() as _), + szpktablename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(szfkcatalogname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szfkcatalogname.as_deref().map_or(0, |slice| slice.len() as _), + szfkcatalogname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(szfkschemaname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szfkschemaname.as_deref().map_or(0, |slice| slice.len() as _), + szfkschemaname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(szfktablename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szfktablename.as_deref().map_or(0, |slice| slice.len() as _), + szfktablename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ) } #[inline] @@ -594,17 +603,17 @@ pub unsafe fn SQLForeignKeysA(hstmt: *mut ::core::ffi::c_void, szpkcatalogname: SQLForeignKeysA( hstmt, ::core::mem::transmute(szpkcatalogname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szpkcatalogname.as_deref().map_or(0, |slice| slice.len() as _), + 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())), - szpkschemaname.as_deref().map_or(0, |slice| slice.len() as _), + szpkschemaname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(szpktablename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szpktablename.as_deref().map_or(0, |slice| slice.len() as _), + szpktablename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(szfkcatalogname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szfkcatalogname.as_deref().map_or(0, |slice| slice.len() as _), + szfkcatalogname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(szfkschemaname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szfkschemaname.as_deref().map_or(0, |slice| slice.len() as _), + szfkschemaname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(szfktablename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szfktablename.as_deref().map_or(0, |slice| slice.len() as _), + szfktablename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ) } #[inline] @@ -613,17 +622,17 @@ pub unsafe fn SQLForeignKeysW(hstmt: *mut ::core::ffi::c_void, szpkcatalogname: SQLForeignKeysW( hstmt, ::core::mem::transmute(szpkcatalogname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szpkcatalogname.as_deref().map_or(0, |slice| slice.len() as _), + 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())), - szpkschemaname.as_deref().map_or(0, |slice| slice.len() as _), + szpkschemaname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(szpktablename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szpktablename.as_deref().map_or(0, |slice| slice.len() as _), + szpktablename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(szfkcatalogname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szfkcatalogname.as_deref().map_or(0, |slice| slice.len() as _), + szfkcatalogname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(szfkschemaname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szfkschemaname.as_deref().map_or(0, |slice| slice.len() as _), + szfkschemaname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(szfktablename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szfktablename.as_deref().map_or(0, |slice| slice.len() as _), + szfktablename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ) } #[inline] @@ -679,17 +688,17 @@ pub unsafe fn SQLGetConnectOptionW(hdbc: *mut ::core::ffi::c_void, foption: u16, #[inline] pub unsafe fn SQLGetCursorName(statementhandle: *mut ::core::ffi::c_void, cursorname: ::core::option::Option<&mut [u8]>, namelengthptr: ::core::option::Option<*mut i16>) -> i16 { ::windows_targets::link!("odbc32.dll" "system" fn SQLGetCursorName(statementhandle : *mut ::core::ffi::c_void, cursorname : *mut u8, bufferlength : i16, namelengthptr : *mut i16) -> i16); - SQLGetCursorName(statementhandle, ::core::mem::transmute(cursorname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), cursorname.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(namelengthptr.unwrap_or(::std::ptr::null_mut()))) + SQLGetCursorName(statementhandle, ::core::mem::transmute(cursorname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), cursorname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(namelengthptr.unwrap_or(::std::ptr::null_mut()))) } #[inline] pub unsafe fn SQLGetCursorNameA(hstmt: *mut ::core::ffi::c_void, szcursor: ::core::option::Option<&mut [u8]>, pcbcursor: ::core::option::Option<*mut i16>) -> i16 { ::windows_targets::link!("odbc32.dll" "system" fn SQLGetCursorNameA(hstmt : *mut ::core::ffi::c_void, szcursor : *mut u8, cbcursormax : i16, pcbcursor : *mut i16) -> i16); - SQLGetCursorNameA(hstmt, ::core::mem::transmute(szcursor.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), szcursor.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcbcursor.unwrap_or(::std::ptr::null_mut()))) + SQLGetCursorNameA(hstmt, ::core::mem::transmute(szcursor.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), szcursor.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcbcursor.unwrap_or(::std::ptr::null_mut()))) } #[inline] pub unsafe fn SQLGetCursorNameW(hstmt: *mut ::core::ffi::c_void, szcursor: ::core::option::Option<&mut [u16]>, pcchcursor: ::core::option::Option<*mut i16>) -> i16 { ::windows_targets::link!("odbc32.dll" "system" fn SQLGetCursorNameW(hstmt : *mut ::core::ffi::c_void, szcursor : *mut u16, cchcursormax : i16, pcchcursor : *mut i16) -> i16); - SQLGetCursorNameW(hstmt, ::core::mem::transmute(szcursor.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), szcursor.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcchcursor.unwrap_or(::std::ptr::null_mut()))) + SQLGetCursorNameW(hstmt, ::core::mem::transmute(szcursor.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), szcursor.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcchcursor.unwrap_or(::std::ptr::null_mut()))) } #[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))] #[inline] @@ -726,7 +735,7 @@ pub unsafe fn SQLGetDescRec(descriptorhandle: *mut ::core::ffi::c_void, recnumbe descriptorhandle, 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() as _), + name.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringlengthptr.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(typeptr.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(subtypeptr.unwrap_or(::std::ptr::null_mut())), @@ -744,7 +753,7 @@ pub unsafe fn SQLGetDescRec(descriptorhandle: *mut ::core::ffi::c_void, recnumbe descriptorhandle, 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() as _), + name.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(stringlengthptr.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(typeptr.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(subtypeptr.unwrap_or(::std::ptr::null_mut())), @@ -762,7 +771,7 @@ pub unsafe fn SQLGetDescRecA(hdesc: *mut ::core::ffi::c_void, irecord: i16, szna hdesc, 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() as _), + szname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcbname.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pftype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pfsubtype.unwrap_or(::std::ptr::null_mut())), @@ -780,7 +789,7 @@ pub unsafe fn SQLGetDescRecA(hdesc: *mut ::core::ffi::c_void, irecord: i16, szna hdesc, 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() as _), + szname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcbname.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pftype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pfsubtype.unwrap_or(::std::ptr::null_mut())), @@ -798,7 +807,7 @@ pub unsafe fn SQLGetDescRecW(hdesc: *mut ::core::ffi::c_void, irecord: i16, szna hdesc, 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() as _), + szname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcchname.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pftype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pfsubtype.unwrap_or(::std::ptr::null_mut())), @@ -816,7 +825,7 @@ pub unsafe fn SQLGetDescRecW(hdesc: *mut ::core::ffi::c_void, irecord: i16, szna hdesc, 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() as _), + szname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pcchname.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pftype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pfsubtype.unwrap_or(::std::ptr::null_mut())), @@ -844,17 +853,17 @@ pub unsafe fn SQLGetDiagFieldW(fhandletype: i16, handle: *mut ::core::ffi::c_voi #[inline] pub unsafe fn SQLGetDiagRec(handletype: i16, handle: *mut ::core::ffi::c_void, recnumber: i16, sqlstate: ::core::option::Option<&mut [u8; 6]>, nativeerror: *mut i32, messagetext: ::core::option::Option<&mut [u8]>, textlength: ::core::option::Option<*mut i16>) -> i16 { ::windows_targets::link!("odbc32.dll" "system" fn SQLGetDiagRec(handletype : i16, handle : *mut ::core::ffi::c_void, recnumber : i16, sqlstate : *mut u8, nativeerror : *mut i32, messagetext : *mut u8, bufferlength : i16, textlength : *mut i16) -> i16); - SQLGetDiagRec(handletype, handle, recnumber, ::core::mem::transmute(sqlstate.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), nativeerror, ::core::mem::transmute(messagetext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), messagetext.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(textlength.unwrap_or(::std::ptr::null_mut()))) + SQLGetDiagRec(handletype, handle, recnumber, ::core::mem::transmute(sqlstate.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), nativeerror, ::core::mem::transmute(messagetext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), messagetext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(textlength.unwrap_or(::std::ptr::null_mut()))) } #[inline] pub unsafe fn SQLGetDiagRecA(fhandletype: i16, handle: *mut ::core::ffi::c_void, irecord: i16, szsqlstate: ::core::option::Option<&mut [u8; 6]>, pfnativeerror: *mut i32, szerrormsg: ::core::option::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); - SQLGetDiagRecA(fhandletype, handle, irecord, ::core::mem::transmute(szsqlstate.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), 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() as _), pcberrormsg) + SQLGetDiagRecA(fhandletype, handle, irecord, ::core::mem::transmute(szsqlstate.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), 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()), pcberrormsg) } #[inline] pub unsafe fn SQLGetDiagRecW(fhandletype: i16, handle: *mut ::core::ffi::c_void, irecord: i16, szsqlstate: ::core::option::Option<&mut [u16; 6]>, pfnativeerror: *mut i32, szerrormsg: ::core::option::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); - SQLGetDiagRecW(fhandletype, handle, irecord, ::core::mem::transmute(szsqlstate.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), 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() as _), pccherrormsg) + SQLGetDiagRecW(fhandletype, handle, irecord, ::core::mem::transmute(szsqlstate.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), 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()), pccherrormsg) } #[inline] pub unsafe fn SQLGetEnvAttr(environmenthandle: *mut ::core::ffi::c_void, attribute: i32, value: *mut ::core::ffi::c_void, bufferlength: i32, stringlength: ::core::option::Option<*mut i32>) -> i16 { @@ -966,17 +975,17 @@ pub unsafe fn SQLMoreResults(hstmt: *mut ::core::ffi::c_void) -> i16 { #[inline] pub unsafe fn SQLNativeSql(hdbc: *mut ::core::ffi::c_void, szsqlstrin: &[u8], szsqlstr: ::core::option::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); - SQLNativeSql(hdbc, ::core::mem::transmute(szsqlstrin.as_ptr()), szsqlstrin.len() 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() as _), pcbsqlstr) + SQLNativeSql(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()), pcbsqlstr) } #[inline] pub unsafe fn SQLNativeSqlA(hdbc: *mut ::core::ffi::c_void, szsqlstrin: &[u8], szsqlstr: ::core::option::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); - SQLNativeSqlA(hdbc, ::core::mem::transmute(szsqlstrin.as_ptr()), szsqlstrin.len() 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() as _), pcbsqlstr) + SQLNativeSqlA(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()), pcbsqlstr) } #[inline] pub unsafe fn SQLNativeSqlW(hdbc: *mut ::core::ffi::c_void, szsqlstrin: &[u16], szsqlstr: ::core::option::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); - SQLNativeSqlW(hdbc, ::core::mem::transmute(szsqlstrin.as_ptr()), szsqlstrin.len() 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() as _), pcchsqlstr) + SQLNativeSqlW(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()), pcchsqlstr) } #[inline] pub unsafe fn SQLNumParams(hstmt: *mut ::core::ffi::c_void, pcpar: ::core::option::Option<*mut i16>) -> i16 { @@ -1008,17 +1017,17 @@ pub unsafe fn SQLParamOptions(hstmt: *mut ::core::ffi::c_void, crow: u32, pirow: #[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); - SQLPrepare(statementhandle, ::core::mem::transmute(statementtext.as_ptr()), statementtext.len() as _) + SQLPrepare(statementhandle, ::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); - SQLPrepareA(hstmt, ::core::mem::transmute(szsqlstr.as_ptr()), szsqlstr.len() as _) + SQLPrepareA(hstmt, ::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); - SQLPrepareW(hstmt, ::core::mem::transmute(szsqlstr.as_ptr()), szsqlstr.len() as _) + SQLPrepareW(hstmt, ::core::mem::transmute(szsqlstr.as_ptr()), szsqlstr.len().try_into().unwrap()) } #[inline] pub unsafe fn SQLPrimaryKeys(hstmt: *mut ::core::ffi::c_void, szcatalogname: ::core::option::Option<&[u8]>, szschemaname: ::core::option::Option<&[u8]>, sztablename: ::core::option::Option<&[u8]>) -> i16 { @@ -1026,11 +1035,11 @@ pub unsafe fn SQLPrimaryKeys(hstmt: *mut ::core::ffi::c_void, szcatalogname: ::c SQLPrimaryKeys( hstmt, ::core::mem::transmute(szcatalogname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szcatalogname.as_deref().map_or(0, |slice| slice.len() as _), + 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())), - szschemaname.as_deref().map_or(0, |slice| slice.len() as _), + szschemaname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(sztablename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - sztablename.as_deref().map_or(0, |slice| slice.len() as _), + sztablename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ) } #[inline] @@ -1039,11 +1048,11 @@ pub unsafe fn SQLPrimaryKeysA(hstmt: *mut ::core::ffi::c_void, szcatalogname: :: SQLPrimaryKeysA( hstmt, ::core::mem::transmute(szcatalogname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szcatalogname.as_deref().map_or(0, |slice| slice.len() as _), + 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())), - szschemaname.as_deref().map_or(0, |slice| slice.len() as _), + szschemaname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(sztablename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - sztablename.as_deref().map_or(0, |slice| slice.len() as _), + sztablename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ) } #[inline] @@ -1052,11 +1061,11 @@ pub unsafe fn SQLPrimaryKeysW(hstmt: *mut ::core::ffi::c_void, szcatalogname: :: SQLPrimaryKeysW( hstmt, ::core::mem::transmute(szcatalogname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szcatalogname.as_deref().map_or(0, |slice| slice.len() as _), + 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())), - szschemaname.as_deref().map_or(0, |slice| slice.len() as _), + szschemaname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(sztablename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - sztablename.as_deref().map_or(0, |slice| slice.len() as _), + sztablename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ) } #[inline] @@ -1065,13 +1074,13 @@ pub unsafe fn SQLProcedureColumns(hstmt: *mut ::core::ffi::c_void, szcatalogname SQLProcedureColumns( hstmt, ::core::mem::transmute(szcatalogname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szcatalogname.as_deref().map_or(0, |slice| slice.len() as _), + 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())), - szschemaname.as_deref().map_or(0, |slice| slice.len() as _), + szschemaname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(szprocname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szprocname.as_deref().map_or(0, |slice| slice.len() as _), + szprocname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(szcolumnname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szcolumnname.as_deref().map_or(0, |slice| slice.len() as _), + szcolumnname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ) } #[inline] @@ -1080,13 +1089,13 @@ pub unsafe fn SQLProcedureColumnsA(hstmt: *mut ::core::ffi::c_void, szcatalognam SQLProcedureColumnsA( hstmt, ::core::mem::transmute(szcatalogname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szcatalogname.as_deref().map_or(0, |slice| slice.len() as _), + 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())), - szschemaname.as_deref().map_or(0, |slice| slice.len() as _), + szschemaname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(szprocname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szprocname.as_deref().map_or(0, |slice| slice.len() as _), + szprocname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(szcolumnname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szcolumnname.as_deref().map_or(0, |slice| slice.len() as _), + szcolumnname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ) } #[inline] @@ -1095,13 +1104,13 @@ pub unsafe fn SQLProcedureColumnsW(hstmt: *mut ::core::ffi::c_void, szcatalognam SQLProcedureColumnsW( hstmt, ::core::mem::transmute(szcatalogname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szcatalogname.as_deref().map_or(0, |slice| slice.len() as _), + 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())), - szschemaname.as_deref().map_or(0, |slice| slice.len() as _), + szschemaname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(szprocname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szprocname.as_deref().map_or(0, |slice| slice.len() as _), + szprocname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(szcolumnname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szcolumnname.as_deref().map_or(0, |slice| slice.len() as _), + szcolumnname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ) } #[inline] @@ -1110,11 +1119,11 @@ pub unsafe fn SQLProcedures(hstmt: *mut ::core::ffi::c_void, szcatalogname: ::co SQLProcedures( hstmt, ::core::mem::transmute(szcatalogname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szcatalogname.as_deref().map_or(0, |slice| slice.len() as _), + 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())), - szschemaname.as_deref().map_or(0, |slice| slice.len() as _), + szschemaname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(szprocname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szprocname.as_deref().map_or(0, |slice| slice.len() as _), + szprocname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ) } #[inline] @@ -1123,11 +1132,11 @@ pub unsafe fn SQLProceduresA(hstmt: *mut ::core::ffi::c_void, szcatalogname: ::c SQLProceduresA( hstmt, ::core::mem::transmute(szcatalogname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szcatalogname.as_deref().map_or(0, |slice| slice.len() as _), + 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())), - szschemaname.as_deref().map_or(0, |slice| slice.len() as _), + szschemaname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(szprocname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szprocname.as_deref().map_or(0, |slice| slice.len() as _), + szprocname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ) } #[inline] @@ -1136,11 +1145,11 @@ pub unsafe fn SQLProceduresW(hstmt: *mut ::core::ffi::c_void, szcatalogname: ::c SQLProceduresW( hstmt, ::core::mem::transmute(szcatalogname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szcatalogname.as_deref().map_or(0, |slice| slice.len() as _), + 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())), - szschemaname.as_deref().map_or(0, |slice| slice.len() as _), + szschemaname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(szprocname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szprocname.as_deref().map_or(0, |slice| slice.len() as _), + szprocname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ) } #[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))] @@ -1221,17 +1230,17 @@ pub unsafe fn SQLSetConnectOptionW(hdbc: *mut ::core::ffi::c_void, foption: u16, #[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); - SQLSetCursorName(statementhandle, ::core::mem::transmute(cursorname.as_ptr()), cursorname.len() as _) + SQLSetCursorName(statementhandle, ::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); - SQLSetCursorNameA(hstmt, ::core::mem::transmute(szcursor.as_ptr()), szcursor.len() as _) + SQLSetCursorNameA(hstmt, ::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); - SQLSetCursorNameW(hstmt, ::core::mem::transmute(szcursor.as_ptr()), szcursor.len() as _) + SQLSetCursorNameW(hstmt, ::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 { @@ -1325,11 +1334,11 @@ pub unsafe fn SQLSpecialColumns(statementhandle: *mut ::core::ffi::c_void, ident statementhandle, 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() as _), + 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())), - schemaname.as_deref().map_or(0, |slice| slice.len() as _), + schemaname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(tablename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - tablename.as_deref().map_or(0, |slice| slice.len() as _), + tablename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), scope, nullable, ) @@ -1341,11 +1350,11 @@ pub unsafe fn SQLSpecialColumnsA(hstmt: *mut ::core::ffi::c_void, fcoltype: u16, hstmt, 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() as _), + 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())), - szschemaname.as_deref().map_or(0, |slice| slice.len() as _), + szschemaname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(sztablename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - sztablename.as_deref().map_or(0, |slice| slice.len() as _), + sztablename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), fscope, fnullable, ) @@ -1357,11 +1366,11 @@ pub unsafe fn SQLSpecialColumnsW(hstmt: *mut ::core::ffi::c_void, fcoltype: u16, hstmt, 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() as _), + 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())), - szschemaname.as_deref().map_or(0, |slice| slice.len() as _), + szschemaname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(sztablename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - sztablename.as_deref().map_or(0, |slice| slice.len() as _), + sztablename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), fscope, fnullable, ) @@ -1372,11 +1381,11 @@ pub unsafe fn SQLStatistics(statementhandle: *mut ::core::ffi::c_void, catalogna SQLStatistics( statementhandle, ::core::mem::transmute(catalogname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - catalogname.as_deref().map_or(0, |slice| slice.len() as _), + 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())), - schemaname.as_deref().map_or(0, |slice| slice.len() as _), + schemaname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(tablename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - tablename.as_deref().map_or(0, |slice| slice.len() as _), + tablename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), unique, reserved, ) @@ -1387,11 +1396,11 @@ pub unsafe fn SQLStatisticsA(hstmt: *mut ::core::ffi::c_void, szcatalogname: ::c SQLStatisticsA( hstmt, ::core::mem::transmute(szcatalogname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szcatalogname.as_deref().map_or(0, |slice| slice.len() as _), + 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())), - szschemaname.as_deref().map_or(0, |slice| slice.len() as _), + szschemaname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(sztablename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - sztablename.as_deref().map_or(0, |slice| slice.len() as _), + sztablename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), funique, faccuracy, ) @@ -1402,11 +1411,11 @@ pub unsafe fn SQLStatisticsW(hstmt: *mut ::core::ffi::c_void, szcatalogname: ::c SQLStatisticsW( hstmt, ::core::mem::transmute(szcatalogname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szcatalogname.as_deref().map_or(0, |slice| slice.len() as _), + 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())), - szschemaname.as_deref().map_or(0, |slice| slice.len() as _), + szschemaname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(sztablename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - sztablename.as_deref().map_or(0, |slice| slice.len() as _), + sztablename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), funique, faccuracy, ) @@ -1417,11 +1426,11 @@ pub unsafe fn SQLTablePrivileges(hstmt: *mut ::core::ffi::c_void, szcatalogname: SQLTablePrivileges( hstmt, ::core::mem::transmute(szcatalogname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szcatalogname.as_deref().map_or(0, |slice| slice.len() as _), + 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())), - szschemaname.as_deref().map_or(0, |slice| slice.len() as _), + szschemaname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(sztablename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - sztablename.as_deref().map_or(0, |slice| slice.len() as _), + sztablename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ) } #[inline] @@ -1430,11 +1439,11 @@ pub unsafe fn SQLTablePrivilegesA(hstmt: *mut ::core::ffi::c_void, szcatalogname SQLTablePrivilegesA( hstmt, ::core::mem::transmute(szcatalogname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szcatalogname.as_deref().map_or(0, |slice| slice.len() as _), + 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())), - szschemaname.as_deref().map_or(0, |slice| slice.len() as _), + szschemaname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(sztablename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - sztablename.as_deref().map_or(0, |slice| slice.len() as _), + sztablename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ) } #[inline] @@ -1443,11 +1452,11 @@ pub unsafe fn SQLTablePrivilegesW(hstmt: *mut ::core::ffi::c_void, szcatalogname SQLTablePrivilegesW( hstmt, ::core::mem::transmute(szcatalogname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szcatalogname.as_deref().map_or(0, |slice| slice.len() as _), + 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())), - szschemaname.as_deref().map_or(0, |slice| slice.len() as _), + szschemaname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(sztablename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - sztablename.as_deref().map_or(0, |slice| slice.len() as _), + sztablename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ) } #[inline] @@ -1456,13 +1465,13 @@ pub unsafe fn SQLTables(statementhandle: *mut ::core::ffi::c_void, catalogname: SQLTables( statementhandle, ::core::mem::transmute(catalogname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - catalogname.as_deref().map_or(0, |slice| slice.len() as _), + 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())), - schemaname.as_deref().map_or(0, |slice| slice.len() as _), + schemaname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(tablename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - tablename.as_deref().map_or(0, |slice| slice.len() as _), + tablename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(tabletype.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - tabletype.as_deref().map_or(0, |slice| slice.len() as _), + tabletype.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ) } #[inline] @@ -1471,13 +1480,13 @@ pub unsafe fn SQLTablesA(hstmt: *mut ::core::ffi::c_void, szcatalogname: ::core: SQLTablesA( hstmt, ::core::mem::transmute(szcatalogname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szcatalogname.as_deref().map_or(0, |slice| slice.len() as _), + 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())), - szschemaname.as_deref().map_or(0, |slice| slice.len() as _), + szschemaname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(sztablename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - sztablename.as_deref().map_or(0, |slice| slice.len() as _), + sztablename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(sztabletype.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - sztabletype.as_deref().map_or(0, |slice| slice.len() as _), + sztabletype.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ) } #[inline] @@ -1486,13 +1495,13 @@ pub unsafe fn SQLTablesW(hstmt: *mut ::core::ffi::c_void, szcatalogname: ::core: SQLTablesW( hstmt, ::core::mem::transmute(szcatalogname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - szcatalogname.as_deref().map_or(0, |slice| slice.len() as _), + 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())), - szschemaname.as_deref().map_or(0, |slice| slice.len() as _), + szschemaname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(sztablename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - sztablename.as_deref().map_or(0, |slice| slice.len() as _), + sztablename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(sztabletype.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), - sztabletype.as_deref().map_or(0, |slice| slice.len() as _), + sztabletype.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ) } #[inline] @@ -1784,7 +1793,7 @@ impl IAlterIndex { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Storage_IndexServer\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn AlterIndex(&self, ptableid: *const super::super::Storage::IndexServer::DBID, pindexid: *const super::super::Storage::IndexServer::DBID, pnewindexid: *const super::super::Storage::IndexServer::DBID, rgpropertysets: &mut [DBPROPSET]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).AlterIndex)(::windows_core::Interface::as_raw(self), ptableid, pindexid, pnewindexid, rgpropertysets.len() as _, ::core::mem::transmute(rgpropertysets.as_ptr())).ok() + (::windows_core::Interface::vtable(self).AlterIndex)(::windows_core::Interface::as_raw(self), ptableid, pindexid, pnewindexid, rgpropertysets.len().try_into().unwrap(), ::core::mem::transmute(rgpropertysets.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IAlterIndex, ::windows_core::IUnknown); @@ -1815,7 +1824,7 @@ impl IAlterTable { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Storage_IndexServer\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn AlterTable(&self, ptableid: *const super::super::Storage::IndexServer::DBID, pnewtableid: *const super::super::Storage::IndexServer::DBID, rgpropertysets: &mut [DBPROPSET]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).AlterTable)(::windows_core::Interface::as_raw(self), ptableid, pnewtableid, rgpropertysets.len() as _, ::core::mem::transmute(rgpropertysets.as_ptr())).ok() + (::windows_core::Interface::vtable(self).AlterTable)(::windows_core::Interface::as_raw(self), ptableid, pnewtableid, rgpropertysets.len().try_into().unwrap(), ::core::mem::transmute(rgpropertysets.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IAlterTable, ::windows_core::IUnknown); @@ -2023,7 +2032,7 @@ impl IColumnsInfo2 { #[doc = "Required features: `\"Win32_Storage_IndexServer\"`, `\"Win32_System_Com\"`"] #[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: ::core::option::Option<*mut *mut u16>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetRestrictedColumnInfo)(::windows_core::Interface::as_raw(self), rgcolumnidmasks.len() as _, ::core::mem::transmute(rgcolumnidmasks.as_ptr()), dwflags, pccolumns, prgcolumnids, prgcolumninfo, ::core::mem::transmute(ppstringsbuffer.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetRestrictedColumnInfo)(::windows_core::Interface::as_raw(self), rgcolumnidmasks.len().try_into().unwrap(), ::core::mem::transmute(rgcolumnidmasks.as_ptr()), dwflags, pccolumns, prgcolumnids, prgcolumninfo, ::core::mem::transmute(ppstringsbuffer.unwrap_or(::std::ptr::null_mut()))).ok() } } ::windows_core::imp::interface_hierarchy!(IColumnsInfo2, ::windows_core::IUnknown, IColumnsInfo); @@ -2057,7 +2066,7 @@ impl IColumnsRowset { where P0: ::windows_core::IntoParam<::windows_core::IUnknown>, { - (::windows_core::Interface::vtable(self).GetColumnsRowset)(::windows_core::Interface::as_raw(self), punkouter.into_param().abi(), rgoptcolumns.len() as _, ::core::mem::transmute(rgoptcolumns.as_ptr()), riid, rgpropertysets.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rgpropertysets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(ppcolrowset)).ok() + (::windows_core::Interface::vtable(self).GetColumnsRowset)(::windows_core::Interface::as_raw(self), punkouter.into_param().abi(), rgoptcolumns.len().try_into().unwrap(), ::core::mem::transmute(rgoptcolumns.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(ppcolrowset)).ok() } } ::windows_core::imp::interface_hierarchy!(IColumnsRowset, ::windows_core::IUnknown); @@ -2145,7 +2154,7 @@ impl ICommandCost { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).SetCostGoals)(::windows_core::Interface::as_raw(self), pwszrowsetname.into_param().abi(), rgcostgoals.len() as _, ::core::mem::transmute(rgcostgoals.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetCostGoals)(::windows_core::Interface::as_raw(self), pwszrowsetname.into_param().abi(), rgcostgoals.len().try_into().unwrap(), ::core::mem::transmute(rgcostgoals.as_ptr())).ok() } pub unsafe fn SetCostLimits(&self, pwszrowsetname: P0, ccostlimits: u32, prgcostlimits: *const DBCOST, dwexecutionflags: u32) -> ::windows_core::Result<()> where @@ -2258,12 +2267,12 @@ impl ICommandProperties { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Storage_IndexServer\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetProperties(&self, rgpropertyidsets: ::core::option::Option<&[DBPROPIDSET]>, pcpropertysets: *mut u32, prgpropertysets: *mut *mut DBPROPSET) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetProperties)(::windows_core::Interface::as_raw(self), rgpropertyidsets.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rgpropertyidsets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pcpropertysets, prgpropertysets).ok() + (::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, prgpropertysets).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Storage_IndexServer\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", 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<()> { - (::windows_core::Interface::vtable(self).SetProperties)(::windows_core::Interface::as_raw(self), rgpropertysets.len() as _, ::core::mem::transmute(rgpropertysets.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetProperties)(::windows_core::Interface::as_raw(self), rgpropertysets.len().try_into().unwrap(), ::core::mem::transmute(rgpropertysets.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(ICommandProperties, ::windows_core::IUnknown); @@ -2790,7 +2799,7 @@ impl IConditionFactory2 { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).CreateCompoundFromArray)(::windows_core::Interface::as_raw(self), ct, ::core::mem::transmute(ppcondsubs.as_ptr()), ppcondsubs.len() as _, cco, &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateCompoundFromArray)(::windows_core::Interface::as_raw(self), ct, ::core::mem::transmute(ppcondsubs.as_ptr()), ppcondsubs.len().try_into().unwrap(), cco, &::IID, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_System_Search_Common\"`, `\"Win32_UI_Shell_PropertiesSystem\"`"] #[cfg(all(feature = "Win32_System_Search_Common", feature = "Win32_UI_Shell_PropertiesSystem"))] @@ -3080,17 +3089,17 @@ impl IDBBinderProperties { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Storage_IndexServer\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetProperties(&self, rgpropertyidsets: ::core::option::Option<&[DBPROPIDSET]>, pcpropertysets: *mut u32, prgpropertysets: *mut *mut DBPROPSET) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetProperties)(::windows_core::Interface::as_raw(self), rgpropertyidsets.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rgpropertyidsets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pcpropertysets, prgpropertysets).ok() + (::windows_core::Interface::vtable(self).base__.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, prgpropertysets).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetPropertyInfo(&self, rgpropertyidsets: ::core::option::Option<&[DBPROPIDSET]>, pcpropertyinfosets: *mut u32, prgpropertyinfosets: *mut *mut DBPROPINFOSET, ppdescbuffer: ::core::option::Option<*mut *mut u16>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetPropertyInfo)(::windows_core::Interface::as_raw(self), rgpropertyidsets.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rgpropertyidsets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pcpropertyinfosets, prgpropertyinfosets, ::core::mem::transmute(ppdescbuffer.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).base__.GetPropertyInfo)(::windows_core::Interface::as_raw(self), rgpropertyidsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(rgpropertyidsets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pcpropertyinfosets, prgpropertyinfosets, ::core::mem::transmute(ppdescbuffer.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Storage_IndexServer\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn SetProperties(&self, rgpropertysets: ::core::option::Option<&mut [DBPROPSET]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetProperties)(::windows_core::Interface::as_raw(self), rgpropertysets.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rgpropertysets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + (::windows_core::Interface::vtable(self).base__.SetProperties)(::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()))).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -3169,7 +3178,7 @@ impl IDBDataSourceAdmin { where P0: ::windows_core::IntoParam<::windows_core::IUnknown>, { - (::windows_core::Interface::vtable(self).CreateDataSource)(::windows_core::Interface::as_raw(self), rgpropertysets.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rgpropertysets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), punkouter.into_param().abi(), riid, ::core::mem::transmute(ppdbsession.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).CreateDataSource)(::windows_core::Interface::as_raw(self), rgpropertysets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(rgpropertysets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), punkouter.into_param().abi(), riid, ::core::mem::transmute(ppdbsession.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn DestroyDataSource(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).DestroyDataSource)(::windows_core::Interface::as_raw(self)).ok() @@ -3177,12 +3186,12 @@ impl IDBDataSourceAdmin { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetCreationProperties(&self, rgpropertyidsets: ::core::option::Option<&[DBPROPIDSET]>, pcpropertyinfosets: *mut u32, prgpropertyinfosets: *mut *mut DBPROPINFOSET, ppdescbuffer: ::core::option::Option<*mut *mut u16>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetCreationProperties)(::windows_core::Interface::as_raw(self), rgpropertyidsets.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rgpropertyidsets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pcpropertyinfosets, prgpropertyinfosets, ::core::mem::transmute(ppdescbuffer.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetCreationProperties)(::windows_core::Interface::as_raw(self), rgpropertyidsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(rgpropertyidsets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pcpropertyinfosets, prgpropertyinfosets, ::core::mem::transmute(ppdescbuffer.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Storage_IndexServer\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn ModifyDataSource(&self, rgpropertysets: ::core::option::Option<&mut [DBPROPSET]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).ModifyDataSource)(::windows_core::Interface::as_raw(self), rgpropertysets.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rgpropertysets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + (::windows_core::Interface::vtable(self).ModifyDataSource)(::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()))).ok() } } ::windows_core::imp::interface_hierarchy!(IDBDataSourceAdmin, ::windows_core::IUnknown); @@ -3221,7 +3230,7 @@ impl IDBInfo { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetLiteralInfo(&self, rgliterals: ::core::option::Option<&[u32]>, pcliteralinfo: *mut u32, prgliteralinfo: *mut *mut DBLITERALINFO, ppcharbuffer: *mut *mut u16) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetLiteralInfo)(::windows_core::Interface::as_raw(self), rgliterals.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rgliterals.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pcliteralinfo, prgliteralinfo, ppcharbuffer).ok() + (::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, prgliteralinfo, ppcharbuffer).ok() } } ::windows_core::imp::interface_hierarchy!(IDBInfo, ::windows_core::IUnknown); @@ -3278,7 +3287,7 @@ impl IDBPromptInitialize { P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).PromptDataSource)(::windows_core::Interface::as_raw(self), punkouter.into_param().abi(), hwndparent.into_param().abi(), dwpromptoptions, rgsourcetypefilter.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rgsourcetypefilter.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pwszszzproviderfilter.into_param().abi(), riid, ::core::mem::transmute(ppdatasource)).ok() + (::windows_core::Interface::vtable(self).PromptDataSource)(::windows_core::Interface::as_raw(self), punkouter.into_param().abi(), hwndparent.into_param().abi(), dwpromptoptions, rgsourcetypefilter.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(rgsourcetypefilter.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pwszszzproviderfilter.into_param().abi(), riid, ::core::mem::transmute(ppdatasource)).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3319,17 +3328,17 @@ impl IDBProperties { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Storage_IndexServer\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetProperties(&self, rgpropertyidsets: ::core::option::Option<&[DBPROPIDSET]>, pcpropertysets: *mut u32, prgpropertysets: *mut *mut DBPROPSET) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetProperties)(::windows_core::Interface::as_raw(self), rgpropertyidsets.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rgpropertyidsets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pcpropertysets, prgpropertysets).ok() + (::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, prgpropertysets).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetPropertyInfo(&self, rgpropertyidsets: ::core::option::Option<&[DBPROPIDSET]>, pcpropertyinfosets: *mut u32, prgpropertyinfosets: *mut *mut DBPROPINFOSET, ppdescbuffer: ::core::option::Option<*mut *mut u16>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPropertyInfo)(::windows_core::Interface::as_raw(self), rgpropertyidsets.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rgpropertyidsets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pcpropertyinfosets, prgpropertyinfosets, ::core::mem::transmute(ppdescbuffer.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).GetPropertyInfo)(::windows_core::Interface::as_raw(self), rgpropertyidsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(rgpropertyidsets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pcpropertyinfosets, prgpropertyinfosets, ::core::mem::transmute(ppdescbuffer.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Storage_IndexServer\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn SetProperties(&self, rgpropertysets: ::core::option::Option<&mut [DBPROPSET]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetProperties)(::windows_core::Interface::as_raw(self), rgpropertysets.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rgpropertysets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + (::windows_core::Interface::vtable(self).SetProperties)(::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()))).ok() } } ::windows_core::imp::interface_hierarchy!(IDBProperties, ::windows_core::IUnknown); @@ -3395,7 +3404,18 @@ impl IDBSchemaRowset { where P0: ::windows_core::IntoParam<::windows_core::IUnknown>, { - (::windows_core::Interface::vtable(self).GetRowset)(::windows_core::Interface::as_raw(self), punkouter.into_param().abi(), rguidschema, rgrestrictions.as_deref().map_or(0, |slice| slice.len() as _), ::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() as _), ::core::mem::transmute(rgpropertysets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(pprowset)).ok() + (::windows_core::Interface::vtable(self).GetRowset)( + ::windows_core::Interface::as_raw(self), + punkouter.into_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<()> { (::windows_core::Interface::vtable(self).GetSchemas)(::windows_core::Interface::as_raw(self), pcschemas, prgschemas, prgrestrictionsupport).ok() @@ -3430,7 +3450,7 @@ impl IDCInfo { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn SetInfo(&self, rginfo: &[DCINFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetInfo)(::windows_core::Interface::as_raw(self), rginfo.len() as _, ::core::mem::transmute(rginfo.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetInfo)(::windows_core::Interface::as_raw(self), rginfo.len().try_into().unwrap(), ::core::mem::transmute(rginfo.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IDCInfo, ::windows_core::IUnknown); @@ -3515,7 +3535,7 @@ impl IDataInitialize { P0: ::windows_core::IntoParam<::windows_core::IUnknown>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).CreateDBInstanceEx)(::windows_core::Interface::as_raw(self), clsidprovider, punkouter.into_param().abi(), dwclsctx, pwszreserved.into_param().abi(), pserverinfo, rgmqresults.len() as _, ::core::mem::transmute(rgmqresults.as_ptr())).ok() + (::windows_core::Interface::vtable(self).CreateDBInstanceEx)(::windows_core::Interface::as_raw(self), clsidprovider, punkouter.into_param().abi(), dwclsctx, pwszreserved.into_param().abi(), pserverinfo, rgmqresults.len().try_into().unwrap(), ::core::mem::transmute(rgmqresults.as_ptr())).ok() } pub unsafe fn LoadStringFromStorage(&self, pwszfilename: P0) -> ::windows_core::Result<::windows_core::PWSTR> where @@ -3695,7 +3715,7 @@ impl IEnumItemProperties { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", 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<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -3737,7 +3757,7 @@ pub struct IEnumItemProperties_Vtbl { pub struct IEnumSearchRoots(::windows_core::IUnknown); impl IEnumSearchRoots { pub unsafe fn Next(&self, rgelt: &mut [::core::option::Option], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -3771,7 +3791,7 @@ pub struct IEnumSearchRoots_Vtbl { pub struct IEnumSearchScopeRules(::windows_core::IUnknown); impl IEnumSearchScopeRules { pub unsafe fn Next(&self, pprgelt: &mut [::core::option::Option], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), pprgelt.len() as _, ::core::mem::transmute(pprgelt.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), pprgelt.len().try_into().unwrap(), ::core::mem::transmute(pprgelt.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -3805,7 +3825,7 @@ pub struct IEnumSearchScopeRules_Vtbl { pub struct IEnumSubscription(::windows_core::IUnknown); impl IEnumSubscription { pub unsafe fn Next(&self, rgelt: &mut [::windows_core::GUID], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -4039,7 +4059,7 @@ impl IIndexDefinition { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Storage_IndexServer\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", 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: ::core::option::Option<*const super::super::Storage::IndexServer::DBID>, rgindexcolumndescs: &[DBINDEXCOLUMNDESC], rgpropertysets: &mut [DBPROPSET], ppindexid: ::core::option::Option<*mut *mut super::super::Storage::IndexServer::DBID>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).CreateIndex)(::windows_core::Interface::as_raw(self), ptableid, ::core::mem::transmute(pindexid.unwrap_or(::std::ptr::null())), rgindexcolumndescs.len() as _, ::core::mem::transmute(rgindexcolumndescs.as_ptr()), rgpropertysets.len() as _, ::core::mem::transmute(rgpropertysets.as_ptr()), ::core::mem::transmute(ppindexid.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).CreateIndex)(::windows_core::Interface::as_raw(self), ptableid, ::core::mem::transmute(pindexid.unwrap_or(::std::ptr::null())), rgindexcolumndescs.len().try_into().unwrap(), ::core::mem::transmute(rgindexcolumndescs.as_ptr()), rgpropertysets.len().try_into().unwrap(), ::core::mem::transmute(rgpropertysets.as_ptr()), ::core::mem::transmute(ppindexid.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Storage_IndexServer\"`"] #[cfg(feature = "Win32_Storage_IndexServer")] @@ -4218,7 +4238,7 @@ pub struct ILoadFilterWithPrivateComActivation_Vtbl { pub struct IMDDataset(::windows_core::IUnknown); impl IMDDataset { pub unsafe fn FreeAxisInfo(&self, rgaxisinfo: &[MDAXISINFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).FreeAxisInfo)(::windows_core::Interface::as_raw(self), rgaxisinfo.len() as _, ::core::mem::transmute(rgaxisinfo.as_ptr())).ok() + (::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<()> { (::windows_core::Interface::vtable(self).GetAxisInfo)(::windows_core::Interface::as_raw(self), pcaxes, prgaxisinfo).ok() @@ -4229,7 +4249,7 @@ impl IMDDataset { where P0: ::windows_core::IntoParam<::windows_core::IUnknown>, { - (::windows_core::Interface::vtable(self).GetAxisRowset)(::windows_core::Interface::as_raw(self), punkouter.into_param().abi(), iaxis, riid, rgpropertysets.len() as _, ::core::mem::transmute(rgpropertysets.as_ptr()), ::core::mem::transmute(pprowset)).ok() + (::windows_core::Interface::vtable(self).GetAxisRowset)(::windows_core::Interface::as_raw(self), punkouter.into_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: P0, ulstartcell: usize, ulendcell: usize, pdata: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where @@ -4268,11 +4288,11 @@ pub struct IMDFind(::windows_core::IUnknown); impl IMDFind { pub unsafe fn FindCell(&self, ulstartingordinal: usize, rgpwszmember: &[::windows_core::PCWSTR]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).FindCell)(::windows_core::Interface::as_raw(self), ulstartingordinal, rgpwszmember.len() as _, ::core::mem::transmute(rgpwszmember.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).FindCell)(::windows_core::Interface::as_raw(self), ulstartingordinal, rgpwszmember.len().try_into().unwrap(), ::core::mem::transmute(rgpwszmember.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn FindTuple(&self, ulaxisidentifier: u32, ulstartingordinal: usize, rgpwszmember: &[::windows_core::PCWSTR]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).FindTuple)(::windows_core::Interface::as_raw(self), ulaxisidentifier, ulstartingordinal, rgpwszmember.len() as _, ::core::mem::transmute(rgpwszmember.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).FindTuple)(::windows_core::Interface::as_raw(self), ulaxisidentifier, ulstartingordinal, rgpwszmember.len().try_into().unwrap(), ::core::mem::transmute(rgpwszmember.as_ptr()), &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IMDFind, ::windows_core::IUnknown); @@ -4299,7 +4319,7 @@ impl IMDRangeRowset { where P0: ::windows_core::IntoParam<::windows_core::IUnknown>, { - (::windows_core::Interface::vtable(self).GetRangeRowset)(::windows_core::Interface::as_raw(self), punkouter.into_param().abi(), ulstartcell, ulendcell, riid, rgpropertysets.len() as _, ::core::mem::transmute(rgpropertysets.as_ptr()), ::core::mem::transmute(pprowset)).ok() + (::windows_core::Interface::vtable(self).GetRangeRowset)(::windows_core::Interface::as_raw(self), punkouter.into_param().abi(), ulstartcell, ulendcell, riid, rgpropertysets.len().try_into().unwrap(), ::core::mem::transmute(rgpropertysets.as_ptr()), ::core::mem::transmute(pprowset)).ok() } } ::windows_core::imp::interface_hierarchy!(IMDRangeRowset, ::windows_core::IUnknown); @@ -4535,7 +4555,7 @@ impl IOpenRowset { where P0: ::windows_core::IntoParam<::windows_core::IUnknown>, { - (::windows_core::Interface::vtable(self).OpenRowset)(::windows_core::Interface::as_raw(self), punkouter.into_param().abi(), ::core::mem::transmute(ptableid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pindexid.unwrap_or(::std::ptr::null())), riid, rgpropertysets.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rgpropertysets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(pprowset.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).OpenRowset)(::windows_core::Interface::as_raw(self), punkouter.into_param().abi(), ::core::mem::transmute(ptableid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pindexid.unwrap_or(::std::ptr::null())), riid, rgpropertysets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(rgpropertysets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(pprowset.unwrap_or(::std::ptr::null_mut()))).ok() } } ::windows_core::imp::interface_hierarchy!(IOpenRowset, ::windows_core::IUnknown); @@ -4878,7 +4898,7 @@ impl IReadData { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).ReadData)(::windows_core::Interface::as_raw(self), hchapter, pbookmark.len() as _, ::core::mem::transmute(pbookmark.as_ptr()), lrowsoffset, haccessor.into_param().abi(), crows, pcrowsobtained, ppfixeddata, pcbvariabletotal, ppvariabledata).ok() + (::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.into_param().abi(), crows, pcrowsobtained, ppfixeddata, pcbvariabletotal, ppvariabledata).ok() } pub unsafe fn ReleaseChapter(&self, hchapter: usize) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).ReleaseChapter)(::windows_core::Interface::as_raw(self), hchapter).ok() @@ -5018,7 +5038,7 @@ impl IRow { #[doc = "Required features: `\"Win32_Storage_IndexServer\"`"] #[cfg(feature = "Win32_Storage_IndexServer")] pub unsafe fn GetColumns(&self, rgcolumns: &mut [DBCOLUMNACCESS]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetColumns)(::windows_core::Interface::as_raw(self), rgcolumns.len() as _, ::core::mem::transmute(rgcolumns.as_ptr())).ok() + (::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: ::core::option::Option<*mut ::core::option::Option<::windows_core::IUnknown>>, phrow: ::core::option::Option<*mut usize>) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetSourceRowset)(::windows_core::Interface::as_raw(self), riid, ::core::mem::transmute(pprowset.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(phrow.unwrap_or(::std::ptr::null_mut()))).ok() @@ -5060,7 +5080,7 @@ impl IRowChange { #[doc = "Required features: `\"Win32_Storage_IndexServer\"`"] #[cfg(feature = "Win32_Storage_IndexServer")] pub unsafe fn SetColumns(&self, rgcolumns: &[DBCOLUMNACCESS]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetColumns)(::windows_core::Interface::as_raw(self), rgcolumns.len() as _, ::core::mem::transmute(rgcolumns.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetColumns)(::windows_core::Interface::as_raw(self), rgcolumns.len().try_into().unwrap(), ::core::mem::transmute(rgcolumns.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IRowChange, ::windows_core::IUnknown); @@ -5156,7 +5176,7 @@ impl IRowSchemaChange { #[doc = "Required features: `\"Win32_Storage_IndexServer\"`"] #[cfg(feature = "Win32_Storage_IndexServer")] pub unsafe fn SetColumns(&self, rgcolumns: &[DBCOLUMNACCESS]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetColumns)(::windows_core::Interface::as_raw(self), rgcolumns.len() as _, ::core::mem::transmute(rgcolumns.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.SetColumns)(::windows_core::Interface::as_raw(self), rgcolumns.len().try_into().unwrap(), ::core::mem::transmute(rgcolumns.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Storage_IndexServer\"`"] #[cfg(feature = "Win32_Storage_IndexServer")] @@ -5203,7 +5223,7 @@ impl IRowset { (::windows_core::Interface::vtable(self).GetData)(::windows_core::Interface::as_raw(self), hrow, haccessor.into_param().abi(), pdata).ok() } pub unsafe fn GetNextRows(&self, hreserved: usize, lrowsoffset: isize, pcrowsobtained: *mut usize, prghrows: &mut [*mut usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNextRows)(::windows_core::Interface::as_raw(self), hreserved, lrowsoffset, prghrows.len() as _, pcrowsobtained, ::core::mem::transmute(prghrows.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetNextRows)(::windows_core::Interface::as_raw(self), hreserved, lrowsoffset, prghrows.len().try_into().unwrap(), pcrowsobtained, ::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<()> { (::windows_core::Interface::vtable(self).ReleaseRows)(::windows_core::Interface::as_raw(self), crows, rghrows, rgrowoptions, rgrefcounts, rgrowstatus).ok() @@ -5264,7 +5284,7 @@ pub struct IRowsetAsynch_Vtbl { pub struct IRowsetBookmark(::windows_core::IUnknown); impl IRowsetBookmark { pub unsafe fn PositionOnBookmark(&self, hchapter: usize, pbookmark: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).PositionOnBookmark)(::windows_core::Interface::as_raw(self), hchapter, pbookmark.len() as _, ::core::mem::transmute(pbookmark.as_ptr())).ok() + (::windows_core::Interface::vtable(self).PositionOnBookmark)(::windows_core::Interface::as_raw(self), hchapter, pbookmark.len().try_into().unwrap(), ::core::mem::transmute(pbookmark.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IRowsetBookmark, ::windows_core::IUnknown); @@ -5370,7 +5390,7 @@ impl IRowsetCopyRows { (::windows_core::Interface::vtable(self).CloseSource)(::windows_core::Interface::as_raw(self), hsourceid).ok() } pub unsafe fn CopyByHROWS(&self, hsourceid: u16, hreserved: usize, rghrows: &[usize], bflags: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).CopyByHROWS)(::windows_core::Interface::as_raw(self), hsourceid, hreserved, rghrows.len() as _, ::core::mem::transmute(rghrows.as_ptr()), bflags).ok() + (::windows_core::Interface::vtable(self).CopyByHROWS)(::windows_core::Interface::as_raw(self), hsourceid, hreserved, rghrows.len().try_into().unwrap(), ::core::mem::transmute(rghrows.as_ptr()), bflags).ok() } pub unsafe fn CopyRows(&self, hsourceid: u16, hreserved: usize, crows: isize, bflags: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -5520,7 +5540,7 @@ impl IRowsetExactScroll { (::windows_core::Interface::vtable(self).base__.base__.base__.GetData)(::windows_core::Interface::as_raw(self), hrow, haccessor.into_param().abi(), pdata).ok() } pub unsafe fn GetNextRows(&self, hreserved: usize, lrowsoffset: isize, pcrowsobtained: *mut usize, prghrows: &mut [*mut usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetNextRows)(::windows_core::Interface::as_raw(self), hreserved, lrowsoffset, prghrows.len() as _, pcrowsobtained, ::core::mem::transmute(prghrows.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetNextRows)(::windows_core::Interface::as_raw(self), hreserved, lrowsoffset, prghrows.len().try_into().unwrap(), pcrowsobtained, ::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<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.ReleaseRows)(::windows_core::Interface::as_raw(self), crows, rghrows, rgrowoptions, rgrefcounts, rgrowstatus).ok() @@ -5530,10 +5550,10 @@ impl IRowsetExactScroll { } pub unsafe fn Compare(&self, hreserved: usize, pbookmark1: &[u8], pbookmark2: &[u8]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.Compare)(::windows_core::Interface::as_raw(self), hreserved, pbookmark1.len() as _, ::core::mem::transmute(pbookmark1.as_ptr()), pbookmark2.len() as _, ::core::mem::transmute(pbookmark2.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.Compare)(::windows_core::Interface::as_raw(self), hreserved, pbookmark1.len().try_into().unwrap(), ::core::mem::transmute(pbookmark1.as_ptr()), pbookmark2.len().try_into().unwrap(), ::core::mem::transmute(pbookmark2.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn GetRowsAt(&self, hreserved1: usize, hreserved2: usize, pbookmark: &[u8], lrowsoffset: isize, pcrowsobtained: *mut usize, prghrows: &mut [*mut usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetRowsAt)(::windows_core::Interface::as_raw(self), hreserved1, hreserved2, pbookmark.len() as _, ::core::mem::transmute(pbookmark.as_ptr()), lrowsoffset, prghrows.len() as _, pcrowsobtained, ::core::mem::transmute(prghrows.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.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, ::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<()> { (::windows_core::Interface::vtable(self).base__.base__.GetRowsByBookmark)(::windows_core::Interface::as_raw(self), hreserved, crows, rgcbbookmarks, rgpbookmarks, rghrows, rgrowstatus).ok() @@ -5542,13 +5562,13 @@ impl IRowsetExactScroll { (::windows_core::Interface::vtable(self).base__.base__.Hash)(::windows_core::Interface::as_raw(self), hreserved, cbookmarks, rgcbbookmarks, rgpbookmarks, rghashedvalues, rgbookmarkstatus).ok() } pub unsafe fn GetApproximatePosition(&self, hreserved: usize, pbookmark: &[u8], pulposition: *mut usize, pcrows: *mut usize) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetApproximatePosition)(::windows_core::Interface::as_raw(self), hreserved, pbookmark.len() as _, ::core::mem::transmute(pbookmark.as_ptr()), pulposition, pcrows).ok() + (::windows_core::Interface::vtable(self).base__.GetApproximatePosition)(::windows_core::Interface::as_raw(self), hreserved, pbookmark.len().try_into().unwrap(), ::core::mem::transmute(pbookmark.as_ptr()), pulposition, pcrows).ok() } pub unsafe fn GetRowsAtRatio(&self, hreserved1: usize, hreserved2: usize, ulnumerator: usize, uldenominator: usize, pcrowsobtained: *mut usize, prghrows: &mut [*mut usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetRowsAtRatio)(::windows_core::Interface::as_raw(self), hreserved1, hreserved2, ulnumerator, uldenominator, prghrows.len() as _, pcrowsobtained, ::core::mem::transmute(prghrows.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.GetRowsAtRatio)(::windows_core::Interface::as_raw(self), hreserved1, hreserved2, ulnumerator, uldenominator, prghrows.len().try_into().unwrap(), pcrowsobtained, ::core::mem::transmute(prghrows.as_ptr())).ok() } pub unsafe fn GetExactPosition(&self, hchapter: usize, pbookmark: &[u8], pulposition: *mut usize, pcrows: *mut usize) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetExactPosition)(::windows_core::Interface::as_raw(self), hchapter, pbookmark.len() as _, ::core::mem::transmute(pbookmark.as_ptr()), pulposition, pcrows).ok() + (::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, pcrows).ok() } } ::windows_core::imp::interface_hierarchy!(IRowsetExactScroll, ::windows_core::IUnknown, IRowset, IRowsetLocate, IRowsetScroll); @@ -5608,7 +5628,7 @@ impl IRowsetFind { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).FindNextRow)(::windows_core::Interface::as_raw(self), hchapter, haccessor.into_param().abi(), pfindvalue, compareop, pbookmark.len() as _, ::core::mem::transmute(pbookmark.as_ptr()), lrowsoffset, crows, pcrowsobtained, prghrows).ok() + (::windows_core::Interface::vtable(self).FindNextRow)(::windows_core::Interface::as_raw(self), hchapter, haccessor.into_param().abi(), pfindvalue, compareop, pbookmark.len().try_into().unwrap(), ::core::mem::transmute(pbookmark.as_ptr()), lrowsoffset, crows, pcrowsobtained, prghrows).ok() } } ::windows_core::imp::interface_hierarchy!(IRowsetFind, ::windows_core::IUnknown); @@ -5692,7 +5712,7 @@ impl IRowsetInfo { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Storage_IndexServer\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetProperties(&self, rgpropertyidsets: ::core::option::Option<&[DBPROPIDSET]>, pcpropertysets: *mut u32, prgpropertysets: *mut *mut DBPROPSET) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetProperties)(::windows_core::Interface::as_raw(self), rgpropertyidsets.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rgpropertyidsets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pcpropertysets, prgpropertysets).ok() + (::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, prgpropertysets).ok() } pub unsafe fn GetReferencedRowset(&self, iordinal: usize, riid: *const ::windows_core::GUID) -> ::windows_core::Result<::windows_core::IUnknown> { let mut result__ = ::std::mem::zeroed(); @@ -5756,7 +5776,7 @@ impl IRowsetLocate { (::windows_core::Interface::vtable(self).base__.GetData)(::windows_core::Interface::as_raw(self), hrow, haccessor.into_param().abi(), pdata).ok() } pub unsafe fn GetNextRows(&self, hreserved: usize, lrowsoffset: isize, pcrowsobtained: *mut usize, prghrows: &mut [*mut usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetNextRows)(::windows_core::Interface::as_raw(self), hreserved, lrowsoffset, prghrows.len() as _, pcrowsobtained, ::core::mem::transmute(prghrows.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.GetNextRows)(::windows_core::Interface::as_raw(self), hreserved, lrowsoffset, prghrows.len().try_into().unwrap(), pcrowsobtained, ::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<()> { (::windows_core::Interface::vtable(self).base__.ReleaseRows)(::windows_core::Interface::as_raw(self), crows, rghrows, rgrowoptions, rgrefcounts, rgrowstatus).ok() @@ -5766,10 +5786,10 @@ impl IRowsetLocate { } pub unsafe fn Compare(&self, hreserved: usize, pbookmark1: &[u8], pbookmark2: &[u8]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).Compare)(::windows_core::Interface::as_raw(self), hreserved, pbookmark1.len() as _, ::core::mem::transmute(pbookmark1.as_ptr()), pbookmark2.len() as _, ::core::mem::transmute(pbookmark2.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).Compare)(::windows_core::Interface::as_raw(self), hreserved, pbookmark1.len().try_into().unwrap(), ::core::mem::transmute(pbookmark1.as_ptr()), pbookmark2.len().try_into().unwrap(), ::core::mem::transmute(pbookmark2.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn GetRowsAt(&self, hreserved1: usize, hreserved2: usize, pbookmark: &[u8], lrowsoffset: isize, pcrowsobtained: *mut usize, prghrows: &mut [*mut usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetRowsAt)(::windows_core::Interface::as_raw(self), hreserved1, hreserved2, pbookmark.len() as _, ::core::mem::transmute(pbookmark.as_ptr()), lrowsoffset, prghrows.len() as _, pcrowsobtained, ::core::mem::transmute(prghrows.as_ptr())).ok() + (::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, ::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<()> { (::windows_core::Interface::vtable(self).GetRowsByBookmark)(::windows_core::Interface::as_raw(self), hreserved, crows, rgcbbookmarks, rgpbookmarks, rghrows, rgrowstatus).ok() @@ -5803,7 +5823,7 @@ impl IRowsetNewRowAfter { P0: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).SetNewDataAfter)(::windows_core::Interface::as_raw(self), hchapter, pbmprevious.len() as _, ::core::mem::transmute(pbmprevious.as_ptr()), haccessor.into_param().abi(), pdata, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).SetNewDataAfter)(::windows_core::Interface::as_raw(self), hchapter, pbmprevious.len().try_into().unwrap(), ::core::mem::transmute(pbmprevious.as_ptr()), haccessor.into_param().abi(), pdata, &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IRowsetNewRowAfter, ::windows_core::IUnknown); @@ -5855,7 +5875,7 @@ impl IRowsetNotify { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).OnFieldChange)(::windows_core::Interface::as_raw(self), prowset.into_param().abi(), hrow, rgcolumns.len() as _, ::core::mem::transmute(rgcolumns.as_ptr()), ereason, ephase, fcantdeny.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).OnFieldChange)(::windows_core::Interface::as_raw(self), prowset.into_param().abi(), hrow, rgcolumns.len().try_into().unwrap(), ::core::mem::transmute(rgcolumns.as_ptr()), ereason, ephase, fcantdeny.into_param().abi()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -5864,7 +5884,7 @@ impl IRowsetNotify { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).OnRowChange)(::windows_core::Interface::as_raw(self), prowset.into_param().abi(), rghrows.len() as _, ::core::mem::transmute(rghrows.as_ptr()), ereason, ephase, fcantdeny.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).OnRowChange)(::windows_core::Interface::as_raw(self), prowset.into_param().abi(), rghrows.len().try_into().unwrap(), ::core::mem::transmute(rghrows.as_ptr()), ereason, ephase, fcantdeny.into_param().abi()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -6032,7 +6052,7 @@ impl IRowsetScroll { (::windows_core::Interface::vtable(self).base__.base__.GetData)(::windows_core::Interface::as_raw(self), hrow, haccessor.into_param().abi(), pdata).ok() } pub unsafe fn GetNextRows(&self, hreserved: usize, lrowsoffset: isize, pcrowsobtained: *mut usize, prghrows: &mut [*mut usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetNextRows)(::windows_core::Interface::as_raw(self), hreserved, lrowsoffset, prghrows.len() as _, pcrowsobtained, ::core::mem::transmute(prghrows.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetNextRows)(::windows_core::Interface::as_raw(self), hreserved, lrowsoffset, prghrows.len().try_into().unwrap(), pcrowsobtained, ::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<()> { (::windows_core::Interface::vtable(self).base__.base__.ReleaseRows)(::windows_core::Interface::as_raw(self), crows, rghrows, rgrowoptions, rgrefcounts, rgrowstatus).ok() @@ -6042,10 +6062,10 @@ impl IRowsetScroll { } pub unsafe fn Compare(&self, hreserved: usize, pbookmark1: &[u8], pbookmark2: &[u8]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.Compare)(::windows_core::Interface::as_raw(self), hreserved, pbookmark1.len() as _, ::core::mem::transmute(pbookmark1.as_ptr()), pbookmark2.len() as _, ::core::mem::transmute(pbookmark2.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.Compare)(::windows_core::Interface::as_raw(self), hreserved, pbookmark1.len().try_into().unwrap(), ::core::mem::transmute(pbookmark1.as_ptr()), pbookmark2.len().try_into().unwrap(), ::core::mem::transmute(pbookmark2.as_ptr()), &mut result__).from_abi(result__) } pub unsafe fn GetRowsAt(&self, hreserved1: usize, hreserved2: usize, pbookmark: &[u8], lrowsoffset: isize, pcrowsobtained: *mut usize, prghrows: &mut [*mut usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetRowsAt)(::windows_core::Interface::as_raw(self), hreserved1, hreserved2, pbookmark.len() as _, ::core::mem::transmute(pbookmark.as_ptr()), lrowsoffset, prghrows.len() as _, pcrowsobtained, ::core::mem::transmute(prghrows.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.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, ::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<()> { (::windows_core::Interface::vtable(self).base__.GetRowsByBookmark)(::windows_core::Interface::as_raw(self), hreserved, crows, rgcbbookmarks, rgpbookmarks, rghrows, rgrowstatus).ok() @@ -6054,10 +6074,10 @@ impl IRowsetScroll { (::windows_core::Interface::vtable(self).base__.Hash)(::windows_core::Interface::as_raw(self), hreserved, cbookmarks, rgcbbookmarks, rgpbookmarks, rghashedvalues, rgbookmarkstatus).ok() } pub unsafe fn GetApproximatePosition(&self, hreserved: usize, pbookmark: &[u8], pulposition: *mut usize, pcrows: *mut usize) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetApproximatePosition)(::windows_core::Interface::as_raw(self), hreserved, pbookmark.len() as _, ::core::mem::transmute(pbookmark.as_ptr()), pulposition, pcrows).ok() + (::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, pcrows).ok() } pub unsafe fn GetRowsAtRatio(&self, hreserved1: usize, hreserved2: usize, ulnumerator: usize, uldenominator: usize, pcrowsobtained: *mut usize, prghrows: &mut [*mut usize]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetRowsAtRatio)(::windows_core::Interface::as_raw(self), hreserved1, hreserved2, ulnumerator, uldenominator, prghrows.len() as _, pcrowsobtained, ::core::mem::transmute(prghrows.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetRowsAtRatio)(::windows_core::Interface::as_raw(self), hreserved1, hreserved2, ulnumerator, uldenominator, prghrows.len().try_into().unwrap(), pcrowsobtained, ::core::mem::transmute(prghrows.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IRowsetScroll, ::windows_core::IUnknown, IRowset, IRowsetLocate); @@ -6107,10 +6127,10 @@ impl IRowsetUpdate { (::windows_core::Interface::vtable(self).GetRowStatus)(::windows_core::Interface::as_raw(self), hreserved, crows, rghrows, rgpendingstatus).ok() } pub unsafe fn Undo(&self, hreserved: usize, rghrows: &[usize], pcrowsundone: *mut usize, prgrowsundone: *mut *mut usize, prgrowstatus: *mut *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Undo)(::windows_core::Interface::as_raw(self), hreserved, rghrows.len() as _, ::core::mem::transmute(rghrows.as_ptr()), pcrowsundone, prgrowsundone, prgrowstatus).ok() + (::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, prgrowsundone, prgrowstatus).ok() } pub unsafe fn Update(&self, hreserved: usize, rghrows: &[usize], pcrows: *mut usize, prgrows: *mut *mut usize, prgrowstatus: *mut *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Update)(::windows_core::Interface::as_raw(self), hreserved, rghrows.len() as _, ::core::mem::transmute(rghrows.as_ptr()), pcrows, prgrows, prgrowstatus).ok() + (::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, prgrows, prgrowstatus).ok() } } ::windows_core::imp::interface_hierarchy!(IRowsetUpdate, ::windows_core::IUnknown, IRowsetChange); @@ -6242,7 +6262,7 @@ impl IRowsetWatchRegion { (::windows_core::Interface::vtable(self).Refresh)(::windows_core::Interface::as_raw(self), pcchangesobtained, prgchanges).ok() } pub unsafe fn ShrinkWatchRegion(&self, hregion: usize, hchapter: usize, pbookmark: &[u8], crows: isize) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).ShrinkWatchRegion)(::windows_core::Interface::as_raw(self), hregion, hchapter, pbookmark.len() as _, ::core::mem::transmute(pbookmark.as_ptr()), crows).ok() + (::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() } } ::windows_core::imp::interface_hierarchy!(IRowsetWatchRegion, ::windows_core::IUnknown, IRowsetWatchAll); @@ -6347,7 +6367,7 @@ impl ISQLRequestDiagFields { #[doc = "Required features: `\"Win32_System_Variant\"`"] #[cfg(feature = "Win32_System_Variant")] pub unsafe fn RequestDiagFields(&self, rgdiagfields: &[KAGREQDIAG]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).RequestDiagFields)(::windows_core::Interface::as_raw(self), rgdiagfields.len() as _, ::core::mem::transmute(rgdiagfields.as_ptr())).ok() + (::windows_core::Interface::vtable(self).RequestDiagFields)(::windows_core::Interface::as_raw(self), rgdiagfields.len().try_into().unwrap(), ::core::mem::transmute(rgdiagfields.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(ISQLRequestDiagFields, ::windows_core::IUnknown); @@ -6558,7 +6578,7 @@ impl IScopedOperations { where P0: ::windows_core::IntoParam<::windows_core::IUnknown>, { - (::windows_core::Interface::vtable(self).OpenRowset)(::windows_core::Interface::as_raw(self), punkouter.into_param().abi(), ::core::mem::transmute(ptableid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pindexid.unwrap_or(::std::ptr::null())), riid, rgpropertysets.len() as _, ::core::mem::transmute(rgpropertysets.as_ptr()), ::core::mem::transmute(pprowset.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).OpenRowset)(::windows_core::Interface::as_raw(self), punkouter.into_param().abi(), ::core::mem::transmute(ptableid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pindexid.unwrap_or(::std::ptr::null())), riid, rgpropertysets.len().try_into().unwrap(), ::core::mem::transmute(rgpropertysets.as_ptr()), ::core::mem::transmute(pprowset.unwrap_or(::std::ptr::null_mut()))).ok() } } ::windows_core::imp::interface_hierarchy!(IScopedOperations, ::windows_core::IUnknown, IBindResource); @@ -7313,7 +7333,7 @@ impl ISearchLanguageSupport { } pub unsafe fn IsPrefixNormalized(&self, pwcsquerytoken: &[u16], pwcsdocumenttoken: &[u16]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).IsPrefixNormalized)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwcsquerytoken.as_ptr()), pwcsquerytoken.len() as _, ::core::mem::transmute(pwcsdocumenttoken.as_ptr()), pwcsdocumenttoken.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).IsPrefixNormalized)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwcsquerytoken.as_ptr()), pwcsquerytoken.len().try_into().unwrap(), ::core::mem::transmute(pwcsdocumenttoken.as_ptr()), pwcsdocumenttoken.len().try_into().unwrap(), &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(ISearchLanguageSupport, ::windows_core::IUnknown); @@ -7564,7 +7584,7 @@ pub struct ISearchManager2_Vtbl { pub struct ISearchNotifyInlineSite(::windows_core::IUnknown); impl ISearchNotifyInlineSite { pub unsafe fn OnItemIndexedStatusChange(&self, sipstatus: SEARCH_INDEXING_PHASE, rgitemstatusentries: &[SEARCH_ITEM_INDEXING_STATUS]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).OnItemIndexedStatusChange)(::windows_core::Interface::as_raw(self), sipstatus, rgitemstatusentries.len() as _, ::core::mem::transmute(rgitemstatusentries.as_ptr())).ok() + (::windows_core::Interface::vtable(self).OnItemIndexedStatusChange)(::windows_core::Interface::as_raw(self), sipstatus, rgitemstatusentries.len().try_into().unwrap(), ::core::mem::transmute(rgitemstatusentries.as_ptr())).ok() } pub unsafe fn OnCatalogStatusChange(&self, guidcatalogresetsignature: *const ::windows_core::GUID, guidcheckpointsignature: *const ::windows_core::GUID, dwlastcheckpointnumber: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).OnCatalogStatusChange)(::windows_core::Interface::as_raw(self), guidcatalogresetsignature, guidcheckpointsignature, dwlastcheckpointnumber).ok() @@ -8256,12 +8276,12 @@ impl ISessionProperties { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Storage_IndexServer\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetProperties(&self, rgpropertyidsets: ::core::option::Option<&[DBPROPIDSET]>, pcpropertysets: *mut u32, prgpropertysets: *mut *mut DBPROPSET) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetProperties)(::windows_core::Interface::as_raw(self), rgpropertyidsets.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rgpropertyidsets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pcpropertysets, prgpropertysets).ok() + (::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, prgpropertysets).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Storage_IndexServer\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn SetProperties(&self, rgpropertysets: ::core::option::Option<&mut [DBPROPSET]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetProperties)(::windows_core::Interface::as_raw(self), rgpropertysets.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rgpropertysets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + (::windows_core::Interface::vtable(self).SetProperties)(::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()))).ok() } } ::windows_core::imp::interface_hierarchy!(ISessionProperties, ::windows_core::IUnknown); @@ -8333,7 +8353,7 @@ impl ISourcesRowset { where P0: ::windows_core::IntoParam<::windows_core::IUnknown>, { - (::windows_core::Interface::vtable(self).GetSourcesRowset)(::windows_core::Interface::as_raw(self), punkouter.into_param().abi(), riid, rgproperties.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rgproperties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(ppsourcesrowset)).ok() + (::windows_core::Interface::vtable(self).GetSourcesRowset)(::windows_core::Interface::as_raw(self), punkouter.into_param().abi(), riid, rgproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(rgproperties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(ppsourcesrowset)).ok() } } ::windows_core::imp::interface_hierarchy!(ISourcesRowset, ::windows_core::IUnknown); @@ -8631,10 +8651,10 @@ impl ISubscriptionMgr2 { (::windows_core::Interface::vtable(self).EnumSubscriptions)(::windows_core::Interface::as_raw(self), dwflags, &mut result__).from_abi(result__) } pub unsafe fn UpdateItems(&self, dwflags: u32, pcookies: &[::windows_core::GUID]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).UpdateItems)(::windows_core::Interface::as_raw(self), dwflags, pcookies.len() as _, ::core::mem::transmute(pcookies.as_ptr())).ok() + (::windows_core::Interface::vtable(self).UpdateItems)(::windows_core::Interface::as_raw(self), dwflags, pcookies.len().try_into().unwrap(), ::core::mem::transmute(pcookies.as_ptr())).ok() } pub unsafe fn AbortItems(&self, pcookies: &[::windows_core::GUID]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).AbortItems)(::windows_core::Interface::as_raw(self), pcookies.len() as _, ::core::mem::transmute(pcookies.as_ptr())).ok() + (::windows_core::Interface::vtable(self).AbortItems)(::windows_core::Interface::as_raw(self), pcookies.len().try_into().unwrap(), ::core::mem::transmute(pcookies.as_ptr())).ok() } pub unsafe fn AbortAll(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).AbortAll)(::windows_core::Interface::as_raw(self)).ok() @@ -8673,10 +8693,10 @@ impl ITableCreation { ::windows_core::Interface::as_raw(self), punkouter.into_param().abi(), ::core::mem::transmute(ptableid.unwrap_or(::std::ptr::null())), - rgcolumndescs.as_deref().map_or(0, |slice| slice.len() 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() as _), + rgpropertysets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(rgpropertysets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(pptableid.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pprowset.unwrap_or(::std::ptr::null_mut())), @@ -8745,10 +8765,10 @@ impl ITableDefinition { ::windows_core::Interface::as_raw(self), punkouter.into_param().abi(), ::core::mem::transmute(ptableid.unwrap_or(::std::ptr::null())), - rgcolumndescs.as_deref().map_or(0, |slice| slice.len() 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() as _), + rgpropertysets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(rgpropertysets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(pptableid.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pprowset.unwrap_or(::std::ptr::null_mut())), @@ -8813,10 +8833,10 @@ impl ITableDefinitionWithConstraints { ::windows_core::Interface::as_raw(self), punkouter.into_param().abi(), ::core::mem::transmute(ptableid.unwrap_or(::std::ptr::null())), - rgcolumndescs.as_deref().map_or(0, |slice| slice.len() 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() as _), + rgpropertysets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(rgpropertysets.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(pptableid.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pprowset.unwrap_or(::std::ptr::null_mut())), @@ -8865,7 +8885,7 @@ impl ITableDefinitionWithConstraints { where P0: ::windows_core::IntoParam<::windows_core::IUnknown>, { - (::windows_core::Interface::vtable(self).CreateTableWithConstraints)(::windows_core::Interface::as_raw(self), punkouter.into_param().abi(), ptableid, rgcolumndescs.len() as _, ::core::mem::transmute(rgcolumndescs.as_ptr()), rgconstraintdescs.len() as _, ::core::mem::transmute(rgconstraintdescs.as_ptr()), riid, rgpropertysets.len() as _, ::core::mem::transmute(rgpropertysets.as_ptr()), pptableid, ::core::mem::transmute(pprowset)).ok() + (::windows_core::Interface::vtable(self).CreateTableWithConstraints)(::windows_core::Interface::as_raw(self), punkouter.into_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, ::core::mem::transmute(pprowset)).ok() } #[doc = "Required features: `\"Win32_Storage_IndexServer\"`"] #[cfg(feature = "Win32_Storage_IndexServer")] @@ -9104,7 +9124,7 @@ impl ITrusteeAdmin { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Security_Authorization\"`, `\"Win32_Storage_IndexServer\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_Authorization", feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn CreateTrustee(&self, ptrustee: *const super::super::Security::Authorization::TRUSTEE_W, rgpropertysets: &mut [DBPROPSET]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).CreateTrustee)(::windows_core::Interface::as_raw(self), ptrustee, rgpropertysets.len() as _, ::core::mem::transmute(rgpropertysets.as_ptr())).ok() + (::windows_core::Interface::vtable(self).CreateTrustee)(::windows_core::Interface::as_raw(self), ptrustee, rgpropertysets.len().try_into().unwrap(), ::core::mem::transmute(rgpropertysets.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Security_Authorization\"`"] #[cfg(feature = "Win32_Security_Authorization")] @@ -9114,12 +9134,12 @@ impl ITrusteeAdmin { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Security_Authorization\"`, `\"Win32_Storage_IndexServer\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_Authorization", feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn SetTrusteeProperties(&self, ptrustee: *const super::super::Security::Authorization::TRUSTEE_W, rgpropertysets: &mut [DBPROPSET]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetTrusteeProperties)(::windows_core::Interface::as_raw(self), ptrustee, rgpropertysets.len() as _, ::core::mem::transmute(rgpropertysets.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetTrusteeProperties)(::windows_core::Interface::as_raw(self), ptrustee, rgpropertysets.len().try_into().unwrap(), ::core::mem::transmute(rgpropertysets.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Security_Authorization\"`, `\"Win32_Storage_IndexServer\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", 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<()> { - (::windows_core::Interface::vtable(self).GetTrusteeProperties)(::windows_core::Interface::as_raw(self), ptrustee, rgpropertyidsets.len() as _, ::core::mem::transmute(rgpropertyidsets.as_ptr()), pcpropertysets, prgpropertysets).ok() + (::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, prgpropertysets).ok() } } ::windows_core::imp::interface_hierarchy!(ITrusteeAdmin, ::windows_core::IUnknown); @@ -9285,14 +9305,14 @@ impl IUrlAccessor { (::windows_core::Interface::vtable(self).AddRequestParameter)(::windows_core::Interface::as_raw(self), pspec, pvar).ok() } pub unsafe fn GetDocFormat(&self, wszdocformat: &mut [u16], pdwlength: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDocFormat)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszdocformat.as_ptr()), wszdocformat.len() as _, pdwlength).ok() + (::windows_core::Interface::vtable(self).GetDocFormat)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszdocformat.as_ptr()), wszdocformat.len().try_into().unwrap(), pdwlength).ok() } pub unsafe fn GetCLSID(&self) -> ::windows_core::Result<::windows_core::GUID> { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).GetCLSID)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetHost(&self, wszhost: &mut [u16], pdwlength: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetHost)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszhost.as_ptr()), wszhost.len() as _, pdwlength).ok() + (::windows_core::Interface::vtable(self).GetHost)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszhost.as_ptr()), wszhost.len().try_into().unwrap(), pdwlength).ok() } pub unsafe fn IsDirectory(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).IsDirectory)(::windows_core::Interface::as_raw(self)).ok() @@ -9308,13 +9328,13 @@ impl IUrlAccessor { (::windows_core::Interface::vtable(self).GetLastModified)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetFileName(&self, wszfilename: &mut [u16], pdwlength: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetFileName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszfilename.as_ptr()), wszfilename.len() as _, pdwlength).ok() + (::windows_core::Interface::vtable(self).GetFileName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszfilename.as_ptr()), wszfilename.len().try_into().unwrap(), pdwlength).ok() } pub unsafe fn GetSecurityDescriptor(&self, psd: &mut [u8], pdwlength: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSecurityDescriptor)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(psd.as_ptr()), psd.len() as _, pdwlength).ok() + (::windows_core::Interface::vtable(self).GetSecurityDescriptor)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(psd.as_ptr()), psd.len().try_into().unwrap(), pdwlength).ok() } pub unsafe fn GetRedirectedURL(&self, wszredirectedurl: &mut [u16], pdwlength: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetRedirectedURL)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszredirectedurl.as_ptr()), wszredirectedurl.len() as _, pdwlength).ok() + (::windows_core::Interface::vtable(self).GetRedirectedURL)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszredirectedurl.as_ptr()), wszredirectedurl.len().try_into().unwrap(), pdwlength).ok() } pub unsafe fn GetSecurityProvider(&self) -> ::windows_core::Result<::windows_core::GUID> { let mut result__ = ::std::mem::zeroed(); @@ -9380,14 +9400,14 @@ impl IUrlAccessor2 { (::windows_core::Interface::vtable(self).base__.AddRequestParameter)(::windows_core::Interface::as_raw(self), pspec, pvar).ok() } pub unsafe fn GetDocFormat(&self, wszdocformat: &mut [u16], pdwlength: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetDocFormat)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszdocformat.as_ptr()), wszdocformat.len() as _, pdwlength).ok() + (::windows_core::Interface::vtable(self).base__.GetDocFormat)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszdocformat.as_ptr()), wszdocformat.len().try_into().unwrap(), pdwlength).ok() } pub unsafe fn GetCLSID(&self) -> ::windows_core::Result<::windows_core::GUID> { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).base__.GetCLSID)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetHost(&self, wszhost: &mut [u16], pdwlength: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetHost)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszhost.as_ptr()), wszhost.len() as _, pdwlength).ok() + (::windows_core::Interface::vtable(self).base__.GetHost)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszhost.as_ptr()), wszhost.len().try_into().unwrap(), pdwlength).ok() } pub unsafe fn IsDirectory(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.IsDirectory)(::windows_core::Interface::as_raw(self)).ok() @@ -9403,13 +9423,13 @@ impl IUrlAccessor2 { (::windows_core::Interface::vtable(self).base__.GetLastModified)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetFileName(&self, wszfilename: &mut [u16], pdwlength: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetFileName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszfilename.as_ptr()), wszfilename.len() as _, pdwlength).ok() + (::windows_core::Interface::vtable(self).base__.GetFileName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszfilename.as_ptr()), wszfilename.len().try_into().unwrap(), pdwlength).ok() } pub unsafe fn GetSecurityDescriptor(&self, psd: &mut [u8], pdwlength: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetSecurityDescriptor)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(psd.as_ptr()), psd.len() as _, pdwlength).ok() + (::windows_core::Interface::vtable(self).base__.GetSecurityDescriptor)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(psd.as_ptr()), psd.len().try_into().unwrap(), pdwlength).ok() } pub unsafe fn GetRedirectedURL(&self, wszredirectedurl: &mut [u16], pdwlength: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetRedirectedURL)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszredirectedurl.as_ptr()), wszredirectedurl.len() as _, pdwlength).ok() + (::windows_core::Interface::vtable(self).base__.GetRedirectedURL)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszredirectedurl.as_ptr()), wszredirectedurl.len().try_into().unwrap(), pdwlength).ok() } pub unsafe fn GetSecurityProvider(&self) -> ::windows_core::Result<::windows_core::GUID> { let mut result__ = ::std::mem::zeroed(); @@ -9428,13 +9448,13 @@ impl IUrlAccessor2 { (::windows_core::Interface::vtable(self).base__.BindToFilter)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetDisplayUrl(&self, wszdocurl: &mut [u16], pdwlength: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDisplayUrl)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszdocurl.as_ptr()), wszdocurl.len() as _, pdwlength).ok() + (::windows_core::Interface::vtable(self).GetDisplayUrl)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszdocurl.as_ptr()), wszdocurl.len().try_into().unwrap(), pdwlength).ok() } pub unsafe fn IsDocument(&self) -> ::windows_core::Result<()> { (::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<()> { - (::windows_core::Interface::vtable(self).GetCodePage)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszcodepage.as_ptr()), wszcodepage.len() as _, pdwlength).ok() + (::windows_core::Interface::vtable(self).GetCodePage)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszcodepage.as_ptr()), wszcodepage.len().try_into().unwrap(), pdwlength).ok() } } ::windows_core::imp::interface_hierarchy!(IUrlAccessor2, ::windows_core::IUnknown, IUrlAccessor); @@ -9462,14 +9482,14 @@ impl IUrlAccessor3 { (::windows_core::Interface::vtable(self).base__.base__.AddRequestParameter)(::windows_core::Interface::as_raw(self), pspec, pvar).ok() } pub unsafe fn GetDocFormat(&self, wszdocformat: &mut [u16], pdwlength: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetDocFormat)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszdocformat.as_ptr()), wszdocformat.len() as _, pdwlength).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetDocFormat)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszdocformat.as_ptr()), wszdocformat.len().try_into().unwrap(), pdwlength).ok() } pub unsafe fn GetCLSID(&self) -> ::windows_core::Result<::windows_core::GUID> { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).base__.base__.GetCLSID)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetHost(&self, wszhost: &mut [u16], pdwlength: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetHost)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszhost.as_ptr()), wszhost.len() as _, pdwlength).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetHost)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszhost.as_ptr()), wszhost.len().try_into().unwrap(), pdwlength).ok() } pub unsafe fn IsDirectory(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.IsDirectory)(::windows_core::Interface::as_raw(self)).ok() @@ -9485,13 +9505,13 @@ impl IUrlAccessor3 { (::windows_core::Interface::vtable(self).base__.base__.GetLastModified)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetFileName(&self, wszfilename: &mut [u16], pdwlength: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetFileName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszfilename.as_ptr()), wszfilename.len() as _, pdwlength).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetFileName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszfilename.as_ptr()), wszfilename.len().try_into().unwrap(), pdwlength).ok() } pub unsafe fn GetSecurityDescriptor(&self, psd: &mut [u8], pdwlength: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetSecurityDescriptor)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(psd.as_ptr()), psd.len() as _, pdwlength).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetSecurityDescriptor)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(psd.as_ptr()), psd.len().try_into().unwrap(), pdwlength).ok() } pub unsafe fn GetRedirectedURL(&self, wszredirectedurl: &mut [u16], pdwlength: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetRedirectedURL)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszredirectedurl.as_ptr()), wszredirectedurl.len() as _, pdwlength).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetRedirectedURL)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszredirectedurl.as_ptr()), wszredirectedurl.len().try_into().unwrap(), pdwlength).ok() } pub unsafe fn GetSecurityProvider(&self) -> ::windows_core::Result<::windows_core::GUID> { let mut result__ = ::std::mem::zeroed(); @@ -9510,13 +9530,13 @@ impl IUrlAccessor3 { (::windows_core::Interface::vtable(self).base__.base__.BindToFilter)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetDisplayUrl(&self, wszdocurl: &mut [u16], pdwlength: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetDisplayUrl)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszdocurl.as_ptr()), wszdocurl.len() as _, pdwlength).ok() + (::windows_core::Interface::vtable(self).base__.GetDisplayUrl)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszdocurl.as_ptr()), wszdocurl.len().try_into().unwrap(), pdwlength).ok() } pub unsafe fn IsDocument(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.IsDocument)(::windows_core::Interface::as_raw(self)).ok() } pub unsafe fn GetCodePage(&self, wszcodepage: &mut [u16], pdwlength: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetCodePage)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszcodepage.as_ptr()), wszcodepage.len() as _, pdwlength).ok() + (::windows_core::Interface::vtable(self).base__.GetCodePage)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszcodepage.as_ptr()), wszcodepage.len().try_into().unwrap(), pdwlength).ok() } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -9553,14 +9573,14 @@ impl IUrlAccessor4 { (::windows_core::Interface::vtable(self).base__.base__.base__.AddRequestParameter)(::windows_core::Interface::as_raw(self), pspec, pvar).ok() } pub unsafe fn GetDocFormat(&self, wszdocformat: &mut [u16], pdwlength: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetDocFormat)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszdocformat.as_ptr()), wszdocformat.len() as _, pdwlength).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetDocFormat)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszdocformat.as_ptr()), wszdocformat.len().try_into().unwrap(), pdwlength).ok() } pub unsafe fn GetCLSID(&self) -> ::windows_core::Result<::windows_core::GUID> { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).base__.base__.base__.GetCLSID)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetHost(&self, wszhost: &mut [u16], pdwlength: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetHost)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszhost.as_ptr()), wszhost.len() as _, pdwlength).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetHost)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszhost.as_ptr()), wszhost.len().try_into().unwrap(), pdwlength).ok() } pub unsafe fn IsDirectory(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.base__.IsDirectory)(::windows_core::Interface::as_raw(self)).ok() @@ -9576,13 +9596,13 @@ impl IUrlAccessor4 { (::windows_core::Interface::vtable(self).base__.base__.base__.GetLastModified)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetFileName(&self, wszfilename: &mut [u16], pdwlength: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetFileName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszfilename.as_ptr()), wszfilename.len() as _, pdwlength).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetFileName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszfilename.as_ptr()), wszfilename.len().try_into().unwrap(), pdwlength).ok() } pub unsafe fn GetSecurityDescriptor(&self, psd: &mut [u8], pdwlength: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetSecurityDescriptor)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(psd.as_ptr()), psd.len() as _, pdwlength).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetSecurityDescriptor)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(psd.as_ptr()), psd.len().try_into().unwrap(), pdwlength).ok() } pub unsafe fn GetRedirectedURL(&self, wszredirectedurl: &mut [u16], pdwlength: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetRedirectedURL)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszredirectedurl.as_ptr()), wszredirectedurl.len() as _, pdwlength).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetRedirectedURL)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszredirectedurl.as_ptr()), wszredirectedurl.len().try_into().unwrap(), pdwlength).ok() } pub unsafe fn GetSecurityProvider(&self) -> ::windows_core::Result<::windows_core::GUID> { let mut result__ = ::std::mem::zeroed(); @@ -9601,13 +9621,13 @@ impl IUrlAccessor4 { (::windows_core::Interface::vtable(self).base__.base__.base__.BindToFilter)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetDisplayUrl(&self, wszdocurl: &mut [u16], pdwlength: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetDisplayUrl)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszdocurl.as_ptr()), wszdocurl.len() as _, pdwlength).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetDisplayUrl)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszdocurl.as_ptr()), wszdocurl.len().try_into().unwrap(), pdwlength).ok() } pub unsafe fn IsDocument(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.base__.IsDocument)(::windows_core::Interface::as_raw(self)).ok() } pub unsafe fn GetCodePage(&self, wszcodepage: &mut [u16], pdwlength: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.base__.GetCodePage)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszcodepage.as_ptr()), wszcodepage.len() as _, pdwlength).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetCodePage)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(wszcodepage.as_ptr()), wszcodepage.len().try_into().unwrap(), pdwlength).ok() } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -9695,7 +9715,7 @@ impl IViewFilter { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).SetFilter)(::windows_core::Interface::as_raw(self), haccessor.into_param().abi(), compareops.len() as _, ::core::mem::transmute(compareops.as_ptr()), pcriteriadata).ok() + (::windows_core::Interface::vtable(self).SetFilter)(::windows_core::Interface::as_raw(self), haccessor.into_param().abi(), compareops.len().try_into().unwrap(), ::core::mem::transmute(compareops.as_ptr()), pcriteriadata).ok() } } ::windows_core::imp::interface_hierarchy!(IViewFilter, ::windows_core::IUnknown); 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 41b4bc151a..de70450012 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Services/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Services/mod.rs @@ -175,7 +175,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn EnumServicesStatusExA(hscmanager : super::super::Security:: SC_HANDLE, infolevel : SC_ENUM_TYPE, dwservicetype : ENUM_SERVICE_TYPE, dwservicestate : ENUM_SERVICE_STATE, lpservices : *mut u8, cbbufsize : u32, pcbbytesneeded : *mut u32, lpservicesreturned : *mut u32, lpresumehandle : *mut u32, pszgroupname : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - EnumServicesStatusExA(hscmanager.into_param().abi(), infolevel, dwservicetype, dwservicestate, ::core::mem::transmute(lpservices.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpservices.as_deref().map_or(0, |slice| slice.len() as _), pcbbytesneeded, lpservicesreturned, ::core::mem::transmute(lpresumehandle.unwrap_or(::std::ptr::null_mut())), pszgroupname.into_param().abi()).ok() + EnumServicesStatusExA(hscmanager.into_param().abi(), infolevel, dwservicetype, dwservicestate, ::core::mem::transmute(lpservices.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpservices.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbbytesneeded, lpservicesreturned, ::core::mem::transmute(lpresumehandle.unwrap_or(::std::ptr::null_mut())), pszgroupname.into_param().abi()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Security\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] @@ -186,7 +186,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn EnumServicesStatusExW(hscmanager : super::super::Security:: SC_HANDLE, infolevel : SC_ENUM_TYPE, dwservicetype : ENUM_SERVICE_TYPE, dwservicestate : ENUM_SERVICE_STATE, lpservices : *mut u8, cbbufsize : u32, pcbbytesneeded : *mut u32, lpservicesreturned : *mut u32, lpresumehandle : *mut u32, pszgroupname : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - EnumServicesStatusExW(hscmanager.into_param().abi(), infolevel, dwservicetype, dwservicestate, ::core::mem::transmute(lpservices.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpservices.as_deref().map_or(0, |slice| slice.len() as _), pcbbytesneeded, lpservicesreturned, ::core::mem::transmute(lpresumehandle.unwrap_or(::std::ptr::null_mut())), pszgroupname.into_param().abi()).ok() + EnumServicesStatusExW(hscmanager.into_param().abi(), infolevel, dwservicetype, dwservicestate, ::core::mem::transmute(lpservices.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpservices.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbbytesneeded, lpservicesreturned, ::core::mem::transmute(lpresumehandle.unwrap_or(::std::ptr::null_mut())), pszgroupname.into_param().abi()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Security\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] @@ -204,7 +204,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("api-ms-win-service-core-l1-1-4.dll" "system" fn GetServiceDirectory(hservicestatus : SERVICE_STATUS_HANDLE, edirectorytype : SERVICE_DIRECTORY_TYPE, lppathbuffer : ::windows_core::PWSTR, cchpathbufferlength : u32, lpcchrequiredbufferlength : *mut u32) -> u32); - GetServiceDirectory(hservicestatus.into_param().abi(), 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() as _), lpcchrequiredbufferlength) + GetServiceDirectory(hservicestatus.into_param().abi(), 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) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Security\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] @@ -268,7 +268,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("api-ms-win-service-core-l1-1-5.dll" "system" fn GetSharedServiceDirectory(servicehandle : super::super::Security:: SC_HANDLE, directorytype : SERVICE_SHARED_DIRECTORY_TYPE, pathbuffer : ::windows_core::PWSTR, pathbufferlength : u32, requiredbufferlength : *mut u32) -> u32); - GetSharedServiceDirectory(servicehandle.into_param().abi(), 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() as _), requiredbufferlength) + GetSharedServiceDirectory(servicehandle.into_param().abi(), 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) } #[doc = "Required features: `\"Win32_Security\"`, `\"Win32_System_Registry\"`"] #[cfg(all(feature = "Win32_Security", feature = "Win32_System_Registry"))] @@ -376,7 +376,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn QueryServiceConfig2A(hservice : super::super::Security:: SC_HANDLE, dwinfolevel : SERVICE_CONFIG, lpbuffer : *mut u8, cbbufsize : u32, pcbbytesneeded : *mut u32) -> super::super::Foundation:: BOOL); - QueryServiceConfig2A(hservice.into_param().abi(), dwinfolevel, ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _), pcbbytesneeded).ok() + QueryServiceConfig2A(hservice.into_param().abi(), dwinfolevel, ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbbytesneeded).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Security\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] @@ -386,7 +386,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn QueryServiceConfig2W(hservice : super::super::Security:: SC_HANDLE, dwinfolevel : SERVICE_CONFIG, lpbuffer : *mut u8, cbbufsize : u32, pcbbytesneeded : *mut u32) -> super::super::Foundation:: BOOL); - QueryServiceConfig2W(hservice.into_param().abi(), dwinfolevel, ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _), pcbbytesneeded).ok() + QueryServiceConfig2W(hservice.into_param().abi(), dwinfolevel, ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbbytesneeded).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Security\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] @@ -466,7 +466,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn QueryServiceStatusEx(hservice : super::super::Security:: SC_HANDLE, infolevel : SC_STATUS_TYPE, lpbuffer : *mut u8, cbbufsize : u32, pcbbytesneeded : *mut u32) -> super::super::Foundation:: BOOL); - QueryServiceStatusEx(hservice.into_param().abi(), infolevel, ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _), pcbbytesneeded).ok() + QueryServiceStatusEx(hservice.into_param().abi(), infolevel, ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbbytesneeded).ok() } #[inline] pub unsafe fn RegisterServiceCtrlHandlerA(lpservicename: P0, lphandlerproc: LPHANDLER_FUNCTION) -> ::windows_core::Result @@ -545,7 +545,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn StartServiceA(hservice : super::super::Security:: SC_HANDLE, dwnumserviceargs : u32, lpserviceargvectors : *const ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - StartServiceA(hservice.into_param().abi(), lpserviceargvectors.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpserviceargvectors.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + StartServiceA(hservice.into_param().abi(), lpserviceargvectors.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpserviceargvectors.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -569,7 +569,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn StartServiceW(hservice : super::super::Security:: SC_HANDLE, dwnumserviceargs : u32, lpserviceargvectors : *const ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - StartServiceW(hservice.into_param().abi(), lpserviceargvectors.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpserviceargvectors.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + StartServiceW(hservice.into_param().abi(), lpserviceargvectors.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpserviceargvectors.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() } #[doc = "Required features: `\"Win32_Security\"`"] #[cfg(feature = "Win32_Security")] 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 72a15c3860..72e8852de3 100644 --- a/crates/libs/windows/src/Windows/Win32/System/SettingsManagementInfrastructure/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/SettingsManagementInfrastructure/mod.rs @@ -306,7 +306,7 @@ impl ISettingsItem { (::windows_core::Interface::vtable(self).GetValueRaw)(::windows_core::Interface::as_raw(self), data, datasize).ok() } pub unsafe fn SetValueRaw(&self, datatype: i32, data: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetValueRaw)(::windows_core::Interface::as_raw(self), datatype, ::core::mem::transmute(data.as_ptr()), data.len() as _).ok() + (::windows_core::Interface::vtable(self).SetValueRaw)(::windows_core::Interface::as_raw(self), datatype, ::core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 9aad0d2789..042c26129c 100644 --- a/crates/libs/windows/src/Windows/Win32/System/SideShow/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/SideShow/mod.rs @@ -175,7 +175,7 @@ impl ISideShowEvents { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).ApplicationEvent)(::windows_core::Interface::as_raw(self), in_picapabilities.into_param().abi(), in_dweventid, in_pbeventdata.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(in_pbeventdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + (::windows_core::Interface::vtable(self).ApplicationEvent)(::windows_core::Interface::as_raw(self), in_picapabilities.into_param().abi(), in_dweventid, in_pbeventdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(in_pbeventdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() } pub unsafe fn DeviceAdded(&self, in_pidevice: P0) -> ::windows_core::Result<()> where 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 e71e6df72a..15fa5969a4 100644 --- a/crates/libs/windows/src/Windows/Win32/System/SystemInformation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/SystemInformation/mod.rs @@ -11,7 +11,7 @@ where #[inline] pub unsafe fn EnumSystemFirmwareTables(firmwaretableprovidersignature: FIRMWARE_TABLE_PROVIDER, pfirmwaretableenumbuffer: ::core::option::Option<&mut [u8]>) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn EnumSystemFirmwareTables(firmwaretableprovidersignature : FIRMWARE_TABLE_PROVIDER, pfirmwaretableenumbuffer : *mut u8, buffersize : u32) -> u32); - EnumSystemFirmwareTables(firmwaretableprovidersignature, ::core::mem::transmute(pfirmwaretableenumbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pfirmwaretableenumbuffer.as_deref().map_or(0, |slice| slice.len() as _)) + EnumSystemFirmwareTables(firmwaretableprovidersignature, ::core::mem::transmute(pfirmwaretableenumbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pfirmwaretableenumbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -121,17 +121,17 @@ pub unsafe fn GetSystemDEPPolicy() -> DEP_SYSTEM_POLICY_TYPE { #[inline] pub unsafe fn GetSystemDirectoryA(lpbuffer: ::core::option::Option<&mut [u8]>) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn GetSystemDirectoryA(lpbuffer : ::windows_core::PSTR, usize : u32) -> u32); - GetSystemDirectoryA(::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _)) + GetSystemDirectoryA(::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetSystemDirectoryW(lpbuffer: ::core::option::Option<&mut [u16]>) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn GetSystemDirectoryW(lpbuffer : ::windows_core::PWSTR, usize : u32) -> u32); - GetSystemDirectoryW(::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _)) + GetSystemDirectoryW(::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetSystemFirmwareTable(firmwaretableprovidersignature: FIRMWARE_TABLE_PROVIDER, firmwaretableid: u32, pfirmwaretablebuffer: ::core::option::Option<&mut [u8]>) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn GetSystemFirmwareTable(firmwaretableprovidersignature : FIRMWARE_TABLE_PROVIDER, firmwaretableid : u32, pfirmwaretablebuffer : *mut u8, buffersize : u32) -> u32); - GetSystemFirmwareTable(firmwaretableprovidersignature, firmwaretableid, ::core::mem::transmute(pfirmwaretablebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pfirmwaretablebuffer.as_deref().map_or(0, |slice| slice.len() as _)) + GetSystemFirmwareTable(firmwaretableprovidersignature, firmwaretableid, ::core::mem::transmute(pfirmwaretablebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pfirmwaretablebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetSystemInfo(lpsysteminfo: *mut SYSTEM_INFO) { @@ -189,32 +189,32 @@ pub unsafe fn GetSystemTimePreciseAsFileTime() -> super::super::Foundation::FILE #[inline] pub unsafe fn GetSystemWindowsDirectoryA(lpbuffer: ::core::option::Option<&mut [u8]>) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn GetSystemWindowsDirectoryA(lpbuffer : ::windows_core::PSTR, usize : u32) -> u32); - GetSystemWindowsDirectoryA(::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _)) + GetSystemWindowsDirectoryA(::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetSystemWindowsDirectoryW(lpbuffer: ::core::option::Option<&mut [u16]>) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn GetSystemWindowsDirectoryW(lpbuffer : ::windows_core::PWSTR, usize : u32) -> u32); - GetSystemWindowsDirectoryW(::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _)) + GetSystemWindowsDirectoryW(::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetSystemWow64Directory2A(lpbuffer: ::core::option::Option<&mut [u8]>, imagefilemachinetype: IMAGE_FILE_MACHINE) -> u32 { ::windows_targets::link!("api-ms-win-core-wow64-l1-1-1.dll" "system" fn GetSystemWow64Directory2A(lpbuffer : ::windows_core::PSTR, usize : u32, imagefilemachinetype : IMAGE_FILE_MACHINE) -> u32); - GetSystemWow64Directory2A(::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _), imagefilemachinetype) + GetSystemWow64Directory2A(::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()), imagefilemachinetype) } #[inline] pub unsafe fn GetSystemWow64Directory2W(lpbuffer: ::core::option::Option<&mut [u16]>, imagefilemachinetype: IMAGE_FILE_MACHINE) -> u32 { ::windows_targets::link!("api-ms-win-core-wow64-l1-1-1.dll" "system" fn GetSystemWow64Directory2W(lpbuffer : ::windows_core::PWSTR, usize : u32, imagefilemachinetype : IMAGE_FILE_MACHINE) -> u32); - GetSystemWow64Directory2W(::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _), imagefilemachinetype) + GetSystemWow64Directory2W(::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()), imagefilemachinetype) } #[inline] pub unsafe fn GetSystemWow64DirectoryA(lpbuffer: ::core::option::Option<&mut [u8]>) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn GetSystemWow64DirectoryA(lpbuffer : ::windows_core::PSTR, usize : u32) -> u32); - GetSystemWow64DirectoryA(::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _)) + GetSystemWow64DirectoryA(::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetSystemWow64DirectoryW(lpbuffer: ::core::option::Option<&mut [u16]>) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn GetSystemWow64DirectoryW(lpbuffer : ::windows_core::PWSTR, usize : u32) -> u32); - GetSystemWow64DirectoryW(::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _)) + GetSystemWow64DirectoryW(::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetTickCount() -> u32 { @@ -248,12 +248,12 @@ pub unsafe fn GetVersionExW(lpversioninformation: *mut OSVERSIONINFOW) -> ::wind #[inline] pub unsafe fn GetWindowsDirectoryA(lpbuffer: ::core::option::Option<&mut [u8]>) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn GetWindowsDirectoryA(lpbuffer : ::windows_core::PSTR, usize : u32) -> u32); - GetWindowsDirectoryA(::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _)) + GetWindowsDirectoryA(::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetWindowsDirectoryW(lpbuffer: ::core::option::Option<&mut [u16]>) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn GetWindowsDirectoryW(lpbuffer : ::windows_core::PWSTR, usize : u32) -> u32); - GetWindowsDirectoryW(::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _)) + GetWindowsDirectoryW(::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GlobalMemoryStatus(lpbuffer: *mut MEMORYSTATUS) { 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 e404557531..1368f2a7bd 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Threading/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Threading/mod.rs @@ -1055,7 +1055,7 @@ pub unsafe fn GetNumaNodeProcessorMask(node: u8, processormask: *mut u64) -> ::w #[inline] pub unsafe fn GetNumaNodeProcessorMask2(nodenumber: u16, processormasks: ::core::option::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); - 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() as _), requiredmaskcount) + 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) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_SystemInformation\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_SystemInformation"))] @@ -1130,7 +1130,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetProcessDefaultCpuSetMasks(process : super::super::Foundation:: HANDLE, cpusetmasks : *mut super::SystemInformation:: GROUP_AFFINITY, cpusetmaskcount : u16, requiredmaskcount : *mut u16) -> super::super::Foundation:: BOOL); - GetProcessDefaultCpuSetMasks(process.into_param().abi(), ::core::mem::transmute(cpusetmasks.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), cpusetmasks.as_deref().map_or(0, |slice| slice.len() as _), requiredmaskcount) + GetProcessDefaultCpuSetMasks(process.into_param().abi(), ::core::mem::transmute(cpusetmasks.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), cpusetmasks.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), requiredmaskcount) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1140,7 +1140,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetProcessDefaultCpuSets(process : super::super::Foundation:: HANDLE, cpusetids : *mut u32, cpusetidcount : u32, requiredidcount : *mut u32) -> super::super::Foundation:: BOOL); - GetProcessDefaultCpuSets(process.into_param().abi(), ::core::mem::transmute(cpusetids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), cpusetids.as_deref().map_or(0, |slice| slice.len() as _), requiredidcount) + GetProcessDefaultCpuSets(process.into_param().abi(), ::core::mem::transmute(cpusetids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), cpusetids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), requiredidcount) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1364,7 +1364,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetThreadSelectedCpuSetMasks(thread : super::super::Foundation:: HANDLE, cpusetmasks : *mut super::SystemInformation:: GROUP_AFFINITY, cpusetmaskcount : u16, requiredmaskcount : *mut u16) -> super::super::Foundation:: BOOL); - GetThreadSelectedCpuSetMasks(thread.into_param().abi(), ::core::mem::transmute(cpusetmasks.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), cpusetmasks.as_deref().map_or(0, |slice| slice.len() as _), requiredmaskcount) + GetThreadSelectedCpuSetMasks(thread.into_param().abi(), ::core::mem::transmute(cpusetmasks.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), cpusetmasks.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), requiredmaskcount) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1374,7 +1374,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetThreadSelectedCpuSets(thread : super::super::Foundation:: HANDLE, cpusetids : *mut u32, cpusetidcount : u32, requiredidcount : *mut u32) -> super::super::Foundation:: BOOL); - GetThreadSelectedCpuSets(thread.into_param().abi(), ::core::mem::transmute(cpusetids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), cpusetids.as_deref().map_or(0, |slice| slice.len() as _), requiredidcount) + GetThreadSelectedCpuSets(thread.into_param().abi(), ::core::mem::transmute(cpusetids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), cpusetids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), requiredidcount) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2230,7 +2230,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetProcessDefaultCpuSetMasks(process : super::super::Foundation:: HANDLE, cpusetmasks : *const super::SystemInformation:: GROUP_AFFINITY, cpusetmaskcount : u16) -> super::super::Foundation:: BOOL); - SetProcessDefaultCpuSetMasks(process.into_param().abi(), ::core::mem::transmute(cpusetmasks.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), cpusetmasks.as_deref().map_or(0, |slice| slice.len() as _)) + SetProcessDefaultCpuSetMasks(process.into_param().abi(), ::core::mem::transmute(cpusetmasks.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), cpusetmasks.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2240,7 +2240,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetProcessDefaultCpuSets(process : super::super::Foundation:: HANDLE, cpusetids : *const u32, cpusetidcount : u32) -> super::super::Foundation:: BOOL); - SetProcessDefaultCpuSets(process.into_param().abi(), ::core::mem::transmute(cpusetids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), cpusetids.as_deref().map_or(0, |slice| slice.len() as _)) + SetProcessDefaultCpuSets(process.into_param().abi(), ::core::mem::transmute(cpusetids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), cpusetids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2250,7 +2250,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetProcessDynamicEHContinuationTargets(process : super::super::Foundation:: HANDLE, numberoftargets : u16, targets : *mut PROCESS_DYNAMIC_EH_CONTINUATION_TARGET) -> super::super::Foundation:: BOOL); - SetProcessDynamicEHContinuationTargets(process.into_param().abi(), targets.len() as _, ::core::mem::transmute(targets.as_ptr())).ok() + SetProcessDynamicEHContinuationTargets(process.into_param().abi(), targets.len().try_into().unwrap(), ::core::mem::transmute(targets.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2260,7 +2260,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetProcessDynamicEnforcedCetCompatibleRanges(process : super::super::Foundation:: HANDLE, numberofranges : u16, ranges : *mut PROCESS_DYNAMIC_ENFORCED_ADDRESS_RANGE) -> super::super::Foundation:: BOOL); - SetProcessDynamicEnforcedCetCompatibleRanges(process.into_param().abi(), ranges.len() as _, ::core::mem::transmute(ranges.as_ptr())) + SetProcessDynamicEnforcedCetCompatibleRanges(process.into_param().abi(), ranges.len().try_into().unwrap(), ::core::mem::transmute(ranges.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2414,7 +2414,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetThreadSelectedCpuSetMasks(thread : super::super::Foundation:: HANDLE, cpusetmasks : *const super::SystemInformation:: GROUP_AFFINITY, cpusetmaskcount : u16) -> super::super::Foundation:: BOOL); - SetThreadSelectedCpuSetMasks(thread.into_param().abi(), ::core::mem::transmute(cpusetmasks.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), cpusetmasks.as_deref().map_or(0, |slice| slice.len() as _)) + SetThreadSelectedCpuSetMasks(thread.into_param().abi(), ::core::mem::transmute(cpusetmasks.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), cpusetmasks.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2424,7 +2424,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetThreadSelectedCpuSets(thread : super::super::Foundation:: HANDLE, cpusetids : *const u32, cpusetidcount : u32) -> super::super::Foundation:: BOOL); - SetThreadSelectedCpuSets(thread.into_param().abi(), ::core::mem::transmute(cpusetids.as_ptr()), cpusetids.len() as _) + SetThreadSelectedCpuSets(thread.into_param().abi(), ::core::mem::transmute(cpusetids.as_ptr()), cpusetids.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2756,7 +2756,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn WaitForMultipleObjects(ncount : u32, lphandles : *const super::super::Foundation:: HANDLE, bwaitall : super::super::Foundation:: BOOL, dwmilliseconds : u32) -> super::super::Foundation:: WAIT_EVENT); - WaitForMultipleObjects(lphandles.len() as _, ::core::mem::transmute(lphandles.as_ptr()), bwaitall.into_param().abi(), dwmilliseconds) + WaitForMultipleObjects(lphandles.len().try_into().unwrap(), ::core::mem::transmute(lphandles.as_ptr()), bwaitall.into_param().abi(), dwmilliseconds) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2767,7 +2767,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn WaitForMultipleObjectsEx(ncount : u32, lphandles : *const super::super::Foundation:: HANDLE, bwaitall : super::super::Foundation:: BOOL, dwmilliseconds : u32, balertable : super::super::Foundation:: BOOL) -> super::super::Foundation:: WAIT_EVENT); - WaitForMultipleObjectsEx(lphandles.len() as _, ::core::mem::transmute(lphandles.as_ptr()), bwaitall.into_param().abi(), dwmilliseconds, balertable.into_param().abi()) + WaitForMultipleObjectsEx(lphandles.len().try_into().unwrap(), ::core::mem::transmute(lphandles.as_ptr()), bwaitall.into_param().abi(), dwmilliseconds, balertable.into_param().abi()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 87cb1fe414..ae4f7d95c8 100644 --- a/crates/libs/windows/src/Windows/Win32/System/TpmBaseServices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/TpmBaseServices/mod.rs @@ -3,14 +3,14 @@ #[inline] pub unsafe fn GetDeviceID(pbwindowsaik: ::core::option::Option<&mut [u8]>, pcbresult: *mut u32, pfprotectedbytpm: ::core::option::Option<*mut super::super::Foundation::BOOL>) -> ::windows_core::Result<()> { ::windows_targets::link!("tbs.dll" "system" fn GetDeviceID(pbwindowsaik : *mut u8, cbwindowsaik : u32, pcbresult : *mut u32, pfprotectedbytpm : *mut super::super::Foundation:: BOOL) -> ::windows_core::HRESULT); - GetDeviceID(::core::mem::transmute(pbwindowsaik.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbwindowsaik.as_deref().map_or(0, |slice| slice.len() as _), pcbresult, ::core::mem::transmute(pfprotectedbytpm.unwrap_or(::std::ptr::null_mut()))).ok() + GetDeviceID(::core::mem::transmute(pbwindowsaik.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbwindowsaik.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult, ::core::mem::transmute(pfprotectedbytpm.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn GetDeviceIDString(pszwindowsaik: ::core::option::Option<&mut [u16]>, pcchresult: *mut u32, pfprotectedbytpm: ::core::option::Option<*mut super::super::Foundation::BOOL>) -> ::windows_core::Result<()> { ::windows_targets::link!("tbs.dll" "system" fn GetDeviceIDString(pszwindowsaik : ::windows_core::PWSTR, cchwindowsaik : u32, pcchresult : *mut u32, pfprotectedbytpm : *mut super::super::Foundation:: BOOL) -> ::windows_core::HRESULT); - GetDeviceIDString(::core::mem::transmute(pszwindowsaik.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszwindowsaik.as_deref().map_or(0, |slice| slice.len() as _), pcchresult, ::core::mem::transmute(pfprotectedbytpm.unwrap_or(::std::ptr::null_mut()))).ok() + GetDeviceIDString(::core::mem::transmute(pszwindowsaik.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszwindowsaik.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcchresult, ::core::mem::transmute(pfprotectedbytpm.unwrap_or(::std::ptr::null_mut()))).ok() } #[inline] pub unsafe fn Tbsi_Context_Create(pcontextparams: *const TBS_CONTEXT_PARAMS, phcontext: *mut *mut ::core::ffi::c_void) -> u32 { @@ -52,7 +52,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); - Tbsi_Physical_Presence_Command(hcontext, ::core::mem::transmute(pabinput.as_ptr()), pabinput.len() as _, paboutput, pcboutput) + Tbsi_Physical_Presence_Command(hcontext, ::core::mem::transmute(pabinput.as_ptr()), pabinput.len().try_into().unwrap(), paboutput, pcboutput) } #[inline] pub unsafe fn Tbsi_Revoke_Attestation() -> u32 { @@ -72,7 +72,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); - Tbsip_Submit_Command(hcontext, locality, priority, ::core::mem::transmute(pabcommand.as_ptr()), pabcommand.len() as _, pabresult, pcbresult) + Tbsip_Submit_Command(hcontext, locality, priority, ::core::mem::transmute(pabcommand.as_ptr()), pabcommand.len().try_into().unwrap(), pabresult, pcbresult) } pub const TBS_COMMAND_LOCALITY_FOUR: TBS_COMMAND_LOCALITY = TBS_COMMAND_LOCALITY(4u32); pub const TBS_COMMAND_LOCALITY_ONE: TBS_COMMAND_LOCALITY = TBS_COMMAND_LOCALITY(1u32); 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 1c39c1c0f7..ef5039fb2e 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Variant/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Variant/mod.rs @@ -3,7 +3,7 @@ #[inline] pub unsafe fn ClearVariantArray(pvars: &mut [VARIANT]) { ::windows_targets::link!("propsys.dll" "system" fn ClearVariantArray(pvars : *mut VARIANT, cvars : u32) -> ()); - ClearVariantArray(::core::mem::transmute(pvars.as_ptr()), pvars.len() as _) + ClearVariantArray(::core::mem::transmute(pvars.as_ptr()), pvars.len().try_into().unwrap()) } #[inline] pub unsafe fn DosDateTimeToVariantTime(wdosdate: u16, wdostime: u16, pvtime: *mut f64) -> i32 { @@ -16,7 +16,7 @@ pub unsafe fn DosDateTimeToVariantTime(wdosdate: u16, wdostime: u16, pvtime: *mu pub unsafe fn InitVariantFromBooleanArray(prgf: &[super::super::Foundation::BOOL]) -> ::windows_core::Result { ::windows_targets::link!("propsys.dll" "system" fn InitVariantFromBooleanArray(prgf : *const super::super::Foundation:: BOOL, celems : u32, pvar : *mut VARIANT) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - InitVariantFromBooleanArray(::core::mem::transmute(prgf.as_ptr()), prgf.len() as _, &mut result__).from_abi(result__) + InitVariantFromBooleanArray(::core::mem::transmute(prgf.as_ptr()), prgf.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] @@ -32,7 +32,7 @@ pub unsafe fn InitVariantFromBuffer(pv: *const ::core::ffi::c_void, cb: u32) -> pub unsafe fn InitVariantFromDoubleArray(prgn: &[f64]) -> ::windows_core::Result { ::windows_targets::link!("propsys.dll" "system" fn InitVariantFromDoubleArray(prgn : *const f64, celems : u32, pvar : *mut VARIANT) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - InitVariantFromDoubleArray(::core::mem::transmute(prgn.as_ptr()), prgn.len() as _, &mut result__).from_abi(result__) + InitVariantFromDoubleArray(::core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] @@ -48,7 +48,7 @@ pub unsafe fn InitVariantFromFileTime(pft: *const super::super::Foundation::FILE pub unsafe fn InitVariantFromFileTimeArray(prgft: ::core::option::Option<&[super::super::Foundation::FILETIME]>) -> ::windows_core::Result { ::windows_targets::link!("propsys.dll" "system" fn InitVariantFromFileTimeArray(prgft : *const super::super::Foundation:: FILETIME, celems : u32, pvar : *mut VARIANT) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - InitVariantFromFileTimeArray(::core::mem::transmute(prgft.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prgft.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + InitVariantFromFileTimeArray(::core::mem::transmute(prgft.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), prgft.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] @@ -64,7 +64,7 @@ pub unsafe fn InitVariantFromGUIDAsString(guid: *const ::windows_core::GUID) -> pub unsafe fn InitVariantFromInt16Array(prgn: &[i16]) -> ::windows_core::Result { ::windows_targets::link!("propsys.dll" "system" fn InitVariantFromInt16Array(prgn : *const i16, celems : u32, pvar : *mut VARIANT) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - InitVariantFromInt16Array(::core::mem::transmute(prgn.as_ptr()), prgn.len() as _, &mut result__).from_abi(result__) + InitVariantFromInt16Array(::core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] @@ -72,7 +72,7 @@ pub unsafe fn InitVariantFromInt16Array(prgn: &[i16]) -> ::windows_core::Result< pub unsafe fn InitVariantFromInt32Array(prgn: &[i32]) -> ::windows_core::Result { ::windows_targets::link!("propsys.dll" "system" fn InitVariantFromInt32Array(prgn : *const i32, celems : u32, pvar : *mut VARIANT) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - InitVariantFromInt32Array(::core::mem::transmute(prgn.as_ptr()), prgn.len() as _, &mut result__).from_abi(result__) + InitVariantFromInt32Array(::core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] @@ -80,7 +80,7 @@ pub unsafe fn InitVariantFromInt32Array(prgn: &[i32]) -> ::windows_core::Result< pub unsafe fn InitVariantFromInt64Array(prgn: &[i64]) -> ::windows_core::Result { ::windows_targets::link!("propsys.dll" "system" fn InitVariantFromInt64Array(prgn : *const i64, celems : u32, pvar : *mut VARIANT) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - InitVariantFromInt64Array(::core::mem::transmute(prgn.as_ptr()), prgn.len() as _, &mut result__).from_abi(result__) + InitVariantFromInt64Array(::core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] @@ -99,7 +99,7 @@ where pub unsafe fn InitVariantFromStringArray(prgsz: &[::windows_core::PCWSTR]) -> ::windows_core::Result { ::windows_targets::link!("propsys.dll" "system" fn InitVariantFromStringArray(prgsz : *const ::windows_core::PCWSTR, celems : u32, pvar : *mut VARIANT) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - InitVariantFromStringArray(::core::mem::transmute(prgsz.as_ptr()), prgsz.len() as _, &mut result__).from_abi(result__) + InitVariantFromStringArray(::core::mem::transmute(prgsz.as_ptr()), prgsz.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] @@ -107,7 +107,7 @@ pub unsafe fn InitVariantFromStringArray(prgsz: &[::windows_core::PCWSTR]) -> :: pub unsafe fn InitVariantFromUInt16Array(prgn: &[u16]) -> ::windows_core::Result { ::windows_targets::link!("propsys.dll" "system" fn InitVariantFromUInt16Array(prgn : *const u16, celems : u32, pvar : *mut VARIANT) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - InitVariantFromUInt16Array(::core::mem::transmute(prgn.as_ptr()), prgn.len() as _, &mut result__).from_abi(result__) + InitVariantFromUInt16Array(::core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] @@ -115,7 +115,7 @@ pub unsafe fn InitVariantFromUInt16Array(prgn: &[u16]) -> ::windows_core::Result pub unsafe fn InitVariantFromUInt32Array(prgn: &[u32]) -> ::windows_core::Result { ::windows_targets::link!("propsys.dll" "system" fn InitVariantFromUInt32Array(prgn : *const u32, celems : u32, pvar : *mut VARIANT) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - InitVariantFromUInt32Array(::core::mem::transmute(prgn.as_ptr()), prgn.len() as _, &mut result__).from_abi(result__) + InitVariantFromUInt32Array(::core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] @@ -123,7 +123,7 @@ pub unsafe fn InitVariantFromUInt32Array(prgn: &[u32]) -> ::windows_core::Result pub unsafe fn InitVariantFromUInt64Array(prgn: &[u64]) -> ::windows_core::Result { ::windows_targets::link!("propsys.dll" "system" fn InitVariantFromUInt64Array(prgn : *const u64, celems : u32, pvar : *mut VARIANT) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - InitVariantFromUInt64Array(::core::mem::transmute(prgn.as_ptr()), prgn.len() as _, &mut result__).from_abi(result__) + InitVariantFromUInt64Array(::core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] @@ -351,7 +351,7 @@ pub unsafe fn VariantToBoolean(varin: *const VARIANT) -> ::windows_core::Result< #[inline] pub unsafe fn VariantToBooleanArray(var: *const VARIANT, prgf: &mut [super::super::Foundation::BOOL], pcelem: *mut u32) -> ::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); - VariantToBooleanArray(var, ::core::mem::transmute(prgf.as_ptr()), prgf.len() as _, pcelem).ok() + VariantToBooleanArray(var, ::core::mem::transmute(prgf.as_ptr()), prgf.len().try_into().unwrap(), pcelem).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] @@ -397,7 +397,7 @@ 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); - VariantToDoubleArray(var, ::core::mem::transmute(prgn.as_ptr()), prgn.len() as _, pcelem).ok() + VariantToDoubleArray(var, ::core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), pcelem).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] @@ -442,7 +442,7 @@ pub unsafe fn VariantToInt16(varin: *const VARIANT) -> ::windows_core::Result ::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); - VariantToInt16Array(var, ::core::mem::transmute(prgn.as_ptr()), prgn.len() as _, pcelem).ok() + VariantToInt16Array(var, ::core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), pcelem).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] @@ -471,7 +471,7 @@ pub unsafe fn VariantToInt32(varin: *const VARIANT) -> ::windows_core::Result ::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); - VariantToInt32Array(var, ::core::mem::transmute(prgn.as_ptr()), prgn.len() as _, pcelem).ok() + VariantToInt32Array(var, ::core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), pcelem).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] @@ -500,7 +500,7 @@ pub unsafe fn VariantToInt64(varin: *const VARIANT) -> ::windows_core::Result ::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); - VariantToInt64Array(var, ::core::mem::transmute(prgn.as_ptr()), prgn.len() as _, pcelem).ok() + VariantToInt64Array(var, ::core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), pcelem).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] @@ -521,7 +521,7 @@ pub unsafe fn VariantToInt64WithDefault(varin: *const VARIANT, lldefault: i64) - #[inline] pub unsafe fn VariantToString(varin: *const VARIANT, pszbuf: &mut [u16]) -> ::windows_core::Result<()> { ::windows_targets::link!("propsys.dll" "system" fn VariantToString(varin : *const VARIANT, pszbuf : ::windows_core::PWSTR, cchbuf : u32) -> ::windows_core::HRESULT); - VariantToString(varin, ::core::mem::transmute(pszbuf.as_ptr()), pszbuf.len() as _).ok() + VariantToString(varin, ::core::mem::transmute(pszbuf.as_ptr()), pszbuf.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] @@ -536,7 +536,7 @@ pub unsafe fn VariantToStringAlloc(varin: *const VARIANT) -> ::windows_core::Res #[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); - VariantToStringArray(var, ::core::mem::transmute(prgsz.as_ptr()), prgsz.len() as _, pcelem).ok() + VariantToStringArray(var, ::core::mem::transmute(prgsz.as_ptr()), prgsz.len().try_into().unwrap(), pcelem).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] @@ -568,7 +568,7 @@ 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); - VariantToUInt16Array(var, ::core::mem::transmute(prgn.as_ptr()), prgn.len() as _, pcelem).ok() + VariantToUInt16Array(var, ::core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), pcelem).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] @@ -597,7 +597,7 @@ 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); - VariantToUInt32Array(var, ::core::mem::transmute(prgn.as_ptr()), prgn.len() as _, pcelem).ok() + VariantToUInt32Array(var, ::core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), pcelem).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] @@ -626,7 +626,7 @@ 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); - VariantToUInt64Array(var, ::core::mem::transmute(prgn.as_ptr()), prgn.len() as _, pcelem).ok() + VariantToUInt64Array(var, ::core::mem::transmute(prgn.as_ptr()), prgn.len().try_into().unwrap(), pcelem).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole"))] 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 56c96a253e..4cf6e20e38 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 @@ -41,7 +41,7 @@ where P0: ::windows_core::IntoParam, { ::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 super:: ROPARAMIIDHANDLE) -> ::windows_core::HRESULT); - RoGetParameterizedTypeInstanceIID(nameelements.len() as _, ::core::mem::transmute(nameelements.as_ptr()), metadatalocator.into_param().abi(), iid, ::core::mem::transmute(pextra.unwrap_or(::std::ptr::null_mut()))).ok() + RoGetParameterizedTypeInstanceIID(nameelements.len().try_into().unwrap(), ::core::mem::transmute(nameelements.as_ptr()), metadatalocator.into_param().abi(), iid, ::core::mem::transmute(pextra.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -84,7 +84,7 @@ pub unsafe fn RoResolveNamespace(name: &::windows_core::HSTRING, windowsmetadata RoResolveNamespace( ::core::mem::transmute_copy(name), ::core::mem::transmute_copy(windowsmetadatadir), - packagegraphdirs.as_deref().map_or(0, |slice| slice.len() as _), + packagegraphdirs.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(packagegraphdirs.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(metadatafilepathscount.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(metadatafilepaths.unwrap_or(::std::ptr::null_mut())), @@ -302,19 +302,19 @@ pub struct IMetaDataAssemblyEmit_Vtbl { pub struct 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: ::core::option::Option<&mut [u16]>, pchname: *mut u32, pmetadata: *mut ASSEMBLYMETADATA, pdwassemblyflags: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetAssemblyProps)(::windows_core::Interface::as_raw(self), mda, ppbpublickey, pcbpublickey, 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() as _), pchname, pmetadata, pdwassemblyflags).ok() + (::windows_core::Interface::vtable(self).GetAssemblyProps)(::windows_core::Interface::as_raw(self), mda, ppbpublickey, pcbpublickey, 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()), pchname, pmetadata, pdwassemblyflags).ok() } pub unsafe fn GetAssemblyRefProps(&self, mdar: u32, ppbpublickeyortoken: *const *const ::core::ffi::c_void, pcbpublickeyortoken: *mut u32, szname: ::core::option::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<()> { - (::windows_core::Interface::vtable(self).GetAssemblyRefProps)(::windows_core::Interface::as_raw(self), mdar, ppbpublickeyortoken, 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() as _), pchname, pmetadata, ppbhashvalue, pcbhashvalue, pdwassemblyrefflags).ok() + (::windows_core::Interface::vtable(self).GetAssemblyRefProps)(::windows_core::Interface::as_raw(self), mdar, ppbpublickeyortoken, 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()), pchname, pmetadata, ppbhashvalue, pcbhashvalue, pdwassemblyrefflags).ok() } pub unsafe fn GetFileProps(&self, mdf: u32, szname: ::core::option::Option<&mut [u16]>, pchname: *mut u32, ppbhashvalue: *const *const ::core::ffi::c_void, pcbhashvalue: *mut u32, pdwfileflags: *mut u32) -> ::windows_core::Result<()> { - (::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() as _), pchname, ppbhashvalue, pcbhashvalue, pdwfileflags).ok() + (::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, ppbhashvalue, pcbhashvalue, pdwfileflags).ok() } pub unsafe fn GetExportedTypeProps(&self, mdct: u32, szname: ::core::option::Option<&mut [u16]>, pchname: *mut u32, ptkimplementation: *mut u32, ptktypedef: *mut u32, pdwexportedtypeflags: *mut u32) -> ::windows_core::Result<()> { - (::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() as _), pchname, ptkimplementation, ptktypedef, pdwexportedtypeflags).ok() + (::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, ptkimplementation, ptktypedef, pdwexportedtypeflags).ok() } pub unsafe fn GetManifestResourceProps(&self, mdmr: u32, szname: ::core::option::Option<&mut [u16]>, pchname: *mut u32, ptkimplementation: *mut u32, pdwoffset: *mut u32, pdwresourceflags: *mut u32) -> ::windows_core::Result<()> { - (::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() as _), pchname, ptkimplementation, pdwoffset, pdwresourceflags).ok() + (::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, ptkimplementation, pdwoffset, pdwresourceflags).ok() } pub unsafe fn EnumAssemblyRefs(&self, phenum: *mut *mut ::core::ffi::c_void, rassemblyrefs: *mut u32, cmax: u32, pctokens: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).EnumAssemblyRefs)(::windows_core::Interface::as_raw(self), phenum, rassemblyrefs, cmax, pctokens).ok() @@ -455,7 +455,7 @@ impl IMetaDataDispenserEx { (::windows_core::Interface::vtable(self).OpenScopeOnITypeInfo)(::windows_core::Interface::as_raw(self), piti.into_param().abi(), dwopenflags, riid, &mut result__).from_abi(result__) } pub unsafe fn GetCORSystemDirectory(&self, szbuffer: ::core::option::Option<&mut [u16]>, pchbuffer: *mut u32) -> ::windows_core::Result<()> { - (::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() as _), pchbuffer).ok() + (::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).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 @@ -475,7 +475,7 @@ impl IMetaDataDispenserEx { P3: ::windows_core::IntoParam<::windows_core::PCWSTR>, P4: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).FindAssemblyModule)(::windows_core::Interface::as_raw(self), szappbase.into_param().abi(), szprivatebin.into_param().abi(), szglobalbin.into_param().abi(), szassemblyname.into_param().abi(), szmodulename.into_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() as _), pcname).ok() + (::windows_core::Interface::vtable(self).FindAssemblyModule)(::windows_core::Interface::as_raw(self), szappbase.into_param().abi(), szprivatebin.into_param().abi(), szglobalbin.into_param().abi(), szassemblyname.into_param().abi(), szmodulename.into_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).ok() } } ::windows_core::imp::interface_hierarchy!(IMetaDataDispenserEx, ::windows_core::IUnknown, IMetaDataDispenser); @@ -1178,19 +1178,19 @@ impl IMetaDataImport { (::windows_core::Interface::vtable(self).FindTypeDefByName)(::windows_core::Interface::as_raw(self), sztypedef.into_param().abi(), tkenclosingclass, ptd).ok() } pub unsafe fn GetScopeProps(&self, szname: ::core::option::Option<&mut [u16]>, pchname: *mut u32, pmvid: *mut ::windows_core::GUID) -> ::windows_core::Result<()> { - (::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() as _), pchname, pmvid).ok() + (::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, pmvid).ok() } pub unsafe fn GetModuleFromScope(&self, pmd: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetModuleFromScope)(::windows_core::Interface::as_raw(self), pmd).ok() } pub unsafe fn GetTypeDefProps(&self, td: u32, sztypedef: ::core::option::Option<&mut [u16]>, pchtypedef: *mut u32, pdwtypedefflags: *mut u32, ptkextends: *mut u32) -> ::windows_core::Result<()> { - (::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() as _), pchtypedef, pdwtypedefflags, ptkextends).ok() + (::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, pdwtypedefflags, ptkextends).ok() } pub unsafe fn GetInterfaceImplProps(&self, iiimpl: u32, pclass: *mut u32, ptkiface: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetInterfaceImplProps)(::windows_core::Interface::as_raw(self), iiimpl, pclass, ptkiface).ok() } pub unsafe fn GetTypeRefProps(&self, tr: u32, ptkresolutionscope: *mut u32, szname: ::core::option::Option<&mut [u16]>, pchname: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetTypeRefProps)(::windows_core::Interface::as_raw(self), tr, 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() as _), pchname).ok() + (::windows_core::Interface::vtable(self).GetTypeRefProps)(::windows_core::Interface::as_raw(self), tr, 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()), pchname).ok() } pub unsafe fn ResolveTypeRef(&self, tr: u32, riid: *const ::windows_core::GUID, ppiscope: *mut ::core::option::Option<::windows_core::IUnknown>, ptd: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).ResolveTypeRef)(::windows_core::Interface::as_raw(self), tr, riid, ::core::mem::transmute(ppiscope), ptd).ok() @@ -1259,10 +1259,10 @@ impl IMetaDataImport { (::windows_core::Interface::vtable(self).FindMemberRef)(::windows_core::Interface::as_raw(self), td, szname.into_param().abi(), pvsigblob, cbsigblob, pmr).ok() } pub unsafe fn GetMethodProps(&self, mb: u32, pclass: *mut u32, szmethod: ::core::option::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<()> { - (::windows_core::Interface::vtable(self).GetMethodProps)(::windows_core::Interface::as_raw(self), mb, 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() as _), pchmethod, pdwattr, ppvsigblob, pcbsigblob, pulcoderva, pdwimplflags).ok() + (::windows_core::Interface::vtable(self).GetMethodProps)(::windows_core::Interface::as_raw(self), mb, 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()), pchmethod, pdwattr, ppvsigblob, pcbsigblob, pulcoderva, pdwimplflags).ok() } pub unsafe fn GetMemberRefProps(&self, mr: u32, ptk: *mut u32, szmember: ::core::option::Option<&mut [u16]>, pchmember: *mut u32, ppvsigblob: *mut *mut u8, pbsig: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetMemberRefProps)(::windows_core::Interface::as_raw(self), mr, 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() as _), pchmember, ppvsigblob, pbsig).ok() + (::windows_core::Interface::vtable(self).GetMemberRefProps)(::windows_core::Interface::as_raw(self), mr, 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()), pchmember, ppvsigblob, pbsig).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<()> { (::windows_core::Interface::vtable(self).EnumProperties)(::windows_core::Interface::as_raw(self), phenum, td, rproperties, cmax, pcproperties).ok() @@ -1298,7 +1298,7 @@ impl IMetaDataImport { (::windows_core::Interface::vtable(self).GetSigFromToken)(::windows_core::Interface::as_raw(self), mdsig, ppvsig, pcbsig).ok() } pub unsafe fn GetModuleRefProps(&self, mur: u32, szname: ::core::option::Option<&mut [u16]>, pchname: *mut u32) -> ::windows_core::Result<()> { - (::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() as _), pchname).ok() + (::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).ok() } pub unsafe fn EnumModuleRefs(&self, phenum: *mut *mut ::core::ffi::c_void, rmodulerefs: *mut u32, cmax: u32, pcmodulerefs: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).EnumModuleRefs)(::windows_core::Interface::as_raw(self), phenum, rmodulerefs, cmax, pcmodulerefs).ok() @@ -1313,10 +1313,10 @@ impl IMetaDataImport { (::windows_core::Interface::vtable(self).EnumUnresolvedMethods)(::windows_core::Interface::as_raw(self), phenum, rmethods, cmax, pctokens).ok() } pub unsafe fn GetUserString(&self, stk: u32, szstring: ::core::option::Option<&mut [u16]>, pchstring: *mut u32) -> ::windows_core::Result<()> { - (::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() as _), pchstring).ok() + (::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).ok() } pub unsafe fn GetPinvokeMap(&self, tk: u32, pdwmappingflags: *mut u32, szimportname: ::core::option::Option<&mut [u16]>, pchimportname: *mut u32, pmrimportdll: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPinvokeMap)(::windows_core::Interface::as_raw(self), tk, 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() as _), pchimportname, pmrimportdll).ok() + (::windows_core::Interface::vtable(self).GetPinvokeMap)(::windows_core::Interface::as_raw(self), tk, 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()), pchimportname, pmrimportdll).ok() } pub unsafe fn EnumSignatures(&self, phenum: *mut *mut ::core::ffi::c_void, rsignatures: *mut u32, cmax: u32, pcsignatures: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).EnumSignatures)(::windows_core::Interface::as_raw(self), phenum, rsignatures, cmax, pcsignatures).ok() @@ -1343,10 +1343,10 @@ impl IMetaDataImport { (::windows_core::Interface::vtable(self).FindTypeRef)(::windows_core::Interface::as_raw(self), tkresolutionscope, szname.into_param().abi(), ptr).ok() } pub unsafe fn GetMemberProps(&self, mb: u32, pclass: *mut u32, szmember: ::core::option::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<()> { - (::windows_core::Interface::vtable(self).GetMemberProps)(::windows_core::Interface::as_raw(self), mb, 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() as _), pchmember, pdwattr, ppvsigblob, pcbsigblob, pulcoderva, pdwimplflags, pdwcplustypeflag, ppvalue, pcchvalue).ok() + (::windows_core::Interface::vtable(self).GetMemberProps)(::windows_core::Interface::as_raw(self), mb, 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()), pchmember, pdwattr, ppvsigblob, pcbsigblob, pulcoderva, pdwimplflags, pdwcplustypeflag, ppvalue, pcchvalue).ok() } pub unsafe fn GetFieldProps(&self, mb: u32, pclass: *mut u32, szfield: ::core::option::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<()> { - (::windows_core::Interface::vtable(self).GetFieldProps)(::windows_core::Interface::as_raw(self), mb, 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() as _), pchfield, pdwattr, ppvsigblob, pcbsigblob, pdwcplustypeflag, ppvalue, pcchvalue).ok() + (::windows_core::Interface::vtable(self).GetFieldProps)(::windows_core::Interface::as_raw(self), mb, 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()), pchfield, pdwattr, ppvsigblob, pcbsigblob, pdwcplustypeflag, ppvalue, pcchvalue).ok() } pub unsafe fn GetPropertyProps(&self, prop: u32, pclass: *mut u32, szproperty: P0, 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 @@ -1355,7 +1355,7 @@ impl IMetaDataImport { (::windows_core::Interface::vtable(self).GetPropertyProps)(::windows_core::Interface::as_raw(self), prop, pclass, szproperty.into_param().abi(), cchproperty, pchproperty, pdwpropflags, ppvsig, pbsig, pdwcplustypeflag, ppdefaultvalue, pcchdefaultvalue, pmdsetter, pmdgetter, rmdothermethod, cmax, pcothermethod).ok() } pub unsafe fn GetParamProps(&self, tk: u32, pmd: *mut u32, pulsequence: *mut u32, szname: ::core::option::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<()> { - (::windows_core::Interface::vtable(self).GetParamProps)(::windows_core::Interface::as_raw(self), tk, pmd, 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() as _), pchname, pdwattr, pdwcplustypeflag, ppvalue, pcchvalue).ok() + (::windows_core::Interface::vtable(self).GetParamProps)(::windows_core::Interface::as_raw(self), tk, pmd, 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()), pchname, pdwattr, pdwcplustypeflag, ppvalue, pcchvalue).ok() } pub unsafe fn GetCustomAttributeByName(&self, tkobj: u32, szname: P0, ppdata: *const *const ::core::ffi::c_void, pcbdata: *mut u32) -> ::windows_core::Result<()> where @@ -1484,19 +1484,19 @@ impl IMetaDataImport2 { (::windows_core::Interface::vtable(self).base__.FindTypeDefByName)(::windows_core::Interface::as_raw(self), sztypedef.into_param().abi(), tkenclosingclass, ptd).ok() } pub unsafe fn GetScopeProps(&self, szname: ::core::option::Option<&mut [u16]>, pchname: *mut u32, pmvid: *mut ::windows_core::GUID) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.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() as _), pchname, pmvid).ok() + (::windows_core::Interface::vtable(self).base__.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, pmvid).ok() } pub unsafe fn GetModuleFromScope(&self, pmd: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetModuleFromScope)(::windows_core::Interface::as_raw(self), pmd).ok() } pub unsafe fn GetTypeDefProps(&self, td: u32, sztypedef: ::core::option::Option<&mut [u16]>, pchtypedef: *mut u32, pdwtypedefflags: *mut u32, ptkextends: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.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() as _), pchtypedef, pdwtypedefflags, ptkextends).ok() + (::windows_core::Interface::vtable(self).base__.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, pdwtypedefflags, ptkextends).ok() } pub unsafe fn GetInterfaceImplProps(&self, iiimpl: u32, pclass: *mut u32, ptkiface: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.GetInterfaceImplProps)(::windows_core::Interface::as_raw(self), iiimpl, pclass, ptkiface).ok() } pub unsafe fn GetTypeRefProps(&self, tr: u32, ptkresolutionscope: *mut u32, szname: ::core::option::Option<&mut [u16]>, pchname: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetTypeRefProps)(::windows_core::Interface::as_raw(self), tr, 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() as _), pchname).ok() + (::windows_core::Interface::vtable(self).base__.GetTypeRefProps)(::windows_core::Interface::as_raw(self), tr, 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()), pchname).ok() } pub unsafe fn ResolveTypeRef(&self, tr: u32, riid: *const ::windows_core::GUID, ppiscope: *mut ::core::option::Option<::windows_core::IUnknown>, ptd: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.ResolveTypeRef)(::windows_core::Interface::as_raw(self), tr, riid, ::core::mem::transmute(ppiscope), ptd).ok() @@ -1565,10 +1565,10 @@ impl IMetaDataImport2 { (::windows_core::Interface::vtable(self).base__.FindMemberRef)(::windows_core::Interface::as_raw(self), td, szname.into_param().abi(), pvsigblob, cbsigblob, pmr).ok() } pub unsafe fn GetMethodProps(&self, mb: u32, pclass: *mut u32, szmethod: ::core::option::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<()> { - (::windows_core::Interface::vtable(self).base__.GetMethodProps)(::windows_core::Interface::as_raw(self), mb, 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() as _), pchmethod, pdwattr, ppvsigblob, pcbsigblob, pulcoderva, pdwimplflags).ok() + (::windows_core::Interface::vtable(self).base__.GetMethodProps)(::windows_core::Interface::as_raw(self), mb, 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()), pchmethod, pdwattr, ppvsigblob, pcbsigblob, pulcoderva, pdwimplflags).ok() } pub unsafe fn GetMemberRefProps(&self, mr: u32, ptk: *mut u32, szmember: ::core::option::Option<&mut [u16]>, pchmember: *mut u32, ppvsigblob: *mut *mut u8, pbsig: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetMemberRefProps)(::windows_core::Interface::as_raw(self), mr, 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() as _), pchmember, ppvsigblob, pbsig).ok() + (::windows_core::Interface::vtable(self).base__.GetMemberRefProps)(::windows_core::Interface::as_raw(self), mr, 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()), pchmember, ppvsigblob, pbsig).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<()> { (::windows_core::Interface::vtable(self).base__.EnumProperties)(::windows_core::Interface::as_raw(self), phenum, td, rproperties, cmax, pcproperties).ok() @@ -1604,7 +1604,7 @@ impl IMetaDataImport2 { (::windows_core::Interface::vtable(self).base__.GetSigFromToken)(::windows_core::Interface::as_raw(self), mdsig, ppvsig, pcbsig).ok() } pub unsafe fn GetModuleRefProps(&self, mur: u32, szname: ::core::option::Option<&mut [u16]>, pchname: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.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() as _), pchname).ok() + (::windows_core::Interface::vtable(self).base__.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).ok() } pub unsafe fn EnumModuleRefs(&self, phenum: *mut *mut ::core::ffi::c_void, rmodulerefs: *mut u32, cmax: u32, pcmodulerefs: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.EnumModuleRefs)(::windows_core::Interface::as_raw(self), phenum, rmodulerefs, cmax, pcmodulerefs).ok() @@ -1619,10 +1619,10 @@ impl IMetaDataImport2 { (::windows_core::Interface::vtable(self).base__.EnumUnresolvedMethods)(::windows_core::Interface::as_raw(self), phenum, rmethods, cmax, pctokens).ok() } pub unsafe fn GetUserString(&self, stk: u32, szstring: ::core::option::Option<&mut [u16]>, pchstring: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.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() as _), pchstring).ok() + (::windows_core::Interface::vtable(self).base__.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).ok() } pub unsafe fn GetPinvokeMap(&self, tk: u32, pdwmappingflags: *mut u32, szimportname: ::core::option::Option<&mut [u16]>, pchimportname: *mut u32, pmrimportdll: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetPinvokeMap)(::windows_core::Interface::as_raw(self), tk, 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() as _), pchimportname, pmrimportdll).ok() + (::windows_core::Interface::vtable(self).base__.GetPinvokeMap)(::windows_core::Interface::as_raw(self), tk, 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()), pchimportname, pmrimportdll).ok() } pub unsafe fn EnumSignatures(&self, phenum: *mut *mut ::core::ffi::c_void, rsignatures: *mut u32, cmax: u32, pcsignatures: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.EnumSignatures)(::windows_core::Interface::as_raw(self), phenum, rsignatures, cmax, pcsignatures).ok() @@ -1649,10 +1649,10 @@ impl IMetaDataImport2 { (::windows_core::Interface::vtable(self).base__.FindTypeRef)(::windows_core::Interface::as_raw(self), tkresolutionscope, szname.into_param().abi(), ptr).ok() } pub unsafe fn GetMemberProps(&self, mb: u32, pclass: *mut u32, szmember: ::core::option::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<()> { - (::windows_core::Interface::vtable(self).base__.GetMemberProps)(::windows_core::Interface::as_raw(self), mb, 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() as _), pchmember, pdwattr, ppvsigblob, pcbsigblob, pulcoderva, pdwimplflags, pdwcplustypeflag, ppvalue, pcchvalue).ok() + (::windows_core::Interface::vtable(self).base__.GetMemberProps)(::windows_core::Interface::as_raw(self), mb, 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()), pchmember, pdwattr, ppvsigblob, pcbsigblob, pulcoderva, pdwimplflags, pdwcplustypeflag, ppvalue, pcchvalue).ok() } pub unsafe fn GetFieldProps(&self, mb: u32, pclass: *mut u32, szfield: ::core::option::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<()> { - (::windows_core::Interface::vtable(self).base__.GetFieldProps)(::windows_core::Interface::as_raw(self), mb, 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() as _), pchfield, pdwattr, ppvsigblob, pcbsigblob, pdwcplustypeflag, ppvalue, pcchvalue).ok() + (::windows_core::Interface::vtable(self).base__.GetFieldProps)(::windows_core::Interface::as_raw(self), mb, 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()), pchfield, pdwattr, ppvsigblob, pcbsigblob, pdwcplustypeflag, ppvalue, pcchvalue).ok() } pub unsafe fn GetPropertyProps(&self, prop: u32, pclass: *mut u32, szproperty: P0, 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 @@ -1661,7 +1661,7 @@ impl IMetaDataImport2 { (::windows_core::Interface::vtable(self).base__.GetPropertyProps)(::windows_core::Interface::as_raw(self), prop, pclass, szproperty.into_param().abi(), cchproperty, pchproperty, pdwpropflags, ppvsig, pbsig, pdwcplustypeflag, ppdefaultvalue, pcchdefaultvalue, pmdsetter, pmdgetter, rmdothermethod, cmax, pcothermethod).ok() } pub unsafe fn GetParamProps(&self, tk: u32, pmd: *mut u32, pulsequence: *mut u32, szname: ::core::option::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<()> { - (::windows_core::Interface::vtable(self).base__.GetParamProps)(::windows_core::Interface::as_raw(self), tk, pmd, 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() as _), pchname, pdwattr, pdwcplustypeflag, ppvalue, pcchvalue).ok() + (::windows_core::Interface::vtable(self).base__.GetParamProps)(::windows_core::Interface::as_raw(self), tk, pmd, 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()), pchname, pdwattr, pdwcplustypeflag, ppvalue, pcchvalue).ok() } pub unsafe fn GetCustomAttributeByName(&self, tkobj: u32, szname: P0, ppdata: *const *const ::core::ffi::c_void, pcbdata: *mut u32) -> ::windows_core::Result<()> where @@ -1687,7 +1687,7 @@ impl IMetaDataImport2 { (::windows_core::Interface::vtable(self).EnumGenericParams)(::windows_core::Interface::as_raw(self), phenum, tk, rgenericparams, cmax, pcgenericparams).ok() } pub unsafe fn GetGenericParamProps(&self, gp: u32, pulparamseq: *mut u32, pdwparamflags: *mut u32, ptowner: *mut u32, reserved: *mut u32, wzname: ::core::option::Option<&mut [u16]>, pchname: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetGenericParamProps)(::windows_core::Interface::as_raw(self), gp, pulparamseq, pdwparamflags, ptowner, 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() as _), pchname).ok() + (::windows_core::Interface::vtable(self).GetGenericParamProps)(::windows_core::Interface::as_raw(self), gp, pulparamseq, pdwparamflags, ptowner, 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()), pchname).ok() } pub unsafe fn GetMethodSpecProps(&self, mi: u32, tkparent: *mut u32, ppvsigblob: *mut *mut u8, pcbsigblob: *mut u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).GetMethodSpecProps)(::windows_core::Interface::as_raw(self), mi, tkparent, ppvsigblob, pcbsigblob).ok() @@ -1702,7 +1702,7 @@ impl IMetaDataImport2 { (::windows_core::Interface::vtable(self).GetPEKind)(::windows_core::Interface::as_raw(self), pdwpekind, pdwmachine).ok() } pub unsafe fn GetVersionString(&self, pwzbuf: ::core::option::Option<&mut [u16]>, pccbufsize: *mut u32) -> ::windows_core::Result<()> { - (::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() as _), pccbufsize).ok() + (::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).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<()> { (::windows_core::Interface::vtable(self).EnumMethodSpecs)(::windows_core::Interface::as_raw(self), phenum, tk, rmethodspecs, cmax, pcmethodspecs).ok() @@ -1957,7 +1957,7 @@ pub struct IMetaDataValidate_Vtbl { pub struct IMetaDataWinMDImport(::windows_core::IUnknown); impl IMetaDataWinMDImport { pub unsafe fn GetUntransformedTypeRefProps(&self, tr: u32, ptkresolutionscope: *mut u32, szname: ::core::option::Option<&mut [u16]>, pchname: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetUntransformedTypeRefProps)(::windows_core::Interface::as_raw(self), tr, 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() as _), pchname).ok() + (::windows_core::Interface::vtable(self).GetUntransformedTypeRefProps)(::windows_core::Interface::as_raw(self), tr, 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()), pchname).ok() } } ::windows_core::imp::interface_hierarchy!(IMetaDataWinMDImport, ::windows_core::IUnknown); @@ -2014,7 +2014,7 @@ impl IRoSimpleMetaDataBuilder { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).SetInterfaceGroupParameterizedDefault)(::windows_core::Interface::as_raw(self), name.into_param().abi(), defaultinterfacenameelements.len() as _, ::core::mem::transmute(defaultinterfacenameelements.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetInterfaceGroupParameterizedDefault)(::windows_core::Interface::as_raw(self), name.into_param().abi(), defaultinterfacenameelements.len().try_into().unwrap(), ::core::mem::transmute(defaultinterfacenameelements.as_ptr())).ok() } pub unsafe fn SetRuntimeClassSimpleDefault(&self, name: P0, defaultinterfacename: P1, defaultinterfaceiid: ::core::option::Option<*const ::windows_core::GUID>) -> ::windows_core::Result<()> where @@ -2027,13 +2027,13 @@ impl IRoSimpleMetaDataBuilder { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).SetRuntimeClassParameterizedDefault)(::windows_core::Interface::as_raw(self), name.into_param().abi(), defaultinterfacenameelements.len() as _, ::core::mem::transmute(defaultinterfacenameelements.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetRuntimeClassParameterizedDefault)(::windows_core::Interface::as_raw(self), name.into_param().abi(), defaultinterfacenameelements.len().try_into().unwrap(), ::core::mem::transmute(defaultinterfacenameelements.as_ptr())).ok() } pub unsafe fn SetStruct(&self, name: P0, fieldtypenames: &[::windows_core::PCWSTR]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).SetStruct)(::windows_core::Interface::as_raw(self), name.into_param().abi(), fieldtypenames.len() as _, ::core::mem::transmute(fieldtypenames.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetStruct)(::windows_core::Interface::as_raw(self), name.into_param().abi(), fieldtypenames.len().try_into().unwrap(), ::core::mem::transmute(fieldtypenames.as_ptr())).ok() } pub unsafe fn SetEnum(&self, name: P0, basetype: P1) -> ::windows_core::Result<()> where 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 74e56b3cf7..62d5b23af8 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WinRT/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WinRT/mod.rs @@ -375,7 +375,7 @@ pub unsafe fn WindowsConcatString(string1: &::windows_core::HSTRING, string2: &: pub unsafe fn WindowsCreateString(sourcestring: ::core::option::Option<&[u16]>) -> ::windows_core::Result<::windows_core::HSTRING> { ::windows_targets::link!("api-ms-win-core-winrt-string-l1-1-0.dll" "system" fn WindowsCreateString(sourcestring : ::windows_core::PCWSTR, length : u32, string : *mut ::std::mem::MaybeUninit <::windows_core::HSTRING >) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - WindowsCreateString(::core::mem::transmute(sourcestring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), sourcestring.as_deref().map_or(0, |slice| slice.len() as _), &mut result__).from_abi(result__) + WindowsCreateString(::core::mem::transmute(sourcestring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), sourcestring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).from_abi(result__) } #[inline] pub unsafe fn WindowsCreateStringReference(sourcestring: P0, length: u32, hstringheader: *mut HSTRING_HEADER, string: *mut ::windows_core::HSTRING) -> ::windows_core::Result<()> 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 d0fe415023..ac3a885706 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WindowsProgramming/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WindowsProgramming/mod.rs @@ -469,7 +469,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetPrivateProfileSectionA(lpappname : ::windows_core::PCSTR, lpreturnedstring : ::windows_core::PSTR, nsize : u32, lpfilename : ::windows_core::PCSTR) -> u32); - GetPrivateProfileSectionA(lpappname.into_param().abi(), ::core::mem::transmute(lpreturnedstring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpreturnedstring.as_deref().map_or(0, |slice| slice.len() as _), lpfilename.into_param().abi()) + GetPrivateProfileSectionA(lpappname.into_param().abi(), ::core::mem::transmute(lpreturnedstring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpreturnedstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpfilename.into_param().abi()) } #[inline] pub unsafe fn GetPrivateProfileSectionNamesA(lpszreturnbuffer: ::core::option::Option<&mut [u8]>, lpfilename: P0) -> u32 @@ -477,7 +477,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetPrivateProfileSectionNamesA(lpszreturnbuffer : ::windows_core::PSTR, nsize : u32, lpfilename : ::windows_core::PCSTR) -> u32); - GetPrivateProfileSectionNamesA(::core::mem::transmute(lpszreturnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszreturnbuffer.as_deref().map_or(0, |slice| slice.len() as _), lpfilename.into_param().abi()) + GetPrivateProfileSectionNamesA(::core::mem::transmute(lpszreturnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszreturnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpfilename.into_param().abi()) } #[inline] pub unsafe fn GetPrivateProfileSectionNamesW(lpszreturnbuffer: ::core::option::Option<&mut [u16]>, lpfilename: P0) -> u32 @@ -485,7 +485,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetPrivateProfileSectionNamesW(lpszreturnbuffer : ::windows_core::PWSTR, nsize : u32, lpfilename : ::windows_core::PCWSTR) -> u32); - GetPrivateProfileSectionNamesW(::core::mem::transmute(lpszreturnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszreturnbuffer.as_deref().map_or(0, |slice| slice.len() as _), lpfilename.into_param().abi()) + GetPrivateProfileSectionNamesW(::core::mem::transmute(lpszreturnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszreturnbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpfilename.into_param().abi()) } #[inline] pub unsafe fn GetPrivateProfileSectionW(lpappname: P0, lpreturnedstring: ::core::option::Option<&mut [u16]>, lpfilename: P1) -> u32 @@ -494,7 +494,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetPrivateProfileSectionW(lpappname : ::windows_core::PCWSTR, lpreturnedstring : ::windows_core::PWSTR, nsize : u32, lpfilename : ::windows_core::PCWSTR) -> u32); - GetPrivateProfileSectionW(lpappname.into_param().abi(), ::core::mem::transmute(lpreturnedstring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpreturnedstring.as_deref().map_or(0, |slice| slice.len() as _), lpfilename.into_param().abi()) + GetPrivateProfileSectionW(lpappname.into_param().abi(), ::core::mem::transmute(lpreturnedstring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpreturnedstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpfilename.into_param().abi()) } #[inline] pub unsafe fn GetPrivateProfileStringA(lpappname: P0, lpkeyname: P1, lpdefault: P2, lpreturnedstring: ::core::option::Option<&mut [u8]>, lpfilename: P3) -> u32 @@ -505,7 +505,7 @@ where P3: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetPrivateProfileStringA(lpappname : ::windows_core::PCSTR, lpkeyname : ::windows_core::PCSTR, lpdefault : ::windows_core::PCSTR, lpreturnedstring : ::windows_core::PSTR, nsize : u32, lpfilename : ::windows_core::PCSTR) -> u32); - GetPrivateProfileStringA(lpappname.into_param().abi(), lpkeyname.into_param().abi(), lpdefault.into_param().abi(), ::core::mem::transmute(lpreturnedstring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpreturnedstring.as_deref().map_or(0, |slice| slice.len() as _), lpfilename.into_param().abi()) + GetPrivateProfileStringA(lpappname.into_param().abi(), lpkeyname.into_param().abi(), lpdefault.into_param().abi(), ::core::mem::transmute(lpreturnedstring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpreturnedstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpfilename.into_param().abi()) } #[inline] pub unsafe fn GetPrivateProfileStringW(lpappname: P0, lpkeyname: P1, lpdefault: P2, lpreturnedstring: ::core::option::Option<&mut [u16]>, lpfilename: P3) -> u32 @@ -516,7 +516,7 @@ where P3: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetPrivateProfileStringW(lpappname : ::windows_core::PCWSTR, lpkeyname : ::windows_core::PCWSTR, lpdefault : ::windows_core::PCWSTR, lpreturnedstring : ::windows_core::PWSTR, nsize : u32, lpfilename : ::windows_core::PCWSTR) -> u32); - GetPrivateProfileStringW(lpappname.into_param().abi(), lpkeyname.into_param().abi(), lpdefault.into_param().abi(), ::core::mem::transmute(lpreturnedstring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpreturnedstring.as_deref().map_or(0, |slice| slice.len() as _), lpfilename.into_param().abi()) + GetPrivateProfileStringW(lpappname.into_param().abi(), lpkeyname.into_param().abi(), lpdefault.into_param().abi(), ::core::mem::transmute(lpreturnedstring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpreturnedstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpfilename.into_param().abi()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -566,7 +566,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetProfileSectionA(lpappname : ::windows_core::PCSTR, lpreturnedstring : ::windows_core::PSTR, nsize : u32) -> u32); - GetProfileSectionA(lpappname.into_param().abi(), ::core::mem::transmute(lpreturnedstring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpreturnedstring.as_deref().map_or(0, |slice| slice.len() as _)) + GetProfileSectionA(lpappname.into_param().abi(), ::core::mem::transmute(lpreturnedstring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpreturnedstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetProfileSectionW(lpappname: P0, lpreturnedstring: ::core::option::Option<&mut [u16]>) -> u32 @@ -574,7 +574,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetProfileSectionW(lpappname : ::windows_core::PCWSTR, lpreturnedstring : ::windows_core::PWSTR, nsize : u32) -> u32); - GetProfileSectionW(lpappname.into_param().abi(), ::core::mem::transmute(lpreturnedstring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpreturnedstring.as_deref().map_or(0, |slice| slice.len() as _)) + GetProfileSectionW(lpappname.into_param().abi(), ::core::mem::transmute(lpreturnedstring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpreturnedstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetProfileStringA(lpappname: P0, lpkeyname: P1, lpdefault: P2, lpreturnedstring: ::core::option::Option<&mut [u8]>) -> u32 @@ -584,7 +584,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetProfileStringA(lpappname : ::windows_core::PCSTR, lpkeyname : ::windows_core::PCSTR, lpdefault : ::windows_core::PCSTR, lpreturnedstring : ::windows_core::PSTR, nsize : u32) -> u32); - GetProfileStringA(lpappname.into_param().abi(), lpkeyname.into_param().abi(), lpdefault.into_param().abi(), ::core::mem::transmute(lpreturnedstring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpreturnedstring.as_deref().map_or(0, |slice| slice.len() as _)) + GetProfileStringA(lpappname.into_param().abi(), lpkeyname.into_param().abi(), lpdefault.into_param().abi(), ::core::mem::transmute(lpreturnedstring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpreturnedstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetProfileStringW(lpappname: P0, lpkeyname: P1, lpdefault: P2, lpreturnedstring: ::core::option::Option<&mut [u16]>) -> u32 @@ -594,7 +594,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetProfileStringW(lpappname : ::windows_core::PCWSTR, lpkeyname : ::windows_core::PCWSTR, lpdefault : ::windows_core::PCWSTR, lpreturnedstring : ::windows_core::PWSTR, nsize : u32) -> u32); - GetProfileStringW(lpappname.into_param().abi(), lpkeyname.into_param().abi(), lpdefault.into_param().abi(), ::core::mem::transmute(lpreturnedstring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpreturnedstring.as_deref().map_or(0, |slice| slice.len() as _)) + GetProfileStringW(lpappname.into_param().abi(), lpkeyname.into_param().abi(), lpdefault.into_param().abi(), ::core::mem::transmute(lpreturnedstring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpreturnedstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1445,7 +1445,7 @@ where P3: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advpack.dll" "system" fn TranslateInfStringA(pszinffilename : ::windows_core::PCSTR, pszinstallsection : ::windows_core::PCSTR, psztranslatesection : ::windows_core::PCSTR, psztranslatekey : ::windows_core::PCSTR, pszbuffer : ::windows_core::PSTR, cchbuffer : u32, pdwrequiredsize : *mut u32, pvreserved : *const ::core::ffi::c_void) -> ::windows_core::HRESULT); - TranslateInfStringA(pszinffilename.into_param().abi(), pszinstallsection.into_param().abi(), psztranslatesection.into_param().abi(), psztranslatekey.into_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() as _), pdwrequiredsize, ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null()))).ok() + TranslateInfStringA(pszinffilename.into_param().abi(), pszinstallsection.into_param().abi(), psztranslatesection.into_param().abi(), psztranslatekey.into_param().abi(), ::core::mem::transmute(pszbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pdwrequiredsize, ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null()))).ok() } #[inline] pub unsafe fn TranslateInfStringExA(hinf: *mut ::core::ffi::c_void, pszinffilename: P0, psztranslatesection: P1, psztranslatekey: P2, pszbuffer: &mut [u8], pdwrequiredsize: *mut u32, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> @@ -1455,7 +1455,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advpack.dll" "system" fn TranslateInfStringExA(hinf : *mut ::core::ffi::c_void, pszinffilename : ::windows_core::PCSTR, psztranslatesection : ::windows_core::PCSTR, psztranslatekey : ::windows_core::PCSTR, pszbuffer : ::windows_core::PSTR, dwbuffersize : u32, pdwrequiredsize : *mut u32, pvreserved : *const ::core::ffi::c_void) -> ::windows_core::HRESULT); - TranslateInfStringExA(hinf, pszinffilename.into_param().abi(), psztranslatesection.into_param().abi(), psztranslatekey.into_param().abi(), ::core::mem::transmute(pszbuffer.as_ptr()), pszbuffer.len() as _, pdwrequiredsize, ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null()))).ok() + TranslateInfStringExA(hinf, pszinffilename.into_param().abi(), psztranslatesection.into_param().abi(), psztranslatekey.into_param().abi(), ::core::mem::transmute(pszbuffer.as_ptr()), pszbuffer.len().try_into().unwrap(), pdwrequiredsize, ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null()))).ok() } #[inline] pub unsafe fn TranslateInfStringExW(hinf: *mut ::core::ffi::c_void, pszinffilename: P0, psztranslatesection: P1, psztranslatekey: P2, pszbuffer: &mut [u16], pdwrequiredsize: *mut u32, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> @@ -1465,7 +1465,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advpack.dll" "system" fn TranslateInfStringExW(hinf : *mut ::core::ffi::c_void, pszinffilename : ::windows_core::PCWSTR, psztranslatesection : ::windows_core::PCWSTR, psztranslatekey : ::windows_core::PCWSTR, pszbuffer : ::windows_core::PWSTR, dwbuffersize : u32, pdwrequiredsize : *mut u32, pvreserved : *const ::core::ffi::c_void) -> ::windows_core::HRESULT); - TranslateInfStringExW(hinf, pszinffilename.into_param().abi(), psztranslatesection.into_param().abi(), psztranslatekey.into_param().abi(), ::core::mem::transmute(pszbuffer.as_ptr()), pszbuffer.len() as _, pdwrequiredsize, ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null()))).ok() + TranslateInfStringExW(hinf, pszinffilename.into_param().abi(), psztranslatesection.into_param().abi(), psztranslatekey.into_param().abi(), ::core::mem::transmute(pszbuffer.as_ptr()), pszbuffer.len().try_into().unwrap(), pdwrequiredsize, ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null()))).ok() } #[inline] pub unsafe fn TranslateInfStringW(pszinffilename: P0, pszinstallsection: P1, psztranslatesection: P2, psztranslatekey: P3, pszbuffer: ::core::option::Option<&mut [u16]>, pdwrequiredsize: *mut u32, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> @@ -1476,7 +1476,7 @@ where P3: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advpack.dll" "system" fn TranslateInfStringW(pszinffilename : ::windows_core::PCWSTR, pszinstallsection : ::windows_core::PCWSTR, psztranslatesection : ::windows_core::PCWSTR, psztranslatekey : ::windows_core::PCWSTR, pszbuffer : ::windows_core::PWSTR, cchbuffer : u32, pdwrequiredsize : *mut u32, pvreserved : *const ::core::ffi::c_void) -> ::windows_core::HRESULT); - TranslateInfStringW(pszinffilename.into_param().abi(), pszinstallsection.into_param().abi(), psztranslatesection.into_param().abi(), psztranslatekey.into_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() as _), pdwrequiredsize, ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null()))).ok() + TranslateInfStringW(pszinffilename.into_param().abi(), pszinstallsection.into_param().abi(), psztranslatesection.into_param().abi(), psztranslatekey.into_param().abi(), ::core::mem::transmute(pszbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pdwrequiredsize, ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null()))).ok() } #[inline] pub unsafe fn UnsubscribeFeatureStateChangeNotification(subscription: P0) @@ -1621,7 +1621,7 @@ where { ::windows_targets::link!("wldp.dll" "system" fn WldpCanExecuteBuffer(host : *const ::windows_core::GUID, options : WLDP_EXECUTION_EVALUATION_OPTIONS, buffer : *const u8, buffersize : u32, auditinfo : ::windows_core::PCWSTR, result : *mut WLDP_EXECUTION_POLICY) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - WldpCanExecuteBuffer(host, options, ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, auditinfo.into_param().abi(), &mut result__).from_abi(result__) + WldpCanExecuteBuffer(host, options, ::core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), auditinfo.into_param().abi(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1672,7 +1672,7 @@ 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); - 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() as _), returnlength).ok() + 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).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1822,7 +1822,7 @@ pub unsafe fn _hread(hfile: i32, lpbuffer: *mut ::core::ffi::c_void, lbytes: i32 #[inline] pub unsafe fn _hwrite(hfile: i32, lpbuffer: &[u8]) -> i32 { ::windows_targets::link!("kernel32.dll" "system" fn _hwrite(hfile : i32, lpbuffer : ::windows_core::PCSTR, lbytes : i32) -> i32); - _hwrite(hfile, ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _) + _hwrite(hfile, ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap()) } #[inline] pub unsafe fn _lclose(hfile: i32) -> i32 { @@ -1858,7 +1858,7 @@ pub unsafe fn _lread(hfile: i32, lpbuffer: *mut ::core::ffi::c_void, ubytes: u32 #[inline] pub unsafe fn _lwrite(hfile: i32, lpbuffer: &[u8]) -> u32 { ::windows_targets::link!("kernel32.dll" "system" fn _lwrite(hfile : i32, lpbuffer : ::windows_core::PCSTR, ubytes : u32) -> u32); - _lwrite(hfile, ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _) + _lwrite(hfile, ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap()) } #[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))] #[inline] 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 93d3a60774..078c6e142f 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WindowsSync/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WindowsSync/mod.rs @@ -727,7 +727,7 @@ impl IEnumSyncProviderConfigUIInfos { #[doc = "Required features: `\"Win32_UI_Shell_PropertiesSystem\"`"] #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe fn Next(&self, ppsyncproviderconfiguiinfo: &mut [::core::option::Option], pcfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppsyncproviderconfiguiinfo.len() as _, ::core::mem::transmute(ppsyncproviderconfiguiinfo.as_ptr()), pcfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppsyncproviderconfiguiinfo.len().try_into().unwrap(), ::core::mem::transmute(ppsyncproviderconfiguiinfo.as_ptr()), pcfetched).ok() } pub unsafe fn Skip(&self, cfactories: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), cfactories).ok() @@ -766,7 +766,7 @@ impl IEnumSyncProviderInfos { #[doc = "Required features: `\"Win32_UI_Shell_PropertiesSystem\"`"] #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe fn Next(&self, ppsyncproviderinfo: &mut [::core::option::Option], pcfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppsyncproviderinfo.len() as _, ::core::mem::transmute(ppsyncproviderinfo.as_ptr()), pcfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppsyncproviderinfo.len().try_into().unwrap(), ::core::mem::transmute(ppsyncproviderinfo.as_ptr()), pcfetched).ok() } pub unsafe fn Skip(&self, cinstances: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), cinstances).ok() 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 81a1627724..0ae7cc910b 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Wmi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Wmi/mod.rs @@ -11,7 +11,7 @@ impl IEnumWbemClassObject { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() } pub unsafe fn Next(&self, ltimeout: i32, apobjects: &mut [::core::option::Option], pureturned: *mut u32) -> ::windows_core::HRESULT { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ltimeout, apobjects.len() as _, ::core::mem::transmute(apobjects.as_ptr()), pureturned) + (::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) } pub unsafe fn NextAsync(&self, ucount: u32, psink: P0) -> ::windows_core::HRESULT where @@ -65,7 +65,7 @@ impl IMofCompiler { P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, P3: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).CompileBuffer)(::windows_core::Interface::as_raw(self), pbuffer.len() as _, ::core::mem::transmute(pbuffer.as_ptr()), serverandnamespace.into_param().abi(), user.into_param().abi(), authority.into_param().abi(), password.into_param().abi(), loptionflags, lclassflags, linstanceflags, pinfo).ok() + (::windows_core::Interface::vtable(self).CompileBuffer)(::windows_core::Interface::as_raw(self), pbuffer.len().try_into().unwrap(), ::core::mem::transmute(pbuffer.as_ptr()), serverandnamespace.into_param().abi(), user.into_param().abi(), authority.into_param().abi(), password.into_param().abi(), loptionflags, lclassflags, linstanceflags, pinfo).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 @@ -3725,7 +3725,7 @@ impl IWbemClientConnectionTransport { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).Open)(::windows_core::Interface::as_raw(self), straddresstype.into_param().abi(), abbinaryaddress.len() as _, ::core::mem::transmute(abbinaryaddress.as_ptr()), strobject.into_param().abi(), struser.into_param().abi(), strpassword.into_param().abi(), strlocale.into_param().abi(), lflags, pctx.into_param().abi(), &::IID, &mut result__, ::core::mem::transmute(pcallres)).from_abi(result__) + (::windows_core::Interface::vtable(self).Open)(::windows_core::Interface::as_raw(self), straddresstype.into_param().abi(), abbinaryaddress.len().try_into().unwrap(), ::core::mem::transmute(abbinaryaddress.as_ptr()), strobject.into_param().abi(), struser.into_param().abi(), strpassword.into_param().abi(), strlocale.into_param().abi(), lflags, pctx.into_param().abi(), &::IID, &mut result__, ::core::mem::transmute(pcallres)).from_abi(result__) } pub unsafe fn OpenAsync(&self, straddresstype: P0, abbinaryaddress: &[u8], strobject: P1, struser: P2, strpassword: P3, strlocale: P4, lflags: i32, pctx: P5, riid: *const ::windows_core::GUID, presponsehandler: P6) -> ::windows_core::Result<()> where @@ -3737,7 +3737,7 @@ impl IWbemClientConnectionTransport { P5: ::windows_core::IntoParam, P6: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).OpenAsync)(::windows_core::Interface::as_raw(self), straddresstype.into_param().abi(), abbinaryaddress.len() as _, ::core::mem::transmute(abbinaryaddress.as_ptr()), strobject.into_param().abi(), struser.into_param().abi(), strpassword.into_param().abi(), strlocale.into_param().abi(), lflags, pctx.into_param().abi(), riid, presponsehandler.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).OpenAsync)(::windows_core::Interface::as_raw(self), straddresstype.into_param().abi(), abbinaryaddress.len().try_into().unwrap(), ::core::mem::transmute(abbinaryaddress.as_ptr()), strobject.into_param().abi(), struser.into_param().abi(), strpassword.into_param().abi(), strlocale.into_param().abi(), lflags, pctx.into_param().abi(), riid, presponsehandler.into_param().abi()).ok() } pub unsafe fn Cancel(&self, lflags: i32, phandler: P0) -> ::windows_core::Result<()> where @@ -3776,7 +3776,7 @@ impl IWbemClientTransport { P6: ::windows_core::IntoParam, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).ConnectServer)(::windows_core::Interface::as_raw(self), straddresstype.into_param().abi(), abbinaryaddress.len() as _, ::core::mem::transmute(abbinaryaddress.as_ptr()), strnetworkresource.into_param().abi(), struser.into_param().abi(), strpassword.into_param().abi(), strlocale.into_param().abi(), lsecurityflags, strauthority.into_param().abi(), pctx.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).ConnectServer)(::windows_core::Interface::as_raw(self), straddresstype.into_param().abi(), abbinaryaddress.len().try_into().unwrap(), ::core::mem::transmute(abbinaryaddress.as_ptr()), strnetworkresource.into_param().abi(), struser.into_param().abi(), strpassword.into_param().abi(), strlocale.into_param().abi(), lsecurityflags, strauthority.into_param().abi(), pctx.into_param().abi(), &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IWbemClientTransport, ::windows_core::IUnknown); @@ -4162,7 +4162,7 @@ pub struct IWbemEventProviderQuerySink_Vtbl { pub struct IWbemEventProviderSecurity(::windows_core::IUnknown); impl IWbemEventProviderSecurity { pub unsafe fn AccessCheck(&self, wszquerylanguage: *const u16, wszquery: *const u16, psid: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).AccessCheck)(::windows_core::Interface::as_raw(self), wszquerylanguage, wszquery, psid.len() as _, ::core::mem::transmute(psid.as_ptr())).ok() + (::windows_core::Interface::vtable(self).AccessCheck)(::windows_core::Interface::as_raw(self), wszquerylanguage, wszquery, psid.len().try_into().unwrap(), ::core::mem::transmute(psid.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IWbemEventProviderSecurity, ::windows_core::IUnknown); @@ -4183,7 +4183,7 @@ pub struct IWbemEventProviderSecurity_Vtbl { pub struct IWbemEventSink(::windows_core::IUnknown); impl IWbemEventSink { pub unsafe fn Indicate(&self, apobjarray: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.Indicate)(::windows_core::Interface::as_raw(self), apobjarray.len() as _, ::core::mem::transmute(apobjarray.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.Indicate)(::windows_core::Interface::as_raw(self), apobjarray.len().try_into().unwrap(), ::core::mem::transmute(apobjarray.as_ptr())).ok() } pub unsafe fn SetStatus(&self, lflags: i32, hresult: ::windows_core::HRESULT, strparam: P0, pobjparam: P1) -> ::windows_core::Result<()> where @@ -4193,7 +4193,7 @@ impl IWbemEventSink { (::windows_core::Interface::vtable(self).base__.SetStatus)(::windows_core::Interface::as_raw(self), lflags, hresult, strparam.into_param().abi(), pobjparam.into_param().abi()).ok() } pub unsafe fn SetSinkSecurity(&self, psd: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetSinkSecurity)(::windows_core::Interface::as_raw(self), psd.len() as _, ::core::mem::transmute(psd.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetSinkSecurity)(::windows_core::Interface::as_raw(self), psd.len().try_into().unwrap(), ::core::mem::transmute(psd.as_ptr())).ok() } pub unsafe fn IsActive(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).IsActive)(::windows_core::Interface::as_raw(self)).ok() @@ -4203,7 +4203,7 @@ impl IWbemEventSink { P0: ::windows_core::IntoParam<::windows_core::IUnknown>, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).GetRestrictedSink)(::windows_core::Interface::as_raw(self), awszqueries.len() as _, ::core::mem::transmute(awszqueries.as_ptr()), pcallback.into_param().abi(), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).GetRestrictedSink)(::windows_core::Interface::as_raw(self), awszqueries.len().try_into().unwrap(), ::core::mem::transmute(awszqueries.as_ptr()), pcallback.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn SetBatchingParameters(&self, lflags: i32, dwmaxbuffersize: u32, dwmaxsendlatency: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).SetBatchingParameters)(::windows_core::Interface::as_raw(self), lflags, dwmaxbuffersize, dwmaxsendlatency).ok() @@ -4233,10 +4233,10 @@ impl IWbemHiPerfEnum { (::windows_core::Interface::vtable(self).AddObjects)(::windows_core::Interface::as_raw(self), lflags, unumobjects, apids, ::core::mem::transmute(apobj)).ok() } pub unsafe fn RemoveObjects(&self, lflags: i32, apids: &[i32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).RemoveObjects)(::windows_core::Interface::as_raw(self), lflags, apids.len() as _, ::core::mem::transmute(apids.as_ptr())).ok() + (::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 [::core::option::Option], pureturned: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetObjects)(::windows_core::Interface::as_raw(self), lflags, apobj.len() as _, ::core::mem::transmute(apobj.as_ptr()), pureturned).ok() + (::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).ok() } pub unsafe fn RemoveAll(&self, lflags: i32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).RemoveAll)(::windows_core::Interface::as_raw(self), lflags).ok() @@ -4309,7 +4309,7 @@ impl IWbemHiPerfProvider { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).GetObjects)(::windows_core::Interface::as_raw(self), pnamespace.into_param().abi(), apobj.len() as _, ::core::mem::transmute(apobj.as_ptr()), lflags, pcontext.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).GetObjects)(::windows_core::Interface::as_raw(self), pnamespace.into_param().abi(), apobj.len().try_into().unwrap(), ::core::mem::transmute(apobj.as_ptr()), lflags, pcontext.into_param().abi()).ok() } } ::windows_core::imp::interface_hierarchy!(IWbemHiPerfProvider, ::windows_core::IUnknown); @@ -4555,10 +4555,10 @@ impl IWbemObjectAccess { (::windows_core::Interface::vtable(self).GetPropertyHandle)(::windows_core::Interface::as_raw(self), wszpropertyname.into_param().abi(), ptype, plhandle).ok() } pub unsafe fn WritePropertyValue(&self, lhandle: i32, adata: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).WritePropertyValue)(::windows_core::Interface::as_raw(self), lhandle, adata.len() as _, ::core::mem::transmute(adata.as_ptr())).ok() + (::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<()> { - (::windows_core::Interface::vtable(self).ReadPropertyValue)(::windows_core::Interface::as_raw(self), lhandle, adata.len() as _, plnumbytes, ::core::mem::transmute(adata.as_ptr())).ok() + (::windows_core::Interface::vtable(self).ReadPropertyValue)(::windows_core::Interface::as_raw(self), lhandle, adata.len().try_into().unwrap(), plnumbytes, ::core::mem::transmute(adata.as_ptr())).ok() } pub unsafe fn ReadDWORD(&self, lhandle: i32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -4611,7 +4611,7 @@ pub struct IWbemObjectAccess_Vtbl { pub struct IWbemObjectSink(::windows_core::IUnknown); impl IWbemObjectSink { pub unsafe fn Indicate(&self, apobjarray: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Indicate)(::windows_core::Interface::as_raw(self), apobjarray.len() as _, ::core::mem::transmute(apobjarray.as_ptr())).ok() + (::windows_core::Interface::vtable(self).Indicate)(::windows_core::Interface::as_raw(self), apobjarray.len().try_into().unwrap(), ::core::mem::transmute(apobjarray.as_ptr())).ok() } pub unsafe fn SetStatus(&self, lflags: i32, hresult: ::windows_core::HRESULT, strparam: P0, pobjparam: P1) -> ::windows_core::Result<()> where @@ -4640,7 +4640,7 @@ pub struct IWbemObjectSink_Vtbl { pub struct IWbemObjectSinkEx(::windows_core::IUnknown); impl IWbemObjectSinkEx { pub unsafe fn Indicate(&self, apobjarray: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.Indicate)(::windows_core::Interface::as_raw(self), apobjarray.len() as _, ::core::mem::transmute(apobjarray.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.Indicate)(::windows_core::Interface::as_raw(self), apobjarray.len().try_into().unwrap(), ::core::mem::transmute(apobjarray.as_ptr())).ok() } pub unsafe fn SetStatus(&self, lflags: i32, hresult: ::windows_core::HRESULT, strparam: P0, pobjparam: P1) -> ::windows_core::Result<()> where @@ -5565,7 +5565,7 @@ impl IWbemUnboundObjectSink { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).IndicateToConsumer)(::windows_core::Interface::as_raw(self), plogicalconsumer.into_param().abi(), apobjects.len() as _, ::core::mem::transmute(apobjects.as_ptr())).ok() + (::windows_core::Interface::vtable(self).IndicateToConsumer)(::windows_core::Interface::as_raw(self), plogicalconsumer.into_param().abi(), apobjects.len().try_into().unwrap(), ::core::mem::transmute(apobjects.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IWbemUnboundObjectSink, ::windows_core::IUnknown); 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 97801b2072..70ecc50059 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Accessibility/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Accessibility/mod.rs @@ -27,7 +27,7 @@ where P0: ::windows_core::IntoParam, { ::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); - AccessibleChildren(pacccontainer.into_param().abi(), ichildstart, rgvarchildren.len() as _, ::core::mem::transmute(rgvarchildren.as_ptr()), pcobtained).ok() + AccessibleChildren(pacccontainer.into_param().abi(), ichildstart, rgvarchildren.len().try_into().unwrap(), ::core::mem::transmute(rgvarchildren.as_ptr()), pcobtained).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -120,22 +120,22 @@ pub unsafe fn GetOleaccVersionInfo(pver: *mut u32, pbuild: *mut u32) { #[inline] pub unsafe fn GetRoleTextA(lrole: u32, lpszrole: ::core::option::Option<&mut [u8]>) -> u32 { ::windows_targets::link!("oleacc.dll" "system" fn GetRoleTextA(lrole : u32, lpszrole : ::windows_core::PSTR, cchrolemax : u32) -> u32); - GetRoleTextA(lrole, ::core::mem::transmute(lpszrole.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszrole.as_deref().map_or(0, |slice| slice.len() as _)) + GetRoleTextA(lrole, ::core::mem::transmute(lpszrole.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszrole.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetRoleTextW(lrole: u32, lpszrole: ::core::option::Option<&mut [u16]>) -> u32 { ::windows_targets::link!("oleacc.dll" "system" fn GetRoleTextW(lrole : u32, lpszrole : ::windows_core::PWSTR, cchrolemax : u32) -> u32); - GetRoleTextW(lrole, ::core::mem::transmute(lpszrole.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszrole.as_deref().map_or(0, |slice| slice.len() as _)) + GetRoleTextW(lrole, ::core::mem::transmute(lpszrole.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszrole.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetStateTextA(lstatebit: u32, lpszstate: ::core::option::Option<&mut [u8]>) -> u32 { ::windows_targets::link!("oleacc.dll" "system" fn GetStateTextA(lstatebit : u32, lpszstate : ::windows_core::PSTR, cchstate : u32) -> u32); - GetStateTextA(lstatebit, ::core::mem::transmute(lpszstate.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszstate.as_deref().map_or(0, |slice| slice.len() as _)) + GetStateTextA(lstatebit, ::core::mem::transmute(lpszstate.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszstate.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetStateTextW(lstatebit: u32, lpszstate: ::core::option::Option<&mut [u16]>) -> u32 { ::windows_targets::link!("oleacc.dll" "system" fn GetStateTextW(lstatebit : u32, lpszstate : ::windows_core::PWSTR, cchstate : u32) -> u32); - GetStateTextW(lstatebit, ::core::mem::transmute(lpszstate.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszstate.as_deref().map_or(0, |slice| slice.len() as _)) + GetStateTextW(lstatebit, ::core::mem::transmute(lpszstate.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszstate.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GridPattern_GetItem(hobj: P0, row: i32, column: i32, presult: *mut HUIANODE) -> ::windows_core::Result<()> @@ -1104,7 +1104,7 @@ impl IAccPropServer { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", 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<()> { - (::windows_core::Interface::vtable(self).GetPropValue)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pidstring.as_ptr()), pidstring.len() as _, ::core::mem::transmute(idprop), pvarvalue, pfhasprop).ok() + (::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), pvarvalue, pfhasprop).ok() } } ::windows_core::imp::interface_hierarchy!(IAccPropServer, ::windows_core::IUnknown); @@ -1130,16 +1130,16 @@ impl IAccPropServices { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn SetPropValue(&self, pidstring: &[u8], idprop: ::windows_core::GUID, var: super::super::System::Variant::VARIANT) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetPropValue)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pidstring.as_ptr()), pidstring.len() as _, ::core::mem::transmute(idprop), ::core::mem::transmute(var)).ok() + (::windows_core::Interface::vtable(self).SetPropValue)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pidstring.as_ptr()), pidstring.len().try_into().unwrap(), ::core::mem::transmute(idprop), ::core::mem::transmute(var)).ok() } pub unsafe fn SetPropServer(&self, pidstring: &[u8], paprops: &[::windows_core::GUID], pserver: P0, annoscope: AnnoScope) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).SetPropServer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pidstring.as_ptr()), pidstring.len() as _, ::core::mem::transmute(paprops.as_ptr()), paprops.len() as _, pserver.into_param().abi(), annoscope).ok() + (::windows_core::Interface::vtable(self).SetPropServer)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pidstring.as_ptr()), pidstring.len().try_into().unwrap(), ::core::mem::transmute(paprops.as_ptr()), paprops.len().try_into().unwrap(), pserver.into_param().abi(), annoscope).ok() } pub unsafe fn ClearProps(&self, pidstring: &[u8], paprops: &[::windows_core::GUID]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).ClearProps)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pidstring.as_ptr()), pidstring.len() as _, ::core::mem::transmute(paprops.as_ptr()), paprops.len() as _).ok() + (::windows_core::Interface::vtable(self).ClearProps)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pidstring.as_ptr()), pidstring.len().try_into().unwrap(), ::core::mem::transmute(paprops.as_ptr()), paprops.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] @@ -1165,7 +1165,7 @@ impl IAccPropServices { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).SetHwndPropServer)(::windows_core::Interface::as_raw(self), hwnd.into_param().abi(), idobject, idchild, ::core::mem::transmute(paprops.as_ptr()), paprops.len() as _, pserver.into_param().abi(), annoscope).ok() + (::windows_core::Interface::vtable(self).SetHwndPropServer)(::windows_core::Interface::as_raw(self), hwnd.into_param().abi(), idobject, idchild, ::core::mem::transmute(paprops.as_ptr()), paprops.len().try_into().unwrap(), pserver.into_param().abi(), annoscope).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1173,7 +1173,7 @@ impl IAccPropServices { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).ClearHwndProps)(::windows_core::Interface::as_raw(self), hwnd.into_param().abi(), idobject, idchild, ::core::mem::transmute(paprops.as_ptr()), paprops.len() as _).ok() + (::windows_core::Interface::vtable(self).ClearHwndProps)(::windows_core::Interface::as_raw(self), hwnd.into_param().abi(), idobject, idchild, ::core::mem::transmute(paprops.as_ptr()), paprops.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1186,7 +1186,7 @@ impl IAccPropServices { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn DecomposeHwndIdentityString(&self, pidstring: &[u8], phwnd: *mut super::super::Foundation::HWND, pidobject: *mut u32, pidchild: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).DecomposeHwndIdentityString)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pidstring.as_ptr()), pidstring.len() as _, phwnd, pidobject, pidchild).ok() + (::windows_core::Interface::vtable(self).DecomposeHwndIdentityString)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pidstring.as_ptr()), pidstring.len().try_into().unwrap(), phwnd, pidobject, pidchild).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`, `\"Win32_UI_WindowsAndMessaging\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant", feature = "Win32_UI_WindowsAndMessaging"))] @@ -1212,7 +1212,7 @@ impl IAccPropServices { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).SetHmenuPropServer)(::windows_core::Interface::as_raw(self), hmenu.into_param().abi(), idchild, ::core::mem::transmute(paprops.as_ptr()), paprops.len() as _, pserver.into_param().abi(), annoscope).ok() + (::windows_core::Interface::vtable(self).SetHmenuPropServer)(::windows_core::Interface::as_raw(self), hmenu.into_param().abi(), idchild, ::core::mem::transmute(paprops.as_ptr()), paprops.len().try_into().unwrap(), pserver.into_param().abi(), annoscope).ok() } #[doc = "Required features: `\"Win32_UI_WindowsAndMessaging\"`"] #[cfg(feature = "Win32_UI_WindowsAndMessaging")] @@ -1220,7 +1220,7 @@ impl IAccPropServices { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).ClearHmenuProps)(::windows_core::Interface::as_raw(self), hmenu.into_param().abi(), idchild, ::core::mem::transmute(paprops.as_ptr()), paprops.len() as _).ok() + (::windows_core::Interface::vtable(self).ClearHmenuProps)(::windows_core::Interface::as_raw(self), hmenu.into_param().abi(), idchild, ::core::mem::transmute(paprops.as_ptr()), paprops.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_UI_WindowsAndMessaging\"`"] #[cfg(feature = "Win32_UI_WindowsAndMessaging")] @@ -1233,7 +1233,7 @@ impl IAccPropServices { #[doc = "Required features: `\"Win32_UI_WindowsAndMessaging\"`"] #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn DecomposeHmenuIdentityString(&self, pidstring: &[u8], phmenu: *mut super::WindowsAndMessaging::HMENU, pidchild: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).DecomposeHmenuIdentityString)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pidstring.as_ptr()), pidstring.len() as _, phmenu, pidchild).ok() + (::windows_core::Interface::vtable(self).DecomposeHmenuIdentityString)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pidstring.as_ptr()), pidstring.len().try_into().unwrap(), phmenu, pidchild).ok() } } ::windows_core::imp::interface_hierarchy!(IAccPropServices, ::windows_core::IUnknown); @@ -3957,7 +3957,7 @@ impl IUIAutomation { } pub unsafe fn CreateAndConditionFromNativeArray(&self, conditions: &[::core::option::Option]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateAndConditionFromNativeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(conditions.as_ptr()), conditions.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateAndConditionFromNativeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(conditions.as_ptr()), conditions.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn CreateOrCondition(&self, condition1: P0, condition2: P1) -> ::windows_core::Result where @@ -3975,7 +3975,7 @@ impl IUIAutomation { } pub unsafe fn CreateOrConditionFromNativeArray(&self, conditions: &[::core::option::Option]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateOrConditionFromNativeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(conditions.as_ptr()), conditions.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateOrConditionFromNativeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(conditions.as_ptr()), conditions.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn CreateNotCondition(&self, condition: P0) -> ::windows_core::Result where @@ -4005,7 +4005,7 @@ impl IUIAutomation { P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).AddPropertyChangedEventHandlerNativeArray)(::windows_core::Interface::as_raw(self), element.into_param().abi(), scope, cacherequest.into_param().abi(), handler.into_param().abi(), ::core::mem::transmute(propertyarray.as_ptr()), propertyarray.len() as _).ok() + (::windows_core::Interface::vtable(self).AddPropertyChangedEventHandlerNativeArray)(::windows_core::Interface::as_raw(self), element.into_param().abi(), scope, cacherequest.into_param().abi(), handler.into_param().abi(), ::core::mem::transmute(propertyarray.as_ptr()), propertyarray.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -4059,7 +4059,7 @@ impl IUIAutomation { #[cfg(feature = "Win32_System_Com")] pub unsafe fn IntNativeArrayToSafeArray(&self, array: &[i32]) -> ::windows_core::Result<*mut super::super::System::Com::SAFEARRAY> { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).IntNativeArrayToSafeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(array.as_ptr()), array.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).IntNativeArrayToSafeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(array.as_ptr()), array.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -4429,7 +4429,7 @@ impl IUIAutomation2 { } pub unsafe fn CreateAndConditionFromNativeArray(&self, conditions: &[::core::option::Option]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.CreateAndConditionFromNativeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(conditions.as_ptr()), conditions.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateAndConditionFromNativeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(conditions.as_ptr()), conditions.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn CreateOrCondition(&self, condition1: P0, condition2: P1) -> ::windows_core::Result where @@ -4447,7 +4447,7 @@ impl IUIAutomation2 { } pub unsafe fn CreateOrConditionFromNativeArray(&self, conditions: &[::core::option::Option]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.CreateOrConditionFromNativeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(conditions.as_ptr()), conditions.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.CreateOrConditionFromNativeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(conditions.as_ptr()), conditions.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn CreateNotCondition(&self, condition: P0) -> ::windows_core::Result where @@ -4477,7 +4477,7 @@ impl IUIAutomation2 { P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.AddPropertyChangedEventHandlerNativeArray)(::windows_core::Interface::as_raw(self), element.into_param().abi(), scope, cacherequest.into_param().abi(), handler.into_param().abi(), ::core::mem::transmute(propertyarray.as_ptr()), propertyarray.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.AddPropertyChangedEventHandlerNativeArray)(::windows_core::Interface::as_raw(self), element.into_param().abi(), scope, cacherequest.into_param().abi(), handler.into_param().abi(), ::core::mem::transmute(propertyarray.as_ptr()), propertyarray.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -4531,7 +4531,7 @@ impl IUIAutomation2 { #[cfg(feature = "Win32_System_Com")] pub unsafe fn IntNativeArrayToSafeArray(&self, array: &[i32]) -> ::windows_core::Result<*mut super::super::System::Com::SAFEARRAY> { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.IntNativeArrayToSafeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(array.as_ptr()), array.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.IntNativeArrayToSafeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(array.as_ptr()), array.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -4823,7 +4823,7 @@ impl IUIAutomation3 { } pub unsafe fn CreateAndConditionFromNativeArray(&self, conditions: &[::core::option::Option]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.CreateAndConditionFromNativeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(conditions.as_ptr()), conditions.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.CreateAndConditionFromNativeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(conditions.as_ptr()), conditions.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn CreateOrCondition(&self, condition1: P0, condition2: P1) -> ::windows_core::Result where @@ -4841,7 +4841,7 @@ impl IUIAutomation3 { } pub unsafe fn CreateOrConditionFromNativeArray(&self, conditions: &[::core::option::Option]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.CreateOrConditionFromNativeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(conditions.as_ptr()), conditions.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.CreateOrConditionFromNativeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(conditions.as_ptr()), conditions.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn CreateNotCondition(&self, condition: P0) -> ::windows_core::Result where @@ -4871,7 +4871,7 @@ impl IUIAutomation3 { P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.AddPropertyChangedEventHandlerNativeArray)(::windows_core::Interface::as_raw(self), element.into_param().abi(), scope, cacherequest.into_param().abi(), handler.into_param().abi(), ::core::mem::transmute(propertyarray.as_ptr()), propertyarray.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.AddPropertyChangedEventHandlerNativeArray)(::windows_core::Interface::as_raw(self), element.into_param().abi(), scope, cacherequest.into_param().abi(), handler.into_param().abi(), ::core::mem::transmute(propertyarray.as_ptr()), propertyarray.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -4925,7 +4925,7 @@ impl IUIAutomation3 { #[cfg(feature = "Win32_System_Com")] pub unsafe fn IntNativeArrayToSafeArray(&self, array: &[i32]) -> ::windows_core::Result<*mut super::super::System::Com::SAFEARRAY> { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.IntNativeArrayToSafeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(array.as_ptr()), array.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.IntNativeArrayToSafeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(array.as_ptr()), array.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -5222,7 +5222,7 @@ impl IUIAutomation4 { } pub unsafe fn CreateAndConditionFromNativeArray(&self, conditions: &[::core::option::Option]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.CreateAndConditionFromNativeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(conditions.as_ptr()), conditions.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.CreateAndConditionFromNativeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(conditions.as_ptr()), conditions.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn CreateOrCondition(&self, condition1: P0, condition2: P1) -> ::windows_core::Result where @@ -5240,7 +5240,7 @@ impl IUIAutomation4 { } pub unsafe fn CreateOrConditionFromNativeArray(&self, conditions: &[::core::option::Option]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.CreateOrConditionFromNativeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(conditions.as_ptr()), conditions.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.CreateOrConditionFromNativeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(conditions.as_ptr()), conditions.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn CreateNotCondition(&self, condition: P0) -> ::windows_core::Result where @@ -5270,7 +5270,7 @@ impl IUIAutomation4 { P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.AddPropertyChangedEventHandlerNativeArray)(::windows_core::Interface::as_raw(self), element.into_param().abi(), scope, cacherequest.into_param().abi(), handler.into_param().abi(), ::core::mem::transmute(propertyarray.as_ptr()), propertyarray.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.AddPropertyChangedEventHandlerNativeArray)(::windows_core::Interface::as_raw(self), element.into_param().abi(), scope, cacherequest.into_param().abi(), handler.into_param().abi(), ::core::mem::transmute(propertyarray.as_ptr()), propertyarray.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -5324,7 +5324,7 @@ impl IUIAutomation4 { #[cfg(feature = "Win32_System_Com")] pub unsafe fn IntNativeArrayToSafeArray(&self, array: &[i32]) -> ::windows_core::Result<*mut super::super::System::Com::SAFEARRAY> { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.IntNativeArrayToSafeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(array.as_ptr()), array.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.IntNativeArrayToSafeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(array.as_ptr()), array.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -5465,7 +5465,7 @@ impl IUIAutomation4 { P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).AddChangesEventHandler)(::windows_core::Interface::as_raw(self), element.into_param().abi(), scope, ::core::mem::transmute(changetypes.as_ptr()), changetypes.len() as _, pcacherequest.into_param().abi(), handler.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).AddChangesEventHandler)(::windows_core::Interface::as_raw(self), element.into_param().abi(), scope, ::core::mem::transmute(changetypes.as_ptr()), changetypes.len().try_into().unwrap(), pcacherequest.into_param().abi(), handler.into_param().abi()).ok() } pub unsafe fn RemoveChangesEventHandler(&self, element: P0, handler: P1) -> ::windows_core::Result<()> where @@ -5636,7 +5636,7 @@ impl IUIAutomation5 { } pub unsafe fn CreateAndConditionFromNativeArray(&self, conditions: &[::core::option::Option]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateAndConditionFromNativeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(conditions.as_ptr()), conditions.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateAndConditionFromNativeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(conditions.as_ptr()), conditions.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn CreateOrCondition(&self, condition1: P0, condition2: P1) -> ::windows_core::Result where @@ -5654,7 +5654,7 @@ impl IUIAutomation5 { } pub unsafe fn CreateOrConditionFromNativeArray(&self, conditions: &[::core::option::Option]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateOrConditionFromNativeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(conditions.as_ptr()), conditions.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.CreateOrConditionFromNativeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(conditions.as_ptr()), conditions.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn CreateNotCondition(&self, condition: P0) -> ::windows_core::Result where @@ -5684,7 +5684,7 @@ impl IUIAutomation5 { P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.AddPropertyChangedEventHandlerNativeArray)(::windows_core::Interface::as_raw(self), element.into_param().abi(), scope, cacherequest.into_param().abi(), handler.into_param().abi(), ::core::mem::transmute(propertyarray.as_ptr()), propertyarray.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.AddPropertyChangedEventHandlerNativeArray)(::windows_core::Interface::as_raw(self), element.into_param().abi(), scope, cacherequest.into_param().abi(), handler.into_param().abi(), ::core::mem::transmute(propertyarray.as_ptr()), propertyarray.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -5738,7 +5738,7 @@ impl IUIAutomation5 { #[cfg(feature = "Win32_System_Com")] pub unsafe fn IntNativeArrayToSafeArray(&self, array: &[i32]) -> ::windows_core::Result<*mut super::super::System::Com::SAFEARRAY> { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.IntNativeArrayToSafeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(array.as_ptr()), array.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.IntNativeArrayToSafeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(array.as_ptr()), array.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -5879,7 +5879,7 @@ impl IUIAutomation5 { P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.AddChangesEventHandler)(::windows_core::Interface::as_raw(self), element.into_param().abi(), scope, ::core::mem::transmute(changetypes.as_ptr()), changetypes.len() as _, pcacherequest.into_param().abi(), handler.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).base__.AddChangesEventHandler)(::windows_core::Interface::as_raw(self), element.into_param().abi(), scope, ::core::mem::transmute(changetypes.as_ptr()), changetypes.len().try_into().unwrap(), pcacherequest.into_param().abi(), handler.into_param().abi()).ok() } pub unsafe fn RemoveChangesEventHandler(&self, element: P0, handler: P1) -> ::windows_core::Result<()> where @@ -6065,7 +6065,7 @@ impl IUIAutomation6 { } pub unsafe fn CreateAndConditionFromNativeArray(&self, conditions: &[::core::option::Option]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateAndConditionFromNativeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(conditions.as_ptr()), conditions.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateAndConditionFromNativeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(conditions.as_ptr()), conditions.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn CreateOrCondition(&self, condition1: P0, condition2: P1) -> ::windows_core::Result where @@ -6083,7 +6083,7 @@ impl IUIAutomation6 { } pub unsafe fn CreateOrConditionFromNativeArray(&self, conditions: &[::core::option::Option]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateOrConditionFromNativeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(conditions.as_ptr()), conditions.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.CreateOrConditionFromNativeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(conditions.as_ptr()), conditions.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn CreateNotCondition(&self, condition: P0) -> ::windows_core::Result where @@ -6113,7 +6113,7 @@ impl IUIAutomation6 { P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.AddPropertyChangedEventHandlerNativeArray)(::windows_core::Interface::as_raw(self), element.into_param().abi(), scope, cacherequest.into_param().abi(), handler.into_param().abi(), ::core::mem::transmute(propertyarray.as_ptr()), propertyarray.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.AddPropertyChangedEventHandlerNativeArray)(::windows_core::Interface::as_raw(self), element.into_param().abi(), scope, cacherequest.into_param().abi(), handler.into_param().abi(), ::core::mem::transmute(propertyarray.as_ptr()), propertyarray.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -6167,7 +6167,7 @@ impl IUIAutomation6 { #[cfg(feature = "Win32_System_Com")] pub unsafe fn IntNativeArrayToSafeArray(&self, array: &[i32]) -> ::windows_core::Result<*mut super::super::System::Com::SAFEARRAY> { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.IntNativeArrayToSafeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(array.as_ptr()), array.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.base__.base__.base__.base__.IntNativeArrayToSafeArray)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(array.as_ptr()), array.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -6308,7 +6308,7 @@ impl IUIAutomation6 { P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.AddChangesEventHandler)(::windows_core::Interface::as_raw(self), element.into_param().abi(), scope, ::core::mem::transmute(changetypes.as_ptr()), changetypes.len() as _, pcacherequest.into_param().abi(), handler.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).base__.base__.AddChangesEventHandler)(::windows_core::Interface::as_raw(self), element.into_param().abi(), scope, ::core::mem::transmute(changetypes.as_ptr()), changetypes.len().try_into().unwrap(), pcacherequest.into_param().abi(), handler.into_param().abi()).ok() } pub unsafe fn RemoveChangesEventHandler(&self, element: P0, handler: P1) -> ::windows_core::Result<()> where @@ -6626,7 +6626,7 @@ impl IUIAutomationChangesEventHandler { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).HandleChangesEvent)(::windows_core::Interface::as_raw(self), sender.into_param().abi(), ::core::mem::transmute(uiachanges.as_ptr()), uiachanges.len() as _).ok() + (::windows_core::Interface::vtable(self).HandleChangesEvent)(::windows_core::Interface::as_raw(self), sender.into_param().abi(), ::core::mem::transmute(uiachanges.as_ptr()), uiachanges.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(IUIAutomationChangesEventHandler, ::windows_core::IUnknown); @@ -11844,7 +11844,7 @@ impl IUIAutomationEventHandlerGroup { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).AddChangesEventHandler)(::windows_core::Interface::as_raw(self), scope, ::core::mem::transmute(changetypes.as_ptr()), changetypes.len() as _, cacherequest.into_param().abi(), handler.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).AddChangesEventHandler)(::windows_core::Interface::as_raw(self), scope, ::core::mem::transmute(changetypes.as_ptr()), changetypes.len().try_into().unwrap(), cacherequest.into_param().abi(), handler.into_param().abi()).ok() } pub unsafe fn AddNotificationEventHandler(&self, scope: TreeScope, cacherequest: P0, handler: P1) -> ::windows_core::Result<()> where @@ -11858,7 +11858,7 @@ impl IUIAutomationEventHandlerGroup { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).AddPropertyChangedEventHandler)(::windows_core::Interface::as_raw(self), scope, cacherequest.into_param().abi(), handler.into_param().abi(), ::core::mem::transmute(propertyarray.as_ptr()), propertyarray.len() as _).ok() + (::windows_core::Interface::vtable(self).AddPropertyChangedEventHandler)(::windows_core::Interface::as_raw(self), scope, cacherequest.into_param().abi(), handler.into_param().abi(), ::core::mem::transmute(propertyarray.as_ptr()), propertyarray.len().try_into().unwrap()).ok() } pub unsafe fn AddStructureChangedEventHandler(&self, scope: TreeScope, cacherequest: P0, handler: P1) -> ::windows_core::Result<()> where @@ -12894,7 +12894,7 @@ impl IUIAutomationRegistrar { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn RegisterPattern(&self, pattern: *const UIAutomationPatternInfo, ppatternid: *mut i32, ppatternavailablepropertyid: *mut i32, ppropertyids: &mut [i32], peventids: &mut [i32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).RegisterPattern)(::windows_core::Interface::as_raw(self), pattern, ppatternid, ppatternavailablepropertyid, ppropertyids.len() as _, ::core::mem::transmute(ppropertyids.as_ptr()), peventids.len() as _, ::core::mem::transmute(peventids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).RegisterPattern)(::windows_core::Interface::as_raw(self), pattern, ppatternid, ppatternavailablepropertyid, ppropertyids.len().try_into().unwrap(), ::core::mem::transmute(ppropertyids.as_ptr()), peventids.len().try_into().unwrap(), ::core::mem::transmute(peventids.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IUIAutomationRegistrar, ::windows_core::IUnknown); @@ -14194,7 +14194,7 @@ impl IUIAutomationTextRange3 { #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetAttributeValues(&self, attributeids: &[UIA_TEXTATTRIBUTE_ID]) -> ::windows_core::Result<*mut super::super::System::Com::SAFEARRAY> { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).GetAttributeValues)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(attributeids.as_ptr()), attributeids.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).GetAttributeValues)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(attributeids.as_ptr()), attributeids.len().try_into().unwrap(), &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IUIAutomationTextRange3, ::windows_core::IUnknown, IUIAutomationTextRange, IUIAutomationTextRange2); 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 0a0adc47c8..f438b42b66 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Animation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Animation/mod.rs @@ -66,13 +66,13 @@ impl IUIAnimationInterpolator2 { (::windows_core::Interface::vtable(self).GetDuration)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetFinalValue(&self, value: &mut [f64]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetFinalValue)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(value.as_ptr()), value.len() as _).ok() + (::windows_core::Interface::vtable(self).GetFinalValue)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(value.as_ptr()), value.len().try_into().unwrap()).ok() } pub unsafe fn InterpolateValue(&self, offset: f64, value: &mut [f64]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).InterpolateValue)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(value.as_ptr()), value.len() as _).ok() + (::windows_core::Interface::vtable(self).InterpolateValue)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(value.as_ptr()), value.len().try_into().unwrap()).ok() } pub unsafe fn InterpolateVelocity(&self, offset: f64, velocity: &mut [f64]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).InterpolateVelocity)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(velocity.as_ptr()), velocity.len() as _).ok() + (::windows_core::Interface::vtable(self).InterpolateVelocity)(::windows_core::Interface::as_raw(self), offset, ::core::mem::transmute(velocity.as_ptr()), velocity.len().try_into().unwrap()).ok() } pub unsafe fn GetPrimitiveInterpolation(&self, interpolation: P0, cdimension: u32) -> ::windows_core::Result<()> where @@ -258,7 +258,7 @@ pub struct IUIAnimationManager2(::windows_core::IUnknown); impl IUIAnimationManager2 { pub unsafe fn CreateAnimationVectorVariable(&self, initialvalue: &[f64]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateAnimationVectorVariable)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(initialvalue.as_ptr()), initialvalue.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateAnimationVectorVariable)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(initialvalue.as_ptr()), initialvalue.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn CreateAnimationVariable(&self, initialvalue: f64) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1015,13 +1015,13 @@ impl IUIAnimationTransition2 { (::windows_core::Interface::vtable(self).SetInitialValue)(::windows_core::Interface::as_raw(self), value).ok() } pub unsafe fn SetInitialVectorValue(&self, value: &[f64]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetInitialVectorValue)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(value.as_ptr()), value.len() as _).ok() + (::windows_core::Interface::vtable(self).SetInitialVectorValue)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(value.as_ptr()), value.len().try_into().unwrap()).ok() } pub unsafe fn SetInitialVelocity(&self, velocity: f64) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).SetInitialVelocity)(::windows_core::Interface::as_raw(self), velocity).ok() } pub unsafe fn SetInitialVectorVelocity(&self, velocity: &[f64]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetInitialVectorVelocity)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(velocity.as_ptr()), velocity.len() as _).ok() + (::windows_core::Interface::vtable(self).SetInitialVectorVelocity)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(velocity.as_ptr()), velocity.len().try_into().unwrap()).ok() } pub unsafe fn IsDurationKnown(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).IsDurationKnown)(::windows_core::Interface::as_raw(self)).ok() @@ -1187,7 +1187,7 @@ impl IUIAnimationTransitionLibrary2 { } pub unsafe fn CreateInstantaneousVectorTransition(&self, finalvalue: &[f64]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateInstantaneousVectorTransition)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(finalvalue.as_ptr()), finalvalue.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateInstantaneousVectorTransition)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(finalvalue.as_ptr()), finalvalue.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn CreateConstantTransition(&self, duration: f64) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1199,7 +1199,7 @@ impl IUIAnimationTransitionLibrary2 { } pub unsafe fn CreateDiscreteVectorTransition(&self, delay: f64, finalvalue: &[f64], hold: f64) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateDiscreteVectorTransition)(::windows_core::Interface::as_raw(self), delay, ::core::mem::transmute(finalvalue.as_ptr()), finalvalue.len() as _, hold, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateDiscreteVectorTransition)(::windows_core::Interface::as_raw(self), delay, ::core::mem::transmute(finalvalue.as_ptr()), finalvalue.len().try_into().unwrap(), hold, &mut result__).from_abi(result__) } pub unsafe fn CreateLinearTransition(&self, duration: f64, finalvalue: f64) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1207,7 +1207,7 @@ impl IUIAnimationTransitionLibrary2 { } pub unsafe fn CreateLinearVectorTransition(&self, duration: f64, finalvalue: &[f64]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateLinearVectorTransition)(::windows_core::Interface::as_raw(self), duration, ::core::mem::transmute(finalvalue.as_ptr()), finalvalue.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateLinearVectorTransition)(::windows_core::Interface::as_raw(self), duration, ::core::mem::transmute(finalvalue.as_ptr()), finalvalue.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn CreateLinearTransitionFromSpeed(&self, speed: f64, finalvalue: f64) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1215,7 +1215,7 @@ impl IUIAnimationTransitionLibrary2 { } pub unsafe fn CreateLinearVectorTransitionFromSpeed(&self, speed: f64, finalvalue: &[f64]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateLinearVectorTransitionFromSpeed)(::windows_core::Interface::as_raw(self), speed, ::core::mem::transmute(finalvalue.as_ptr()), finalvalue.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateLinearVectorTransitionFromSpeed)(::windows_core::Interface::as_raw(self), speed, ::core::mem::transmute(finalvalue.as_ptr()), finalvalue.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn CreateSinusoidalTransitionFromVelocity(&self, duration: f64, period: f64) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1255,7 +1255,7 @@ impl IUIAnimationTransitionLibrary2 { } pub unsafe fn CreateCubicBezierLinearVectorTransition(&self, duration: f64, finalvalue: &[f64], x1: f64, y1: f64, x2: f64, y2: f64) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateCubicBezierLinearVectorTransition)(::windows_core::Interface::as_raw(self), duration, ::core::mem::transmute(finalvalue.as_ptr()), finalvalue.len() as _, x1, y1, x2, y2, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateCubicBezierLinearVectorTransition)(::windows_core::Interface::as_raw(self), duration, ::core::mem::transmute(finalvalue.as_ptr()), finalvalue.len().try_into().unwrap(), x1, y1, x2, y2, &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(IUIAnimationTransitionLibrary2, ::windows_core::IUnknown); @@ -1391,7 +1391,7 @@ impl IUIAnimationVariable2 { (::windows_core::Interface::vtable(self).GetValue)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetVectorValue(&self, value: &mut [f64]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetVectorValue)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(value.as_ptr()), value.len() as _).ok() + (::windows_core::Interface::vtable(self).GetVectorValue)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(value.as_ptr()), value.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Graphics_DirectComposition\"`"] #[cfg(feature = "Win32_Graphics_DirectComposition")] @@ -1404,42 +1404,42 @@ impl IUIAnimationVariable2 { #[doc = "Required features: `\"Win32_Graphics_DirectComposition\"`"] #[cfg(feature = "Win32_Graphics_DirectComposition")] pub unsafe fn GetVectorCurve(&self, animation: &[::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetVectorCurve)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(animation.as_ptr()), animation.len() as _).ok() + (::windows_core::Interface::vtable(self).GetVectorCurve)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(animation.as_ptr()), animation.len().try_into().unwrap()).ok() } pub unsafe fn GetFinalValue(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).GetFinalValue)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetFinalVectorValue(&self, finalvalue: &mut [f64]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetFinalVectorValue)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(finalvalue.as_ptr()), finalvalue.len() as _).ok() + (::windows_core::Interface::vtable(self).GetFinalVectorValue)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(finalvalue.as_ptr()), finalvalue.len().try_into().unwrap()).ok() } pub unsafe fn GetPreviousValue(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).GetPreviousValue)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetPreviousVectorValue(&self, previousvalue: &mut [f64]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPreviousVectorValue)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(previousvalue.as_ptr()), previousvalue.len() as _).ok() + (::windows_core::Interface::vtable(self).GetPreviousVectorValue)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(previousvalue.as_ptr()), previousvalue.len().try_into().unwrap()).ok() } pub unsafe fn GetIntegerValue(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).GetIntegerValue)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetIntegerVectorValue(&self, value: &mut [i32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetIntegerVectorValue)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(value.as_ptr()), value.len() as _).ok() + (::windows_core::Interface::vtable(self).GetIntegerVectorValue)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(value.as_ptr()), value.len().try_into().unwrap()).ok() } pub unsafe fn GetFinalIntegerValue(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).GetFinalIntegerValue)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetFinalIntegerVectorValue(&self, finalvalue: &mut [i32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetFinalIntegerVectorValue)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(finalvalue.as_ptr()), finalvalue.len() as _).ok() + (::windows_core::Interface::vtable(self).GetFinalIntegerVectorValue)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(finalvalue.as_ptr()), finalvalue.len().try_into().unwrap()).ok() } pub unsafe fn GetPreviousIntegerValue(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).GetPreviousIntegerValue)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetPreviousIntegerVectorValue(&self, previousvalue: &mut [i32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPreviousIntegerVectorValue)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(previousvalue.as_ptr()), previousvalue.len() as _).ok() + (::windows_core::Interface::vtable(self).GetPreviousIntegerVectorValue)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(previousvalue.as_ptr()), previousvalue.len().try_into().unwrap()).ok() } pub unsafe fn GetCurrentStoryboard(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1449,13 +1449,13 @@ impl IUIAnimationVariable2 { (::windows_core::Interface::vtable(self).SetLowerBound)(::windows_core::Interface::as_raw(self), bound).ok() } pub unsafe fn SetLowerBoundVector(&self, bound: &[f64]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetLowerBoundVector)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(bound.as_ptr()), bound.len() as _).ok() + (::windows_core::Interface::vtable(self).SetLowerBoundVector)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(bound.as_ptr()), bound.len().try_into().unwrap()).ok() } pub unsafe fn SetUpperBound(&self, bound: f64) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).SetUpperBound)(::windows_core::Interface::as_raw(self), bound).ok() } pub unsafe fn SetUpperBoundVector(&self, bound: &[f64]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetUpperBoundVector)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(bound.as_ptr()), bound.len() as _).ok() + (::windows_core::Interface::vtable(self).SetUpperBoundVector)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(bound.as_ptr()), bound.len().try_into().unwrap()).ok() } pub unsafe fn SetRoundingMode(&self, mode: UI_ANIMATION_ROUNDING_MODE) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).SetRoundingMode)(::windows_core::Interface::as_raw(self), mode).ok() 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 f7b281f4ed..611ed815c1 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/ColorSystem/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/ColorSystem/mod.rs @@ -65,12 +65,12 @@ pub unsafe fn CMConvertIndexToColorName(hprofile: isize, paindex: *const u32, pa #[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); - CMCreateDeviceLinkProfile(::core::mem::transmute(pahprofiles.as_ptr()), pahprofiles.len() as _, ::core::mem::transmute(padwintents.as_ptr()), padwintents.len() as _, dwflags, lpprofiledata) + 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) } #[inline] pub unsafe fn CMCreateMultiProfileTransform(pahprofiles: &[isize], padwintents: &[u32], dwflags: u32) -> isize { ::windows_targets::link!("icm32.dll" "system" fn CMCreateMultiProfileTransform(pahprofiles : *const isize, nprofiles : u32, padwintents : *const u32, nintents : u32, dwflags : u32) -> isize); - CMCreateMultiProfileTransform(::core::mem::transmute(pahprofiles.as_ptr()), pahprofiles.len() as _, ::core::mem::transmute(padwintents.as_ptr()), padwintents.len() as _, dwflags) + CMCreateMultiProfileTransform(::core::mem::transmute(pahprofiles.as_ptr()), pahprofiles.len().try_into().unwrap(), ::core::mem::transmute(padwintents.as_ptr()), padwintents.len().try_into().unwrap(), dwflags) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] @@ -333,12 +333,12 @@ 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); - CreateDeviceLinkProfile(::core::mem::transmute(hprofile.as_ptr()), hprofile.len() as _, ::core::mem::transmute(padwintent.as_ptr()), padwintent.len() as _, dwflags, pprofiledata, indexpreferredcmm) + 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, indexpreferredcmm) } #[inline] pub unsafe fn CreateMultiProfileTransform(pahprofiles: &[isize], padwintent: &[u32], dwflags: u32, indexpreferredcmm: u32) -> isize { ::windows_targets::link!("mscms.dll" "system" fn CreateMultiProfileTransform(pahprofiles : *const isize, nprofiles : u32, padwintent : *const u32, nintents : u32, dwflags : u32, indexpreferredcmm : u32) -> isize); - CreateMultiProfileTransform(::core::mem::transmute(pahprofiles.as_ptr()), pahprofiles.len() as _, ::core::mem::transmute(padwintent.as_ptr()), padwintent.len() as _, dwflags, indexpreferredcmm) + CreateMultiProfileTransform(::core::mem::transmute(pahprofiles.as_ptr()), pahprofiles.len().try_into().unwrap(), ::core::mem::transmute(padwintent.as_ptr()), padwintent.len().try_into().unwrap(), dwflags, indexpreferredcmm) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] @@ -896,7 +896,7 @@ where #[inline] pub unsafe fn WcsCheckColors(hcolortransform: isize, ninputchannels: u32, cdtinput: COLORDATATYPE, cbinput: u32, pinputdata: *const ::core::ffi::c_void, paresult: &mut [u8]) -> super::super::Foundation::BOOL { ::windows_targets::link!("mscms.dll" "system" fn WcsCheckColors(hcolortransform : isize, ncolors : u32, ninputchannels : u32, cdtinput : COLORDATATYPE, cbinput : u32, pinputdata : *const ::core::ffi::c_void, paresult : *mut u8) -> super::super::Foundation:: BOOL); - WcsCheckColors(hcolortransform, paresult.len() as _, ninputchannels, cdtinput, cbinput, pinputdata, ::core::mem::transmute(paresult.as_ptr())) + WcsCheckColors(hcolortransform, paresult.len().try_into().unwrap(), ninputchannels, cdtinput, cbinput, pinputdata, ::core::mem::transmute(paresult.as_ptr())) } #[inline] pub unsafe fn WcsCreateIccProfile(hwcsprofile: isize, dwoptions: u32) -> isize { @@ -919,7 +919,7 @@ where #[inline] pub unsafe fn WcsEnumColorProfiles(scope: WCS_PROFILE_MANAGEMENT_SCOPE, penumrecord: *const ENUMTYPEW, pbuffer: &mut [u8], pnprofiles: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL { ::windows_targets::link!("mscms.dll" "system" fn WcsEnumColorProfiles(scope : WCS_PROFILE_MANAGEMENT_SCOPE, penumrecord : *const ENUMTYPEW, pbuffer : *mut u8, dwsize : u32, pnprofiles : *mut u32) -> super::super::Foundation:: BOOL); - WcsEnumColorProfiles(scope, penumrecord, ::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len() as _, ::core::mem::transmute(pnprofiles.unwrap_or(::std::ptr::null_mut()))) + WcsEnumColorProfiles(scope, penumrecord, ::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap(), ::core::mem::transmute(pnprofiles.unwrap_or(::std::ptr::null_mut()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1043,11 +1043,11 @@ impl IDeviceModelPlugIn { (::windows_core::Interface::vtable(self).GetNumChannels)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn DeviceToColorimetricColors(&self, cchannels: u32, pdevicevalues: *const f32, pxyzcolors: &mut [XYZColorF]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).DeviceToColorimetricColors)(::windows_core::Interface::as_raw(self), pxyzcolors.len() as _, cchannels, pdevicevalues, ::core::mem::transmute(pxyzcolors.as_ptr())).ok() + (::windows_core::Interface::vtable(self).DeviceToColorimetricColors)(::windows_core::Interface::as_raw(self), pxyzcolors.len().try_into().unwrap(), cchannels, pdevicevalues, ::core::mem::transmute(pxyzcolors.as_ptr())).ok() } pub unsafe fn ColorimetricToDeviceColors(&self, cchannels: u32, pxyzcolors: &[XYZColorF]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).ColorimetricToDeviceColors)(::windows_core::Interface::as_raw(self), pxyzcolors.len() as _, cchannels, ::core::mem::transmute(pxyzcolors.as_ptr()), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).ColorimetricToDeviceColors)(::windows_core::Interface::as_raw(self), pxyzcolors.len().try_into().unwrap(), cchannels, ::core::mem::transmute(pxyzcolors.as_ptr()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1068,14 +1068,14 @@ impl IDeviceModelPlugIn { (::windows_core::Interface::vtable(self).GetGamutBoundaryMeshSize)(::windows_core::Interface::as_raw(self), pnumvertices, pnumtriangles).ok() } pub unsafe fn GetGamutBoundaryMesh(&self, cchannels: u32, cvertices: u32, pvertices: *mut f32, ptriangles: &mut [GamutShellTriangle]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetGamutBoundaryMesh)(::windows_core::Interface::as_raw(self), cchannels, cvertices, ptriangles.len() as _, pvertices, ::core::mem::transmute(ptriangles.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetGamutBoundaryMesh)(::windows_core::Interface::as_raw(self), cchannels, cvertices, ptriangles.len().try_into().unwrap(), pvertices, ::core::mem::transmute(ptriangles.as_ptr())).ok() } pub unsafe fn GetNeutralAxisSize(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(self).GetNeutralAxisSize)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetNeutralAxis(&self, pxyzcolors: &mut [XYZColorF]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetNeutralAxis)(::windows_core::Interface::as_raw(self), pxyzcolors.len() as _, ::core::mem::transmute(pxyzcolors.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetNeutralAxis)(::windows_core::Interface::as_raw(self), pxyzcolors.len().try_into().unwrap(), ::core::mem::transmute(pxyzcolors.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(IDeviceModelPlugIn, ::windows_core::IUnknown); 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 b491fd65d9..3a4cf75bcd 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 @@ -51,7 +51,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("comdlg32.dll" "system" fn GetFileTitleA(param0 : ::windows_core::PCSTR, buf : ::windows_core::PSTR, cchsize : u16) -> i16); - GetFileTitleA(param0.into_param().abi(), ::core::mem::transmute(buf.as_ptr()), buf.len() as _) + GetFileTitleA(param0.into_param().abi(), ::core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap()) } #[inline] pub unsafe fn GetFileTitleW(param0: P0, buf: &mut [u16]) -> i16 @@ -59,7 +59,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("comdlg32.dll" "system" fn GetFileTitleW(param0 : ::windows_core::PCWSTR, buf : ::windows_core::PWSTR, cchsize : u16) -> i16); - GetFileTitleW(param0.into_param().abi(), ::core::mem::transmute(buf.as_ptr()), buf.len() as _) + GetFileTitleW(param0.into_param().abi(), ::core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 ab983f5d02..43c61ed6dd 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Controls/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Controls/mod.rs @@ -541,7 +541,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn DlgDirSelectComboBoxExA(hwnddlg : super::super::Foundation:: HWND, lpstring : ::windows_core::PSTR, cchout : i32, idcombobox : i32) -> super::super::Foundation:: BOOL); - DlgDirSelectComboBoxExA(hwnddlg.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _, idcombobox).ok() + DlgDirSelectComboBoxExA(hwnddlg.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), idcombobox).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -551,7 +551,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn DlgDirSelectComboBoxExW(hwnddlg : super::super::Foundation:: HWND, lpstring : ::windows_core::PWSTR, cchout : i32, idcombobox : i32) -> super::super::Foundation:: BOOL); - DlgDirSelectComboBoxExW(hwnddlg.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _, idcombobox).ok() + DlgDirSelectComboBoxExW(hwnddlg.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), idcombobox).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -561,7 +561,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn DlgDirSelectExA(hwnddlg : super::super::Foundation:: HWND, lpstring : ::windows_core::PSTR, chcount : i32, idlistbox : i32) -> super::super::Foundation:: BOOL); - DlgDirSelectExA(hwnddlg.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _, idlistbox).ok() + DlgDirSelectExA(hwnddlg.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), idlistbox).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -571,7 +571,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn DlgDirSelectExW(hwnddlg : super::super::Foundation:: HWND, lpstring : ::windows_core::PWSTR, chcount : i32, idlistbox : i32) -> super::super::Foundation:: BOOL); - DlgDirSelectExW(hwnddlg.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _, idlistbox).ok() + DlgDirSelectExW(hwnddlg.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap(), idlistbox).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -594,7 +594,7 @@ where P2: ::windows_core::IntoParam, { ::windows_targets::link!("comctl32.dll" "system" fn DrawShadowText(hdc : super::super::Graphics::Gdi:: HDC, psztext : ::windows_core::PCWSTR, cch : u32, prc : *const super::super::Foundation:: RECT, dwflags : u32, crtext : super::super::Foundation:: COLORREF, crshadow : super::super::Foundation:: COLORREF, ixoffset : i32, iyoffset : i32) -> i32); - DrawShadowText(hdc.into_param().abi(), ::core::mem::transmute(psztext.as_ptr()), psztext.len() as _, prc, dwflags, crtext.into_param().abi(), crshadow.into_param().abi(), ixoffset, iyoffset) + DrawShadowText(hdc.into_param().abi(), ::core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap(), prc, dwflags, crtext.into_param().abi(), crshadow.into_param().abi(), ixoffset, iyoffset) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] @@ -694,7 +694,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("uxtheme.dll" "system" fn DrawThemeText(htheme : HTHEME, hdc : super::super::Graphics::Gdi:: HDC, ipartid : i32, istateid : i32, psztext : ::windows_core::PCWSTR, cchtext : i32, dwtextflags : super::super::Graphics::Gdi:: DRAW_TEXT_FORMAT, dwtextflags2 : u32, prect : *const super::super::Foundation:: RECT) -> ::windows_core::HRESULT); - DrawThemeText(htheme.into_param().abi(), hdc.into_param().abi(), ipartid, istateid, ::core::mem::transmute(psztext.as_ptr()), psztext.len() as _, dwtextflags, dwtextflags2, prect).ok() + DrawThemeText(htheme.into_param().abi(), hdc.into_param().abi(), ipartid, istateid, ::core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap(), dwtextflags, dwtextflags2, prect).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] @@ -705,7 +705,7 @@ where P1: ::windows_core::IntoParam, { ::windows_targets::link!("uxtheme.dll" "system" fn DrawThemeTextEx(htheme : HTHEME, hdc : super::super::Graphics::Gdi:: HDC, ipartid : i32, istateid : i32, psztext : ::windows_core::PCWSTR, cchtext : i32, dwtextflags : super::super::Graphics::Gdi:: DRAW_TEXT_FORMAT, prect : *mut super::super::Foundation:: RECT, poptions : *const DTTOPTS) -> ::windows_core::HRESULT); - DrawThemeTextEx(htheme.into_param().abi(), hdc.into_param().abi(), ipartid, istateid, ::core::mem::transmute(psztext.as_ptr()), psztext.len() as _, dwtextflags, prect, ::core::mem::transmute(poptions.unwrap_or(::std::ptr::null()))).ok() + DrawThemeTextEx(htheme.into_param().abi(), hdc.into_param().abi(), ipartid, istateid, ::core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap(), dwtextflags, prect, ::core::mem::transmute(poptions.unwrap_or(::std::ptr::null()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -773,7 +773,7 @@ where #[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); - EvaluateProximityToPolygon(controlpolygon.len() as _, ::core::mem::transmute(controlpolygon.as_ptr()), phittestinginput, pproximityeval).ok() + EvaluateProximityToPolygon(controlpolygon.len().try_into().unwrap(), ::core::mem::transmute(controlpolygon.as_ptr()), phittestinginput, pproximityeval).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -929,7 +929,7 @@ where #[inline] pub unsafe fn GetCurrentThemeName(pszthemefilename: &mut [u16], pszcolorbuff: ::core::option::Option<&mut [u16]>, pszsizebuff: ::core::option::Option<&mut [u16]>) -> ::windows_core::Result<()> { ::windows_targets::link!("uxtheme.dll" "system" fn GetCurrentThemeName(pszthemefilename : ::windows_core::PWSTR, cchmaxnamechars : i32, pszcolorbuff : ::windows_core::PWSTR, cchmaxcolorchars : i32, pszsizebuff : ::windows_core::PWSTR, cchmaxsizechars : i32) -> ::windows_core::HRESULT); - GetCurrentThemeName(::core::mem::transmute(pszthemefilename.as_ptr()), pszthemefilename.len() as _, ::core::mem::transmute(pszcolorbuff.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszcolorbuff.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pszsizebuff.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszsizebuff.as_deref().map_or(0, |slice| slice.len() as _)).ok() + GetCurrentThemeName(::core::mem::transmute(pszthemefilename.as_ptr()), pszthemefilename.len().try_into().unwrap(), ::core::mem::transmute(pszcolorbuff.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszcolorbuff.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pszsizebuff.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszsizebuff.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1053,7 +1053,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("uxtheme.dll" "system" fn GetThemeDocumentationProperty(pszthemename : ::windows_core::PCWSTR, pszpropertyname : ::windows_core::PCWSTR, pszvaluebuff : ::windows_core::PWSTR, cchmaxvalchars : i32) -> ::windows_core::HRESULT); - GetThemeDocumentationProperty(pszthemename.into_param().abi(), pszpropertyname.into_param().abi(), ::core::mem::transmute(pszvaluebuff.as_ptr()), pszvaluebuff.len() as _).ok() + GetThemeDocumentationProperty(pszthemename.into_param().abi(), pszpropertyname.into_param().abi(), ::core::mem::transmute(pszvaluebuff.as_ptr()), pszvaluebuff.len().try_into().unwrap()).ok() } #[inline] pub unsafe fn GetThemeEnumValue(htheme: P0, ipartid: i32, istateid: i32, ipropid: THEME_PROPERTY_SYMBOL_ID) -> ::windows_core::Result @@ -1070,7 +1070,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("uxtheme.dll" "system" fn GetThemeFilename(htheme : HTHEME, ipartid : i32, istateid : i32, ipropid : i32, pszthemefilename : ::windows_core::PWSTR, cchmaxbuffchars : i32) -> ::windows_core::HRESULT); - GetThemeFilename(htheme.into_param().abi(), ipartid, istateid, ipropid.0 as _, ::core::mem::transmute(pszthemefilename.as_ptr()), pszthemefilename.len() as _).ok() + GetThemeFilename(htheme.into_param().abi(), ipartid, istateid, ipropid.0 as _, ::core::mem::transmute(pszthemefilename.as_ptr()), pszthemefilename.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Graphics_Gdi\"`"] #[cfg(feature = "Win32_Graphics_Gdi")] @@ -1184,7 +1184,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("uxtheme.dll" "system" fn GetThemeString(htheme : HTHEME, ipartid : i32, istateid : i32, ipropid : i32, pszbuff : ::windows_core::PWSTR, cchmaxbuffchars : i32) -> ::windows_core::HRESULT); - GetThemeString(htheme.into_param().abi(), ipartid, istateid, ipropid, ::core::mem::transmute(pszbuff.as_ptr()), pszbuff.len() as _).ok() + GetThemeString(htheme.into_param().abi(), ipartid, istateid, ipropid, ::core::mem::transmute(pszbuff.as_ptr()), pszbuff.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1249,7 +1249,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("uxtheme.dll" "system" fn GetThemeSysString(htheme : HTHEME, istringid : i32, pszstringbuff : ::windows_core::PWSTR, cchmaxstringchars : i32) -> ::windows_core::HRESULT); - GetThemeSysString(htheme.into_param().abi(), istringid.0 as _, ::core::mem::transmute(pszstringbuff.as_ptr()), pszstringbuff.len() as _).ok() + GetThemeSysString(htheme.into_param().abi(), istringid.0 as _, ::core::mem::transmute(pszstringbuff.as_ptr()), pszstringbuff.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] @@ -1261,7 +1261,7 @@ where { ::windows_targets::link!("uxtheme.dll" "system" fn GetThemeTextExtent(htheme : HTHEME, hdc : super::super::Graphics::Gdi:: HDC, ipartid : i32, istateid : i32, psztext : ::windows_core::PCWSTR, cchcharcount : i32, dwtextflags : super::super::Graphics::Gdi:: DRAW_TEXT_FORMAT, pboundingrect : *const super::super::Foundation:: RECT, pextentrect : *mut super::super::Foundation:: RECT) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - GetThemeTextExtent(htheme.into_param().abi(), hdc.into_param().abi(), ipartid, istateid, ::core::mem::transmute(psztext.as_ptr()), psztext.len() as _, dwtextflags, ::core::mem::transmute(pboundingrect.unwrap_or(::std::ptr::null())), &mut result__).from_abi(result__) + GetThemeTextExtent(htheme.into_param().abi(), hdc.into_param().abi(), ipartid, istateid, ::core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap(), dwtextflags, ::core::mem::transmute(pboundingrect.unwrap_or(::std::ptr::null())), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Graphics_Gdi\"`"] #[cfg(feature = "Win32_Graphics_Gdi")] 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 ce66d756f1..58bec11d28 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 @@ -345,7 +345,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("imm32.dll" "system" fn ImmGetDescriptionA(param0 : super::super::TextServices:: HKL, lpszdescription : ::windows_core::PSTR, ubuflen : u32) -> u32); - ImmGetDescriptionA(param0.into_param().abi(), ::core::mem::transmute(lpszdescription.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszdescription.as_deref().map_or(0, |slice| slice.len() as _)) + ImmGetDescriptionA(param0.into_param().abi(), ::core::mem::transmute(lpszdescription.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszdescription.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_UI_TextServices\"`"] #[cfg(feature = "Win32_UI_TextServices")] @@ -355,7 +355,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("imm32.dll" "system" fn ImmGetDescriptionW(param0 : super::super::TextServices:: HKL, lpszdescription : ::windows_core::PWSTR, ubuflen : u32) -> u32); - ImmGetDescriptionW(param0.into_param().abi(), ::core::mem::transmute(lpszdescription.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszdescription.as_deref().map_or(0, |slice| slice.len() as _)) + ImmGetDescriptionW(param0.into_param().abi(), ::core::mem::transmute(lpszdescription.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszdescription.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Globalization\"`"] #[cfg(feature = "Win32_Globalization")] @@ -365,7 +365,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("imm32.dll" "system" fn ImmGetGuideLineA(param0 : super::super::super::Globalization:: HIMC, dwindex : GET_GUIDE_LINE_TYPE, lpbuf : ::windows_core::PSTR, dwbuflen : u32) -> u32); - ImmGetGuideLineA(param0.into_param().abi(), dwindex, ::core::mem::transmute(lpbuf.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuf.as_deref().map_or(0, |slice| slice.len() as _)) + ImmGetGuideLineA(param0.into_param().abi(), dwindex, ::core::mem::transmute(lpbuf.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuf.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Globalization\"`"] #[cfg(feature = "Win32_Globalization")] @@ -422,7 +422,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("imm32.dll" "system" fn ImmGetIMEFileNameA(param0 : super::super::TextServices:: HKL, lpszfilename : ::windows_core::PSTR, ubuflen : u32) -> u32); - ImmGetIMEFileNameA(param0.into_param().abi(), ::core::mem::transmute(lpszfilename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszfilename.as_deref().map_or(0, |slice| slice.len() as _)) + ImmGetIMEFileNameA(param0.into_param().abi(), ::core::mem::transmute(lpszfilename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszfilename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_UI_TextServices\"`"] #[cfg(feature = "Win32_UI_TextServices")] @@ -432,7 +432,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("imm32.dll" "system" fn ImmGetIMEFileNameW(param0 : super::super::TextServices:: HKL, lpszfilename : ::windows_core::PWSTR, ubuflen : u32) -> u32); - ImmGetIMEFileNameW(param0.into_param().abi(), ::core::mem::transmute(lpszfilename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszfilename.as_deref().map_or(0, |slice| slice.len() as _)) + ImmGetIMEFileNameW(param0.into_param().abi(), ::core::mem::transmute(lpszfilename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszfilename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Globalization\"`, `\"Win32_Graphics_Gdi\"`"] #[cfg(all(feature = "Win32_Globalization", feature = "Win32_Graphics_Gdi"))] @@ -482,7 +482,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("imm32.dll" "system" fn ImmGetRegisterWordStyleA(param0 : super::super::TextServices:: HKL, nitem : u32, lpstylebuf : *mut STYLEBUFA) -> u32); - ImmGetRegisterWordStyleA(param0.into_param().abi(), lpstylebuf.len() as _, ::core::mem::transmute(lpstylebuf.as_ptr())) + ImmGetRegisterWordStyleA(param0.into_param().abi(), lpstylebuf.len().try_into().unwrap(), ::core::mem::transmute(lpstylebuf.as_ptr())) } #[doc = "Required features: `\"Win32_UI_TextServices\"`"] #[cfg(feature = "Win32_UI_TextServices")] @@ -492,7 +492,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("imm32.dll" "system" fn ImmGetRegisterWordStyleW(param0 : super::super::TextServices:: HKL, nitem : u32, lpstylebuf : *mut STYLEBUFW) -> u32); - ImmGetRegisterWordStyleW(param0.into_param().abi(), lpstylebuf.len() as _, ::core::mem::transmute(lpstylebuf.as_ptr())) + ImmGetRegisterWordStyleW(param0.into_param().abi(), lpstylebuf.len().try_into().unwrap(), ::core::mem::transmute(lpstylebuf.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Globalization\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Globalization"))] @@ -3308,7 +3308,7 @@ pub struct IFEClassFactory_Vtbl { pub struct IFECommon(::windows_core::IUnknown); impl IFECommon { pub unsafe fn IsDefaultIME(&self, szname: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).IsDefaultIME)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(szname.as_ptr()), szname.len() as _).ok() + (::windows_core::Interface::vtable(self).IsDefaultIME)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(szname.as_ptr()), szname.len().try_into().unwrap()).ok() } pub unsafe fn SetDefaultIME(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).SetDefaultIME)(::windows_core::Interface::as_raw(self)).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 146450f6a5..5afa9b0d03 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 @@ -79,12 +79,12 @@ pub unsafe fn GetKBCodePage() -> u32 { #[inline] pub unsafe fn GetKeyNameTextA(lparam: i32, lpstring: &mut [u8]) -> i32 { ::windows_targets::link!("user32.dll" "system" fn GetKeyNameTextA(lparam : i32, lpstring : ::windows_core::PSTR, cchsize : i32) -> i32); - GetKeyNameTextA(lparam, ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _) + GetKeyNameTextA(lparam, ::core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap()) } #[inline] pub unsafe fn GetKeyNameTextW(lparam: i32, lpstring: &mut [u16]) -> i32 { ::windows_targets::link!("user32.dll" "system" fn GetKeyNameTextW(lparam : i32, lpstring : ::windows_core::PWSTR, cchsize : i32) -> i32); - GetKeyNameTextW(lparam, ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _) + GetKeyNameTextW(lparam, ::core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap()) } #[inline] pub unsafe fn GetKeyState(nvirtkey: i32) -> i16 { @@ -103,7 +103,7 @@ pub unsafe fn GetKeyboardLayout(idthread: u32) -> super::super::TextServices::HK #[inline] pub unsafe fn GetKeyboardLayoutList(lplist: ::core::option::Option<&mut [super::super::TextServices::HKL]>) -> i32 { ::windows_targets::link!("user32.dll" "system" fn GetKeyboardLayoutList(nbuff : i32, lplist : *mut super::super::TextServices:: HKL) -> i32); - GetKeyboardLayoutList(lplist.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lplist.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + GetKeyboardLayoutList(lplist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lplist.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -141,7 +141,7 @@ pub unsafe fn GetLastInputInfo(plii: *mut LASTINPUTINFO) -> super::super::super: #[inline] pub unsafe fn GetMouseMovePointsEx(cbsize: u32, lppt: *const MOUSEMOVEPOINT, lpptbuf: &mut [MOUSEMOVEPOINT], resolution: GET_MOUSE_MOVE_POINTS_EX_RESOLUTION) -> i32 { ::windows_targets::link!("user32.dll" "system" fn GetMouseMovePointsEx(cbsize : u32, lppt : *const MOUSEMOVEPOINT, lpptbuf : *mut MOUSEMOVEPOINT, nbufpoints : i32, resolution : GET_MOUSE_MOVE_POINTS_EX_RESOLUTION) -> i32); - GetMouseMovePointsEx(cbsize, lppt, ::core::mem::transmute(lpptbuf.as_ptr()), lpptbuf.len() as _, resolution) + GetMouseMovePointsEx(cbsize, lppt, ::core::mem::transmute(lpptbuf.as_ptr()), lpptbuf.len().try_into().unwrap(), resolution) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -230,7 +230,7 @@ pub unsafe fn ReleaseCapture() -> ::windows_core::Result<()> { #[inline] pub unsafe fn SendInput(pinputs: &[INPUT], cbsize: i32) -> u32 { ::windows_targets::link!("user32.dll" "system" fn SendInput(cinputs : u32, pinputs : *const INPUT, cbsize : i32) -> u32); - SendInput(pinputs.len() as _, ::core::mem::transmute(pinputs.as_ptr()), cbsize) + SendInput(pinputs.len().try_into().unwrap(), ::core::mem::transmute(pinputs.as_ptr()), cbsize) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -304,7 +304,7 @@ where #[inline] pub unsafe fn ToUnicode(wvirtkey: u32, wscancode: u32, lpkeystate: ::core::option::Option<&[u8; 256]>, pwszbuff: &mut [u16], wflags: u32) -> i32 { ::windows_targets::link!("user32.dll" "system" fn ToUnicode(wvirtkey : u32, wscancode : u32, lpkeystate : *const u8, pwszbuff : ::windows_core::PWSTR, cchbuff : i32, wflags : u32) -> i32); - ToUnicode(wvirtkey, wscancode, ::core::mem::transmute(lpkeystate.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(pwszbuff.as_ptr()), pwszbuff.len() as _, wflags) + ToUnicode(wvirtkey, wscancode, ::core::mem::transmute(lpkeystate.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(pwszbuff.as_ptr()), pwszbuff.len().try_into().unwrap(), wflags) } #[doc = "Required features: `\"Win32_UI_TextServices\"`"] #[cfg(feature = "Win32_UI_TextServices")] @@ -314,7 +314,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn ToUnicodeEx(wvirtkey : u32, wscancode : u32, lpkeystate : *const u8, pwszbuff : ::windows_core::PWSTR, cchbuff : i32, wflags : u32, dwhkl : super::super::TextServices:: HKL) -> i32); - ToUnicodeEx(wvirtkey, wscancode, ::core::mem::transmute(lpkeystate.as_ptr()), ::core::mem::transmute(pwszbuff.as_ptr()), pwszbuff.len() as _, wflags, dwhkl.into_param().abi()) + ToUnicodeEx(wvirtkey, wscancode, ::core::mem::transmute(lpkeystate.as_ptr()), ::core::mem::transmute(pwszbuff.as_ptr()), pwszbuff.len().try_into().unwrap(), wflags, dwhkl.into_param().abi()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 d86cecbc98..2dd876ba8d 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 @@ -123,7 +123,7 @@ pub unsafe fn GetPointerInfoHistory(pointerid: u32, entriescount: *mut u32, poin #[inline] pub unsafe fn GetPointerInputTransform(pointerid: u32, inputtransform: &mut [INPUT_TRANSFORM]) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn GetPointerInputTransform(pointerid : u32, historycount : u32, inputtransform : *mut INPUT_TRANSFORM) -> super::super::super::Foundation:: BOOL); - GetPointerInputTransform(pointerid, inputtransform.len() as _, ::core::mem::transmute(inputtransform.as_ptr())).ok() + GetPointerInputTransform(pointerid, inputtransform.len().try_into().unwrap(), ::core::mem::transmute(inputtransform.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] @@ -165,7 +165,7 @@ pub unsafe fn GetPointerType(pointerid: u32, pointertype: *mut super::super::Win #[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); - GetRawPointerDeviceData(pointerid, historycount, pproperties.len() as _, ::core::mem::transmute(pproperties.as_ptr()), pvalues).ok() + GetRawPointerDeviceData(pointerid, historycount, pproperties.len().try_into().unwrap(), ::core::mem::transmute(pproperties.as_ptr()), pvalues).ok() } #[inline] pub unsafe fn GetUnpredictedMessagePos() -> u32 { @@ -187,14 +187,14 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn InjectSyntheticPointerInput(device : super::super::Controls:: HSYNTHETICPOINTERDEVICE, pointerinfo : *const super::super::Controls:: POINTER_TYPE_INFO, count : u32) -> super::super::super::Foundation:: BOOL); - InjectSyntheticPointerInput(device.into_param().abi(), ::core::mem::transmute(pointerinfo.as_ptr()), pointerinfo.len() as _).ok() + InjectSyntheticPointerInput(device.into_param().abi(), ::core::mem::transmute(pointerinfo.as_ptr()), pointerinfo.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] pub unsafe fn InjectTouchInput(contacts: &[POINTER_TOUCH_INFO]) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn InjectTouchInput(count : u32, contacts : *const POINTER_TOUCH_INFO) -> super::super::super::Foundation:: BOOL); - InjectTouchInput(contacts.len() as _, ::core::mem::transmute(contacts.as_ptr())).ok() + InjectTouchInput(contacts.len().try_into().unwrap(), ::core::mem::transmute(contacts.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 171711ca18..041f66e305 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 @@ -36,7 +36,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetGestureExtraArgs(hgestureinfo : HGESTUREINFO, cbextraargs : u32, pextraargs : *mut u8) -> super::super::super::Foundation:: BOOL); - GetGestureExtraArgs(hgestureinfo.into_param().abi(), pextraargs.len() as _, ::core::mem::transmute(pextraargs.as_ptr())).ok() + GetGestureExtraArgs(hgestureinfo.into_param().abi(), pextraargs.len().try_into().unwrap(), ::core::mem::transmute(pextraargs.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -56,7 +56,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetTouchInputInfo(htouchinput : HTOUCHINPUT, cinputs : u32, pinputs : *mut TOUCHINPUT, cbsize : i32) -> super::super::super::Foundation:: BOOL); - GetTouchInputInfo(htouchinput.into_param().abi(), pinputs.len() as _, ::core::mem::transmute(pinputs.as_ptr()), cbsize).ok() + GetTouchInputInfo(htouchinput.into_param().abi(), pinputs.len().try_into().unwrap(), ::core::mem::transmute(pinputs.as_ptr()), cbsize).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -86,7 +86,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn SetGestureConfig(hwnd : super::super::super::Foundation:: HWND, dwreserved : u32, cids : u32, pgestureconfig : *const GESTURECONFIG, cbsize : u32) -> super::super::super::Foundation:: BOOL); - SetGestureConfig(hwnd.into_param().abi(), dwreserved, pgestureconfig.len() as _, ::core::mem::transmute(pgestureconfig.as_ptr()), cbsize).ok() + SetGestureConfig(hwnd.into_param().abi(), dwreserved, pgestureconfig.len().try_into().unwrap(), ::core::mem::transmute(pgestureconfig.as_ptr()), cbsize).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 1c3bffb42b..80ae0c6203 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Input/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Input/mod.rs @@ -24,7 +24,7 @@ pub mod XboxController; #[inline] pub unsafe fn DefRawInputProc(parawinput: &[*const RAWINPUT], cbsizeheader: u32) -> super::super::Foundation::LRESULT { ::windows_targets::link!("user32.dll" "system" fn DefRawInputProc(parawinput : *const *const RAWINPUT, ninput : i32, cbsizeheader : u32) -> super::super::Foundation:: LRESULT); - DefRawInputProc(::core::mem::transmute(parawinput.as_ptr()), parawinput.len() as _, cbsizeheader) + DefRawInputProc(::core::mem::transmute(parawinput.as_ptr()), parawinput.len().try_into().unwrap(), cbsizeheader) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -94,7 +94,7 @@ pub unsafe fn GetRegisteredRawInputDevices(prawinputdevices: ::core::option::Opt #[inline] pub unsafe fn RegisterRawInputDevices(prawinputdevices: &[RAWINPUTDEVICE], cbsize: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn RegisterRawInputDevices(prawinputdevices : *const RAWINPUTDEVICE, uinumdevices : u32, cbsize : u32) -> super::super::Foundation:: BOOL); - RegisterRawInputDevices(::core::mem::transmute(prawinputdevices.as_ptr()), prawinputdevices.len() as _, cbsize).ok() + RegisterRawInputDevices(::core::mem::transmute(prawinputdevices.as_ptr()), prawinputdevices.len().try_into().unwrap(), cbsize).ok() } pub const IMDT_KEYBOARD: INPUT_MESSAGE_DEVICE_TYPE = INPUT_MESSAGE_DEVICE_TYPE(1i32); pub const IMDT_MOUSE: INPUT_MESSAGE_DEVICE_TYPE = INPUT_MESSAGE_DEVICE_TYPE(2i32); 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 fd74726faa..796bfd21a6 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/InteractionContext/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/InteractionContext/mod.rs @@ -14,7 +14,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ninput.dll" "system" fn BufferPointerPacketsInteractionContext(interactioncontext : HINTERACTIONCONTEXT, entriescount : u32, pointerinfo : *const super::Input::Pointer:: POINTER_INFO) -> ::windows_core::HRESULT); - BufferPointerPacketsInteractionContext(interactioncontext.into_param().abi(), pointerinfo.len() as _, ::core::mem::transmute(pointerinfo.as_ptr())).ok() + BufferPointerPacketsInteractionContext(interactioncontext.into_param().abi(), pointerinfo.len().try_into().unwrap(), ::core::mem::transmute(pointerinfo.as_ptr())).ok() } #[inline] pub unsafe fn CreateInteractionContext() -> ::windows_core::Result { @@ -63,7 +63,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ninput.dll" "system" fn GetInteractionConfigurationInteractionContext(interactioncontext : HINTERACTIONCONTEXT, configurationcount : u32, configuration : *mut INTERACTION_CONTEXT_CONFIGURATION) -> ::windows_core::HRESULT); - GetInteractionConfigurationInteractionContext(interactioncontext.into_param().abi(), configuration.len() as _, ::core::mem::transmute(configuration.as_ptr())).ok() + GetInteractionConfigurationInteractionContext(interactioncontext.into_param().abi(), configuration.len().try_into().unwrap(), ::core::mem::transmute(configuration.as_ptr())).ok() } #[inline] pub unsafe fn GetMouseWheelParameterInteractionContext(interactioncontext: P0, parameter: MOUSE_WHEEL_PARAMETER) -> ::windows_core::Result @@ -180,7 +180,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ninput.dll" "system" fn SetCrossSlideParametersInteractionContext(interactioncontext : HINTERACTIONCONTEXT, parametercount : u32, crossslideparameters : *const CROSS_SLIDE_PARAMETER) -> ::windows_core::HRESULT); - SetCrossSlideParametersInteractionContext(interactioncontext.into_param().abi(), crossslideparameters.len() as _, ::core::mem::transmute(crossslideparameters.as_ptr())).ok() + SetCrossSlideParametersInteractionContext(interactioncontext.into_param().abi(), crossslideparameters.len().try_into().unwrap(), ::core::mem::transmute(crossslideparameters.as_ptr())).ok() } #[inline] pub unsafe fn SetHoldParameterInteractionContext(interactioncontext: P0, parameter: HOLD_PARAMETER, value: f32) -> ::windows_core::Result<()> @@ -204,7 +204,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ninput.dll" "system" fn SetInteractionConfigurationInteractionContext(interactioncontext : HINTERACTIONCONTEXT, configurationcount : u32, configuration : *const INTERACTION_CONTEXT_CONFIGURATION) -> ::windows_core::HRESULT); - SetInteractionConfigurationInteractionContext(interactioncontext.into_param().abi(), configuration.len() as _, ::core::mem::transmute(configuration.as_ptr())).ok() + SetInteractionConfigurationInteractionContext(interactioncontext.into_param().abi(), configuration.len().try_into().unwrap(), ::core::mem::transmute(configuration.as_ptr())).ok() } #[inline] pub unsafe fn SetMouseWheelParameterInteractionContext(interactioncontext: P0, parameter: MOUSE_WHEEL_PARAMETER, value: f32) -> ::windows_core::Result<()> 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 3b49314bd0..3f6158bc26 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/LegacyWindowsEnvironmentFeatures/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/LegacyWindowsEnvironmentFeatures/mod.rs @@ -273,7 +273,7 @@ impl IReconcilableObject { P2: ::windows_core::IntoParam, P3: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).Reconcile)(::windows_core::Interface::as_raw(self), pinitiator.into_param().abi(), dwflags, hwndowner.into_param().abi(), hwndprogressfeedback.into_param().abi(), rgpmkotherinput.len() as _, ::core::mem::transmute(rgpmkotherinput.as_ptr()), ploutindex, pstgnewresidues.into_param().abi(), ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null()))).ok() + (::windows_core::Interface::vtable(self).Reconcile)(::windows_core::Interface::as_raw(self), pinitiator.into_param().abi(), dwflags, hwndowner.into_param().abi(), hwndprogressfeedback.into_param().abi(), rgpmkotherinput.len().try_into().unwrap(), ::core::mem::transmute(rgpmkotherinput.as_ptr()), ploutindex, pstgnewresidues.into_param().abi(), ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null()))).ok() } pub unsafe fn GetProgressFeedbackMaxEstimate(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Win32/UI/Notifications/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Notifications/mod.rs index d7bc6ee3b2..b5b2d0715d 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Notifications/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Notifications/mod.rs @@ -7,7 +7,7 @@ impl INotificationActivationCallback { P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).Activate)(::windows_core::Interface::as_raw(self), appusermodelid.into_param().abi(), invokedargs.into_param().abi(), ::core::mem::transmute(data.as_ptr()), data.len() as _).ok() + (::windows_core::Interface::vtable(self).Activate)(::windows_core::Interface::as_raw(self), appusermodelid.into_param().abi(), invokedargs.into_param().abi(), ::core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(INotificationActivationCallback, ::windows_core::IUnknown); 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 840468a0db..af0bf1e767 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 @@ -19,7 +19,7 @@ where P0: ::windows_core::IntoParam, { ::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); - PSCreateDelayedMultiplexPropertyStore(flags, pdpsf.into_param().abi(), ::core::mem::transmute(rgstoreids.as_ptr()), rgstoreids.len() as _, riid, ppv).ok() + PSCreateDelayedMultiplexPropertyStore(flags, pdpsf.into_param().abi(), ::core::mem::transmute(rgstoreids.as_ptr()), rgstoreids.len().try_into().unwrap(), riid, ppv).ok() } #[inline] pub unsafe fn PSCreateMemoryPropertyStore(riid: *const ::windows_core::GUID, ppv: *mut *mut ::core::ffi::c_void) -> ::windows_core::Result<()> { @@ -29,7 +29,7 @@ pub unsafe fn PSCreateMemoryPropertyStore(riid: *const ::windows_core::GUID, ppv #[inline] pub unsafe fn PSCreateMultiplexPropertyStore(prgpunkstores: &[::core::option::Option<::windows_core::IUnknown>], 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); - PSCreateMultiplexPropertyStore(::core::mem::transmute(prgpunkstores.as_ptr()), prgpunkstores.len() as _, riid, ppv).ok() + PSCreateMultiplexPropertyStore(::core::mem::transmute(prgpunkstores.as_ptr()), prgpunkstores.len().try_into().unwrap(), riid, ppv).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] @@ -73,7 +73,7 @@ pub unsafe fn PSEnumeratePropertyDescriptions(filteron: PROPDESC_ENUMFILTER, rii #[inline] pub unsafe fn PSFormatForDisplay(propkey: *const PROPERTYKEY, propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, pdfflags: PROPDESC_FORMAT_FLAGS, pwsztext: &mut [u16]) -> ::windows_core::Result<()> { ::windows_targets::link!("propsys.dll" "system" fn PSFormatForDisplay(propkey : *const PROPERTYKEY, propvar : *const super::super::super::System::Com::StructuredStorage:: PROPVARIANT, pdfflags : PROPDESC_FORMAT_FLAGS, pwsztext : ::windows_core::PWSTR, cchtext : u32) -> ::windows_core::HRESULT); - PSFormatForDisplay(propkey, propvar, pdfflags, ::core::mem::transmute(pwsztext.as_ptr()), pwsztext.len() as _).ok() + PSFormatForDisplay(propkey, propvar, pdfflags, ::core::mem::transmute(pwsztext.as_ptr()), pwsztext.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] @@ -359,7 +359,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("propsys.dll" "system" fn PSPropertyBag_ReadStr(propbag : * mut::core::ffi::c_void, propname : ::windows_core::PCWSTR, value : ::windows_core::PWSTR, charactercount : i32) -> ::windows_core::HRESULT); - PSPropertyBag_ReadStr(propbag.into_param().abi(), propname.into_param().abi(), ::core::mem::transmute(value.as_ptr()), value.len() as _).ok() + PSPropertyBag_ReadStr(propbag.into_param().abi(), propname.into_param().abi(), ::core::mem::transmute(value.as_ptr()), value.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_System_Com_StructuredStorage\"`"] #[cfg(feature = "Win32_System_Com_StructuredStorage")] @@ -624,7 +624,7 @@ where #[inline] pub unsafe fn PSStringFromPropertyKey(pkey: *const PROPERTYKEY, psz: &mut [u16]) -> ::windows_core::Result<()> { ::windows_targets::link!("propsys.dll" "system" fn PSStringFromPropertyKey(pkey : *const PROPERTYKEY, psz : ::windows_core::PWSTR, cch : u32) -> ::windows_core::HRESULT); - PSStringFromPropertyKey(pkey, ::core::mem::transmute(psz.as_ptr()), psz.len() as _).ok() + PSStringFromPropertyKey(pkey, ::core::mem::transmute(psz.as_ptr()), psz.len().try_into().unwrap()).ok() } #[inline] pub unsafe fn PSUnregisterPropertySchema(pszpath: P0) -> ::windows_core::Result<()> @@ -2159,7 +2159,7 @@ impl IPropertySystem { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn FormatForDisplay(&self, key: *const PROPERTYKEY, propvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, pdff: PROPDESC_FORMAT_FLAGS, psztext: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).FormatForDisplay)(::windows_core::Interface::as_raw(self), key, propvar, pdff, ::core::mem::transmute(psztext.as_ptr()), psztext.len() as _).ok() + (::windows_core::Interface::vtable(self).FormatForDisplay)(::windows_core::Interface::as_raw(self), key, propvar, pdff, ::core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] @@ -2242,13 +2242,13 @@ impl IPropertyUI { (::windows_core::Interface::vtable(self).ParsePropertyName)(::windows_core::Interface::as_raw(self), pszname.into_param().abi(), pfmtid, ppid, pcheaten).ok() } pub unsafe fn GetCannonicalName(&self, fmtid: *const ::windows_core::GUID, pid: u32, pwsztext: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetCannonicalName)(::windows_core::Interface::as_raw(self), fmtid, pid, ::core::mem::transmute(pwsztext.as_ptr()), pwsztext.len() as _).ok() + (::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() } pub unsafe fn GetDisplayName(&self, fmtid: *const ::windows_core::GUID, pid: u32, flags: PROPERTYUI_NAME_FLAGS, pwsztext: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDisplayName)(::windows_core::Interface::as_raw(self), fmtid, pid, flags, ::core::mem::transmute(pwsztext.as_ptr()), pwsztext.len() as _).ok() + (::windows_core::Interface::vtable(self).GetDisplayName)(::windows_core::Interface::as_raw(self), fmtid, pid, flags, ::core::mem::transmute(pwsztext.as_ptr()), pwsztext.len().try_into().unwrap()).ok() } pub unsafe fn GetPropertyDescription(&self, fmtid: *const ::windows_core::GUID, pid: u32, pwsztext: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPropertyDescription)(::windows_core::Interface::as_raw(self), fmtid, pid, ::core::mem::transmute(pwsztext.as_ptr()), pwsztext.len() as _).ok() + (::windows_core::Interface::vtable(self).GetPropertyDescription)(::windows_core::Interface::as_raw(self), fmtid, pid, ::core::mem::transmute(pwsztext.as_ptr()), pwsztext.len().try_into().unwrap()).ok() } pub unsafe fn GetDefaultWidth(&self, fmtid: *const ::windows_core::GUID, pid: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -2261,10 +2261,10 @@ impl IPropertyUI { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn FormatForDisplay(&self, fmtid: *const ::windows_core::GUID, pid: u32, ppropvar: *const super::super::super::System::Com::StructuredStorage::PROPVARIANT, puiff: PROPERTYUI_FORMAT_FLAGS, pwsztext: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).FormatForDisplay)(::windows_core::Interface::as_raw(self), fmtid, pid, ppropvar, puiff, ::core::mem::transmute(pwsztext.as_ptr()), pwsztext.len() as _).ok() + (::windows_core::Interface::vtable(self).FormatForDisplay)(::windows_core::Interface::as_raw(self), fmtid, pid, 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<()> { - (::windows_core::Interface::vtable(self).GetHelpInfo)(::windows_core::Interface::as_raw(self), fmtid, pid, ::core::mem::transmute(pwszhelpfile.as_ptr()), pwszhelpfile.len() as _, puhelpid).ok() + (::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).ok() } } ::windows_core::imp::interface_hierarchy!(IPropertyUI, ::windows_core::IUnknown); 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 1e5b1ef47b..bd07f6b457 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Shell/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Shell/mod.rs @@ -22,7 +22,7 @@ where { ::windows_targets::link!("shell32.dll" "system" fn AssocCreateForClasses(rgclasses : *const ASSOCIATIONELEMENT, cclasses : u32, riid : *const ::windows_core::GUID, ppv : *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT); let mut result__ = ::std::ptr::null_mut(); - AssocCreateForClasses(::core::mem::transmute(rgclasses.as_ptr()), rgclasses.len() as _, &::IID, &mut result__).from_abi(result__) + AssocCreateForClasses(::core::mem::transmute(rgclasses.as_ptr()), rgclasses.len().try_into().unwrap(), &::IID, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`, `\"Win32_UI_Shell_Common\"`, `\"Win32_UI_Shell_PropertiesSystem\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant", feature = "Win32_UI_Shell_Common", feature = "Win32_UI_Shell_PropertiesSystem"))] @@ -128,7 +128,7 @@ where { ::windows_targets::link!("shell32.dll" "system" fn CDefFolderMenu_Create2(pidlfolder : *const Common:: ITEMIDLIST, hwnd : super::super::Foundation:: HWND, cidl : u32, apidl : *const *const Common:: ITEMIDLIST, psf : * mut::core::ffi::c_void, pfn : LPFNDFMCALLBACK, nkeys : u32, ahkeys : *const super::super::System::Registry:: HKEY, ppcm : *mut * mut::core::ffi::c_void) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - CDefFolderMenu_Create2(::core::mem::transmute(pidlfolder.unwrap_or(::std::ptr::null())), hwnd.into_param().abi(), apidl.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(apidl.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), psf.into_param().abi(), pfn, ahkeys.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ahkeys.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), &mut result__).from_abi(result__) + CDefFolderMenu_Create2(::core::mem::transmute(pidlfolder.unwrap_or(::std::ptr::null())), hwnd.into_param().abi(), apidl.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(apidl.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), psf.into_param().abi(), pfn, ahkeys.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(ahkeys.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_System_Com\"`, `\"Win32_UI_Shell_Common\"`"] #[cfg(all(feature = "Win32_System_Com", feature = "Win32_UI_Shell_Common"))] @@ -136,7 +136,7 @@ where pub unsafe fn CIDLData_CreateFromIDArray(pidlfolder: *const Common::ITEMIDLIST, apidl: ::core::option::Option<&[*const Common::ITEMIDLIST]>) -> ::windows_core::Result { ::windows_targets::link!("shell32.dll" "system" fn CIDLData_CreateFromIDArray(pidlfolder : *const Common:: ITEMIDLIST, cidl : u32, apidl : *const *const Common:: ITEMIDLIST, ppdtobj : *mut * mut::core::ffi::c_void) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - CIDLData_CreateFromIDArray(pidlfolder, apidl.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(apidl.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), &mut result__).from_abi(result__) + CIDLData_CreateFromIDArray(pidlfolder, 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())), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -207,7 +207,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("userenv.dll" "system" fn CreateProfile(pszusersid : ::windows_core::PCWSTR, pszusername : ::windows_core::PCWSTR, pszprofilepath : ::windows_core::PWSTR, cchprofilepath : u32) -> ::windows_core::HRESULT); - CreateProfile(pszusersid.into_param().abi(), pszusername.into_param().abi(), ::core::mem::transmute(pszprofilepath.as_ptr()), pszprofilepath.len() as _).ok() + CreateProfile(pszusersid.into_param().abi(), pszusername.into_param().abi(), ::core::mem::transmute(pszprofilepath.as_ptr()), pszprofilepath.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -313,12 +313,12 @@ where #[inline] pub unsafe fn DoEnvironmentSubstA(pszsrc: &mut [u8]) -> u32 { ::windows_targets::link!("shell32.dll" "system" fn DoEnvironmentSubstA(pszsrc : ::windows_core::PSTR, cchsrc : u32) -> u32); - DoEnvironmentSubstA(::core::mem::transmute(pszsrc.as_ptr()), pszsrc.len() as _) + DoEnvironmentSubstA(::core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap()) } #[inline] pub unsafe fn DoEnvironmentSubstW(pszsrc: &mut [u16]) -> u32 { ::windows_targets::link!("shell32.dll" "system" fn DoEnvironmentSubstW(pszsrc : ::windows_core::PWSTR, cchsrc : u32) -> u32); - DoEnvironmentSubstW(::core::mem::transmute(pszsrc.as_ptr()), pszsrc.len() as _) + DoEnvironmentSubstW(::core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -345,7 +345,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("shell32.dll" "system" fn DragQueryFileA(hdrop : HDROP, ifile : u32, lpszfile : ::windows_core::PSTR, cch : u32) -> u32); - DragQueryFileA(hdrop.into_param().abi(), ifile, ::core::mem::transmute(lpszfile.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszfile.as_deref().map_or(0, |slice| slice.len() as _)) + DragQueryFileA(hdrop.into_param().abi(), ifile, ::core::mem::transmute(lpszfile.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszfile.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn DragQueryFileW(hdrop: P0, ifile: u32, lpszfile: ::core::option::Option<&mut [u16]>) -> u32 @@ -353,7 +353,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("shell32.dll" "system" fn DragQueryFileW(hdrop : HDROP, ifile : u32, lpszfile : ::windows_core::PWSTR, cch : u32) -> u32); - DragQueryFileW(hdrop.into_param().abi(), ifile, ::core::mem::transmute(lpszfile.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszfile.as_deref().map_or(0, |slice| slice.len() as _)) + DragQueryFileW(hdrop.into_param().abi(), ifile, ::core::mem::transmute(lpszfile.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszfile.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -546,7 +546,7 @@ where P4: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shell32.dll" "system" fn GetFileNameFromBrowse(hwnd : super::super::Foundation:: HWND, pszfilepath : ::windows_core::PWSTR, cchfilepath : u32, pszworkingdir : ::windows_core::PCWSTR, pszdefext : ::windows_core::PCWSTR, pszfilters : ::windows_core::PCWSTR, psztitle : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - GetFileNameFromBrowse(hwnd.into_param().abi(), ::core::mem::transmute(pszfilepath.as_ptr()), pszfilepath.len() as _, pszworkingdir.into_param().abi(), pszdefext.into_param().abi(), pszfilters.into_param().abi(), psztitle.into_param().abi()) + GetFileNameFromBrowse(hwnd.into_param().abi(), ::core::mem::transmute(pszfilepath.as_ptr()), pszfilepath.len().try_into().unwrap(), pszworkingdir.into_param().abi(), pszdefext.into_param().abi(), pszfilters.into_param().abi(), psztitle.into_param().abi()) } #[doc = "Required features: `\"Win32_UI_WindowsAndMessaging\"`"] #[cfg(feature = "Win32_UI_WindowsAndMessaging")] @@ -706,7 +706,7 @@ pub unsafe fn HMONITOR_UserUnmarshal64(param0: *const u32, param1: *const u8, pa #[inline] pub unsafe fn HashData(pbdata: &[u8], pbhash: &mut [u8]) -> ::windows_core::Result<()> { ::windows_targets::link!("shlwapi.dll" "system" fn HashData(pbdata : *const u8, cbdata : u32, pbhash : *mut u8, cbhash : u32) -> ::windows_core::HRESULT); - HashData(::core::mem::transmute(pbdata.as_ptr()), pbdata.len() as _, ::core::mem::transmute(pbhash.as_ptr()), pbhash.len() as _).ok() + HashData(::core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), ::core::mem::transmute(pbhash.as_ptr()), pbhash.len().try_into().unwrap()).ok() } #[inline] pub unsafe fn HlinkClone(pihl: P0, pihlsiteforclone: P1, dwsitedata: u32) -> ::windows_core::Result @@ -1579,12 +1579,12 @@ where #[inline] pub unsafe fn PathCchAddBackslash(pszpath: &mut [u16]) -> ::windows_core::Result<()> { ::windows_targets::link!("api-ms-win-core-path-l1-1-0.dll" "system" fn PathCchAddBackslash(pszpath : ::windows_core::PWSTR, cchpath : usize) -> ::windows_core::HRESULT); - PathCchAddBackslash(::core::mem::transmute(pszpath.as_ptr()), pszpath.len() as _).ok() + PathCchAddBackslash(::core::mem::transmute(pszpath.as_ptr()), pszpath.len().try_into().unwrap()).ok() } #[inline] pub unsafe fn PathCchAddBackslashEx(pszpath: &mut [u16], ppszend: ::core::option::Option<*mut ::windows_core::PWSTR>, pcchremaining: ::core::option::Option<*mut usize>) -> ::windows_core::Result<()> { ::windows_targets::link!("api-ms-win-core-path-l1-1-0.dll" "system" fn PathCchAddBackslashEx(pszpath : ::windows_core::PWSTR, cchpath : usize, ppszend : *mut ::windows_core::PWSTR, pcchremaining : *mut usize) -> ::windows_core::HRESULT); - PathCchAddBackslashEx(::core::mem::transmute(pszpath.as_ptr()), pszpath.len() as _, ::core::mem::transmute(ppszend.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcchremaining.unwrap_or(::std::ptr::null_mut()))).ok() + PathCchAddBackslashEx(::core::mem::transmute(pszpath.as_ptr()), pszpath.len().try_into().unwrap(), ::core::mem::transmute(ppszend.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcchremaining.unwrap_or(::std::ptr::null_mut()))).ok() } #[inline] pub unsafe fn PathCchAddExtension(pszpath: &mut [u16], pszext: P0) -> ::windows_core::Result<()> @@ -1592,7 +1592,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("api-ms-win-core-path-l1-1-0.dll" "system" fn PathCchAddExtension(pszpath : ::windows_core::PWSTR, cchpath : usize, pszext : ::windows_core::PCWSTR) -> ::windows_core::HRESULT); - PathCchAddExtension(::core::mem::transmute(pszpath.as_ptr()), pszpath.len() as _, pszext.into_param().abi()).ok() + PathCchAddExtension(::core::mem::transmute(pszpath.as_ptr()), pszpath.len().try_into().unwrap(), pszext.into_param().abi()).ok() } #[inline] pub unsafe fn PathCchAppend(pszpath: &mut [u16], pszmore: P0) -> ::windows_core::Result<()> @@ -1600,7 +1600,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("api-ms-win-core-path-l1-1-0.dll" "system" fn PathCchAppend(pszpath : ::windows_core::PWSTR, cchpath : usize, pszmore : ::windows_core::PCWSTR) -> ::windows_core::HRESULT); - PathCchAppend(::core::mem::transmute(pszpath.as_ptr()), pszpath.len() as _, pszmore.into_param().abi()).ok() + PathCchAppend(::core::mem::transmute(pszpath.as_ptr()), pszpath.len().try_into().unwrap(), pszmore.into_param().abi()).ok() } #[inline] pub unsafe fn PathCchAppendEx(pszpath: &mut [u16], pszmore: P0, dwflags: PATHCCH_OPTIONS) -> ::windows_core::Result<()> @@ -1608,7 +1608,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("api-ms-win-core-path-l1-1-0.dll" "system" fn PathCchAppendEx(pszpath : ::windows_core::PWSTR, cchpath : usize, pszmore : ::windows_core::PCWSTR, dwflags : PATHCCH_OPTIONS) -> ::windows_core::HRESULT); - PathCchAppendEx(::core::mem::transmute(pszpath.as_ptr()), pszpath.len() as _, pszmore.into_param().abi(), dwflags).ok() + PathCchAppendEx(::core::mem::transmute(pszpath.as_ptr()), pszpath.len().try_into().unwrap(), pszmore.into_param().abi(), dwflags).ok() } #[inline] pub unsafe fn PathCchCanonicalize(pszpathout: &mut [u16], pszpathin: P0) -> ::windows_core::Result<()> @@ -1616,7 +1616,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("api-ms-win-core-path-l1-1-0.dll" "system" fn PathCchCanonicalize(pszpathout : ::windows_core::PWSTR, cchpathout : usize, pszpathin : ::windows_core::PCWSTR) -> ::windows_core::HRESULT); - PathCchCanonicalize(::core::mem::transmute(pszpathout.as_ptr()), pszpathout.len() as _, pszpathin.into_param().abi()).ok() + PathCchCanonicalize(::core::mem::transmute(pszpathout.as_ptr()), pszpathout.len().try_into().unwrap(), pszpathin.into_param().abi()).ok() } #[inline] pub unsafe fn PathCchCanonicalizeEx(pszpathout: &mut [u16], pszpathin: P0, dwflags: PATHCCH_OPTIONS) -> ::windows_core::Result<()> @@ -1624,7 +1624,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("api-ms-win-core-path-l1-1-0.dll" "system" fn PathCchCanonicalizeEx(pszpathout : ::windows_core::PWSTR, cchpathout : usize, pszpathin : ::windows_core::PCWSTR, dwflags : PATHCCH_OPTIONS) -> ::windows_core::HRESULT); - PathCchCanonicalizeEx(::core::mem::transmute(pszpathout.as_ptr()), pszpathout.len() as _, pszpathin.into_param().abi(), dwflags).ok() + PathCchCanonicalizeEx(::core::mem::transmute(pszpathout.as_ptr()), pszpathout.len().try_into().unwrap(), pszpathin.into_param().abi(), dwflags).ok() } #[inline] pub unsafe fn PathCchCombine(pszpathout: &mut [u16], pszpathin: P0, pszmore: P1) -> ::windows_core::Result<()> @@ -1633,7 +1633,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("api-ms-win-core-path-l1-1-0.dll" "system" fn PathCchCombine(pszpathout : ::windows_core::PWSTR, cchpathout : usize, pszpathin : ::windows_core::PCWSTR, pszmore : ::windows_core::PCWSTR) -> ::windows_core::HRESULT); - PathCchCombine(::core::mem::transmute(pszpathout.as_ptr()), pszpathout.len() as _, pszpathin.into_param().abi(), pszmore.into_param().abi()).ok() + PathCchCombine(::core::mem::transmute(pszpathout.as_ptr()), pszpathout.len().try_into().unwrap(), pszpathin.into_param().abi(), pszmore.into_param().abi()).ok() } #[inline] pub unsafe fn PathCchCombineEx(pszpathout: &mut [u16], pszpathin: P0, pszmore: P1, dwflags: PATHCCH_OPTIONS) -> ::windows_core::Result<()> @@ -1642,7 +1642,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("api-ms-win-core-path-l1-1-0.dll" "system" fn PathCchCombineEx(pszpathout : ::windows_core::PWSTR, cchpathout : usize, pszpathin : ::windows_core::PCWSTR, pszmore : ::windows_core::PCWSTR, dwflags : PATHCCH_OPTIONS) -> ::windows_core::HRESULT); - PathCchCombineEx(::core::mem::transmute(pszpathout.as_ptr()), pszpathout.len() as _, pszpathin.into_param().abi(), pszmore.into_param().abi(), dwflags).ok() + PathCchCombineEx(::core::mem::transmute(pszpathout.as_ptr()), pszpathout.len().try_into().unwrap(), pszpathin.into_param().abi(), pszmore.into_param().abi(), dwflags).ok() } #[inline] pub unsafe fn PathCchFindExtension(pszpath: P0, cchpath: usize) -> ::windows_core::Result<::windows_core::PCWSTR> @@ -1666,7 +1666,7 @@ where #[inline] pub unsafe fn PathCchRemoveBackslash(pszpath: &mut [u16]) -> ::windows_core::Result<()> { ::windows_targets::link!("api-ms-win-core-path-l1-1-0.dll" "system" fn PathCchRemoveBackslash(pszpath : ::windows_core::PWSTR, cchpath : usize) -> ::windows_core::HRESULT); - PathCchRemoveBackslash(::core::mem::transmute(pszpath.as_ptr()), pszpath.len() as _).ok() + PathCchRemoveBackslash(::core::mem::transmute(pszpath.as_ptr()), pszpath.len().try_into().unwrap()).ok() } #[inline] pub unsafe fn PathCchRemoveBackslashEx(pszpath: ::windows_core::PWSTR, cchpath: usize, ppszend: ::core::option::Option<*mut ::windows_core::PWSTR>, pcchremaining: ::core::option::Option<*mut usize>) -> ::windows_core::Result<()> { @@ -1689,7 +1689,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("api-ms-win-core-path-l1-1-0.dll" "system" fn PathCchRenameExtension(pszpath : ::windows_core::PWSTR, cchpath : usize, pszext : ::windows_core::PCWSTR) -> ::windows_core::HRESULT); - PathCchRenameExtension(::core::mem::transmute(pszpath.as_ptr()), pszpath.len() as _, pszext.into_param().abi()).ok() + PathCchRenameExtension(::core::mem::transmute(pszpath.as_ptr()), pszpath.len().try_into().unwrap(), pszext.into_param().abi()).ok() } #[inline] pub unsafe fn PathCchSkipRoot(pszpath: P0) -> ::windows_core::Result<::windows_core::PCWSTR> @@ -1703,7 +1703,7 @@ where #[inline] pub unsafe fn PathCchStripPrefix(pszpath: &mut [u16]) -> ::windows_core::Result<()> { ::windows_targets::link!("api-ms-win-core-path-l1-1-0.dll" "system" fn PathCchStripPrefix(pszpath : ::windows_core::PWSTR, cchpath : usize) -> ::windows_core::HRESULT); - PathCchStripPrefix(::core::mem::transmute(pszpath.as_ptr()), pszpath.len() as _).ok() + PathCchStripPrefix(::core::mem::transmute(pszpath.as_ptr()), pszpath.len().try_into().unwrap()).ok() } #[inline] pub unsafe fn PathCchStripToRoot(pszpath: ::windows_core::PWSTR, cchpath: usize) -> ::windows_core::Result<()> { @@ -1772,7 +1772,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn PathCompactPathExA(pszout : ::windows_core::PSTR, pszsrc : ::windows_core::PCSTR, cchmax : u32, dwflags : u32) -> super::super::Foundation:: BOOL); - PathCompactPathExA(::core::mem::transmute(pszout.as_ptr()), pszsrc.into_param().abi(), pszout.len() as _, dwflags) + PathCompactPathExA(::core::mem::transmute(pszout.as_ptr()), pszsrc.into_param().abi(), pszout.len().try_into().unwrap(), dwflags) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1782,7 +1782,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn PathCompactPathExW(pszout : ::windows_core::PWSTR, pszsrc : ::windows_core::PCWSTR, cchmax : u32, dwflags : u32) -> super::super::Foundation:: BOOL); - PathCompactPathExW(::core::mem::transmute(pszout.as_ptr()), pszsrc.into_param().abi(), pszout.len() as _, dwflags) + PathCompactPathExW(::core::mem::transmute(pszout.as_ptr()), pszsrc.into_param().abi(), pszout.len().try_into().unwrap(), dwflags) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] @@ -1906,7 +1906,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn PathFindSuffixArrayA(pszpath : ::windows_core::PCSTR, apszsuffix : *const ::windows_core::PCSTR, iarraysize : i32) -> ::windows_core::PCSTR); - PathFindSuffixArrayA(pszpath.into_param().abi(), ::core::mem::transmute(apszsuffix.as_ptr()), apszsuffix.len() as _) + PathFindSuffixArrayA(pszpath.into_param().abi(), ::core::mem::transmute(apszsuffix.as_ptr()), apszsuffix.len().try_into().unwrap()) } #[inline] pub unsafe fn PathFindSuffixArrayW(pszpath: P0, apszsuffix: &[::windows_core::PCWSTR]) -> ::windows_core::PCWSTR @@ -1914,7 +1914,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn PathFindSuffixArrayW(pszpath : ::windows_core::PCWSTR, apszsuffix : *const ::windows_core::PCWSTR, iarraysize : i32) -> ::windows_core::PCWSTR); - PathFindSuffixArrayW(pszpath.into_param().abi(), ::core::mem::transmute(apszsuffix.as_ptr()), apszsuffix.len() as _) + PathFindSuffixArrayW(pszpath.into_param().abi(), ::core::mem::transmute(apszsuffix.as_ptr()), apszsuffix.len().try_into().unwrap()) } #[inline] pub unsafe fn PathGetArgsA(pszpath: P0) -> ::windows_core::PSTR @@ -2353,7 +2353,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shell32.dll" "system" fn PathMakeUniqueName(pszuniquename : ::windows_core::PWSTR, cchmax : u32, psztemplate : ::windows_core::PCWSTR, pszlongplate : ::windows_core::PCWSTR, pszdir : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - PathMakeUniqueName(::core::mem::transmute(pszuniquename.as_ptr()), pszuniquename.len() as _, psztemplate.into_param().abi(), pszlongplate.into_param().abi(), pszdir.into_param().abi()) + PathMakeUniqueName(::core::mem::transmute(pszuniquename.as_ptr()), pszuniquename.len().try_into().unwrap(), psztemplate.into_param().abi(), pszlongplate.into_param().abi(), pszdir.into_param().abi()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2533,7 +2533,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn PathSearchAndQualifyA(pszpath : ::windows_core::PCSTR, pszbuf : ::windows_core::PSTR, cchbuf : u32) -> super::super::Foundation:: BOOL); - PathSearchAndQualifyA(pszpath.into_param().abi(), ::core::mem::transmute(pszbuf.as_ptr()), pszbuf.len() as _) + PathSearchAndQualifyA(pszpath.into_param().abi(), ::core::mem::transmute(pszbuf.as_ptr()), pszbuf.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2543,7 +2543,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn PathSearchAndQualifyW(pszpath : ::windows_core::PCWSTR, pszbuf : ::windows_core::PWSTR, cchbuf : u32) -> super::super::Foundation:: BOOL); - PathSearchAndQualifyW(pszpath.into_param().abi(), ::core::mem::transmute(pszbuf.as_ptr()), pszbuf.len() as _) + PathSearchAndQualifyW(pszpath.into_param().abi(), ::core::mem::transmute(pszbuf.as_ptr()), pszbuf.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2615,7 +2615,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn PathUnExpandEnvStringsA(pszpath : ::windows_core::PCSTR, pszbuf : ::windows_core::PSTR, cchbuf : u32) -> super::super::Foundation:: BOOL); - PathUnExpandEnvStringsA(pszpath.into_param().abi(), ::core::mem::transmute(pszbuf.as_ptr()), pszbuf.len() as _) + PathUnExpandEnvStringsA(pszpath.into_param().abi(), ::core::mem::transmute(pszbuf.as_ptr()), pszbuf.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2625,7 +2625,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn PathUnExpandEnvStringsW(pszpath : ::windows_core::PCWSTR, pszbuf : ::windows_core::PWSTR, cchbuf : u32) -> super::super::Foundation:: BOOL); - PathUnExpandEnvStringsW(pszpath.into_param().abi(), ::core::mem::transmute(pszbuf.as_ptr()), pszbuf.len() as _) + PathUnExpandEnvStringsW(pszpath.into_param().abi(), ::core::mem::transmute(pszbuf.as_ptr()), pszbuf.len().try_into().unwrap()) } #[inline] pub unsafe fn PathUndecorateA(pszpath: ::windows_core::PSTR) { @@ -2691,7 +2691,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("shell32.dll" "system" fn PickIconDlg(hwnd : super::super::Foundation:: HWND, psziconpath : ::windows_core::PWSTR, cchiconpath : u32, piiconindex : *mut i32) -> i32); - PickIconDlg(hwnd.into_param().abi(), ::core::mem::transmute(psziconpath.as_ptr()), psziconpath.len() as _, ::core::mem::transmute(piiconindex.unwrap_or(::std::ptr::null_mut()))) + PickIconDlg(hwnd.into_param().abi(), ::core::mem::transmute(psziconpath.as_ptr()), psziconpath.len().try_into().unwrap(), ::core::mem::transmute(piiconindex.unwrap_or(::std::ptr::null_mut()))) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com_StructuredStorage\"`, `\"Win32_System_Variant\"`, `\"Win32_UI_Shell_Common\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant", feature = "Win32_UI_Shell_Common"))] @@ -2833,7 +2833,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn SHAnsiToAnsi(pszsrc : ::windows_core::PCSTR, pszdst : ::windows_core::PSTR, cchbuf : i32) -> i32); - SHAnsiToAnsi(pszsrc.into_param().abi(), ::core::mem::transmute(pszdst.as_ptr()), pszdst.len() as _) + SHAnsiToAnsi(pszsrc.into_param().abi(), ::core::mem::transmute(pszdst.as_ptr()), pszdst.len().try_into().unwrap()) } #[inline] pub unsafe fn SHAnsiToUnicode(pszsrc: P0, pwszdst: &mut [u16]) -> i32 @@ -2841,7 +2841,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn SHAnsiToUnicode(pszsrc : ::windows_core::PCSTR, pwszdst : ::windows_core::PWSTR, cwchbuf : i32) -> i32); - SHAnsiToUnicode(pszsrc.into_param().abi(), ::core::mem::transmute(pwszdst.as_ptr()), pwszdst.len() as _) + SHAnsiToUnicode(pszsrc.into_param().abi(), ::core::mem::transmute(pwszdst.as_ptr()), pwszdst.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3063,7 +3063,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__ = ::std::ptr::null_mut(); - SHCreateDataObject(::core::mem::transmute(pidlfolder.unwrap_or(::std::ptr::null())), apidl.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(apidl.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdtinner.into_param().abi(), &::IID, &mut result__).from_abi(result__) + SHCreateDataObject(::core::mem::transmute(pidlfolder.unwrap_or(::std::ptr::null())), apidl.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(apidl.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdtinner.into_param().abi(), &::IID, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`, `\"Win32_UI_Shell_Common\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry", feature = "Win32_UI_Shell_Common"))] @@ -3202,7 +3202,7 @@ where #[inline] pub unsafe fn SHCreateMemStream(pinit: ::core::option::Option<&[u8]>) -> ::core::option::Option { ::windows_targets::link!("shlwapi.dll" "system" fn SHCreateMemStream(pinit : *const u8, cbinit : u32) -> ::core::option::Option < super::super::System::Com:: IStream >); - SHCreateMemStream(::core::mem::transmute(pinit.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pinit.as_deref().map_or(0, |slice| slice.len() as _)) + SHCreateMemStream(::core::mem::transmute(pinit.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pinit.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Security\"`, `\"Win32_System_Threading\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security", feature = "Win32_System_Threading"))] @@ -3266,7 +3266,7 @@ where { ::windows_targets::link!("shell32.dll" "system" fn SHCreateShellItemArray(pidlparent : *const Common:: ITEMIDLIST, psf : * mut::core::ffi::c_void, cidl : u32, ppidl : *const *const Common:: ITEMIDLIST, ppsiitemarray : *mut * mut::core::ffi::c_void) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - SHCreateShellItemArray(::core::mem::transmute(pidlparent.unwrap_or(::std::ptr::null())), psf.into_param().abi(), ppidl.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(ppidl.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), &mut result__).from_abi(result__) + SHCreateShellItemArray(::core::mem::transmute(pidlparent.unwrap_or(::std::ptr::null())), psf.into_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__).from_abi(result__) } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -3286,7 +3286,7 @@ where pub unsafe fn SHCreateShellItemArrayFromIDLists(rgpidl: &[*const Common::ITEMIDLIST]) -> ::windows_core::Result { ::windows_targets::link!("shell32.dll" "system" fn SHCreateShellItemArrayFromIDLists(cidl : u32, rgpidl : *const *const Common:: ITEMIDLIST, ppsiitemarray : *mut * mut::core::ffi::c_void) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - SHCreateShellItemArrayFromIDLists(rgpidl.len() as _, ::core::mem::transmute(rgpidl.as_ptr()), &mut result__).from_abi(result__) + SHCreateShellItemArrayFromIDLists(rgpidl.len().try_into().unwrap(), ::core::mem::transmute(rgpidl.as_ptr()), &mut result__).from_abi(result__) } #[inline] pub unsafe fn SHCreateShellItemArrayFromShellItem(psi: P0) -> ::windows_core::Result @@ -3314,7 +3314,7 @@ where pub unsafe fn SHCreateStdEnumFmtEtc(afmt: &[super::super::System::Com::FORMATETC]) -> ::windows_core::Result { ::windows_targets::link!("shell32.dll" "system" fn SHCreateStdEnumFmtEtc(cfmt : u32, afmt : *const super::super::System::Com:: FORMATETC, ppenumformatetc : *mut * mut::core::ffi::c_void) -> ::windows_core::HRESULT); let mut result__ = ::std::mem::zeroed(); - SHCreateStdEnumFmtEtc(afmt.len() as _, ::core::mem::transmute(afmt.as_ptr()), &mut result__).from_abi(result__) + SHCreateStdEnumFmtEtc(afmt.len().try_into().unwrap(), ::core::mem::transmute(afmt.as_ptr()), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -3549,7 +3549,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("shell32.dll" "system" fn SHEnumerateUnreadMailAccountsW(hkeyuser : super::super::System::Registry:: HKEY, dwindex : u32, pszmailaddress : ::windows_core::PWSTR, cchmailaddress : i32) -> ::windows_core::HRESULT); - SHEnumerateUnreadMailAccountsW(hkeyuser.into_param().abi(), dwindex, ::core::mem::transmute(pszmailaddress.as_ptr()), pszmailaddress.len() as _).ok() + SHEnumerateUnreadMailAccountsW(hkeyuser.into_param().abi(), 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: ::core::option::Option<*mut ::windows_core::PWSTR>, ppszparameters: ::core::option::Option<*mut ::windows_core::PWSTR>) -> ::windows_core::Result<()> @@ -3601,14 +3601,14 @@ pub unsafe fn SHFlushSFCache() { #[inline] pub unsafe fn SHFormatDateTimeA(pft: *const super::super::Foundation::FILETIME, pdwflags: ::core::option::Option<*mut u32>, pszbuf: &mut [u8]) -> i32 { ::windows_targets::link!("shlwapi.dll" "system" fn SHFormatDateTimeA(pft : *const super::super::Foundation:: FILETIME, pdwflags : *mut u32, pszbuf : ::windows_core::PSTR, cchbuf : u32) -> i32); - SHFormatDateTimeA(pft, ::core::mem::transmute(pdwflags.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pszbuf.as_ptr()), pszbuf.len() as _) + SHFormatDateTimeA(pft, ::core::mem::transmute(pdwflags.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pszbuf.as_ptr()), pszbuf.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn SHFormatDateTimeW(pft: *const super::super::Foundation::FILETIME, pdwflags: ::core::option::Option<*mut u32>, pszbuf: &mut [u16]) -> i32 { ::windows_targets::link!("shlwapi.dll" "system" fn SHFormatDateTimeW(pft : *const super::super::Foundation:: FILETIME, pdwflags : *mut u32, pszbuf : ::windows_core::PWSTR, cchbuf : u32) -> i32); - SHFormatDateTimeW(pft, ::core::mem::transmute(pdwflags.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pszbuf.as_ptr()), pszbuf.len() as _) + SHFormatDateTimeW(pft, ::core::mem::transmute(pdwflags.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pszbuf.as_ptr()), pszbuf.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3833,7 +3833,7 @@ pub unsafe fn SHGetInstanceExplorer() -> ::windows_core::Result<::windows_core:: #[inline] pub unsafe fn SHGetInverseCMAP(pbmap: &mut [u8]) -> ::windows_core::Result<()> { ::windows_targets::link!("shlwapi.dll" "system" fn SHGetInverseCMAP(pbmap : *mut u8, cbmap : u32) -> ::windows_core::HRESULT); - SHGetInverseCMAP(::core::mem::transmute(pbmap.as_ptr()), pbmap.len() as _).ok() + SHGetInverseCMAP(::core::mem::transmute(pbmap.as_ptr()), pbmap.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -3897,7 +3897,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shell32.dll" "system" fn SHGetLocalizedName(pszpath : ::windows_core::PCWSTR, pszresmodule : ::windows_core::PWSTR, cch : u32, pidsres : *mut i32) -> ::windows_core::HRESULT); - SHGetLocalizedName(pszpath.into_param().abi(), ::core::mem::transmute(pszresmodule.as_ptr()), pszresmodule.len() as _, pidsres).ok() + SHGetLocalizedName(pszpath.into_param().abi(), ::core::mem::transmute(pszresmodule.as_ptr()), pszresmodule.len().try_into().unwrap(), pidsres).ok() } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -3949,7 +3949,7 @@ pub unsafe fn SHGetPathFromIDListA(pidl: *const Common::ITEMIDLIST, pszpath: &mu #[inline] pub unsafe fn SHGetPathFromIDListEx(pidl: *const Common::ITEMIDLIST, pszpath: &mut [u16], uopts: GPFIDL_FLAGS) -> super::super::Foundation::BOOL { ::windows_targets::link!("shell32.dll" "system" fn SHGetPathFromIDListEx(pidl : *const Common:: ITEMIDLIST, pszpath : ::windows_core::PWSTR, cchpath : u32, uopts : GPFIDL_FLAGS) -> super::super::Foundation:: BOOL); - SHGetPathFromIDListEx(pidl, ::core::mem::transmute(pszpath.as_ptr()), pszpath.len() as _, uopts) + SHGetPathFromIDListEx(pidl, ::core::mem::transmute(pszpath.as_ptr()), pszpath.len().try_into().unwrap(), uopts) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_UI_Shell_Common\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell_Common"))] @@ -4058,7 +4058,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shell32.dll" "system" fn SHGetUnreadMailCountW(hkeyuser : super::super::System::Registry:: HKEY, pszmailaddress : ::windows_core::PCWSTR, pdwcount : *mut u32, pfiletime : *mut super::super::Foundation:: FILETIME, pszshellexecutecommand : ::windows_core::PWSTR, cchshellexecutecommand : i32) -> ::windows_core::HRESULT); - SHGetUnreadMailCountW(hkeyuser.into_param().abi(), pszmailaddress.into_param().abi(), ::core::mem::transmute(pdwcount.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pfiletime.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pszshellexecutecommand.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszshellexecutecommand.as_deref().map_or(0, |slice| slice.len() as _)).ok() + SHGetUnreadMailCountW(hkeyuser.into_param().abi(), pszmailaddress.into_param().abi(), ::core::mem::transmute(pdwcount.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pfiletime.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pszshellexecutecommand.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszshellexecutecommand.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] @@ -4191,7 +4191,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn SHLoadIndirectString(pszsource : ::windows_core::PCWSTR, pszoutbuf : ::windows_core::PWSTR, cchoutbuf : u32, ppvreserved : *const *const ::core::ffi::c_void) -> ::windows_core::HRESULT); - SHLoadIndirectString(pszsource.into_param().abi(), ::core::mem::transmute(pszoutbuf.as_ptr()), pszoutbuf.len() as _, ::core::mem::transmute(ppvreserved.unwrap_or(::std::ptr::null()))).ok() + SHLoadIndirectString(pszsource.into_param().abi(), ::core::mem::transmute(pszoutbuf.as_ptr()), pszoutbuf.len().try_into().unwrap(), ::core::mem::transmute(ppvreserved.unwrap_or(::std::ptr::null()))).ok() } #[inline] pub unsafe fn SHLoadNonloadedIconOverlayIdentifiers() -> ::windows_core::Result<()> { @@ -4271,7 +4271,7 @@ where #[inline] pub unsafe fn SHOpenFolderAndSelectItems(pidlfolder: *const Common::ITEMIDLIST, apidl: ::core::option::Option<&[*const Common::ITEMIDLIST]>, dwflags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("shell32.dll" "system" fn SHOpenFolderAndSelectItems(pidlfolder : *const Common:: ITEMIDLIST, cidl : u32, apidl : *const *const Common:: ITEMIDLIST, dwflags : u32) -> ::windows_core::HRESULT); - SHOpenFolderAndSelectItems(pidlfolder, apidl.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(apidl.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dwflags).ok() + SHOpenFolderAndSelectItems(pidlfolder, 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())), dwflags).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Registry\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Registry"))] @@ -4284,7 +4284,7 @@ where P3: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shell32.dll" "system" fn SHOpenPropSheetW(pszcaption : ::windows_core::PCWSTR, ahkeys : *const super::super::System::Registry:: HKEY, ckeys : u32, pclsiddefault : *const ::windows_core::GUID, pdtobj : * mut::core::ffi::c_void, psb : * mut::core::ffi::c_void, pstartpage : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - SHOpenPropSheetW(pszcaption.into_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() as _), ::core::mem::transmute(pclsiddefault.unwrap_or(::std::ptr::null())), pdtobj.into_param().abi(), psb.into_param().abi(), pstartpage.into_param().abi()) + SHOpenPropSheetW(pszcaption.into_param().abi(), ::core::mem::transmute(ahkeys.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ahkeys.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pclsiddefault.unwrap_or(::std::ptr::null())), pdtobj.into_param().abi(), psb.into_param().abi(), pstartpage.into_param().abi()) } #[doc = "Required features: `\"Win32_System_Com\"`, `\"Win32_System_Registry\"`"] #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Registry"))] @@ -5065,7 +5065,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn SHUnicodeToAnsi(pwszsrc : ::windows_core::PCWSTR, pszdst : ::windows_core::PSTR, cchbuf : i32) -> i32); - SHUnicodeToAnsi(pwszsrc.into_param().abi(), ::core::mem::transmute(pszdst.as_ptr()), pszdst.len() as _) + SHUnicodeToAnsi(pwszsrc.into_param().abi(), ::core::mem::transmute(pszdst.as_ptr()), pszdst.len().try_into().unwrap()) } #[inline] pub unsafe fn SHUnicodeToUnicode(pwzsrc: P0, pwzdst: &mut [u16]) -> i32 @@ -5073,7 +5073,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn SHUnicodeToUnicode(pwzsrc : ::windows_core::PCWSTR, pwzdst : ::windows_core::PWSTR, cwchbuf : i32) -> i32); - SHUnicodeToUnicode(pwzsrc.into_param().abi(), ::core::mem::transmute(pwzdst.as_ptr()), pwzdst.len() as _) + SHUnicodeToUnicode(pwzsrc.into_param().abi(), ::core::mem::transmute(pwzdst.as_ptr()), pwzdst.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -5377,7 +5377,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn StrCatBuffA(pszdest : ::windows_core::PSTR, pszsrc : ::windows_core::PCSTR, cchdestbuffsize : i32) -> ::windows_core::PSTR); - StrCatBuffA(::core::mem::transmute(pszdest.as_ptr()), pszsrc.into_param().abi(), pszdest.len() as _) + StrCatBuffA(::core::mem::transmute(pszdest.as_ptr()), pszsrc.into_param().abi(), pszdest.len().try_into().unwrap()) } #[inline] pub unsafe fn StrCatBuffW(pszdest: &mut [u16], pszsrc: P0) -> ::windows_core::PWSTR @@ -5385,7 +5385,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn StrCatBuffW(pszdest : ::windows_core::PWSTR, pszsrc : ::windows_core::PCWSTR, cchdestbuffsize : i32) -> ::windows_core::PWSTR); - StrCatBuffW(::core::mem::transmute(pszdest.as_ptr()), pszsrc.into_param().abi(), pszdest.len() as _) + StrCatBuffW(::core::mem::transmute(pszdest.as_ptr()), pszsrc.into_param().abi(), pszdest.len().try_into().unwrap()) } #[inline] pub unsafe fn StrCatChainW(pszdst: &mut [u16], ichat: u32, pszsrc: P0) -> u32 @@ -5393,7 +5393,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn StrCatChainW(pszdst : ::windows_core::PWSTR, cchdst : u32, ichat : u32, pszsrc : ::windows_core::PCWSTR) -> u32); - StrCatChainW(::core::mem::transmute(pszdst.as_ptr()), pszdst.len() as _, ichat, pszsrc.into_param().abi()) + StrCatChainW(::core::mem::transmute(pszdst.as_ptr()), pszdst.len().try_into().unwrap(), ichat, pszsrc.into_param().abi()) } #[inline] pub unsafe fn StrCatW(psz1: ::windows_core::PWSTR, psz2: P0) -> ::windows_core::PWSTR @@ -5592,7 +5592,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn StrCpyNW(pszdst : ::windows_core::PWSTR, pszsrc : ::windows_core::PCWSTR, cchmax : i32) -> ::windows_core::PWSTR); - StrCpyNW(::core::mem::transmute(pszdst.as_ptr()), pszsrc.into_param().abi(), pszdst.len() as _) + StrCpyNW(::core::mem::transmute(pszdst.as_ptr()), pszsrc.into_param().abi(), pszdst.len().try_into().unwrap()) } #[inline] pub unsafe fn StrCpyW(psz1: ::windows_core::PWSTR, psz2: P0) -> ::windows_core::PWSTR @@ -5621,42 +5621,42 @@ where #[inline] pub unsafe fn StrFormatByteSize64A(qdw: i64, pszbuf: &mut [u8]) -> ::windows_core::PSTR { ::windows_targets::link!("shlwapi.dll" "system" fn StrFormatByteSize64A(qdw : i64, pszbuf : ::windows_core::PSTR, cchbuf : u32) -> ::windows_core::PSTR); - StrFormatByteSize64A(qdw, ::core::mem::transmute(pszbuf.as_ptr()), pszbuf.len() as _) + StrFormatByteSize64A(qdw, ::core::mem::transmute(pszbuf.as_ptr()), pszbuf.len().try_into().unwrap()) } #[inline] pub unsafe fn StrFormatByteSizeA(dw: u32, pszbuf: &mut [u8]) -> ::windows_core::PSTR { ::windows_targets::link!("shlwapi.dll" "system" fn StrFormatByteSizeA(dw : u32, pszbuf : ::windows_core::PSTR, cchbuf : u32) -> ::windows_core::PSTR); - StrFormatByteSizeA(dw, ::core::mem::transmute(pszbuf.as_ptr()), pszbuf.len() as _) + StrFormatByteSizeA(dw, ::core::mem::transmute(pszbuf.as_ptr()), pszbuf.len().try_into().unwrap()) } #[inline] pub unsafe fn StrFormatByteSizeEx(ull: u64, flags: SFBS_FLAGS, pszbuf: &mut [u16]) -> ::windows_core::Result<()> { ::windows_targets::link!("shlwapi.dll" "system" fn StrFormatByteSizeEx(ull : u64, flags : SFBS_FLAGS, pszbuf : ::windows_core::PWSTR, cchbuf : u32) -> ::windows_core::HRESULT); - StrFormatByteSizeEx(ull, flags, ::core::mem::transmute(pszbuf.as_ptr()), pszbuf.len() as _).ok() + StrFormatByteSizeEx(ull, flags, ::core::mem::transmute(pszbuf.as_ptr()), pszbuf.len().try_into().unwrap()).ok() } #[inline] pub unsafe fn StrFormatByteSizeW(qdw: i64, pszbuf: &mut [u16]) -> ::windows_core::PWSTR { ::windows_targets::link!("shlwapi.dll" "system" fn StrFormatByteSizeW(qdw : i64, pszbuf : ::windows_core::PWSTR, cchbuf : u32) -> ::windows_core::PWSTR); - StrFormatByteSizeW(qdw, ::core::mem::transmute(pszbuf.as_ptr()), pszbuf.len() as _) + StrFormatByteSizeW(qdw, ::core::mem::transmute(pszbuf.as_ptr()), pszbuf.len().try_into().unwrap()) } #[inline] pub unsafe fn StrFormatKBSizeA(qdw: i64, pszbuf: &mut [u8]) -> ::windows_core::PSTR { ::windows_targets::link!("shlwapi.dll" "system" fn StrFormatKBSizeA(qdw : i64, pszbuf : ::windows_core::PSTR, cchbuf : u32) -> ::windows_core::PSTR); - StrFormatKBSizeA(qdw, ::core::mem::transmute(pszbuf.as_ptr()), pszbuf.len() as _) + StrFormatKBSizeA(qdw, ::core::mem::transmute(pszbuf.as_ptr()), pszbuf.len().try_into().unwrap()) } #[inline] pub unsafe fn StrFormatKBSizeW(qdw: i64, pszbuf: &mut [u16]) -> ::windows_core::PWSTR { ::windows_targets::link!("shlwapi.dll" "system" fn StrFormatKBSizeW(qdw : i64, pszbuf : ::windows_core::PWSTR, cchbuf : u32) -> ::windows_core::PWSTR); - StrFormatKBSizeW(qdw, ::core::mem::transmute(pszbuf.as_ptr()), pszbuf.len() as _) + StrFormatKBSizeW(qdw, ::core::mem::transmute(pszbuf.as_ptr()), pszbuf.len().try_into().unwrap()) } #[inline] pub unsafe fn StrFromTimeIntervalA(pszout: &mut [u8], dwtimems: u32, digits: i32) -> i32 { ::windows_targets::link!("shlwapi.dll" "system" fn StrFromTimeIntervalA(pszout : ::windows_core::PSTR, cchmax : u32, dwtimems : u32, digits : i32) -> i32); - StrFromTimeIntervalA(::core::mem::transmute(pszout.as_ptr()), pszout.len() as _, dwtimems, digits) + StrFromTimeIntervalA(::core::mem::transmute(pszout.as_ptr()), pszout.len().try_into().unwrap(), dwtimems, digits) } #[inline] pub unsafe fn StrFromTimeIntervalW(pszout: &mut [u16], dwtimems: u32, digits: i32) -> i32 { ::windows_targets::link!("shlwapi.dll" "system" fn StrFromTimeIntervalW(pszout : ::windows_core::PWSTR, cchmax : u32, dwtimems : u32, digits : i32) -> i32); - StrFromTimeIntervalW(::core::mem::transmute(pszout.as_ptr()), pszout.len() as _, dwtimems, digits) + StrFromTimeIntervalW(::core::mem::transmute(pszout.as_ptr()), pszout.len().try_into().unwrap(), dwtimems, digits) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -5688,7 +5688,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn StrNCatA(psz1 : ::windows_core::PSTR, psz2 : ::windows_core::PCSTR, cchmax : i32) -> ::windows_core::PSTR); - StrNCatA(::core::mem::transmute(psz1.as_ptr()), psz2.into_param().abi(), psz1.len() as _) + StrNCatA(::core::mem::transmute(psz1.as_ptr()), psz2.into_param().abi(), psz1.len().try_into().unwrap()) } #[inline] pub unsafe fn StrNCatW(psz1: &mut [u16], psz2: P0) -> ::windows_core::PWSTR @@ -5696,7 +5696,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn StrNCatW(psz1 : ::windows_core::PWSTR, psz2 : ::windows_core::PCWSTR, cchmax : i32) -> ::windows_core::PWSTR); - StrNCatW(::core::mem::transmute(psz1.as_ptr()), psz2.into_param().abi(), psz1.len() as _) + StrNCatW(::core::mem::transmute(psz1.as_ptr()), psz2.into_param().abi(), psz1.len().try_into().unwrap()) } #[inline] pub unsafe fn StrPBrkA(psz: P0, pszset: P1) -> ::windows_core::PSTR @@ -5784,14 +5784,14 @@ pub unsafe fn StrRetToBSTR(pstr: *mut Common::STRRET, pidl: ::core::option::Opti #[inline] pub unsafe fn StrRetToBufA(pstr: *mut Common::STRRET, pidl: ::core::option::Option<*const Common::ITEMIDLIST>, pszbuf: &mut [u8]) -> ::windows_core::Result<()> { ::windows_targets::link!("shlwapi.dll" "system" fn StrRetToBufA(pstr : *mut Common:: STRRET, pidl : *const Common:: ITEMIDLIST, pszbuf : ::windows_core::PSTR, cchbuf : u32) -> ::windows_core::HRESULT); - StrRetToBufA(pstr, ::core::mem::transmute(pidl.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pszbuf.as_ptr()), pszbuf.len() as _).ok() + StrRetToBufA(pstr, ::core::mem::transmute(pidl.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pszbuf.as_ptr()), pszbuf.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_UI_Shell_Common\"`"] #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] pub unsafe fn StrRetToBufW(pstr: *mut Common::STRRET, pidl: ::core::option::Option<*const Common::ITEMIDLIST>, pszbuf: &mut [u16]) -> ::windows_core::Result<()> { ::windows_targets::link!("shlwapi.dll" "system" fn StrRetToBufW(pstr : *mut Common:: STRRET, pidl : *const Common:: ITEMIDLIST, pszbuf : ::windows_core::PWSTR, cchbuf : u32) -> ::windows_core::HRESULT); - StrRetToBufW(pstr, ::core::mem::transmute(pidl.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pszbuf.as_ptr()), pszbuf.len() as _).ok() + StrRetToBufW(pstr, ::core::mem::transmute(pidl.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pszbuf.as_ptr()), pszbuf.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_UI_Shell_Common\"`"] #[cfg(feature = "Win32_UI_Shell_Common")] @@ -6099,7 +6099,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn UrlFixupW(pcszurl : ::windows_core::PCWSTR, psztranslatedurl : ::windows_core::PWSTR, cchmax : u32) -> ::windows_core::HRESULT); - UrlFixupW(pcszurl.into_param().abi(), ::core::mem::transmute(psztranslatedurl.as_ptr()), psztranslatedurl.len() as _).ok() + UrlFixupW(pcszurl.into_param().abi(), ::core::mem::transmute(psztranslatedurl.as_ptr()), psztranslatedurl.len().try_into().unwrap()).ok() } #[inline] pub unsafe fn UrlGetLocationA(pszurl: P0) -> ::windows_core::PCSTR @@ -6139,7 +6139,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn UrlHashA(pszurl : ::windows_core::PCSTR, pbhash : *mut u8, cbhash : u32) -> ::windows_core::HRESULT); - UrlHashA(pszurl.into_param().abi(), ::core::mem::transmute(pbhash.as_ptr()), pbhash.len() as _).ok() + UrlHashA(pszurl.into_param().abi(), ::core::mem::transmute(pbhash.as_ptr()), pbhash.len().try_into().unwrap()).ok() } #[inline] pub unsafe fn UrlHashW(pszurl: P0, pbhash: &mut [u8]) -> ::windows_core::Result<()> @@ -6147,7 +6147,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn UrlHashW(pszurl : ::windows_core::PCWSTR, pbhash : *mut u8, cbhash : u32) -> ::windows_core::HRESULT); - UrlHashW(pszurl.into_param().abi(), ::core::mem::transmute(pbhash.as_ptr()), pbhash.len() as _).ok() + UrlHashW(pszurl.into_param().abi(), ::core::mem::transmute(pbhash.as_ptr()), pbhash.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -6276,7 +6276,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("shlwapi.dll" "cdecl" fn wnsprintfA(pszdest : ::windows_core::PSTR, cchdest : i32, pszfmt : ::windows_core::PCSTR) -> i32); - wnsprintfA(::core::mem::transmute(pszdest.as_ptr()), pszdest.len() as _, pszfmt.into_param().abi()) + wnsprintfA(::core::mem::transmute(pszdest.as_ptr()), pszdest.len().try_into().unwrap(), pszfmt.into_param().abi()) } #[inline] pub unsafe fn wnsprintfW(pszdest: &mut [u16], pszfmt: P0) -> i32 @@ -6284,7 +6284,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shlwapi.dll" "cdecl" fn wnsprintfW(pszdest : ::windows_core::PWSTR, cchdest : i32, pszfmt : ::windows_core::PCWSTR) -> i32); - wnsprintfW(::core::mem::transmute(pszdest.as_ptr()), pszdest.len() as _, pszfmt.into_param().abi()) + wnsprintfW(::core::mem::transmute(pszdest.as_ptr()), pszdest.len().try_into().unwrap(), pszfmt.into_param().abi()) } #[inline] pub unsafe fn wvnsprintfA(pszdest: &mut [u8], pszfmt: P0, arglist: *const i8) -> i32 @@ -6292,7 +6292,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn wvnsprintfA(pszdest : ::windows_core::PSTR, cchdest : i32, pszfmt : ::windows_core::PCSTR, arglist : *const i8) -> i32); - wvnsprintfA(::core::mem::transmute(pszdest.as_ptr()), pszdest.len() as _, pszfmt.into_param().abi(), arglist) + wvnsprintfA(::core::mem::transmute(pszdest.as_ptr()), pszdest.len().try_into().unwrap(), pszfmt.into_param().abi(), arglist) } #[inline] pub unsafe fn wvnsprintfW(pszdest: &mut [u16], pszfmt: P0, arglist: *const i8) -> i32 @@ -6300,7 +6300,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn wvnsprintfW(pszdest : ::windows_core::PWSTR, cchdest : i32, pszfmt : ::windows_core::PCWSTR, arglist : *const i8) -> i32); - wvnsprintfW(::core::mem::transmute(pszdest.as_ptr()), pszdest.len() as _, pszfmt.into_param().abi(), arglist) + wvnsprintfW(::core::mem::transmute(pszdest.as_ptr()), pszdest.len().try_into().unwrap(), pszfmt.into_param().abi(), arglist) } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -8674,7 +8674,7 @@ impl IBandSite { #[doc = "Required features: `\"Win32_System_Ole\"`"] #[cfg(feature = "Win32_System_Ole")] pub unsafe fn QueryBand(&self, dwbandid: u32, ppstb: ::core::option::Option<*mut ::core::option::Option>, pdwstate: ::core::option::Option<*mut u32>, pszname: ::core::option::Option<&mut [u16]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).QueryBand)(::windows_core::Interface::as_raw(self), dwbandid, ::core::mem::transmute(ppstb.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdwstate.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pszname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszname.as_deref().map_or(0, |slice| slice.len() as _)).ok() + (::windows_core::Interface::vtable(self).QueryBand)(::windows_core::Interface::as_raw(self), dwbandid, ::core::mem::transmute(ppstb.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdwstate.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pszname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } pub unsafe fn SetBandState(&self, dwbandid: u32, dwmask: u32, dwstate: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).SetBandState)(::windows_core::Interface::as_raw(self), dwbandid, dwmask, dwstate).ok() @@ -8835,7 +8835,7 @@ impl IBrowserService { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).GetTitle)(::windows_core::Interface::as_raw(self), psv.into_param().abi(), ::core::mem::transmute(pszname.as_ptr()), pszname.len() as _).ok() + (::windows_core::Interface::vtable(self).GetTitle)(::windows_core::Interface::as_raw(self), psv.into_param().abi(), ::core::mem::transmute(pszname.as_ptr()), pszname.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_System_Ole\"`"] #[cfg(feature = "Win32_System_Ole")] @@ -9113,7 +9113,7 @@ impl IBrowserService2 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.GetTitle)(::windows_core::Interface::as_raw(self), psv.into_param().abi(), ::core::mem::transmute(pszname.as_ptr()), pszname.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.GetTitle)(::windows_core::Interface::as_raw(self), psv.into_param().abi(), ::core::mem::transmute(pszname.as_ptr()), pszname.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_System_Ole\"`"] #[cfg(feature = "Win32_System_Ole")] @@ -9809,7 +9809,7 @@ impl IBrowserService3 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.GetTitle)(::windows_core::Interface::as_raw(self), psv.into_param().abi(), ::core::mem::transmute(pszname.as_ptr()), pszname.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.GetTitle)(::windows_core::Interface::as_raw(self), psv.into_param().abi(), ::core::mem::transmute(pszname.as_ptr()), pszname.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_System_Ole\"`"] #[cfg(feature = "Win32_System_Ole")] @@ -10366,7 +10366,7 @@ impl IBrowserService4 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.base__.base__.GetTitle)(::windows_core::Interface::as_raw(self), psv.into_param().abi(), ::core::mem::transmute(pszname.as_ptr()), pszname.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.base__.base__.GetTitle)(::windows_core::Interface::as_raw(self), psv.into_param().abi(), ::core::mem::transmute(pszname.as_ptr()), pszname.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_System_Ole\"`"] #[cfg(feature = "Win32_System_Ole")] @@ -10915,7 +10915,7 @@ pub struct IBrowserService4_Vtbl { pub struct ICDBurn(::windows_core::IUnknown); impl ICDBurn { pub unsafe fn GetRecorderDriveLetter(&self, pszdrive: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetRecorderDriveLetter)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszdrive.as_ptr()), pszdrive.len() as _).ok() + (::windows_core::Interface::vtable(self).GetRecorderDriveLetter)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszdrive.as_ptr()), pszdrive.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -10980,7 +10980,7 @@ pub struct ICDBurnExt_Vtbl { pub struct ICategorizer(::windows_core::IUnknown); impl ICategorizer { pub unsafe fn GetDescription(&self, pszdesc: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDescription)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszdesc.as_ptr()), pszdesc.len() as _).ok() + (::windows_core::Interface::vtable(self).GetDescription)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszdesc.as_ptr()), pszdesc.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_UI_Shell_Common\"`"] #[cfg(feature = "Win32_UI_Shell_Common")] @@ -11040,7 +11040,7 @@ impl ICategoryProvider { (::windows_core::Interface::vtable(self).EnumCategories)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn GetCategoryName(&self, pguid: *const ::windows_core::GUID, pszname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetCategoryName)(::windows_core::Interface::as_raw(self), pguid, ::core::mem::transmute(pszname.as_ptr()), pszname.len() as _).ok() + (::windows_core::Interface::vtable(self).GetCategoryName)(::windows_core::Interface::as_raw(self), pguid, ::core::mem::transmute(pszname.as_ptr()), pszname.len().try_into().unwrap()).ok() } pub unsafe fn CreateCategory(&self, pguid: *const ::windows_core::GUID) -> ::windows_core::Result where @@ -11101,12 +11101,12 @@ impl IColumnManager { #[doc = "Required features: `\"Win32_UI_Shell_PropertiesSystem\"`"] #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe fn GetColumns(&self, dwflags: CM_ENUM_FLAGS, rgkeyorder: &mut [PropertiesSystem::PROPERTYKEY]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetColumns)(::windows_core::Interface::as_raw(self), dwflags, ::core::mem::transmute(rgkeyorder.as_ptr()), rgkeyorder.len() as _).ok() + (::windows_core::Interface::vtable(self).GetColumns)(::windows_core::Interface::as_raw(self), dwflags, ::core::mem::transmute(rgkeyorder.as_ptr()), rgkeyorder.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_UI_Shell_PropertiesSystem\"`"] #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe fn SetColumns(&self, rgkeyorder: &[PropertiesSystem::PROPERTYKEY]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetColumns)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rgkeyorder.as_ptr()), rgkeyorder.len() as _).ok() + (::windows_core::Interface::vtable(self).SetColumns)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rgkeyorder.as_ptr()), rgkeyorder.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(IColumnManager, ::windows_core::IUnknown); @@ -11273,7 +11273,7 @@ impl ICommDlgBrowser2 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).GetDefaultMenuText)(::windows_core::Interface::as_raw(self), ppshv.into_param().abi(), ::core::mem::transmute(psztext.as_ptr()), psztext.len() as _).ok() + (::windows_core::Interface::vtable(self).GetDefaultMenuText)(::windows_core::Interface::as_raw(self), ppshv.into_param().abi(), ::core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap()).ok() } pub unsafe fn GetViewFlags(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -11343,7 +11343,7 @@ impl ICommDlgBrowser3 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.GetDefaultMenuText)(::windows_core::Interface::as_raw(self), ppshv.into_param().abi(), ::core::mem::transmute(psztext.as_ptr()), psztext.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.GetDefaultMenuText)(::windows_core::Interface::as_raw(self), ppshv.into_param().abi(), ::core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap()).ok() } pub unsafe fn GetViewFlags(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -11358,7 +11358,7 @@ impl ICommDlgBrowser3 { (::windows_core::Interface::vtable(self).OnColumnClicked)(::windows_core::Interface::as_raw(self), ppshv.into_param().abi(), icolumn).ok() } pub unsafe fn GetCurrentFilter(&self, pszfilespec: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetCurrentFilter)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszfilespec.as_ptr()), pszfilespec.len() as _).ok() + (::windows_core::Interface::vtable(self).GetCurrentFilter)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszfilespec.as_ptr()), pszfilespec.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_System_Ole\"`"] #[cfg(feature = "Win32_System_Ole")] @@ -12599,7 +12599,7 @@ pub struct ICurrentItem_Vtbl { pub struct ICurrentWorkingDirectory(::windows_core::IUnknown); impl ICurrentWorkingDirectory { pub unsafe fn GetDirectory(&self, pwzpath: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDirectory)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwzpath.as_ptr()), pwzpath.len() as _).ok() + (::windows_core::Interface::vtable(self).GetDirectory)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwzpath.as_ptr()), pwzpath.len().try_into().unwrap()).ok() } pub unsafe fn SetDirectory(&self, pwzpath: P0) -> ::windows_core::Result<()> where @@ -12935,7 +12935,7 @@ impl IDefaultFolderMenuInitialize { P2: ::windows_core::IntoParam, P3: ::windows_core::IntoParam<::windows_core::IUnknown>, { - (::windows_core::Interface::vtable(self).Initialize)(::windows_core::Interface::as_raw(self), hwnd.into_param().abi(), pcmcb.into_param().abi(), ::core::mem::transmute(pidlfolder.unwrap_or(::std::ptr::null())), psf.into_param().abi(), apidl.len() as _, ::core::mem::transmute(apidl.as_ptr()), punkassociation.into_param().abi(), ckeys, ::core::mem::transmute(akeys.unwrap_or(::std::ptr::null()))).ok() + (::windows_core::Interface::vtable(self).Initialize)(::windows_core::Interface::as_raw(self), hwnd.into_param().abi(), pcmcb.into_param().abi(), ::core::mem::transmute(pidlfolder.unwrap_or(::std::ptr::null())), psf.into_param().abi(), apidl.len().try_into().unwrap(), ::core::mem::transmute(apidl.as_ptr()), punkassociation.into_param().abi(), ckeys, ::core::mem::transmute(akeys.unwrap_or(::std::ptr::null()))).ok() } pub unsafe fn SetMenuRestrictions(&self, dfmrvalues: DEFAULT_FOLDER_MENU_RESTRICTIONS) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).SetMenuRestrictions)(::windows_core::Interface::as_raw(self), dfmrvalues).ok() @@ -13948,7 +13948,7 @@ impl IEnumACString { #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, rgelt: &mut [::windows_core::PWSTR], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::HRESULT { - (::windows_core::Interface::vtable(self).base__.Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))) + (::windows_core::Interface::vtable(self).base__.Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))) } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -13967,7 +13967,7 @@ impl IEnumACString { (::windows_core::Interface::vtable(self).base__.Clone)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn NextItem(&self, pszurl: ::core::option::Option<&mut [u16]>, pulsortindex: *mut u32) -> ::windows_core::Result<()> { - (::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() as _), pulsortindex).ok() + (::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).ok() } pub unsafe fn SetEnumOptions(&self, dwoptions: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).SetEnumOptions)(::windows_core::Interface::as_raw(self), dwoptions).ok() @@ -14001,7 +14001,7 @@ pub struct IEnumACString_Vtbl { pub struct IEnumAssocHandlers(::windows_core::IUnknown); impl IEnumAssocHandlers { pub unsafe fn Next(&self, rgelt: &mut [::core::option::Option], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() } } ::windows_core::imp::interface_hierarchy!(IEnumAssocHandlers, ::windows_core::IUnknown); @@ -14022,7 +14022,7 @@ pub struct IEnumAssocHandlers_Vtbl { pub struct IEnumExplorerCommand(::windows_core::IUnknown); impl IEnumExplorerCommand { pub unsafe fn Next(&self, puicommand: &mut [::core::option::Option], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::HRESULT { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), puicommand.len() as _, ::core::mem::transmute(puicommand.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))) + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), puicommand.len().try_into().unwrap(), ::core::mem::transmute(puicommand.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -14056,7 +14056,7 @@ pub struct IEnumExplorerCommand_Vtbl { pub struct IEnumExtraSearch(::windows_core::IUnknown); impl IEnumExtraSearch { pub unsafe fn Next(&self, rgelt: &mut [EXTRASEARCH], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -14092,7 +14092,7 @@ impl IEnumFullIDList { #[doc = "Required features: `\"Win32_UI_Shell_Common\"`"] #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn Next(&self, rgelt: &mut [*mut Common::ITEMIDLIST], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -14165,7 +14165,7 @@ impl IEnumIDList { #[doc = "Required features: `\"Win32_UI_Shell_Common\"`"] #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn Next(&self, rgelt: &mut [*mut Common::ITEMIDLIST], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::HRESULT { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))) + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))) } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::HRESULT { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt) @@ -14201,7 +14201,7 @@ pub struct IEnumIDList_Vtbl { pub struct IEnumObjects(::windows_core::IUnknown); impl IEnumObjects { pub unsafe fn Next(&self, riid: *const ::windows_core::GUID, rgelt: &mut [*mut ::core::ffi::c_void], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, riid, ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), riid, ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -14282,7 +14282,7 @@ pub struct IEnumReadyCallback_Vtbl { pub struct IEnumResources(::windows_core::IUnknown); impl IEnumResources { pub unsafe fn Next(&self, psir: &mut [SHELL_ITEM_RESOURCE], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), psir.len() as _, ::core::mem::transmute(psir.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), psir.len().try_into().unwrap(), ::core::mem::transmute(psir.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -14316,7 +14316,7 @@ pub struct IEnumResources_Vtbl { pub struct IEnumShellItems(::windows_core::IUnknown); impl IEnumShellItems { pub unsafe fn Next(&self, rgelt: &mut [::core::option::Option], pceltfetched: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), ::core::mem::transmute(pceltfetched.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -14350,7 +14350,7 @@ pub struct IEnumShellItems_Vtbl { pub struct IEnumSyncMgrConflict(::windows_core::IUnknown); impl IEnumSyncMgrConflict { pub unsafe fn Next(&self, rgelt: &mut [::core::option::Option], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -14384,7 +14384,7 @@ pub struct IEnumSyncMgrConflict_Vtbl { pub struct IEnumSyncMgrEvents(::windows_core::IUnknown); impl IEnumSyncMgrEvents { pub unsafe fn Next(&self, rgelt: &mut [::core::option::Option], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -14418,7 +14418,7 @@ pub struct IEnumSyncMgrEvents_Vtbl { pub struct IEnumSyncMgrSyncItems(::windows_core::IUnknown); impl IEnumSyncMgrSyncItems { pub unsafe fn Next(&self, rgelt: &mut [::core::option::Option], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -14452,7 +14452,7 @@ pub struct IEnumSyncMgrSyncItems_Vtbl { pub struct IEnumTravelLogEntry(::windows_core::IUnknown); impl IEnumTravelLogEntry { pub unsafe fn Next(&self, rgelt: &mut [::core::option::Option], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -15098,7 +15098,7 @@ pub struct IExtensionServices_Vtbl { pub struct 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<()> { - (::windows_core::Interface::vtable(self).GetIconLocation)(::windows_core::Interface::as_raw(self), uflags, ::core::mem::transmute(psziconfile.as_ptr()), psziconfile.len() as _, piindex, pwflags).ok() + (::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, pwflags).ok() } #[doc = "Required features: `\"Win32_UI_WindowsAndMessaging\"`"] #[cfg(feature = "Win32_UI_WindowsAndMessaging")] @@ -15131,7 +15131,7 @@ pub struct IExtractIconA_Vtbl { pub struct 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<()> { - (::windows_core::Interface::vtable(self).GetIconLocation)(::windows_core::Interface::as_raw(self), uflags, ::core::mem::transmute(psziconfile.as_ptr()), psziconfile.len() as _, piindex, pwflags).ok() + (::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, pwflags).ok() } #[doc = "Required features: `\"Win32_UI_WindowsAndMessaging\"`"] #[cfg(feature = "Win32_UI_WindowsAndMessaging")] @@ -15166,7 +15166,7 @@ impl IExtractImage { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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<()> { - (::windows_core::Interface::vtable(self).GetLocation)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszpathbuffer.as_ptr()), pszpathbuffer.len() as _, pdwpriority, prgsize, dwrecclrdepth, pdwflags).ok() + (::windows_core::Interface::vtable(self).GetLocation)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszpathbuffer.as_ptr()), pszpathbuffer.len().try_into().unwrap(), pdwpriority, prgsize, dwrecclrdepth, pdwflags).ok() } #[doc = "Required features: `\"Win32_Graphics_Gdi\"`"] #[cfg(feature = "Win32_Graphics_Gdi")] @@ -15202,7 +15202,7 @@ impl IExtractImage2 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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<()> { - (::windows_core::Interface::vtable(self).base__.GetLocation)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszpathbuffer.as_ptr()), pszpathbuffer.len() as _, pdwpriority, prgsize, dwrecclrdepth, pdwflags).ok() + (::windows_core::Interface::vtable(self).base__.GetLocation)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszpathbuffer.as_ptr()), pszpathbuffer.len().try_into().unwrap(), pdwpriority, prgsize, dwrecclrdepth, pdwflags).ok() } #[doc = "Required features: `\"Win32_Graphics_Gdi\"`"] #[cfg(feature = "Win32_Graphics_Gdi")] @@ -15248,7 +15248,7 @@ impl IFileDialog { #[doc = "Required features: `\"Win32_UI_Shell_Common\"`"] #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn SetFileTypes(&self, rgfilterspec: &[Common::COMDLG_FILTERSPEC]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetFileTypes)(::windows_core::Interface::as_raw(self), rgfilterspec.len() as _, ::core::mem::transmute(rgfilterspec.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetFileTypes)(::windows_core::Interface::as_raw(self), rgfilterspec.len().try_into().unwrap(), ::core::mem::transmute(rgfilterspec.as_ptr())).ok() } pub unsafe fn SetFileTypeIndex(&self, ifiletype: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).SetFileTypeIndex)(::windows_core::Interface::as_raw(self), ifiletype).ok() @@ -15407,7 +15407,7 @@ impl IFileDialog2 { #[doc = "Required features: `\"Win32_UI_Shell_Common\"`"] #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn SetFileTypes(&self, rgfilterspec: &[Common::COMDLG_FILTERSPEC]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetFileTypes)(::windows_core::Interface::as_raw(self), rgfilterspec.len() as _, ::core::mem::transmute(rgfilterspec.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.SetFileTypes)(::windows_core::Interface::as_raw(self), rgfilterspec.len().try_into().unwrap(), ::core::mem::transmute(rgfilterspec.as_ptr())).ok() } pub unsafe fn SetFileTypeIndex(&self, ifiletype: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.SetFileTypeIndex)(::windows_core::Interface::as_raw(self), ifiletype).ok() @@ -15901,7 +15901,7 @@ impl IFileOpenDialog { #[doc = "Required features: `\"Win32_UI_Shell_Common\"`"] #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn SetFileTypes(&self, rgfilterspec: &[Common::COMDLG_FILTERSPEC]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetFileTypes)(::windows_core::Interface::as_raw(self), rgfilterspec.len() as _, ::core::mem::transmute(rgfilterspec.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.SetFileTypes)(::windows_core::Interface::as_raw(self), rgfilterspec.len().try_into().unwrap(), ::core::mem::transmute(rgfilterspec.as_ptr())).ok() } pub unsafe fn SetFileTypeIndex(&self, ifiletype: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.SetFileTypeIndex)(::windows_core::Interface::as_raw(self), ifiletype).ok() @@ -16502,7 +16502,7 @@ impl IFileSaveDialog { #[doc = "Required features: `\"Win32_UI_Shell_Common\"`"] #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn SetFileTypes(&self, rgfilterspec: &[Common::COMDLG_FILTERSPEC]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetFileTypes)(::windows_core::Interface::as_raw(self), rgfilterspec.len() as _, ::core::mem::transmute(rgfilterspec.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.SetFileTypes)(::windows_core::Interface::as_raw(self), rgfilterspec.len().try_into().unwrap(), ::core::mem::transmute(rgfilterspec.as_ptr())).ok() } pub unsafe fn SetFileTypeIndex(&self, ifiletype: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.SetFileTypeIndex)(::windows_core::Interface::as_raw(self), ifiletype).ok() @@ -17235,12 +17235,12 @@ impl IFolderView2 { #[doc = "Required features: `\"Win32_UI_Shell_PropertiesSystem\"`"] #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe fn SetSortColumns(&self, rgsortcolumns: &[SORTCOLUMN]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetSortColumns)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rgsortcolumns.as_ptr()), rgsortcolumns.len() as _).ok() + (::windows_core::Interface::vtable(self).SetSortColumns)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rgsortcolumns.as_ptr()), rgsortcolumns.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_UI_Shell_PropertiesSystem\"`"] #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe fn GetSortColumns(&self, rgsortcolumns: &mut [SORTCOLUMN]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSortColumns)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rgsortcolumns.as_ptr()), rgsortcolumns.len() as _).ok() + (::windows_core::Interface::vtable(self).GetSortColumns)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rgsortcolumns.as_ptr()), rgsortcolumns.len().try_into().unwrap()).ok() } pub unsafe fn GetItem(&self, iitem: i32) -> ::windows_core::Result where @@ -17506,7 +17506,7 @@ impl IFolderViewSettings { #[doc = "Required features: `\"Win32_UI_Shell_PropertiesSystem\"`"] #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe fn GetSortColumns(&self, rgsortcolumns: &mut [SORTCOLUMN], pccolumnsout: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSortColumns)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rgsortcolumns.as_ptr()), rgsortcolumns.len() as _, pccolumnsout).ok() + (::windows_core::Interface::vtable(self).GetSortColumns)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rgsortcolumns.as_ptr()), rgsortcolumns.len().try_into().unwrap(), pccolumnsout).ok() } pub unsafe fn GetGroupSubsetCount(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -18968,7 +18968,7 @@ impl IKnownFolderManager { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).Redirect)(::windows_core::Interface::as_raw(self), rfid, hwnd.into_param().abi(), flags, psztargetpath.into_param().abi(), pexclusion.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pexclusion.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(ppszerror.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).Redirect)(::windows_core::Interface::as_raw(self), rfid, hwnd.into_param().abi(), flags, psztargetpath.into_param().abi(), pexclusion.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(pexclusion.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(ppszerror.unwrap_or(::std::ptr::null_mut()))).ok() } } ::windows_core::imp::interface_hierarchy!(IKnownFolderManager, ::windows_core::IUnknown); @@ -19858,7 +19858,7 @@ impl INameSpaceTreeControlEvents { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).OnGetToolTip)(::windows_core::Interface::as_raw(self), psi.into_param().abi(), ::core::mem::transmute(psztip.as_ptr()), psztip.len() as _).ok() + (::windows_core::Interface::vtable(self).OnGetToolTip)(::windows_core::Interface::as_raw(self), psi.into_param().abi(), ::core::mem::transmute(psztip.as_ptr()), psztip.len().try_into().unwrap()).ok() } pub unsafe fn OnBeforeItemDelete(&self, psi: P0) -> ::windows_core::Result<()> where @@ -20178,7 +20178,7 @@ impl INetworkFolderInternal { #[doc = "Required features: `\"Win32_UI_Shell_Common\"`"] #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn GetProvider(&self, itemids: &[*const Common::ITEMIDLIST], provider: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetProvider)(::windows_core::Interface::as_raw(self), itemids.len() as _, ::core::mem::transmute(itemids.as_ptr()), provider.len() as _, ::core::mem::transmute(provider.as_ptr())).ok() + (::windows_core::Interface::vtable(self).GetProvider)(::windows_core::Interface::as_raw(self), itemids.len().try_into().unwrap(), ::core::mem::transmute(itemids.as_ptr()), provider.len().try_into().unwrap(), ::core::mem::transmute(provider.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(INetworkFolderInternal, ::windows_core::IUnknown); @@ -20247,7 +20247,7 @@ impl INewShortcutHookA { (::windows_core::Interface::vtable(self).SetReferent)(::windows_core::Interface::as_raw(self), pcszreferent.into_param().abi(), hwnd.into_param().abi()).ok() } pub unsafe fn GetReferent(&self, pszreferent: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetReferent)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszreferent.as_ptr()), pszreferent.len() as _).ok() + (::windows_core::Interface::vtable(self).GetReferent)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszreferent.as_ptr()), pszreferent.len().try_into().unwrap()).ok() } pub unsafe fn SetFolder(&self, pcszfolder: P0) -> ::windows_core::Result<()> where @@ -20256,13 +20256,13 @@ impl INewShortcutHookA { (::windows_core::Interface::vtable(self).SetFolder)(::windows_core::Interface::as_raw(self), pcszfolder.into_param().abi()).ok() } pub unsafe fn GetFolder(&self, pszfolder: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetFolder)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszfolder.as_ptr()), pszfolder.len() as _).ok() + (::windows_core::Interface::vtable(self).GetFolder)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszfolder.as_ptr()), pszfolder.len().try_into().unwrap()).ok() } pub unsafe fn GetName(&self, pszname: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszname.as_ptr()), pszname.len() as _).ok() + (::windows_core::Interface::vtable(self).GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszname.as_ptr()), pszname.len().try_into().unwrap()).ok() } pub unsafe fn GetExtension(&self, pszextension: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetExtension)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszextension.as_ptr()), pszextension.len() as _).ok() + (::windows_core::Interface::vtable(self).GetExtension)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszextension.as_ptr()), pszextension.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(INewShortcutHookA, ::windows_core::IUnknown); @@ -20300,7 +20300,7 @@ impl INewShortcutHookW { (::windows_core::Interface::vtable(self).SetReferent)(::windows_core::Interface::as_raw(self), pcszreferent.into_param().abi(), hwnd.into_param().abi()).ok() } pub unsafe fn GetReferent(&self, pszreferent: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetReferent)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszreferent.as_ptr()), pszreferent.len() as _).ok() + (::windows_core::Interface::vtable(self).GetReferent)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszreferent.as_ptr()), pszreferent.len().try_into().unwrap()).ok() } pub unsafe fn SetFolder(&self, pcszfolder: P0) -> ::windows_core::Result<()> where @@ -20309,13 +20309,13 @@ impl INewShortcutHookW { (::windows_core::Interface::vtable(self).SetFolder)(::windows_core::Interface::as_raw(self), pcszfolder.into_param().abi()).ok() } pub unsafe fn GetFolder(&self, pszfolder: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetFolder)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszfolder.as_ptr()), pszfolder.len() as _).ok() + (::windows_core::Interface::vtable(self).GetFolder)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszfolder.as_ptr()), pszfolder.len().try_into().unwrap()).ok() } pub unsafe fn GetName(&self, pszname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszname.as_ptr()), pszname.len() as _).ok() + (::windows_core::Interface::vtable(self).GetName)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszname.as_ptr()), pszname.len().try_into().unwrap()).ok() } pub unsafe fn GetExtension(&self, pszextension: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetExtension)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszextension.as_ptr()), pszextension.len() as _).ok() + (::windows_core::Interface::vtable(self).GetExtension)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszextension.as_ptr()), pszextension.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(INewShortcutHookW, ::windows_core::IUnknown); @@ -20469,7 +20469,7 @@ impl INotifyReplica { #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] pub unsafe fn YouAreAReplica(&self, rgpmkotherreplicas: &mut [::core::option::Option]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).YouAreAReplica)(::windows_core::Interface::as_raw(self), rgpmkotherreplicas.len() as _, ::core::mem::transmute(rgpmkotherreplicas.as_ptr())).ok() + (::windows_core::Interface::vtable(self).YouAreAReplica)(::windows_core::Interface::as_raw(self), rgpmkotherreplicas.len().try_into().unwrap(), ::core::mem::transmute(rgpmkotherreplicas.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(INotifyReplica, ::windows_core::IUnknown); @@ -20724,7 +20724,7 @@ impl IOpenControlPanel { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).GetPath)(::windows_core::Interface::as_raw(self), pszname.into_param().abi(), ::core::mem::transmute(pszpath.as_ptr()), pszpath.len() as _).ok() + (::windows_core::Interface::vtable(self).GetPath)(::windows_core::Interface::as_raw(self), pszname.into_param().abi(), ::core::mem::transmute(pszpath.as_ptr()), pszpath.len().try_into().unwrap()).ok() } pub unsafe fn GetCurrentView(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -21906,7 +21906,7 @@ impl IPublishingWizard { #[doc = "Required features: `\"Win32_UI_Controls\"`"] #[cfg(feature = "Win32_UI_Controls")] pub unsafe fn AddPages(&self, apages: &mut [super::Controls::HPROPSHEETPAGE], pnpagesadded: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.AddPages)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(apages.as_ptr()), apages.len() as _, pnpagesadded).ok() + (::windows_core::Interface::vtable(self).base__.AddPages)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(apages.as_ptr()), apages.len().try_into().unwrap(), pnpagesadded).ok() } #[doc = "Required features: `\"Win32_UI_Controls\"`"] #[cfg(feature = "Win32_UI_Controls")] @@ -22590,12 +22590,12 @@ impl ISearchFolderItemFactory { #[doc = "Required features: `\"Win32_UI_Shell_PropertiesSystem\"`"] #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe fn SetVisibleColumns(&self, rgkey: &[PropertiesSystem::PROPERTYKEY]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetVisibleColumns)(::windows_core::Interface::as_raw(self), rgkey.len() as _, ::core::mem::transmute(rgkey.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetVisibleColumns)(::windows_core::Interface::as_raw(self), rgkey.len().try_into().unwrap(), ::core::mem::transmute(rgkey.as_ptr())).ok() } #[doc = "Required features: `\"Win32_UI_Shell_PropertiesSystem\"`"] #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe fn SetSortColumns(&self, rgsortcolumns: &[SORTCOLUMN]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetSortColumns)(::windows_core::Interface::as_raw(self), rgsortcolumns.len() as _, ::core::mem::transmute(rgsortcolumns.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetSortColumns)(::windows_core::Interface::as_raw(self), rgsortcolumns.len().try_into().unwrap(), ::core::mem::transmute(rgsortcolumns.as_ptr())).ok() } #[doc = "Required features: `\"Win32_UI_Shell_PropertiesSystem\"`"] #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] @@ -22605,7 +22605,7 @@ impl ISearchFolderItemFactory { #[doc = "Required features: `\"Win32_UI_Shell_PropertiesSystem\"`"] #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe fn SetStacks(&self, rgstackkeys: &[PropertiesSystem::PROPERTYKEY]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetStacks)(::windows_core::Interface::as_raw(self), rgstackkeys.len() as _, ::core::mem::transmute(rgstackkeys.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetStacks)(::windows_core::Interface::as_raw(self), rgstackkeys.len().try_into().unwrap(), ::core::mem::transmute(rgstackkeys.as_ptr())).ok() } pub unsafe fn SetScope(&self, psiascope: P0) -> ::windows_core::Result<()> where @@ -22943,7 +22943,7 @@ impl IShellBrowser { #[doc = "Required features: `\"Win32_UI_Controls\"`"] #[cfg(feature = "Win32_UI_Controls")] pub unsafe fn SetToolbarItems(&self, lpbuttons: ::core::option::Option<&[super::Controls::TBBUTTON]>, uflags: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetToolbarItems)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(lpbuttons.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuttons.as_deref().map_or(0, |slice| slice.len() as _), uflags).ok() + (::windows_core::Interface::vtable(self).SetToolbarItems)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(lpbuttons.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuttons.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), uflags).ok() } } #[cfg(feature = "Win32_System_Ole")] @@ -24552,7 +24552,7 @@ impl IShellFolder { #[doc = "Required features: `\"Win32_UI_Shell_Common\"`"] #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn GetAttributesOf(&self, apidl: &[*const Common::ITEMIDLIST], rgfinout: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetAttributesOf)(::windows_core::Interface::as_raw(self), apidl.len() as _, ::core::mem::transmute(apidl.as_ptr()), rgfinout).ok() + (::windows_core::Interface::vtable(self).GetAttributesOf)(::windows_core::Interface::as_raw(self), apidl.len().try_into().unwrap(), ::core::mem::transmute(apidl.as_ptr()), rgfinout).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_UI_Shell_Common\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell_Common"))] @@ -24562,7 +24562,7 @@ impl IShellFolder { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).GetUIObjectOf)(::windows_core::Interface::as_raw(self), hwndowner.into_param().abi(), apidl.len() as _, ::core::mem::transmute(apidl.as_ptr()), &::IID, ::core::mem::transmute(rgfreserved.unwrap_or(::std::ptr::null())), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).GetUIObjectOf)(::windows_core::Interface::as_raw(self), hwndowner.into_param().abi(), apidl.len().try_into().unwrap(), ::core::mem::transmute(apidl.as_ptr()), &::IID, ::core::mem::transmute(rgfreserved.unwrap_or(::std::ptr::null())), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_UI_Shell_Common\"`"] #[cfg(feature = "Win32_UI_Shell_Common")] @@ -24694,7 +24694,7 @@ impl IShellFolder2 { #[doc = "Required features: `\"Win32_UI_Shell_Common\"`"] #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn GetAttributesOf(&self, apidl: &[*const Common::ITEMIDLIST], rgfinout: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetAttributesOf)(::windows_core::Interface::as_raw(self), apidl.len() as _, ::core::mem::transmute(apidl.as_ptr()), rgfinout).ok() + (::windows_core::Interface::vtable(self).base__.GetAttributesOf)(::windows_core::Interface::as_raw(self), apidl.len().try_into().unwrap(), ::core::mem::transmute(apidl.as_ptr()), rgfinout).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_UI_Shell_Common\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Shell_Common"))] @@ -24704,7 +24704,7 @@ impl IShellFolder2 { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).base__.GetUIObjectOf)(::windows_core::Interface::as_raw(self), hwndowner.into_param().abi(), apidl.len() as _, ::core::mem::transmute(apidl.as_ptr()), &::IID, ::core::mem::transmute(rgfreserved.unwrap_or(::std::ptr::null())), &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).base__.GetUIObjectOf)(::windows_core::Interface::as_raw(self), hwndowner.into_param().abi(), apidl.len().try_into().unwrap(), ::core::mem::transmute(apidl.as_ptr()), &::IID, ::core::mem::transmute(rgfreserved.unwrap_or(::std::ptr::null())), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_UI_Shell_Common\"`"] #[cfg(feature = "Win32_UI_Shell_Common")] @@ -25526,7 +25526,7 @@ impl IShellIconOverlayIdentifier { (::windows_core::Interface::vtable(self).IsMemberOf)(::windows_core::Interface::as_raw(self), pwszpath.into_param().abi(), dwattrib).ok() } pub unsafe fn GetOverlayInfo(&self, pwsziconfile: &mut [u16], pindex: *mut i32, pdwflags: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetOverlayInfo)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwsziconfile.as_ptr()), pwsziconfile.len() as _, pindex, pdwflags).ok() + (::windows_core::Interface::vtable(self).GetOverlayInfo)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwsziconfile.as_ptr()), pwsziconfile.len().try_into().unwrap(), pindex, pdwflags).ok() } pub unsafe fn GetPriority(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -25967,7 +25967,7 @@ impl IShellItem2 { T: ::windows_core::ComInterface, { let mut result__ = ::std::ptr::null_mut(); - (::windows_core::Interface::vtable(self).GetPropertyStoreForKeys)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rgkeys.as_ptr()), rgkeys.len() as _, flags, &::IID, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).GetPropertyStoreForKeys)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rgkeys.as_ptr()), rgkeys.len().try_into().unwrap(), flags, &::IID, &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_UI_Shell_PropertiesSystem\"`"] #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] @@ -26451,7 +26451,7 @@ impl IShellLinkA { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Storage_FileSystem\"`"] #[cfg(all(feature = "Win32_Foundation", 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<()> { - (::windows_core::Interface::vtable(self).GetPath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszfile.as_ptr()), pszfile.len() as _, pfd, fflags).ok() + (::windows_core::Interface::vtable(self).GetPath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszfile.as_ptr()), pszfile.len().try_into().unwrap(), pfd, fflags).ok() } #[doc = "Required features: `\"Win32_UI_Shell_Common\"`"] #[cfg(feature = "Win32_UI_Shell_Common")] @@ -26465,7 +26465,7 @@ impl IShellLinkA { (::windows_core::Interface::vtable(self).SetIDList)(::windows_core::Interface::as_raw(self), pidl).ok() } pub unsafe fn GetDescription(&self, pszname: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDescription)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszname.as_ptr()), pszname.len() as _).ok() + (::windows_core::Interface::vtable(self).GetDescription)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszname.as_ptr()), pszname.len().try_into().unwrap()).ok() } pub unsafe fn SetDescription(&self, pszname: P0) -> ::windows_core::Result<()> where @@ -26474,7 +26474,7 @@ impl IShellLinkA { (::windows_core::Interface::vtable(self).SetDescription)(::windows_core::Interface::as_raw(self), pszname.into_param().abi()).ok() } pub unsafe fn GetWorkingDirectory(&self, pszdir: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetWorkingDirectory)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszdir.as_ptr()), pszdir.len() as _).ok() + (::windows_core::Interface::vtable(self).GetWorkingDirectory)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszdir.as_ptr()), pszdir.len().try_into().unwrap()).ok() } pub unsafe fn SetWorkingDirectory(&self, pszdir: P0) -> ::windows_core::Result<()> where @@ -26483,7 +26483,7 @@ impl IShellLinkA { (::windows_core::Interface::vtable(self).SetWorkingDirectory)(::windows_core::Interface::as_raw(self), pszdir.into_param().abi()).ok() } pub unsafe fn GetArguments(&self, pszargs: &mut [u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetArguments)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszargs.as_ptr()), pszargs.len() as _).ok() + (::windows_core::Interface::vtable(self).GetArguments)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszargs.as_ptr()), pszargs.len().try_into().unwrap()).ok() } pub unsafe fn SetArguments(&self, pszargs: P0) -> ::windows_core::Result<()> where @@ -26510,7 +26510,7 @@ impl IShellLinkA { (::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<()> { - (::windows_core::Interface::vtable(self).GetIconLocation)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(psziconpath.as_ptr()), psziconpath.len() as _, piicon).ok() + (::windows_core::Interface::vtable(self).GetIconLocation)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(psziconpath.as_ptr()), psziconpath.len().try_into().unwrap(), piicon).ok() } pub unsafe fn SetIconLocation(&self, psziconpath: P0, iicon: i32) -> ::windows_core::Result<()> where @@ -26851,7 +26851,7 @@ impl IShellLinkW { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Storage_FileSystem\"`"] #[cfg(all(feature = "Win32_Foundation", 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<()> { - (::windows_core::Interface::vtable(self).GetPath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszfile.as_ptr()), pszfile.len() as _, pfd, fflags).ok() + (::windows_core::Interface::vtable(self).GetPath)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszfile.as_ptr()), pszfile.len().try_into().unwrap(), pfd, fflags).ok() } #[doc = "Required features: `\"Win32_UI_Shell_Common\"`"] #[cfg(feature = "Win32_UI_Shell_Common")] @@ -26865,7 +26865,7 @@ impl IShellLinkW { (::windows_core::Interface::vtable(self).SetIDList)(::windows_core::Interface::as_raw(self), pidl).ok() } pub unsafe fn GetDescription(&self, pszname: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetDescription)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszname.as_ptr()), pszname.len() as _).ok() + (::windows_core::Interface::vtable(self).GetDescription)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszname.as_ptr()), pszname.len().try_into().unwrap()).ok() } pub unsafe fn SetDescription(&self, pszname: P0) -> ::windows_core::Result<()> where @@ -26874,7 +26874,7 @@ impl IShellLinkW { (::windows_core::Interface::vtable(self).SetDescription)(::windows_core::Interface::as_raw(self), pszname.into_param().abi()).ok() } pub unsafe fn GetWorkingDirectory(&self, pszdir: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetWorkingDirectory)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszdir.as_ptr()), pszdir.len() as _).ok() + (::windows_core::Interface::vtable(self).GetWorkingDirectory)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszdir.as_ptr()), pszdir.len().try_into().unwrap()).ok() } pub unsafe fn SetWorkingDirectory(&self, pszdir: P0) -> ::windows_core::Result<()> where @@ -26883,7 +26883,7 @@ impl IShellLinkW { (::windows_core::Interface::vtable(self).SetWorkingDirectory)(::windows_core::Interface::as_raw(self), pszdir.into_param().abi()).ok() } pub unsafe fn GetArguments(&self, pszargs: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetArguments)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszargs.as_ptr()), pszargs.len() as _).ok() + (::windows_core::Interface::vtable(self).GetArguments)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszargs.as_ptr()), pszargs.len().try_into().unwrap()).ok() } pub unsafe fn SetArguments(&self, pszargs: P0) -> ::windows_core::Result<()> where @@ -26910,7 +26910,7 @@ impl IShellLinkW { (::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<()> { - (::windows_core::Interface::vtable(self).GetIconLocation)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(psziconpath.as_ptr()), psziconpath.len() as _, piicon).ok() + (::windows_core::Interface::vtable(self).GetIconLocation)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(psziconpath.as_ptr()), psziconpath.len().try_into().unwrap(), piicon).ok() } pub unsafe fn SetIconLocation(&self, psziconpath: P0, iicon: i32) -> ::windows_core::Result<()> where @@ -32051,7 +32051,7 @@ impl IStorageProviderPropertyHandler { #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe fn RetrieveProperties(&self, propertiestoretrieve: &[PropertiesSystem::PROPERTYKEY]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).RetrieveProperties)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(propertiestoretrieve.as_ptr()), propertiestoretrieve.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).RetrieveProperties)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(propertiestoretrieve.as_ptr()), propertiestoretrieve.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_UI_Shell_PropertiesSystem\"`"] #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] @@ -32528,7 +32528,7 @@ impl ISyncMgrConflictStore { #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] pub unsafe fn RemoveConflicts(&self, rgconflictidinfo: &[SYNCMGR_CONFLICT_ID_INFO]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).RemoveConflicts)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rgconflictidinfo.as_ptr()), rgconflictidinfo.len() as _).ok() + (::windows_core::Interface::vtable(self).RemoveConflicts)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(rgconflictidinfo.as_ptr()), rgconflictidinfo.len().try_into().unwrap()).ok() } pub unsafe fn GetCount(&self, pszhandlerid: P0, pszitemid: P1) -> ::windows_core::Result where @@ -32585,7 +32585,7 @@ impl ISyncMgrControl { P2: ::windows_core::IntoParam<::windows_core::IUnknown>, P3: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).StartItemSync)(::windows_core::Interface::as_raw(self), pszhandlerid.into_param().abi(), ::core::mem::transmute(ppszitemids.as_ptr()), ppszitemids.len() as _, hwndowner.into_param().abi(), punk.into_param().abi(), nsynccontrolflags, presult.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).StartItemSync)(::windows_core::Interface::as_raw(self), pszhandlerid.into_param().abi(), ::core::mem::transmute(ppszitemids.as_ptr()), ppszitemids.len().try_into().unwrap(), hwndowner.into_param().abi(), punk.into_param().abi(), nsynccontrolflags, presult.into_param().abi()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -32605,7 +32605,7 @@ impl ISyncMgrControl { where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).StopItemSync)(::windows_core::Interface::as_raw(self), pszhandlerid.into_param().abi(), ::core::mem::transmute(ppszitemids.as_ptr()), ppszitemids.len() as _).ok() + (::windows_core::Interface::vtable(self).StopItemSync)(::windows_core::Interface::as_raw(self), pszhandlerid.into_param().abi(), ::core::mem::transmute(ppszitemids.as_ptr()), ppszitemids.len().try_into().unwrap()).ok() } pub unsafe fn StopSyncAll(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).StopSyncAll)(::windows_core::Interface::as_raw(self)).ok() @@ -32732,7 +32732,7 @@ impl ISyncMgrEnumItems { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] pub unsafe fn Next(&self, rgelt: &mut [SYNCMGRITEM], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -32890,7 +32890,7 @@ impl ISyncMgrEventStore { (::windows_core::Interface::vtable(self).GetEvent)(::windows_core::Interface::as_raw(self), rguideventid, &mut result__).from_abi(result__) } pub unsafe fn RemoveEvent(&self, pguideventids: &[::windows_core::GUID]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).RemoveEvent)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pguideventids.as_ptr()), pguideventids.len() as _).ok() + (::windows_core::Interface::vtable(self).RemoveEvent)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pguideventids.as_ptr()), pguideventids.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(ISyncMgrEventStore, ::windows_core::IUnknown); @@ -32960,7 +32960,7 @@ impl ISyncMgrHandler { P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam<::windows_core::IUnknown>, { - (::windows_core::Interface::vtable(self).Synchronize)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppszitemids.as_ptr()), ppszitemids.len() as _, hwndowner.into_param().abi(), psessioncreator.into_param().abi(), punk.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).Synchronize)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(ppszitemids.as_ptr()), ppszitemids.len().try_into().unwrap(), hwndowner.into_param().abi(), psessioncreator.into_param().abi(), punk.into_param().abi()).ok() } } ::windows_core::imp::interface_hierarchy!(ISyncMgrHandler, ::windows_core::IUnknown); @@ -33203,7 +33203,7 @@ impl ISyncMgrSessionCreator { P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).CreateSession)(::windows_core::Interface::as_raw(self), pszhandlerid.into_param().abi(), ::core::mem::transmute(ppszitemids.as_ptr()), ppszitemids.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).CreateSession)(::windows_core::Interface::as_raw(self), pszhandlerid.into_param().abi(), ::core::mem::transmute(ppszitemids.as_ptr()), ppszitemids.len().try_into().unwrap(), &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(ISyncMgrSessionCreator, ::windows_core::IUnknown); @@ -33484,7 +33484,7 @@ pub struct ISyncMgrSyncResult_Vtbl { pub struct ISyncMgrSynchronize(::windows_core::IUnknown); impl ISyncMgrSynchronize { pub unsafe fn Initialize(&self, dwreserved: u32, dwsyncmgrflags: u32, lpcookie: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Initialize)(::windows_core::Interface::as_raw(self), dwreserved, dwsyncmgrflags, lpcookie.len() as _, ::core::mem::transmute(lpcookie.as_ptr())).ok() + (::windows_core::Interface::vtable(self).Initialize)(::windows_core::Interface::as_raw(self), dwreserved, dwsyncmgrflags, lpcookie.len().try_into().unwrap(), ::core::mem::transmute(lpcookie.as_ptr())).ok() } #[doc = "Required features: `\"Win32_UI_WindowsAndMessaging\"`"] #[cfg(feature = "Win32_UI_WindowsAndMessaging")] @@ -33523,7 +33523,7 @@ impl ISyncMgrSynchronize { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).PrepareForSync)(::windows_core::Interface::as_raw(self), pitemids.len() as _, ::core::mem::transmute(pitemids.as_ptr()), hwndparent.into_param().abi(), dwreserved).ok() + (::windows_core::Interface::vtable(self).PrepareForSync)(::windows_core::Interface::as_raw(self), pitemids.len().try_into().unwrap(), ::core::mem::transmute(pitemids.as_ptr()), hwndparent.into_param().abi(), dwreserved).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -33596,7 +33596,7 @@ impl ISyncMgrSynchronizeCallback { (::windows_core::Interface::vtable(self).SynchronizeCompleted)(::windows_core::Interface::as_raw(self), hr).ok() } pub unsafe fn ShowErrorCompleted(&self, hr: ::windows_core::HRESULT, pitemids: &[::windows_core::GUID]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).ShowErrorCompleted)(::windows_core::Interface::as_raw(self), hr, pitemids.len() as _, ::core::mem::transmute(pitemids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).ShowErrorCompleted)(::windows_core::Interface::as_raw(self), hr, pitemids.len().try_into().unwrap(), ::core::mem::transmute(pitemids.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -33654,7 +33654,7 @@ pub struct ISyncMgrSynchronizeCallback_Vtbl { pub struct ISyncMgrSynchronizeInvoke(::windows_core::IUnknown); impl ISyncMgrSynchronizeInvoke { pub unsafe fn UpdateItems(&self, dwinvokeflags: u32, clsid: *const ::windows_core::GUID, pcookie: &[u8]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).UpdateItems)(::windows_core::Interface::as_raw(self), dwinvokeflags, clsid, pcookie.len() as _, ::core::mem::transmute(pcookie.as_ptr())).ok() + (::windows_core::Interface::vtable(self).UpdateItems)(::windows_core::Interface::as_raw(self), dwinvokeflags, clsid, pcookie.len().try_into().unwrap(), ::core::mem::transmute(pcookie.as_ptr())).ok() } pub unsafe fn UpdateAll(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).UpdateAll)(::windows_core::Interface::as_raw(self)).ok() @@ -33942,7 +33942,7 @@ impl ITaskbarList3 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).ThumbBarAddButtons)(::windows_core::Interface::as_raw(self), hwnd.into_param().abi(), pbutton.len() as _, ::core::mem::transmute(pbutton.as_ptr())).ok() + (::windows_core::Interface::vtable(self).ThumbBarAddButtons)(::windows_core::Interface::as_raw(self), hwnd.into_param().abi(), pbutton.len().try_into().unwrap(), ::core::mem::transmute(pbutton.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] @@ -33950,7 +33950,7 @@ impl ITaskbarList3 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).ThumbBarUpdateButtons)(::windows_core::Interface::as_raw(self), hwnd.into_param().abi(), pbutton.len() as _, ::core::mem::transmute(pbutton.as_ptr())).ok() + (::windows_core::Interface::vtable(self).ThumbBarUpdateButtons)(::windows_core::Interface::as_raw(self), hwnd.into_param().abi(), pbutton.len().try_into().unwrap(), ::core::mem::transmute(pbutton.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_UI_Controls\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Controls"))] @@ -34154,7 +34154,7 @@ impl ITaskbarList4 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.ThumbBarAddButtons)(::windows_core::Interface::as_raw(self), hwnd.into_param().abi(), pbutton.len() as _, ::core::mem::transmute(pbutton.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.ThumbBarAddButtons)(::windows_core::Interface::as_raw(self), hwnd.into_param().abi(), pbutton.len().try_into().unwrap(), ::core::mem::transmute(pbutton.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] @@ -34162,7 +34162,7 @@ impl ITaskbarList4 { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.ThumbBarUpdateButtons)(::windows_core::Interface::as_raw(self), hwnd.into_param().abi(), pbutton.len() as _, ::core::mem::transmute(pbutton.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.ThumbBarUpdateButtons)(::windows_core::Interface::as_raw(self), hwnd.into_param().abi(), pbutton.len().try_into().unwrap(), ::core::mem::transmute(pbutton.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_UI_Controls\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Controls"))] @@ -34581,7 +34581,7 @@ impl ITransferAdviseSink { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { - (::windows_core::Interface::vtable(self).FileFailure)(::windows_core::Interface::as_raw(self), psi.into_param().abi(), pszitem.into_param().abi(), hrerror, ::core::mem::transmute(pszrename.as_ptr()), pszrename.len() as _).ok() + (::windows_core::Interface::vtable(self).FileFailure)(::windows_core::Interface::as_raw(self), psi.into_param().abi(), pszitem.into_param().abi(), hrerror, ::core::mem::transmute(pszrename.as_ptr()), pszrename.len().try_into().unwrap()).ok() } pub unsafe fn SubStreamFailure(&self, psi: P0, pszstreamname: P1, hrerror: ::windows_core::HRESULT) -> ::windows_core::Result<()> where @@ -34909,7 +34909,7 @@ impl ITravelLog { where P0: ::windows_core::IntoParam<::windows_core::IUnknown>, { - (::windows_core::Interface::vtable(self).GetToolTipText)(::windows_core::Interface::as_raw(self), punk.into_param().abi(), ioffset, idstemplate, ::core::mem::transmute(pwztext.as_ptr()), pwztext.len() as _).ok() + (::windows_core::Interface::vtable(self).GetToolTipText)(::windows_core::Interface::as_raw(self), punk.into_param().abi(), ioffset, idstemplate, ::core::mem::transmute(pwztext.as_ptr()), pwztext.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_UI_WindowsAndMessaging\"`"] #[cfg(feature = "Win32_UI_WindowsAndMessaging")] @@ -35145,7 +35145,7 @@ pub struct ITrayDeskBand_Vtbl { pub struct IURLSearchHook(::windows_core::IUnknown); impl IURLSearchHook { pub unsafe fn Translate(&self, pwszsearchurl: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Translate)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszsearchurl.as_ptr()), pwszsearchurl.len() as _).ok() + (::windows_core::Interface::vtable(self).Translate)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszsearchurl.as_ptr()), pwszsearchurl.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(IURLSearchHook, ::windows_core::IUnknown); @@ -35166,13 +35166,13 @@ pub struct IURLSearchHook_Vtbl { pub struct IURLSearchHook2(::windows_core::IUnknown); impl IURLSearchHook2 { pub unsafe fn Translate(&self, pwszsearchurl: &mut [u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.Translate)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszsearchurl.as_ptr()), pwszsearchurl.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.Translate)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszsearchurl.as_ptr()), pwszsearchurl.len().try_into().unwrap()).ok() } pub unsafe fn TranslateWithSearchContext(&self, pwszsearchurl: &mut [u16], psearchcontext: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).TranslateWithSearchContext)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszsearchurl.as_ptr()), pwszsearchurl.len() as _, psearchcontext.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).TranslateWithSearchContext)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pwszsearchurl.as_ptr()), pwszsearchurl.len().try_into().unwrap(), psearchcontext.into_param().abi()).ok() } } ::windows_core::imp::interface_hierarchy!(IURLSearchHook2, ::windows_core::IUnknown, IURLSearchHook); @@ -36604,7 +36604,7 @@ impl IWebWizardExtension { #[doc = "Required features: `\"Win32_UI_Controls\"`"] #[cfg(feature = "Win32_UI_Controls")] pub unsafe fn AddPages(&self, apages: &mut [super::Controls::HPROPSHEETPAGE], pnpagesadded: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.AddPages)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(apages.as_ptr()), apages.len() as _, pnpagesadded).ok() + (::windows_core::Interface::vtable(self).base__.AddPages)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(apages.as_ptr()), apages.len().try_into().unwrap(), pnpagesadded).ok() } #[doc = "Required features: `\"Win32_UI_Controls\"`"] #[cfg(feature = "Win32_UI_Controls")] @@ -36832,7 +36832,7 @@ impl IWizardExtension { #[doc = "Required features: `\"Win32_UI_Controls\"`"] #[cfg(feature = "Win32_UI_Controls")] pub unsafe fn AddPages(&self, apages: &mut [super::Controls::HPROPSHEETPAGE], pnpagesadded: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).AddPages)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(apages.as_ptr()), apages.len() as _, pnpagesadded).ok() + (::windows_core::Interface::vtable(self).AddPages)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(apages.as_ptr()), apages.len().try_into().unwrap(), pnpagesadded).ok() } #[doc = "Required features: `\"Win32_UI_Controls\"`"] #[cfg(feature = "Win32_UI_Controls")] 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 88e826e448..71a02253c9 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/TabletPC/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/TabletPC/mod.rs @@ -206,7 +206,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("inkobjcore.dll" "system" fn SetTextContext(hrc : HRECOCONTEXT, cwcbefore : u32, pwcbefore : ::windows_core::PCWSTR, cwcafter : u32, pwcafter : ::windows_core::PCWSTR) -> ::windows_core::HRESULT); - SetTextContext(hrc.into_param().abi(), pwcbefore.len() as _, ::core::mem::transmute(pwcbefore.as_ptr()), pwcafter.len() as _, ::core::mem::transmute(pwcafter.as_ptr())).ok() + SetTextContext(hrc.into_param().abi(), pwcbefore.len().try_into().unwrap(), ::core::mem::transmute(pwcbefore.as_ptr()), pwcafter.len().try_into().unwrap(), ::core::mem::transmute(pwcafter.as_ptr())).ok() } #[inline] pub unsafe fn SetWordList(hrc: P0, hwl: P1) -> ::windows_core::Result<()> @@ -409,7 +409,7 @@ impl IGestureRecognizer { (::windows_core::Interface::vtable(self).SetMaxStrokeCount)(::windows_core::Interface::as_raw(self), cstrokes).ok() } pub unsafe fn EnableGestures(&self, pgestures: &[i32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).EnableGestures)(::windows_core::Interface::as_raw(self), pgestures.len() as _, ::core::mem::transmute(pgestures.as_ptr())).ok() + (::windows_core::Interface::vtable(self).EnableGestures)(::windows_core::Interface::as_raw(self), pgestures.len().try_into().unwrap(), ::core::mem::transmute(pgestures.as_ptr())).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -6259,7 +6259,7 @@ impl IRealTimeStylus { (::windows_core::Interface::vtable(self).putref_ChildRealTimeStylusPlugin)(::windows_core::Interface::as_raw(self), pirts.into_param().abi()).ok() } pub unsafe fn AddCustomStylusDataToQueue(&self, sq: StylusQueue, pguidid: *const ::windows_core::GUID, pbdata: ::core::option::Option<&[u8]>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).AddCustomStylusDataToQueue)(::windows_core::Interface::as_raw(self), sq, pguidid, pbdata.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pbdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + (::windows_core::Interface::vtable(self).AddCustomStylusDataToQueue)(::windows_core::Interface::as_raw(self), sq, pguidid, 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()))).ok() } pub unsafe fn ClearStylusQueues(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).ClearStylusQueues)(::windows_core::Interface::as_raw(self)).ok() @@ -6317,7 +6317,7 @@ impl IRealTimeStylus { (::windows_core::Interface::vtable(self).GetStylusForId)(::windows_core::Interface::as_raw(self), sid, &mut result__).from_abi(result__) } pub unsafe fn SetDesiredPacketDescription(&self, ppropertyguids: &[::windows_core::GUID]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetDesiredPacketDescription)(::windows_core::Interface::as_raw(self), ppropertyguids.len() as _, ::core::mem::transmute(ppropertyguids.as_ptr())).ok() + (::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<()> { (::windows_core::Interface::vtable(self).GetDesiredPacketDescription)(::windows_core::Interface::as_raw(self), pcproperties, pppropertyguids).ok() @@ -6541,15 +6541,15 @@ impl IStrokeBuilder { #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] pub unsafe fn CreateStroke(&self, ppackets: &[i32], ppacketproperties: &[PACKET_PROPERTY], finktodevicescalex: f32, finktodevicescaley: f32, ppiinkstroke: *mut ::core::option::Option) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).CreateStroke)(::windows_core::Interface::as_raw(self), ppackets.len() as _, ::core::mem::transmute(ppackets.as_ptr()), ppacketproperties.len() as _, ::core::mem::transmute(ppacketproperties.as_ptr()), finktodevicescalex, finktodevicescaley, ::core::mem::transmute(ppiinkstroke)).ok() + (::windows_core::Interface::vtable(self).CreateStroke)(::windows_core::Interface::as_raw(self), ppackets.len().try_into().unwrap(), ::core::mem::transmute(ppackets.as_ptr()), ppacketproperties.len().try_into().unwrap(), ::core::mem::transmute(ppacketproperties.as_ptr()), finktodevicescalex, finktodevicescaley, ::core::mem::transmute(ppiinkstroke)).ok() } #[doc = "Required features: `\"Win32_System_Com\"`"] #[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: ::core::option::Option<*mut ::core::option::Option>) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).BeginStroke)(::windows_core::Interface::as_raw(self), tcid, sid, ppacket, ppacketproperties.len() as _, ::core::mem::transmute(ppacketproperties.as_ptr()), finktodevicescalex, finktodevicescaley, ::core::mem::transmute(ppiinkstroke.unwrap_or(::std::ptr::null_mut()))).ok() + (::windows_core::Interface::vtable(self).BeginStroke)(::windows_core::Interface::as_raw(self), tcid, sid, ppacket, ppacketproperties.len().try_into().unwrap(), ::core::mem::transmute(ppacketproperties.as_ptr()), finktodevicescalex, finktodevicescaley, ::core::mem::transmute(ppiinkstroke.unwrap_or(::std::ptr::null_mut()))).ok() } pub unsafe fn AppendPackets(&self, tcid: u32, sid: u32, ppackets: &[i32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).AppendPackets)(::windows_core::Interface::as_raw(self), tcid, sid, ppackets.len() as _, ::core::mem::transmute(ppackets.as_ptr())).ok() + (::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() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] @@ -6612,13 +6612,13 @@ impl IStylusAsyncPlugin { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.RealTimeStylusEnabled)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), ptcids.len() as _, ::core::mem::transmute(ptcids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.RealTimeStylusEnabled)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), ptcids.len().try_into().unwrap(), ::core::mem::transmute(ptcids.as_ptr())).ok() } pub unsafe fn RealTimeStylusDisabled(&self, pirtssrc: P0, ptcids: &[u32]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.RealTimeStylusDisabled)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), ptcids.len() as _, ::core::mem::transmute(ptcids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.RealTimeStylusDisabled)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), ptcids.len().try_into().unwrap(), ::core::mem::transmute(ptcids.as_ptr())).ok() } pub unsafe fn StylusInRange(&self, pirtssrc: P0, tcid: u32, sid: u32) -> ::windows_core::Result<()> where @@ -6638,7 +6638,7 @@ impl IStylusAsyncPlugin { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.StylusDown)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), pstylusinfo, ppacket.len() as _, ::core::mem::transmute(ppacket.as_ptr()), ppinoutpkt).ok() + (::windows_core::Interface::vtable(self).base__.StylusDown)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), pstylusinfo, ppacket.len().try_into().unwrap(), ::core::mem::transmute(ppacket.as_ptr()), ppinoutpkt).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -6646,7 +6646,7 @@ impl IStylusAsyncPlugin { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.StylusUp)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), pstylusinfo, ppacket.len() as _, ::core::mem::transmute(ppacket.as_ptr()), ppinoutpkt).ok() + (::windows_core::Interface::vtable(self).base__.StylusUp)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), pstylusinfo, ppacket.len().try_into().unwrap(), ::core::mem::transmute(ppacket.as_ptr()), ppinoutpkt).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -6670,7 +6670,7 @@ impl IStylusAsyncPlugin { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.InAirPackets)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), pstylusinfo, cpktcount, ppackets.len() as _, ::core::mem::transmute(ppackets.as_ptr()), pcinoutpkts, ppinoutpkts).ok() + (::windows_core::Interface::vtable(self).base__.InAirPackets)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), pstylusinfo, cpktcount, ppackets.len().try_into().unwrap(), ::core::mem::transmute(ppackets.as_ptr()), pcinoutpkts, ppinoutpkts).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -6678,13 +6678,13 @@ impl IStylusAsyncPlugin { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.Packets)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), pstylusinfo, cpktcount, ppackets.len() as _, ::core::mem::transmute(ppackets.as_ptr()), pcinoutpkts, ppinoutpkts).ok() + (::windows_core::Interface::vtable(self).base__.Packets)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), pstylusinfo, cpktcount, ppackets.len().try_into().unwrap(), ::core::mem::transmute(ppackets.as_ptr()), pcinoutpkts, ppinoutpkts).ok() } pub unsafe fn CustomStylusDataAdded(&self, pirtssrc: P0, pguidid: *const ::windows_core::GUID, pbdata: ::core::option::Option<&[u8]>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.CustomStylusDataAdded)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), pguidid, pbdata.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pbdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + (::windows_core::Interface::vtable(self).base__.CustomStylusDataAdded)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), pguidid, 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()))).ok() } pub unsafe fn SystemEvent(&self, pirtssrc: P0, tcid: u32, sid: u32, event: u16, eventdata: SYSTEM_EVENT_DATA) -> ::windows_core::Result<()> where @@ -6745,13 +6745,13 @@ impl IStylusPlugin { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).RealTimeStylusEnabled)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), ptcids.len() as _, ::core::mem::transmute(ptcids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).RealTimeStylusEnabled)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), ptcids.len().try_into().unwrap(), ::core::mem::transmute(ptcids.as_ptr())).ok() } pub unsafe fn RealTimeStylusDisabled(&self, pirtssrc: P0, ptcids: &[u32]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).RealTimeStylusDisabled)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), ptcids.len() as _, ::core::mem::transmute(ptcids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).RealTimeStylusDisabled)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), ptcids.len().try_into().unwrap(), ::core::mem::transmute(ptcids.as_ptr())).ok() } pub unsafe fn StylusInRange(&self, pirtssrc: P0, tcid: u32, sid: u32) -> ::windows_core::Result<()> where @@ -6771,7 +6771,7 @@ impl IStylusPlugin { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).StylusDown)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), pstylusinfo, ppacket.len() as _, ::core::mem::transmute(ppacket.as_ptr()), ppinoutpkt).ok() + (::windows_core::Interface::vtable(self).StylusDown)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), pstylusinfo, ppacket.len().try_into().unwrap(), ::core::mem::transmute(ppacket.as_ptr()), ppinoutpkt).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -6779,7 +6779,7 @@ impl IStylusPlugin { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).StylusUp)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), pstylusinfo, ppacket.len() as _, ::core::mem::transmute(ppacket.as_ptr()), ppinoutpkt).ok() + (::windows_core::Interface::vtable(self).StylusUp)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), pstylusinfo, ppacket.len().try_into().unwrap(), ::core::mem::transmute(ppacket.as_ptr()), ppinoutpkt).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -6803,7 +6803,7 @@ impl IStylusPlugin { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).InAirPackets)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), pstylusinfo, cpktcount, ppackets.len() as _, ::core::mem::transmute(ppackets.as_ptr()), pcinoutpkts, ppinoutpkts).ok() + (::windows_core::Interface::vtable(self).InAirPackets)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), pstylusinfo, cpktcount, ppackets.len().try_into().unwrap(), ::core::mem::transmute(ppackets.as_ptr()), pcinoutpkts, ppinoutpkts).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -6811,13 +6811,13 @@ impl IStylusPlugin { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).Packets)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), pstylusinfo, cpktcount, ppackets.len() as _, ::core::mem::transmute(ppackets.as_ptr()), pcinoutpkts, ppinoutpkts).ok() + (::windows_core::Interface::vtable(self).Packets)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), pstylusinfo, cpktcount, ppackets.len().try_into().unwrap(), ::core::mem::transmute(ppackets.as_ptr()), pcinoutpkts, ppinoutpkts).ok() } pub unsafe fn CustomStylusDataAdded(&self, pirtssrc: P0, pguidid: *const ::windows_core::GUID, pbdata: ::core::option::Option<&[u8]>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).CustomStylusDataAdded)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), pguidid, pbdata.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pbdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + (::windows_core::Interface::vtable(self).CustomStylusDataAdded)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), pguidid, 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()))).ok() } pub unsafe fn SystemEvent(&self, pirtssrc: P0, tcid: u32, sid: u32, event: u16, eventdata: SYSTEM_EVENT_DATA) -> ::windows_core::Result<()> where @@ -6916,13 +6916,13 @@ impl IStylusSyncPlugin { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.RealTimeStylusEnabled)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), ptcids.len() as _, ::core::mem::transmute(ptcids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.RealTimeStylusEnabled)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), ptcids.len().try_into().unwrap(), ::core::mem::transmute(ptcids.as_ptr())).ok() } pub unsafe fn RealTimeStylusDisabled(&self, pirtssrc: P0, ptcids: &[u32]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.RealTimeStylusDisabled)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), ptcids.len() as _, ::core::mem::transmute(ptcids.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.RealTimeStylusDisabled)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), ptcids.len().try_into().unwrap(), ::core::mem::transmute(ptcids.as_ptr())).ok() } pub unsafe fn StylusInRange(&self, pirtssrc: P0, tcid: u32, sid: u32) -> ::windows_core::Result<()> where @@ -6942,7 +6942,7 @@ impl IStylusSyncPlugin { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.StylusDown)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), pstylusinfo, ppacket.len() as _, ::core::mem::transmute(ppacket.as_ptr()), ppinoutpkt).ok() + (::windows_core::Interface::vtable(self).base__.StylusDown)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), pstylusinfo, ppacket.len().try_into().unwrap(), ::core::mem::transmute(ppacket.as_ptr()), ppinoutpkt).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -6950,7 +6950,7 @@ impl IStylusSyncPlugin { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.StylusUp)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), pstylusinfo, ppacket.len() as _, ::core::mem::transmute(ppacket.as_ptr()), ppinoutpkt).ok() + (::windows_core::Interface::vtable(self).base__.StylusUp)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), pstylusinfo, ppacket.len().try_into().unwrap(), ::core::mem::transmute(ppacket.as_ptr()), ppinoutpkt).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -6974,7 +6974,7 @@ impl IStylusSyncPlugin { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.InAirPackets)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), pstylusinfo, cpktcount, ppackets.len() as _, ::core::mem::transmute(ppackets.as_ptr()), pcinoutpkts, ppinoutpkts).ok() + (::windows_core::Interface::vtable(self).base__.InAirPackets)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), pstylusinfo, cpktcount, ppackets.len().try_into().unwrap(), ::core::mem::transmute(ppackets.as_ptr()), pcinoutpkts, ppinoutpkts).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -6982,13 +6982,13 @@ impl IStylusSyncPlugin { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.Packets)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), pstylusinfo, cpktcount, ppackets.len() as _, ::core::mem::transmute(ppackets.as_ptr()), pcinoutpkts, ppinoutpkts).ok() + (::windows_core::Interface::vtable(self).base__.Packets)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), pstylusinfo, cpktcount, ppackets.len().try_into().unwrap(), ::core::mem::transmute(ppackets.as_ptr()), pcinoutpkts, ppinoutpkts).ok() } pub unsafe fn CustomStylusDataAdded(&self, pirtssrc: P0, pguidid: *const ::windows_core::GUID, pbdata: ::core::option::Option<&[u8]>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.CustomStylusDataAdded)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), pguidid, pbdata.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pbdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() + (::windows_core::Interface::vtable(self).base__.CustomStylusDataAdded)(::windows_core::Interface::as_raw(self), pirtssrc.into_param().abi(), pguidid, 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()))).ok() } pub unsafe fn SystemEvent(&self, pirtssrc: P0, tcid: u32, sid: u32, event: u16, eventdata: SYSTEM_EVENT_DATA) -> ::windows_core::Result<()> where 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 187e449085..a00f17acea 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/TextServices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/TextServices/mod.rs @@ -446,7 +446,7 @@ impl IEnumITfCompositionView { (::windows_core::Interface::vtable(self).Clone)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn Next(&self, rgcompositionview: &mut [::core::option::Option], pcfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgcompositionview.len() as _, ::core::mem::transmute(rgcompositionview.as_ptr()), pcfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgcompositionview.len().try_into().unwrap(), ::core::mem::transmute(rgcompositionview.as_ptr()), pcfetched).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -480,7 +480,7 @@ impl IEnumSpeechCommands { (::windows_core::Interface::vtable(self).Clone)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn Next(&self, pspcmds: &mut [*mut u16], pcfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), pspcmds.len() as _, ::core::mem::transmute(pspcmds.as_ptr()), pcfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), pspcmds.len().try_into().unwrap(), ::core::mem::transmute(pspcmds.as_ptr()), pcfetched).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -514,7 +514,7 @@ impl IEnumTfCandidates { (::windows_core::Interface::vtable(self).Clone)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn Next(&self, ppcand: &mut [::core::option::Option], pcfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppcand.len() as _, ::core::mem::transmute(ppcand.as_ptr()), pcfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppcand.len().try_into().unwrap(), ::core::mem::transmute(ppcand.as_ptr()), pcfetched).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -548,7 +548,7 @@ impl IEnumTfContextViews { (::windows_core::Interface::vtable(self).Clone)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn Next(&self, rgviews: &mut [::core::option::Option], pcfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgviews.len() as _, ::core::mem::transmute(rgviews.as_ptr()), pcfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgviews.len().try_into().unwrap(), ::core::mem::transmute(rgviews.as_ptr()), pcfetched).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -582,7 +582,7 @@ impl IEnumTfContexts { (::windows_core::Interface::vtable(self).Clone)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn Next(&self, rgcontext: &mut [::core::option::Option], pcfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgcontext.len() as _, ::core::mem::transmute(rgcontext.as_ptr()), pcfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgcontext.len().try_into().unwrap(), ::core::mem::transmute(rgcontext.as_ptr()), pcfetched).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -616,7 +616,7 @@ impl IEnumTfDisplayAttributeInfo { (::windows_core::Interface::vtable(self).Clone)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn Next(&self, rginfo: &mut [::core::option::Option], pcfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rginfo.len() as _, ::core::mem::transmute(rginfo.as_ptr()), pcfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rginfo.len().try_into().unwrap(), ::core::mem::transmute(rginfo.as_ptr()), pcfetched).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -650,7 +650,7 @@ impl IEnumTfDocumentMgrs { (::windows_core::Interface::vtable(self).Clone)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn Next(&self, rgdocumentmgr: &mut [::core::option::Option], pcfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgdocumentmgr.len() as _, ::core::mem::transmute(rgdocumentmgr.as_ptr()), pcfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgdocumentmgr.len().try_into().unwrap(), ::core::mem::transmute(rgdocumentmgr.as_ptr()), pcfetched).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -684,7 +684,7 @@ impl IEnumTfFunctionProviders { (::windows_core::Interface::vtable(self).Clone)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn Next(&self, ppcmdobj: &mut [::core::option::Option], pcfetch: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppcmdobj.len() as _, ::core::mem::transmute(ppcmdobj.as_ptr()), pcfetch).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppcmdobj.len().try_into().unwrap(), ::core::mem::transmute(ppcmdobj.as_ptr()), pcfetch).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -718,7 +718,7 @@ impl IEnumTfInputProcessorProfiles { (::windows_core::Interface::vtable(self).Clone)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn Next(&self, pprofile: &mut [TF_INPUTPROCESSORPROFILE], pcfetch: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), pprofile.len() as _, ::core::mem::transmute(pprofile.as_ptr()), pcfetch).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), pprofile.len().try_into().unwrap(), ::core::mem::transmute(pprofile.as_ptr()), pcfetch).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -752,7 +752,7 @@ impl IEnumTfLangBarItems { (::windows_core::Interface::vtable(self).Clone)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn Next(&self, ppitem: &mut [::core::option::Option], pcfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppitem.len() as _, ::core::mem::transmute(ppitem.as_ptr()), pcfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppitem.len().try_into().unwrap(), ::core::mem::transmute(ppitem.as_ptr()), pcfetched).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -788,7 +788,7 @@ impl IEnumTfLanguageProfiles { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn Next(&self, pprofile: &mut [TF_LANGUAGEPROFILE], pcfetch: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), pprofile.len() as _, ::core::mem::transmute(pprofile.as_ptr()), pcfetch).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), pprofile.len().try_into().unwrap(), ::core::mem::transmute(pprofile.as_ptr()), pcfetch).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -825,7 +825,7 @@ impl IEnumTfLatticeElements { (::windows_core::Interface::vtable(self).Clone)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn Next(&self, rgselements: &mut [TF_LMLATTELEMENT], pcfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgselements.len() as _, ::core::mem::transmute(rgselements.as_ptr()), pcfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgselements.len().try_into().unwrap(), ::core::mem::transmute(rgselements.as_ptr()), pcfetched).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -859,7 +859,7 @@ impl IEnumTfProperties { (::windows_core::Interface::vtable(self).Clone)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn Next(&self, ppprop: &mut [::core::option::Option], pcfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppprop.len() as _, ::core::mem::transmute(ppprop.as_ptr()), pcfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppprop.len().try_into().unwrap(), ::core::mem::transmute(ppprop.as_ptr()), pcfetched).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -895,7 +895,7 @@ impl IEnumTfPropertyValue { #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", 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<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgvalues.len() as _, ::core::mem::transmute(rgvalues.as_ptr()), pcfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgvalues.len().try_into().unwrap(), ::core::mem::transmute(rgvalues.as_ptr()), pcfetched).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -932,7 +932,7 @@ impl IEnumTfRanges { (::windows_core::Interface::vtable(self).Clone)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn Next(&self, pprange: &mut [::core::option::Option], pcfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), pprange.len() as _, ::core::mem::transmute(pprange.as_ptr()), pcfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), pprange.len().try_into().unwrap(), ::core::mem::transmute(pprange.as_ptr()), pcfetched).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -966,7 +966,7 @@ impl IEnumTfUIElements { (::windows_core::Interface::vtable(self).Clone)(::windows_core::Interface::as_raw(self), &mut result__).from_abi(result__) } pub unsafe fn Next(&self, ppelement: &mut [::core::option::Option], pcfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppelement.len() as _, ::core::mem::transmute(ppelement.as_ptr()), pcfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppelement.len().try_into().unwrap(), ::core::mem::transmute(ppelement.as_ptr()), pcfetched).ok() } pub unsafe fn Reset(&self) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Reset)(::windows_core::Interface::as_raw(self)).ok() @@ -1021,7 +1021,7 @@ impl ISpeechCommandProvider { (::windows_core::Interface::vtable(self).EnumSpeechCommands)(::windows_core::Interface::as_raw(self), langid, &mut result__).from_abi(result__) } pub unsafe fn ProcessCommand(&self, pszcommand: &[u16], langid: u16) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).ProcessCommand)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszcommand.as_ptr()), pszcommand.len() as _, langid).ok() + (::windows_core::Interface::vtable(self).ProcessCommand)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pszcommand.as_ptr()), pszcommand.len().try_into().unwrap(), langid).ok() } } ::windows_core::imp::interface_hierarchy!(ISpeechCommandProvider, ::windows_core::IUnknown); @@ -1068,19 +1068,19 @@ impl ITextStoreACP { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetSelection(&self, ulindex: u32, pselection: &mut [TS_SELECTION_ACP], pcfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSelection)(::windows_core::Interface::as_raw(self), ulindex, pselection.len() as _, ::core::mem::transmute(pselection.as_ptr()), pcfetched).ok() + (::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).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetSelection(&self, pselection: &[TS_SELECTION_ACP]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetSelection)(::windows_core::Interface::as_raw(self), pselection.len() as _, ::core::mem::transmute(pselection.as_ptr())).ok() + (::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<()> { - (::windows_core::Interface::vtable(self).GetText)(::windows_core::Interface::as_raw(self), acpstart, acpend, ::core::mem::transmute(pchplain.as_ptr()), pchplain.len() as _, pcchplainret, ::core::mem::transmute(prgruninfo.as_ptr()), prgruninfo.len() as _, pcruninforet, pacpnext).ok() + (::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, ::core::mem::transmute(prgruninfo.as_ptr()), prgruninfo.len().try_into().unwrap(), pcruninforet, pacpnext).ok() } pub unsafe fn SetText(&self, dwflags: u32, acpstart: i32, acpend: i32, pchtext: &[u16]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).SetText)(::windows_core::Interface::as_raw(self), dwflags, acpstart, acpend, ::core::mem::transmute(pchtext.as_ptr()), pchtext.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).SetText)(::windows_core::Interface::as_raw(self), dwflags, acpstart, acpend, ::core::mem::transmute(pchtext.as_ptr()), pchtext.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -1108,7 +1108,7 @@ impl ITextStoreACP { (::windows_core::Interface::vtable(self).InsertEmbedded)(::windows_core::Interface::as_raw(self), dwflags, acpstart, acpend, pdataobject.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn InsertTextAtSelection(&self, dwflags: u32, pchtext: &[u16], pacpstart: *mut i32, pacpend: *mut i32, pchange: *mut TS_TEXTCHANGE) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).InsertTextAtSelection)(::windows_core::Interface::as_raw(self), dwflags, ::core::mem::transmute(pchtext.as_ptr()), pchtext.len() as _, pacpstart, pacpend, pchange).ok() + (::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, pacpend, pchange).ok() } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -1119,23 +1119,23 @@ impl ITextStoreACP { (::windows_core::Interface::vtable(self).InsertEmbeddedAtSelection)(::windows_core::Interface::as_raw(self), dwflags, pdataobject.into_param().abi(), pacpstart, pacpend, pchange).ok() } pub unsafe fn RequestSupportedAttrs(&self, dwflags: u32, pafilterattrs: &[::windows_core::GUID]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).RequestSupportedAttrs)(::windows_core::Interface::as_raw(self), dwflags, pafilterattrs.len() as _, ::core::mem::transmute(pafilterattrs.as_ptr())).ok() + (::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() } pub unsafe fn RequestAttrsAtPosition(&self, acppos: i32, pafilterattrs: &[::windows_core::GUID], dwflags: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).RequestAttrsAtPosition)(::windows_core::Interface::as_raw(self), acppos, pafilterattrs.len() as _, ::core::mem::transmute(pafilterattrs.as_ptr()), dwflags).ok() + (::windows_core::Interface::vtable(self).RequestAttrsAtPosition)(::windows_core::Interface::as_raw(self), acppos, pafilterattrs.len().try_into().unwrap(), ::core::mem::transmute(pafilterattrs.as_ptr()), dwflags).ok() } pub unsafe fn RequestAttrsTransitioningAtPosition(&self, acppos: i32, pafilterattrs: &[::windows_core::GUID], dwflags: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).RequestAttrsTransitioningAtPosition)(::windows_core::Interface::as_raw(self), acppos, pafilterattrs.len() as _, ::core::mem::transmute(pafilterattrs.as_ptr()), dwflags).ok() + (::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() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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<()> { - (::windows_core::Interface::vtable(self).FindNextAttrTransition)(::windows_core::Interface::as_raw(self), acpstart, acphalt, pafilterattrs.len() as _, ::core::mem::transmute(pafilterattrs.as_ptr()), dwflags, pacpnext, pffound, plfoundoffset).ok() + (::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, pffound, plfoundoffset).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", 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<()> { - (::windows_core::Interface::vtable(self).RetrieveRequestedAttrs)(::windows_core::Interface::as_raw(self), paattrvals.len() as _, ::core::mem::transmute(paattrvals.as_ptr()), pcfetched).ok() + (::windows_core::Interface::vtable(self).RetrieveRequestedAttrs)(::windows_core::Interface::as_raw(self), paattrvals.len().try_into().unwrap(), ::core::mem::transmute(paattrvals.as_ptr()), pcfetched).ok() } pub unsafe fn GetEndACP(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1273,19 +1273,19 @@ impl ITextStoreACP2 { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetSelection(&self, ulindex: u32, pselection: &mut [TS_SELECTION_ACP], pcfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSelection)(::windows_core::Interface::as_raw(self), ulindex, pselection.len() as _, ::core::mem::transmute(pselection.as_ptr()), pcfetched).ok() + (::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).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetSelection(&self, pselection: &[TS_SELECTION_ACP]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetSelection)(::windows_core::Interface::as_raw(self), pselection.len() as _, ::core::mem::transmute(pselection.as_ptr())).ok() + (::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<()> { - (::windows_core::Interface::vtable(self).GetText)(::windows_core::Interface::as_raw(self), acpstart, acpend, ::core::mem::transmute(pchplain.as_ptr()), pchplain.len() as _, pcchplainret, ::core::mem::transmute(prgruninfo.as_ptr()), prgruninfo.len() as _, pcruninforet, pacpnext).ok() + (::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, ::core::mem::transmute(prgruninfo.as_ptr()), prgruninfo.len().try_into().unwrap(), pcruninforet, pacpnext).ok() } pub unsafe fn SetText(&self, dwflags: u32, acpstart: i32, acpend: i32, pchtext: &[u16]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).SetText)(::windows_core::Interface::as_raw(self), dwflags, acpstart, acpend, ::core::mem::transmute(pchtext.as_ptr()), pchtext.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).SetText)(::windows_core::Interface::as_raw(self), dwflags, acpstart, acpend, ::core::mem::transmute(pchtext.as_ptr()), pchtext.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -1313,7 +1313,7 @@ impl ITextStoreACP2 { (::windows_core::Interface::vtable(self).InsertEmbedded)(::windows_core::Interface::as_raw(self), dwflags, acpstart, acpend, pdataobject.into_param().abi(), &mut result__).from_abi(result__) } pub unsafe fn InsertTextAtSelection(&self, dwflags: u32, pchtext: &[u16], pacpstart: *mut i32, pacpend: *mut i32, pchange: *mut TS_TEXTCHANGE) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).InsertTextAtSelection)(::windows_core::Interface::as_raw(self), dwflags, ::core::mem::transmute(pchtext.as_ptr()), pchtext.len() as _, pacpstart, pacpend, pchange).ok() + (::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, pacpend, pchange).ok() } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -1324,23 +1324,23 @@ impl ITextStoreACP2 { (::windows_core::Interface::vtable(self).InsertEmbeddedAtSelection)(::windows_core::Interface::as_raw(self), dwflags, pdataobject.into_param().abi(), pacpstart, pacpend, pchange).ok() } pub unsafe fn RequestSupportedAttrs(&self, dwflags: u32, pafilterattrs: &[::windows_core::GUID]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).RequestSupportedAttrs)(::windows_core::Interface::as_raw(self), dwflags, pafilterattrs.len() as _, ::core::mem::transmute(pafilterattrs.as_ptr())).ok() + (::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() } pub unsafe fn RequestAttrsAtPosition(&self, acppos: i32, pafilterattrs: &[::windows_core::GUID], dwflags: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).RequestAttrsAtPosition)(::windows_core::Interface::as_raw(self), acppos, pafilterattrs.len() as _, ::core::mem::transmute(pafilterattrs.as_ptr()), dwflags).ok() + (::windows_core::Interface::vtable(self).RequestAttrsAtPosition)(::windows_core::Interface::as_raw(self), acppos, pafilterattrs.len().try_into().unwrap(), ::core::mem::transmute(pafilterattrs.as_ptr()), dwflags).ok() } pub unsafe fn RequestAttrsTransitioningAtPosition(&self, acppos: i32, pafilterattrs: &[::windows_core::GUID], dwflags: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).RequestAttrsTransitioningAtPosition)(::windows_core::Interface::as_raw(self), acppos, pafilterattrs.len() as _, ::core::mem::transmute(pafilterattrs.as_ptr()), dwflags).ok() + (::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() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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<()> { - (::windows_core::Interface::vtable(self).FindNextAttrTransition)(::windows_core::Interface::as_raw(self), acpstart, acphalt, pafilterattrs.len() as _, ::core::mem::transmute(pafilterattrs.as_ptr()), dwflags, pacpnext, pffound, plfoundoffset).ok() + (::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, pffound, plfoundoffset).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", 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<()> { - (::windows_core::Interface::vtable(self).RetrieveRequestedAttrs)(::windows_core::Interface::as_raw(self), paattrvals.len() as _, ::core::mem::transmute(paattrvals.as_ptr()), pcfetched).ok() + (::windows_core::Interface::vtable(self).RetrieveRequestedAttrs)(::windows_core::Interface::as_raw(self), paattrvals.len().try_into().unwrap(), ::core::mem::transmute(paattrvals.as_ptr()), pcfetched).ok() } pub unsafe fn GetEndACP(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1538,7 +1538,7 @@ impl ITextStoreACPSink { (::windows_core::Interface::vtable(self).OnStatusChange)(::windows_core::Interface::as_raw(self), dwflags).ok() } pub unsafe fn OnAttrsChange(&self, acpstart: i32, acpend: i32, paattrs: &[::windows_core::GUID]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).OnAttrsChange)(::windows_core::Interface::as_raw(self), acpstart, acpend, paattrs.len() as _, ::core::mem::transmute(paattrs.as_ptr())).ok() + (::windows_core::Interface::vtable(self).OnAttrsChange)(::windows_core::Interface::as_raw(self), acpstart, acpend, paattrs.len().try_into().unwrap(), ::core::mem::transmute(paattrs.as_ptr())).ok() } pub unsafe fn OnLockGranted(&self, dwlockflags: TEXT_STORE_LOCK_FLAGS) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).OnLockGranted)(::windows_core::Interface::as_raw(self), dwlockflags).ok() @@ -1587,7 +1587,7 @@ impl ITextStoreACPSinkEx { (::windows_core::Interface::vtable(self).base__.OnStatusChange)(::windows_core::Interface::as_raw(self), dwflags).ok() } pub unsafe fn OnAttrsChange(&self, acpstart: i32, acpend: i32, paattrs: &[::windows_core::GUID]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.OnAttrsChange)(::windows_core::Interface::as_raw(self), acpstart, acpend, paattrs.len() as _, ::core::mem::transmute(paattrs.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.OnAttrsChange)(::windows_core::Interface::as_raw(self), acpstart, acpend, paattrs.len().try_into().unwrap(), ::core::mem::transmute(paattrs.as_ptr())).ok() } pub unsafe fn OnLockGranted(&self, dwlockflags: TEXT_STORE_LOCK_FLAGS) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.OnLockGranted)(::windows_core::Interface::as_raw(self), dwlockflags).ok() @@ -1649,12 +1649,12 @@ impl ITextStoreAnchor { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetSelection(&self, ulindex: u32, pselection: &mut [TS_SELECTION_ANCHOR], pcfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSelection)(::windows_core::Interface::as_raw(self), ulindex, pselection.len() as _, ::core::mem::transmute(pselection.as_ptr()), pcfetched).ok() + (::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).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetSelection(&self, pselection: &[TS_SELECTION_ANCHOR]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetSelection)(::windows_core::Interface::as_raw(self), pselection.len() as _, ::core::mem::transmute(pselection.as_ptr())).ok() + (::windows_core::Interface::vtable(self).SetSelection)(::windows_core::Interface::as_raw(self), pselection.len().try_into().unwrap(), ::core::mem::transmute(pselection.as_ptr())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1664,14 +1664,14 @@ impl ITextStoreAnchor { P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).GetText)(::windows_core::Interface::as_raw(self), dwflags, pastart.into_param().abi(), paend.into_param().abi(), ::core::mem::transmute(pchtext.as_ptr()), pchtext.len() as _, pcch, fupdateanchor.into_param().abi()).ok() + (::windows_core::Interface::vtable(self).GetText)(::windows_core::Interface::as_raw(self), dwflags, pastart.into_param().abi(), paend.into_param().abi(), ::core::mem::transmute(pchtext.as_ptr()), pchtext.len().try_into().unwrap(), pcch, fupdateanchor.into_param().abi()).ok() } pub unsafe fn SetText(&self, dwflags: u32, pastart: P0, paend: P1, pchtext: &[u16]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).SetText)(::windows_core::Interface::as_raw(self), dwflags, pastart.into_param().abi(), paend.into_param().abi(), ::core::mem::transmute(pchtext.as_ptr()), pchtext.len() as _).ok() + (::windows_core::Interface::vtable(self).SetText)(::windows_core::Interface::as_raw(self), dwflags, pastart.into_param().abi(), paend.into_param().abi(), ::core::mem::transmute(pchtext.as_ptr()), pchtext.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -1701,19 +1701,19 @@ impl ITextStoreAnchor { (::windows_core::Interface::vtable(self).InsertEmbedded)(::windows_core::Interface::as_raw(self), dwflags, pastart.into_param().abi(), paend.into_param().abi(), pdataobject.into_param().abi()).ok() } pub unsafe fn RequestSupportedAttrs(&self, dwflags: u32, pafilterattrs: &[::windows_core::GUID]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).RequestSupportedAttrs)(::windows_core::Interface::as_raw(self), dwflags, pafilterattrs.len() as _, ::core::mem::transmute(pafilterattrs.as_ptr())).ok() + (::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() } pub unsafe fn RequestAttrsAtPosition(&self, papos: P0, pafilterattrs: &[::windows_core::GUID], dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).RequestAttrsAtPosition)(::windows_core::Interface::as_raw(self), papos.into_param().abi(), pafilterattrs.len() as _, ::core::mem::transmute(pafilterattrs.as_ptr()), dwflags).ok() + (::windows_core::Interface::vtable(self).RequestAttrsAtPosition)(::windows_core::Interface::as_raw(self), papos.into_param().abi(), pafilterattrs.len().try_into().unwrap(), ::core::mem::transmute(pafilterattrs.as_ptr()), dwflags).ok() } pub unsafe fn RequestAttrsTransitioningAtPosition(&self, papos: P0, pafilterattrs: &[::windows_core::GUID], dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).RequestAttrsTransitioningAtPosition)(::windows_core::Interface::as_raw(self), papos.into_param().abi(), pafilterattrs.len() as _, ::core::mem::transmute(pafilterattrs.as_ptr()), dwflags).ok() + (::windows_core::Interface::vtable(self).RequestAttrsTransitioningAtPosition)(::windows_core::Interface::as_raw(self), papos.into_param().abi(), pafilterattrs.len().try_into().unwrap(), ::core::mem::transmute(pafilterattrs.as_ptr()), dwflags).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1722,12 +1722,12 @@ impl ITextStoreAnchor { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).FindNextAttrTransition)(::windows_core::Interface::as_raw(self), pastart.into_param().abi(), pahalt.into_param().abi(), pafilterattrs.len() as _, ::core::mem::transmute(pafilterattrs.as_ptr()), dwflags, pffound, plfoundoffset).ok() + (::windows_core::Interface::vtable(self).FindNextAttrTransition)(::windows_core::Interface::as_raw(self), pastart.into_param().abi(), pahalt.into_param().abi(), pafilterattrs.len().try_into().unwrap(), ::core::mem::transmute(pafilterattrs.as_ptr()), dwflags, pffound, plfoundoffset).ok() } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_System_Com\"`, `\"Win32_System_Ole\"`, `\"Win32_System_Variant\"`"] #[cfg(all(feature = "Win32_Foundation", 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<()> { - (::windows_core::Interface::vtable(self).RetrieveRequestedAttrs)(::windows_core::Interface::as_raw(self), paattrvals.len() as _, ::core::mem::transmute(paattrvals.as_ptr()), pcfetched).ok() + (::windows_core::Interface::vtable(self).RetrieveRequestedAttrs)(::windows_core::Interface::as_raw(self), paattrvals.len().try_into().unwrap(), ::core::mem::transmute(paattrvals.as_ptr()), pcfetched).ok() } pub unsafe fn GetStart(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1775,7 +1775,7 @@ impl ITextStoreAnchor { (::windows_core::Interface::vtable(self).QueryInsertEmbedded)(::windows_core::Interface::as_raw(self), pguidservice, pformatetc, &mut result__).from_abi(result__) } pub unsafe fn InsertTextAtSelection(&self, dwflags: u32, pchtext: &[u16], ppastart: *mut ::core::option::Option, ppaend: *mut ::core::option::Option) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).InsertTextAtSelection)(::windows_core::Interface::as_raw(self), dwflags, ::core::mem::transmute(pchtext.as_ptr()), pchtext.len() as _, ::core::mem::transmute(ppastart), ::core::mem::transmute(ppaend)).ok() + (::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(ppastart), ::core::mem::transmute(ppaend)).ok() } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -1919,7 +1919,7 @@ impl ITextStoreAnchorSink { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).OnAttrsChange)(::windows_core::Interface::as_raw(self), pastart.into_param().abi(), paend.into_param().abi(), paattrs.len() as _, ::core::mem::transmute(paattrs.as_ptr())).ok() + (::windows_core::Interface::vtable(self).OnAttrsChange)(::windows_core::Interface::as_raw(self), pastart.into_param().abi(), paend.into_param().abi(), paattrs.len().try_into().unwrap(), ::core::mem::transmute(paattrs.as_ptr())).ok() } pub unsafe fn OnLockGranted(&self, dwlockflags: TEXT_STORE_LOCK_FLAGS) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).OnLockGranted)(::windows_core::Interface::as_raw(self), dwlockflags).ok() @@ -1976,7 +1976,7 @@ impl ITextStoreSinkAnchorEx { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).base__.OnAttrsChange)(::windows_core::Interface::as_raw(self), pastart.into_param().abi(), paend.into_param().abi(), paattrs.len() as _, ::core::mem::transmute(paattrs.as_ptr())).ok() + (::windows_core::Interface::vtable(self).base__.OnAttrsChange)(::windows_core::Interface::as_raw(self), pastart.into_param().abi(), paend.into_param().abi(), paattrs.len().try_into().unwrap(), ::core::mem::transmute(paattrs.as_ptr())).ok() } pub unsafe fn OnLockGranted(&self, dwlockflags: TEXT_STORE_LOCK_FLAGS) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.OnLockGranted)(::windows_core::Interface::as_raw(self), dwlockflags).ok() @@ -2116,10 +2116,10 @@ impl ITfCandidateListUIElement { (::windows_core::Interface::vtable(self).GetString)(::windows_core::Interface::as_raw(self), uindex, &mut result__).from_abi(result__) } pub unsafe fn GetPageIndex(&self, pindex: &mut [u32], pupagecnt: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetPageIndex)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pindex.as_ptr()), pindex.len() as _, pupagecnt).ok() + (::windows_core::Interface::vtable(self).GetPageIndex)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pindex.as_ptr()), pindex.len().try_into().unwrap(), pupagecnt).ok() } pub unsafe fn SetPageIndex(&self, pindex: &[u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetPageIndex)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pindex.as_ptr()), pindex.len() as _).ok() + (::windows_core::Interface::vtable(self).SetPageIndex)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pindex.as_ptr()), pindex.len().try_into().unwrap()).ok() } pub unsafe fn GetCurrentPage(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -2193,10 +2193,10 @@ impl ITfCandidateListUIElementBehavior { (::windows_core::Interface::vtable(self).base__.GetString)(::windows_core::Interface::as_raw(self), uindex, &mut result__).from_abi(result__) } pub unsafe fn GetPageIndex(&self, pindex: &mut [u32], pupagecnt: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetPageIndex)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pindex.as_ptr()), pindex.len() as _, pupagecnt).ok() + (::windows_core::Interface::vtable(self).base__.GetPageIndex)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pindex.as_ptr()), pindex.len().try_into().unwrap(), pupagecnt).ok() } pub unsafe fn SetPageIndex(&self, pindex: &[u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetPageIndex)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pindex.as_ptr()), pindex.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.SetPageIndex)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pindex.as_ptr()), pindex.len().try_into().unwrap()).ok() } pub unsafe fn GetCurrentPage(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -2277,10 +2277,10 @@ impl ITfCategoryMgr { (::windows_core::Interface::vtable(self).EnumItemsInCategory)(::windows_core::Interface::as_raw(self), rcatid, &mut result__).from_abi(result__) } pub unsafe fn FindClosestCategory(&self, rguid: *const ::windows_core::GUID, pcatid: *mut ::windows_core::GUID, ppcatidlist: &[*const ::windows_core::GUID]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).FindClosestCategory)(::windows_core::Interface::as_raw(self), rguid, pcatid, ::core::mem::transmute(ppcatidlist.as_ptr()), ppcatidlist.len() as _).ok() + (::windows_core::Interface::vtable(self).FindClosestCategory)(::windows_core::Interface::as_raw(self), rguid, pcatid, ::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<()> { - (::windows_core::Interface::vtable(self).RegisterGUIDDescription)(::windows_core::Interface::as_raw(self), rclsid, rguid, ::core::mem::transmute(pchdesc.as_ptr()), pchdesc.len() as _).ok() + (::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() } pub unsafe fn UnregisterGUIDDescription(&self, rclsid: *const ::windows_core::GUID, rguid: *const ::windows_core::GUID) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).UnregisterGUIDDescription)(::windows_core::Interface::as_raw(self), rclsid, rguid).ok() @@ -2649,12 +2649,12 @@ impl ITfContext { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn GetSelection(&self, ec: u32, ulindex: u32, pselection: &mut [TF_SELECTION], pcfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetSelection)(::windows_core::Interface::as_raw(self), ec, ulindex, pselection.len() as _, ::core::mem::transmute(pselection.as_ptr()), pcfetched).ok() + (::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).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn SetSelection(&self, ec: u32, pselection: &[TF_SELECTION]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetSelection)(::windows_core::Interface::as_raw(self), ec, pselection.len() as _, ::core::mem::transmute(pselection.as_ptr())).ok() + (::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() } pub unsafe fn GetStart(&self, ec: u32) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -2686,7 +2686,7 @@ impl ITfContext { } pub unsafe fn TrackProperties(&self, prgprop: &[*const ::windows_core::GUID], prgappprop: &[*const ::windows_core::GUID]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).TrackProperties)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(prgprop.as_ptr()), prgprop.len() as _, ::core::mem::transmute(prgappprop.as_ptr()), prgappprop.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).TrackProperties)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(prgprop.as_ptr()), prgprop.len().try_into().unwrap(), ::core::mem::transmute(prgappprop.as_ptr()), prgappprop.len().try_into().unwrap(), &mut result__).from_abi(result__) } pub unsafe fn EnumProperties(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -3390,7 +3390,7 @@ impl ITfEditRecord { } pub unsafe fn GetTextAndPropertyUpdates(&self, dwflags: GET_TEXT_AND_PROPERTY_UPDATES_FLAGS, prgproperties: &[*const ::windows_core::GUID]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).GetTextAndPropertyUpdates)(::windows_core::Interface::as_raw(self), dwflags, ::core::mem::transmute(prgproperties.as_ptr()), prgproperties.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).GetTextAndPropertyUpdates)(::windows_core::Interface::as_raw(self), dwflags, ::core::mem::transmute(prgproperties.as_ptr()), prgproperties.len().try_into().unwrap(), &mut result__).from_abi(result__) } } ::windows_core::imp::interface_hierarchy!(ITfEditRecord, ::windows_core::IUnknown); @@ -3474,7 +3474,7 @@ impl ITfFnAdviseText { where P0: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).OnTextUpdate)(::windows_core::Interface::as_raw(self), prange.into_param().abi(), ::core::mem::transmute(pchtext.as_ptr()), pchtext.len() as _).ok() + (::windows_core::Interface::vtable(self).OnTextUpdate)(::windows_core::Interface::as_raw(self), prange.into_param().abi(), ::core::mem::transmute(pchtext.as_ptr()), pchtext.len().try_into().unwrap()).ok() } pub unsafe fn OnLatticeUpdate(&self, prange: P0, plattice: P1) -> ::windows_core::Result<()> where @@ -3503,7 +3503,7 @@ pub struct ITfFnAdviseText_Vtbl { pub struct ITfFnBalloon(::windows_core::IUnknown); impl ITfFnBalloon { pub unsafe fn UpdateBalloon(&self, style: TfLBBalloonStyle, pch: &[u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).UpdateBalloon)(::windows_core::Interface::as_raw(self), style, ::core::mem::transmute(pch.as_ptr()), pch.len() as _).ok() + (::windows_core::Interface::vtable(self).UpdateBalloon)(::windows_core::Interface::as_raw(self), style, ::core::mem::transmute(pch.as_ptr()), pch.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(ITfFnBalloon, ::windows_core::IUnknown); @@ -4243,7 +4243,7 @@ impl ITfInputProcessorProfileMgr { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).RegisterProfile)(::windows_core::Interface::as_raw(self), rclsid, langid, guidprofile, ::core::mem::transmute(pchdesc.as_ptr()), pchdesc.len() as _, ::core::mem::transmute(pchiconfile.as_ptr()), pchiconfile.len() as _, uiconindex, hklsubstitute.into_param().abi(), dwpreferredlayout, benabledbydefault.into_param().abi(), dwflags).ok() + (::windows_core::Interface::vtable(self).RegisterProfile)(::windows_core::Interface::as_raw(self), rclsid, langid, guidprofile, ::core::mem::transmute(pchdesc.as_ptr()), pchdesc.len().try_into().unwrap(), ::core::mem::transmute(pchiconfile.as_ptr()), pchiconfile.len().try_into().unwrap(), uiconindex, hklsubstitute.into_param().abi(), dwpreferredlayout, benabledbydefault.into_param().abi(), dwflags).ok() } pub unsafe fn UnregisterProfile(&self, rclsid: *const ::windows_core::GUID, langid: u16, guidprofile: *const ::windows_core::GUID, dwflags: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).UnregisterProfile)(::windows_core::Interface::as_raw(self), rclsid, langid, guidprofile, dwflags).ok() @@ -4308,7 +4308,7 @@ impl ITfInputProcessorProfiles { (::windows_core::Interface::vtable(self).Unregister)(::windows_core::Interface::as_raw(self), rclsid).ok() } pub unsafe fn AddLanguageProfile(&self, rclsid: *const ::windows_core::GUID, langid: u16, guidprofile: *const ::windows_core::GUID, pchdesc: &[u16], pchiconfile: &[u16], uiconindex: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).AddLanguageProfile)(::windows_core::Interface::as_raw(self), rclsid, langid, guidprofile, ::core::mem::transmute(pchdesc.as_ptr()), pchdesc.len() as _, ::core::mem::transmute(pchiconfile.as_ptr()), pchiconfile.len() as _, uiconindex).ok() + (::windows_core::Interface::vtable(self).AddLanguageProfile)(::windows_core::Interface::as_raw(self), rclsid, langid, guidprofile, ::core::mem::transmute(pchdesc.as_ptr()), pchdesc.len().try_into().unwrap(), ::core::mem::transmute(pchiconfile.as_ptr()), pchiconfile.len().try_into().unwrap(), uiconindex).ok() } pub unsafe fn RemoveLanguageProfile(&self, rclsid: *const ::windows_core::GUID, langid: u16, guidprofile: *const ::windows_core::GUID) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).RemoveLanguageProfile)(::windows_core::Interface::as_raw(self), rclsid, langid, guidprofile).ok() @@ -4431,7 +4431,7 @@ impl ITfInputProcessorProfilesEx { (::windows_core::Interface::vtable(self).base__.Unregister)(::windows_core::Interface::as_raw(self), rclsid).ok() } pub unsafe fn AddLanguageProfile(&self, rclsid: *const ::windows_core::GUID, langid: u16, guidprofile: *const ::windows_core::GUID, pchdesc: &[u16], pchiconfile: &[u16], uiconindex: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.AddLanguageProfile)(::windows_core::Interface::as_raw(self), rclsid, langid, guidprofile, ::core::mem::transmute(pchdesc.as_ptr()), pchdesc.len() as _, ::core::mem::transmute(pchiconfile.as_ptr()), pchiconfile.len() as _, uiconindex).ok() + (::windows_core::Interface::vtable(self).base__.AddLanguageProfile)(::windows_core::Interface::as_raw(self), rclsid, langid, guidprofile, ::core::mem::transmute(pchdesc.as_ptr()), pchdesc.len().try_into().unwrap(), ::core::mem::transmute(pchiconfile.as_ptr()), pchiconfile.len().try_into().unwrap(), uiconindex).ok() } pub unsafe fn RemoveLanguageProfile(&self, rclsid: *const ::windows_core::GUID, langid: u16, guidprofile: *const ::windows_core::GUID) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).base__.RemoveLanguageProfile)(::windows_core::Interface::as_raw(self), rclsid, langid, guidprofile).ok() @@ -4501,7 +4501,7 @@ impl ITfInputProcessorProfilesEx { (::windows_core::Interface::vtable(self).base__.SubstituteKeyboardLayout)(::windows_core::Interface::as_raw(self), rclsid, langid, guidprofile, hkl.into_param().abi()).ok() } pub unsafe fn SetLanguageProfileDisplayName(&self, rclsid: *const ::windows_core::GUID, langid: u16, guidprofile: *const ::windows_core::GUID, pchfile: &[u16], uresid: u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetLanguageProfileDisplayName)(::windows_core::Interface::as_raw(self), rclsid, langid, guidprofile, ::core::mem::transmute(pchfile.as_ptr()), pchfile.len() as _, uresid).ok() + (::windows_core::Interface::vtable(self).SetLanguageProfileDisplayName)(::windows_core::Interface::as_raw(self), rclsid, langid, guidprofile, ::core::mem::transmute(pchfile.as_ptr()), pchfile.len().try_into().unwrap(), uresid).ok() } } ::windows_core::imp::interface_hierarchy!(ITfInputProcessorProfilesEx, ::windows_core::IUnknown, ITfInputProcessorProfiles); @@ -4608,7 +4608,7 @@ pub struct ITfInsertAtSelection(::windows_core::IUnknown); impl ITfInsertAtSelection { pub unsafe fn InsertTextAtSelection(&self, ec: u32, dwflags: INSERT_TEXT_AT_SELECTION_FLAGS, pchtext: &[u16]) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); - (::windows_core::Interface::vtable(self).InsertTextAtSelection)(::windows_core::Interface::as_raw(self), ec, dwflags, ::core::mem::transmute(pchtext.as_ptr()), pchtext.len() as _, &mut result__).from_abi(result__) + (::windows_core::Interface::vtable(self).InsertTextAtSelection)(::windows_core::Interface::as_raw(self), ec, dwflags, ::core::mem::transmute(pchtext.as_ptr()), pchtext.len().try_into().unwrap(), &mut result__).from_abi(result__) } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -4910,13 +4910,13 @@ impl ITfKeystrokeMgr { (::windows_core::Interface::vtable(self).IsPreservedKey)(::windows_core::Interface::as_raw(self), rguid, pprekey, &mut result__).from_abi(result__) } pub unsafe fn PreserveKey(&self, tid: u32, rguid: *const ::windows_core::GUID, prekey: *const TF_PRESERVEDKEY, pchdesc: &[u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).PreserveKey)(::windows_core::Interface::as_raw(self), tid, rguid, prekey, ::core::mem::transmute(pchdesc.as_ptr()), pchdesc.len() as _).ok() + (::windows_core::Interface::vtable(self).PreserveKey)(::windows_core::Interface::as_raw(self), tid, rguid, prekey, ::core::mem::transmute(pchdesc.as_ptr()), pchdesc.len().try_into().unwrap()).ok() } pub unsafe fn UnpreserveKey(&self, rguid: *const ::windows_core::GUID, pprekey: *const TF_PRESERVEDKEY) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).UnpreserveKey)(::windows_core::Interface::as_raw(self), rguid, pprekey).ok() } pub unsafe fn SetPreservedKeyDescription(&self, rguid: *const ::windows_core::GUID, pchdesc: &[u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetPreservedKeyDescription)(::windows_core::Interface::as_raw(self), rguid, ::core::mem::transmute(pchdesc.as_ptr()), pchdesc.len() as _).ok() + (::windows_core::Interface::vtable(self).SetPreservedKeyDescription)(::windows_core::Interface::as_raw(self), rguid, ::core::mem::transmute(pchdesc.as_ptr()), pchdesc.len().try_into().unwrap()).ok() } pub unsafe fn GetPreservedKeyDescription(&self, rguid: *const ::windows_core::GUID) -> ::windows_core::Result<::windows_core::BSTR> { let mut result__ = ::std::mem::zeroed(); @@ -5438,7 +5438,7 @@ impl ITfLangBarItemMgr { (::windows_core::Interface::vtable(self).AdviseItemsSink)(::windows_core::Interface::as_raw(self), ulcount, ::core::mem::transmute(ppunk), pguiditem, pdwcookie).ok() } pub unsafe fn UnadviseItemsSink(&self, pdwcookie: &[u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).UnadviseItemsSink)(::windows_core::Interface::as_raw(self), pdwcookie.len() as _, ::core::mem::transmute(pdwcookie.as_ptr())).ok() + (::windows_core::Interface::vtable(self).UnadviseItemsSink)(::windows_core::Interface::as_raw(self), pdwcookie.len().try_into().unwrap(), ::core::mem::transmute(pdwcookie.as_ptr())).ok() } } ::windows_core::imp::interface_hierarchy!(ITfLangBarItemMgr, ::windows_core::IUnknown); @@ -5631,7 +5631,7 @@ impl ITfMenu { P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { - (::windows_core::Interface::vtable(self).AddMenuItem)(::windows_core::Interface::as_raw(self), uid, dwflags, hbmp.into_param().abi(), hbmpmask.into_param().abi(), ::core::mem::transmute(pch.as_ptr()), pch.len() as _, ::core::mem::transmute(ppmenu)).ok() + (::windows_core::Interface::vtable(self).AddMenuItem)(::windows_core::Interface::as_raw(self), uid, dwflags, hbmp.into_param().abi(), hbmpmask.into_param().abi(), ::core::mem::transmute(pch.as_ptr()), pch.len().try_into().unwrap(), ::core::mem::transmute(ppmenu)).ok() } } ::windows_core::imp::interface_hierarchy!(ITfMenu, ::windows_core::IUnknown); @@ -6051,10 +6051,10 @@ pub struct ITfQueryEmbedded_Vtbl { pub struct ITfRange(::windows_core::IUnknown); impl ITfRange { pub unsafe fn GetText(&self, ec: u32, dwflags: u32, pchtext: &mut [u16], pcch: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).GetText)(::windows_core::Interface::as_raw(self), ec, dwflags, ::core::mem::transmute(pchtext.as_ptr()), pchtext.len() as _, pcch).ok() + (::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).ok() } pub unsafe fn SetText(&self, ec: u32, dwflags: u32, pchtext: &[u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetText)(::windows_core::Interface::as_raw(self), ec, dwflags, ::core::mem::transmute(pchtext.as_ptr()), pchtext.len() as _).ok() + (::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() } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -6229,10 +6229,10 @@ pub struct ITfRange_Vtbl { pub struct ITfRangeACP(::windows_core::IUnknown); impl ITfRangeACP { pub unsafe fn GetText(&self, ec: u32, dwflags: u32, pchtext: &mut [u16], pcch: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.GetText)(::windows_core::Interface::as_raw(self), ec, dwflags, ::core::mem::transmute(pchtext.as_ptr()), pchtext.len() as _, pcch).ok() + (::windows_core::Interface::vtable(self).base__.GetText)(::windows_core::Interface::as_raw(self), ec, dwflags, ::core::mem::transmute(pchtext.as_ptr()), pchtext.len().try_into().unwrap(), pcch).ok() } pub unsafe fn SetText(&self, ec: u32, dwflags: u32, pchtext: &[u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).base__.SetText)(::windows_core::Interface::as_raw(self), ec, dwflags, ::core::mem::transmute(pchtext.as_ptr()), pchtext.len() as _).ok() + (::windows_core::Interface::vtable(self).base__.SetText)(::windows_core::Interface::as_raw(self), ec, dwflags, ::core::mem::transmute(pchtext.as_ptr()), pchtext.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_System_Com\"`"] #[cfg(feature = "Win32_System_Com")] @@ -6656,7 +6656,7 @@ impl ITfSpeechUIServer { (::windows_core::Interface::vtable(self).ShowUI)(::windows_core::Interface::as_raw(self), fshow.into_param().abi()).ok() } pub unsafe fn UpdateBalloon(&self, style: TfLBBalloonStyle, pch: &[u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).UpdateBalloon)(::windows_core::Interface::as_raw(self), style, ::core::mem::transmute(pch.as_ptr()), pch.len() as _).ok() + (::windows_core::Interface::vtable(self).UpdateBalloon)(::windows_core::Interface::as_raw(self), style, ::core::mem::transmute(pch.as_ptr()), pch.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(ITfSpeechUIServer, ::windows_core::IUnknown); @@ -6740,7 +6740,7 @@ impl ITfSystemLangBarItem { (::windows_core::Interface::vtable(self).SetIcon)(::windows_core::Interface::as_raw(self), hicon.into_param().abi()).ok() } pub unsafe fn SetTooltipString(&self, pchtooltip: &[u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetTooltipString)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pchtooltip.as_ptr()), pchtooltip.len() as _).ok() + (::windows_core::Interface::vtable(self).SetTooltipString)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pchtooltip.as_ptr()), pchtooltip.len().try_into().unwrap()).ok() } } ::windows_core::imp::interface_hierarchy!(ITfSystemLangBarItem, ::windows_core::IUnknown); @@ -6793,7 +6793,7 @@ pub struct ITfSystemLangBarItemSink_Vtbl { pub struct ITfSystemLangBarItemText(::windows_core::IUnknown); impl ITfSystemLangBarItemText { pub unsafe fn SetItemText(&self, pch: &[u16]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).SetItemText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pch.as_ptr()), pch.len() as _).ok() + (::windows_core::Interface::vtable(self).SetItemText)(::windows_core::Interface::as_raw(self), ::core::mem::transmute(pch.as_ptr()), pch.len().try_into().unwrap()).ok() } pub unsafe fn GetItemText(&self) -> ::windows_core::Result<::windows_core::BSTR> { let mut result__ = ::std::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Win32/UI/WindowsAndMessaging/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/WindowsAndMessaging/mod.rs index aec6407514..4aff9eebbe 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/WindowsAndMessaging/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/WindowsAndMessaging/mod.rs @@ -162,7 +162,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn CascadeWindows(hwndparent : super::super::Foundation:: HWND, whow : CASCADE_WINDOWS_HOW, lprect : *const super::super::Foundation:: RECT, ckids : u32, lpkids : *const super::super::Foundation:: HWND) -> u16); - CascadeWindows(hwndparent.into_param().abi(), whow, ::core::mem::transmute(lprect.unwrap_or(::std::ptr::null())), lpkids.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpkids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + CascadeWindows(hwndparent.into_param().abi(), whow, ::core::mem::transmute(lprect.unwrap_or(::std::ptr::null())), lpkids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpkids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -211,12 +211,12 @@ pub unsafe fn CharLowerA(lpsz: ::windows_core::PSTR) -> ::windows_core::PSTR { #[inline] pub unsafe fn CharLowerBuffA(lpsz: &mut [u8]) -> u32 { ::windows_targets::link!("user32.dll" "system" fn CharLowerBuffA(lpsz : ::windows_core::PSTR, cchlength : u32) -> u32); - CharLowerBuffA(::core::mem::transmute(lpsz.as_ptr()), lpsz.len() as _) + CharLowerBuffA(::core::mem::transmute(lpsz.as_ptr()), lpsz.len().try_into().unwrap()) } #[inline] pub unsafe fn CharLowerBuffW(lpsz: &mut [u16]) -> u32 { ::windows_targets::link!("user32.dll" "system" fn CharLowerBuffW(lpsz : ::windows_core::PWSTR, cchlength : u32) -> u32); - CharLowerBuffW(::core::mem::transmute(lpsz.as_ptr()), lpsz.len() as _) + CharLowerBuffW(::core::mem::transmute(lpsz.as_ptr()), lpsz.len().try_into().unwrap()) } #[inline] pub unsafe fn CharLowerW(lpsz: ::windows_core::PWSTR) -> ::windows_core::PWSTR { @@ -292,7 +292,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("user32.dll" "system" fn CharToOemBuffA(lpszsrc : ::windows_core::PCSTR, lpszdst : ::windows_core::PSTR, cchdstlength : u32) -> super::super::Foundation:: BOOL); - CharToOemBuffA(lpszsrc.into_param().abi(), ::core::mem::transmute(lpszdst.as_ptr()), lpszdst.len() as _).ok() + CharToOemBuffA(lpszsrc.into_param().abi(), ::core::mem::transmute(lpszdst.as_ptr()), lpszdst.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -302,7 +302,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("user32.dll" "system" fn CharToOemBuffW(lpszsrc : ::windows_core::PCWSTR, lpszdst : ::windows_core::PSTR, cchdstlength : u32) -> super::super::Foundation:: BOOL); - CharToOemBuffW(lpszsrc.into_param().abi(), ::core::mem::transmute(lpszdst.as_ptr()), lpszdst.len() as _).ok() + CharToOemBuffW(lpszsrc.into_param().abi(), ::core::mem::transmute(lpszdst.as_ptr()), lpszdst.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -322,12 +322,12 @@ pub unsafe fn CharUpperA(lpsz: ::windows_core::PSTR) -> ::windows_core::PSTR { #[inline] pub unsafe fn CharUpperBuffA(lpsz: &mut [u8]) -> u32 { ::windows_targets::link!("user32.dll" "system" fn CharUpperBuffA(lpsz : ::windows_core::PSTR, cchlength : u32) -> u32); - CharUpperBuffA(::core::mem::transmute(lpsz.as_ptr()), lpsz.len() as _) + CharUpperBuffA(::core::mem::transmute(lpsz.as_ptr()), lpsz.len().try_into().unwrap()) } #[inline] pub unsafe fn CharUpperBuffW(lpsz: &mut [u16]) -> u32 { ::windows_targets::link!("user32.dll" "system" fn CharUpperBuffW(lpsz : ::windows_core::PWSTR, cchlength : u32) -> u32); - CharUpperBuffW(::core::mem::transmute(lpsz.as_ptr()), lpsz.len() as _) + CharUpperBuffW(::core::mem::transmute(lpsz.as_ptr()), lpsz.len().try_into().unwrap()) } #[inline] pub unsafe fn CharUpperW(lpsz: ::windows_core::PWSTR) -> ::windows_core::PWSTR { @@ -395,7 +395,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn CopyAcceleratorTableA(haccelsrc : HACCEL, lpacceldst : *mut ACCEL, caccelentries : i32) -> i32); - CopyAcceleratorTableA(haccelsrc.into_param().abi(), ::core::mem::transmute(lpacceldst.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpacceldst.as_deref().map_or(0, |slice| slice.len() as _)) + CopyAcceleratorTableA(haccelsrc.into_param().abi(), ::core::mem::transmute(lpacceldst.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpacceldst.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn CopyAcceleratorTableW(haccelsrc: P0, lpacceldst: ::core::option::Option<&mut [ACCEL]>) -> i32 @@ -403,7 +403,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn CopyAcceleratorTableW(haccelsrc : HACCEL, lpacceldst : *mut ACCEL, caccelentries : i32) -> i32); - CopyAcceleratorTableW(haccelsrc.into_param().abi(), ::core::mem::transmute(lpacceldst.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpacceldst.as_deref().map_or(0, |slice| slice.len() as _)) + CopyAcceleratorTableW(haccelsrc.into_param().abi(), ::core::mem::transmute(lpacceldst.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpacceldst.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn CopyIcon(hicon: P0) -> ::windows_core::Result @@ -428,13 +428,13 @@ where #[inline] pub unsafe fn CreateAcceleratorTableA(paccel: &[ACCEL]) -> ::windows_core::Result { ::windows_targets::link!("user32.dll" "system" fn CreateAcceleratorTableA(paccel : *const ACCEL, caccel : i32) -> HACCEL); - let result__ = CreateAcceleratorTableA(::core::mem::transmute(paccel.as_ptr()), paccel.len() as _); + let result__ = CreateAcceleratorTableA(::core::mem::transmute(paccel.as_ptr()), paccel.len().try_into().unwrap()); (!result__.is_invalid()).then(|| result__).ok_or_else(::windows_core::Error::from_win32) } #[inline] pub unsafe fn CreateAcceleratorTableW(paccel: &[ACCEL]) -> ::windows_core::Result { ::windows_targets::link!("user32.dll" "system" fn CreateAcceleratorTableW(paccel : *const ACCEL, caccel : i32) -> HACCEL); - let result__ = CreateAcceleratorTableW(::core::mem::transmute(paccel.as_ptr()), paccel.len() as _); + let result__ = CreateAcceleratorTableW(::core::mem::transmute(paccel.as_ptr()), paccel.len().try_into().unwrap()); (!result__.is_invalid()).then(|| result__).ok_or_else(::windows_core::Error::from_win32) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`"] @@ -528,7 +528,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn CreateIconFromResource(presbits : *const u8, dwressize : u32, ficon : super::super::Foundation:: BOOL, dwver : u32) -> HICON); - let result__ = CreateIconFromResource(::core::mem::transmute(presbits.as_ptr()), presbits.len() as _, ficon.into_param().abi(), dwver); + let result__ = CreateIconFromResource(::core::mem::transmute(presbits.as_ptr()), presbits.len().try_into().unwrap(), ficon.into_param().abi(), dwver); (!result__.is_invalid()).then(|| result__).ok_or_else(::windows_core::Error::from_win32) } #[doc = "Required features: `\"Win32_Foundation\"`"] @@ -539,7 +539,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn CreateIconFromResourceEx(presbits : *const u8, dwressize : u32, ficon : super::super::Foundation:: BOOL, dwver : u32, cxdesired : i32, cydesired : i32, flags : IMAGE_FLAGS) -> HICON); - let result__ = CreateIconFromResourceEx(::core::mem::transmute(presbits.as_ptr()), presbits.len() as _, ficon.into_param().abi(), dwver, cxdesired, cydesired, flags); + let result__ = CreateIconFromResourceEx(::core::mem::transmute(presbits.as_ptr()), presbits.len().try_into().unwrap(), ficon.into_param().abi(), dwver, cxdesired, cydesired, flags); (!result__.is_invalid()).then(|| result__).ok_or_else(::windows_core::Error::from_win32) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`"] @@ -801,7 +801,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("mrmsupport.dll" "system" fn DestroyIndexedResults(resourceuri : ::windows_core::PCWSTR, qualifiercount : u32, qualifiers : *const IndexedResourceQualifier) -> ()); - DestroyIndexedResults(resourceuri.into_param().abi(), qualifiers.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(qualifiers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + DestroyIndexedResults(resourceuri.into_param().abi(), qualifiers.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(qualifiers.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1126,7 +1126,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetAltTabInfoA(hwnd : super::super::Foundation:: HWND, iitem : i32, pati : *mut ALTTABINFO, pszitemtext : ::windows_core::PSTR, cchitemtext : u32) -> super::super::Foundation:: BOOL); - GetAltTabInfoA(hwnd.into_param().abi(), iitem, pati, ::core::mem::transmute(pszitemtext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszitemtext.as_deref().map_or(0, |slice| slice.len() as _)).ok() + GetAltTabInfoA(hwnd.into_param().abi(), iitem, pati, ::core::mem::transmute(pszitemtext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszitemtext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1136,7 +1136,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetAltTabInfoW(hwnd : super::super::Foundation:: HWND, iitem : i32, pati : *mut ALTTABINFO, pszitemtext : ::windows_core::PWSTR, cchitemtext : u32) -> super::super::Foundation:: BOOL); - GetAltTabInfoW(hwnd.into_param().abi(), iitem, pati, ::core::mem::transmute(pszitemtext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszitemtext.as_deref().map_or(0, |slice| slice.len() as _)).ok() + GetAltTabInfoW(hwnd.into_param().abi(), iitem, pati, ::core::mem::transmute(pszitemtext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszitemtext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1254,7 +1254,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetClassNameA(hwnd : super::super::Foundation:: HWND, lpclassname : ::windows_core::PSTR, nmaxcount : i32) -> i32); - GetClassNameA(hwnd.into_param().abi(), ::core::mem::transmute(lpclassname.as_ptr()), lpclassname.len() as _) + GetClassNameA(hwnd.into_param().abi(), ::core::mem::transmute(lpclassname.as_ptr()), lpclassname.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1264,7 +1264,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetClassNameW(hwnd : super::super::Foundation:: HWND, lpclassname : ::windows_core::PWSTR, nmaxcount : i32) -> i32); - GetClassNameW(hwnd.into_param().abi(), ::core::mem::transmute(lpclassname.as_ptr()), lpclassname.len() as _) + GetClassNameW(hwnd.into_param().abi(), ::core::mem::transmute(lpclassname.as_ptr()), lpclassname.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1363,7 +1363,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetDlgItemTextA(hdlg : super::super::Foundation:: HWND, niddlgitem : i32, lpstring : ::windows_core::PSTR, cchmax : i32) -> u32); - GetDlgItemTextA(hdlg.into_param().abi(), niddlgitem, ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _) + GetDlgItemTextA(hdlg.into_param().abi(), niddlgitem, ::core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1373,7 +1373,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetDlgItemTextW(hdlg : super::super::Foundation:: HWND, niddlgitem : i32, lpstring : ::windows_core::PWSTR, cchmax : i32) -> u32); - GetDlgItemTextW(hdlg.into_param().abi(), niddlgitem, ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _) + GetDlgItemTextW(hdlg.into_param().abi(), niddlgitem, ::core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1552,7 +1552,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetMenuStringA(hmenu : HMENU, uiditem : u32, lpstring : ::windows_core::PSTR, cchmax : i32, flags : MENU_ITEM_FLAGS) -> i32); - GetMenuStringA(hmenu.into_param().abi(), uiditem, ::core::mem::transmute(lpstring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpstring.as_deref().map_or(0, |slice| slice.len() as _), flags) + GetMenuStringA(hmenu.into_param().abi(), uiditem, ::core::mem::transmute(lpstring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), flags) } #[inline] pub unsafe fn GetMenuStringW(hmenu: P0, uiditem: u32, lpstring: ::core::option::Option<&mut [u16]>, flags: MENU_ITEM_FLAGS) -> i32 @@ -1560,7 +1560,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetMenuStringW(hmenu : HMENU, uiditem : u32, lpstring : ::windows_core::PWSTR, cchmax : i32, flags : MENU_ITEM_FLAGS) -> i32); - GetMenuStringW(hmenu.into_param().abi(), uiditem, ::core::mem::transmute(lpstring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpstring.as_deref().map_or(0, |slice| slice.len() as _), flags) + GetMenuStringW(hmenu.into_param().abi(), uiditem, ::core::mem::transmute(lpstring.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), flags) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1845,7 +1845,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetWindowModuleFileNameA(hwnd : super::super::Foundation:: HWND, pszfilename : ::windows_core::PSTR, cchfilenamemax : u32) -> u32); - GetWindowModuleFileNameA(hwnd.into_param().abi(), ::core::mem::transmute(pszfilename.as_ptr()), pszfilename.len() as _) + GetWindowModuleFileNameA(hwnd.into_param().abi(), ::core::mem::transmute(pszfilename.as_ptr()), pszfilename.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1855,7 +1855,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetWindowModuleFileNameW(hwnd : super::super::Foundation:: HWND, pszfilename : ::windows_core::PWSTR, cchfilenamemax : u32) -> u32); - GetWindowModuleFileNameW(hwnd.into_param().abi(), ::core::mem::transmute(pszfilename.as_ptr()), pszfilename.len() as _) + GetWindowModuleFileNameW(hwnd.into_param().abi(), ::core::mem::transmute(pszfilename.as_ptr()), pszfilename.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1885,7 +1885,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetWindowTextA(hwnd : super::super::Foundation:: HWND, lpstring : ::windows_core::PSTR, nmaxcount : i32) -> i32); - GetWindowTextA(hwnd.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _) + GetWindowTextA(hwnd.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -1915,7 +1915,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetWindowTextW(hwnd : super::super::Foundation:: HWND, lpstring : ::windows_core::PWSTR, nmaxcount : i32) -> i32); - GetWindowTextW(hwnd.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _) + GetWindowTextW(hwnd.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2041,7 +2041,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn InternalGetWindowText(hwnd : super::super::Foundation:: HWND, pstring : ::windows_core::PWSTR, cchmaxcount : i32) -> i32); - InternalGetWindowText(hwnd.into_param().abi(), ::core::mem::transmute(pstring.as_ptr()), pstring.len() as _) + InternalGetWindowText(hwnd.into_param().abi(), ::core::mem::transmute(pstring.as_ptr()), pstring.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2605,7 +2605,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::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); - MrmCreateResourceIndexerFromPreviousPriData(projectroot.into_param().abi(), platformversion, defaultqualifiers.into_param().abi(), ::core::mem::transmute(pridata.as_ptr()), pridata.len() as _, indexer).ok() + MrmCreateResourceIndexerFromPreviousPriData(projectroot.into_param().abi(), platformversion, defaultqualifiers.into_param().abi(), ::core::mem::transmute(pridata.as_ptr()), pridata.len().try_into().unwrap(), indexer).ok() } #[inline] pub unsafe fn MrmCreateResourceIndexerFromPreviousPriFile(projectroot: P0, platformversion: MrmPlatformVersion, defaultqualifiers: P1, prifile: P2, indexer: *mut MrmResourceIndexerHandle) -> ::windows_core::Result<()> @@ -2624,7 +2624,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::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); - MrmCreateResourceIndexerFromPreviousSchemaData(projectroot.into_param().abi(), platformversion, defaultqualifiers.into_param().abi(), ::core::mem::transmute(schemaxmldata.as_ptr()), schemaxmldata.len() as _, indexer).ok() + MrmCreateResourceIndexerFromPreviousSchemaData(projectroot.into_param().abi(), platformversion, defaultqualifiers.into_param().abi(), ::core::mem::transmute(schemaxmldata.as_ptr()), schemaxmldata.len().try_into().unwrap(), indexer).ok() } #[inline] pub unsafe fn MrmCreateResourceIndexerFromPreviousSchemaFile(projectroot: P0, platformversion: MrmPlatformVersion, defaultqualifiers: P1, schemafile: P2, indexer: *mut MrmResourceIndexerHandle) -> ::windows_core::Result<()> @@ -2654,7 +2654,7 @@ pub unsafe fn MrmDestroyIndexerAndMessages(indexer: MrmResourceIndexerHandle) -> #[inline] pub unsafe fn MrmDumpPriDataInMemory(inputpridata: &[u8], schemapridata: ::core::option::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); - MrmDumpPriDataInMemory(::core::mem::transmute(inputpridata.as_ptr()), inputpridata.len() as _, ::core::mem::transmute(schemapridata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), schemapridata.as_deref().map_or(0, |slice| slice.len() as _), dumptype, outputxmldata, outputxmlsize).ok() + 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, outputxmlsize).ok() } #[inline] pub unsafe fn MrmDumpPriFile(indexfilename: P0, schemaprifile: P1, dumptype: MrmDumpType, outputxmlfile: P2) -> ::windows_core::Result<()> @@ -2696,7 +2696,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("mrmsupport.dll" "system" fn MrmIndexEmbeddedData(indexer : MrmResourceIndexerHandle, resourceuri : ::windows_core::PCWSTR, embeddeddata : *const u8, embeddeddatasize : u32, qualifiers : ::windows_core::PCWSTR) -> ::windows_core::HRESULT); - MrmIndexEmbeddedData(::core::mem::transmute(indexer), resourceuri.into_param().abi(), ::core::mem::transmute(embeddeddata.as_ptr()), embeddeddata.len() as _, qualifiers.into_param().abi()).ok() + MrmIndexEmbeddedData(::core::mem::transmute(indexer), resourceuri.into_param().abi(), ::core::mem::transmute(embeddeddata.as_ptr()), embeddeddata.len().try_into().unwrap(), qualifiers.into_param().abi()).ok() } #[inline] pub unsafe fn MrmIndexFile(indexer: MrmResourceIndexerHandle, resourceuri: P0, filepath: P1, qualifiers: P2) -> ::windows_core::Result<()> @@ -2747,14 +2747,14 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn MsgWaitForMultipleObjects(ncount : u32, phandles : *const super::super::Foundation:: HANDLE, fwaitall : super::super::Foundation:: BOOL, dwmilliseconds : u32, dwwakemask : QUEUE_STATUS_FLAGS) -> super::super::Foundation:: WAIT_EVENT); - MsgWaitForMultipleObjects(phandles.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(phandles.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), fwaitall.into_param().abi(), dwmilliseconds, dwwakemask) + MsgWaitForMultipleObjects(phandles.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(phandles.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), fwaitall.into_param().abi(), dwmilliseconds, dwwakemask) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] #[inline] pub unsafe fn MsgWaitForMultipleObjectsEx(phandles: ::core::option::Option<&[super::super::Foundation::HANDLE]>, dwmilliseconds: u32, dwwakemask: QUEUE_STATUS_FLAGS, dwflags: MSG_WAIT_FOR_MULTIPLE_OBJECTS_EX_FLAGS) -> super::super::Foundation::WAIT_EVENT { ::windows_targets::link!("user32.dll" "system" fn MsgWaitForMultipleObjectsEx(ncount : u32, phandles : *const super::super::Foundation:: HANDLE, dwmilliseconds : u32, dwwakemask : QUEUE_STATUS_FLAGS, dwflags : MSG_WAIT_FOR_MULTIPLE_OBJECTS_EX_FLAGS) -> super::super::Foundation:: WAIT_EVENT); - MsgWaitForMultipleObjectsEx(phandles.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(phandles.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dwmilliseconds, dwwakemask, dwflags) + MsgWaitForMultipleObjectsEx(phandles.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(phandles.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dwmilliseconds, dwwakemask, dwflags) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2774,7 +2774,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("user32.dll" "system" fn OemToCharBuffA(lpszsrc : ::windows_core::PCSTR, lpszdst : ::windows_core::PSTR, cchdstlength : u32) -> super::super::Foundation:: BOOL); - OemToCharBuffA(lpszsrc.into_param().abi(), ::core::mem::transmute(lpszdst.as_ptr()), lpszdst.len() as _).ok() + OemToCharBuffA(lpszsrc.into_param().abi(), ::core::mem::transmute(lpszdst.as_ptr()), lpszdst.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2784,7 +2784,7 @@ where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("user32.dll" "system" fn OemToCharBuffW(lpszsrc : ::windows_core::PCSTR, lpszdst : ::windows_core::PWSTR, cchdstlength : u32) -> super::super::Foundation:: BOOL); - OemToCharBuffW(lpszsrc.into_param().abi(), ::core::mem::transmute(lpszdst.as_ptr()), lpszdst.len() as _).ok() + OemToCharBuffW(lpszsrc.into_param().abi(), ::core::mem::transmute(lpszdst.as_ptr()), lpszdst.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2890,12 +2890,12 @@ where #[inline] pub unsafe fn PrivateExtractIconsA(szfilename: &[u8; 260], niconindex: i32, cxicon: i32, cyicon: i32, phicon: ::core::option::Option<&mut [HICON]>, piconid: ::core::option::Option<*mut u32>, flags: u32) -> u32 { ::windows_targets::link!("user32.dll" "system" fn PrivateExtractIconsA(szfilename : ::windows_core::PCSTR, niconindex : i32, cxicon : i32, cyicon : i32, phicon : *mut HICON, piconid : *mut u32, nicons : u32, flags : u32) -> u32); - PrivateExtractIconsA(::core::mem::transmute(szfilename.as_ptr()), niconindex, cxicon, cyicon, ::core::mem::transmute(phicon.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(piconid.unwrap_or(::std::ptr::null_mut())), phicon.as_deref().map_or(0, |slice| slice.len() as _), flags) + PrivateExtractIconsA(::core::mem::transmute(szfilename.as_ptr()), niconindex, cxicon, cyicon, ::core::mem::transmute(phicon.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(piconid.unwrap_or(::std::ptr::null_mut())), phicon.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), flags) } #[inline] pub unsafe fn PrivateExtractIconsW(szfilename: &[u16; 260], niconindex: i32, cxicon: i32, cyicon: i32, phicon: ::core::option::Option<&mut [HICON]>, piconid: ::core::option::Option<*mut u32>, flags: u32) -> u32 { ::windows_targets::link!("user32.dll" "system" fn PrivateExtractIconsW(szfilename : ::windows_core::PCWSTR, niconindex : i32, cxicon : i32, cyicon : i32, phicon : *mut HICON, piconid : *mut u32, nicons : u32, flags : u32) -> u32); - PrivateExtractIconsW(::core::mem::transmute(szfilename.as_ptr()), niconindex, cxicon, cyicon, ::core::mem::transmute(phicon.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(piconid.unwrap_or(::std::ptr::null_mut())), phicon.as_deref().map_or(0, |slice| slice.len() as _), flags) + PrivateExtractIconsW(::core::mem::transmute(szfilename.as_ptr()), niconindex, cxicon, cyicon, ::core::mem::transmute(phicon.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(piconid.unwrap_or(::std::ptr::null_mut())), phicon.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), flags) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2915,7 +2915,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn RealGetWindowClassA(hwnd : super::super::Foundation:: HWND, ptszclassname : ::windows_core::PSTR, cchclassnamemax : u32) -> u32); - RealGetWindowClassA(hwnd.into_param().abi(), ::core::mem::transmute(ptszclassname.as_ptr()), ptszclassname.len() as _) + RealGetWindowClassA(hwnd.into_param().abi(), ::core::mem::transmute(ptszclassname.as_ptr()), ptszclassname.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -2925,7 +2925,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn RealGetWindowClassW(hwnd : super::super::Foundation:: HWND, ptszclassname : ::windows_core::PWSTR, cchclassnamemax : u32) -> u32); - RealGetWindowClassW(hwnd.into_param().abi(), ::core::mem::transmute(ptszclassname.as_ptr()), ptszclassname.len() as _) + RealGetWindowClassW(hwnd.into_param().abi(), ::core::mem::transmute(ptszclassname.as_ptr()), ptszclassname.len().try_into().unwrap()) } #[doc = "Required features: `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] @@ -3217,7 +3217,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn SetAdditionalForegroundBoostProcesses(toplevelwindow : super::super::Foundation:: HWND, processhandlecount : u32, processhandlearray : *const super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - SetAdditionalForegroundBoostProcesses(toplevelwindow.into_param().abi(), processhandlearray.len() as _, ::core::mem::transmute(processhandlearray.as_ptr())) + SetAdditionalForegroundBoostProcesses(toplevelwindow.into_param().abi(), processhandlearray.len().try_into().unwrap(), ::core::mem::transmute(processhandlearray.as_ptr())) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -3759,7 +3759,7 @@ where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn TileWindows(hwndparent : super::super::Foundation:: HWND, whow : TILE_WINDOWS_HOW, lprect : *const super::super::Foundation:: RECT, ckids : u32, lpkids : *const super::super::Foundation:: HWND) -> u16); - TileWindows(hwndparent.into_param().abi(), whow, ::core::mem::transmute(lprect.unwrap_or(::std::ptr::null())), lpkids.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpkids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + TileWindows(hwndparent.into_param().abi(), whow, ::core::mem::transmute(lprect.unwrap_or(::std::ptr::null())), lpkids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(lpkids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] 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 26655018c4..4645613a65 100644 --- a/crates/libs/windows/src/Windows/Win32/Web/InternetExplorer/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Web/InternetExplorer/mod.rs @@ -227,7 +227,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("ieframe.dll" "system" fn IERegSetValueEx(lpsubkey : ::windows_core::PCWSTR, lpvaluename : ::windows_core::PCWSTR, reserved : u32, dwtype : u32, lpdata : *const u8, cbdata : u32) -> ::windows_core::HRESULT); - IERegSetValueEx(lpsubkey.into_param().abi(), lpvaluename.into_param().abi(), reserved, dwtype, ::core::mem::transmute(lpdata.as_ptr()), lpdata.len() as _).ok() + IERegSetValueEx(lpsubkey.into_param().abi(), lpvaluename.into_param().abi(), reserved, dwtype, ::core::mem::transmute(lpdata.as_ptr()), lpdata.len().try_into().unwrap()).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -247,7 +247,7 @@ where P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("ieframe.dll" "system" fn IERegisterWritableRegistryValue(guid : ::windows_core::GUID, lppath : ::windows_core::PCWSTR, lpvaluename : ::windows_core::PCWSTR, dwtype : u32, lpdata : *const u8, cbmaxdata : u32) -> ::windows_core::HRESULT); - IERegisterWritableRegistryValue(::core::mem::transmute(guid), lppath.into_param().abi(), lpvaluename.into_param().abi(), dwtype, ::core::mem::transmute(lpdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpdata.as_deref().map_or(0, |slice| slice.len() as _)).ok() + IERegisterWritableRegistryValue(::core::mem::transmute(guid), lppath.into_param().abi(), lpvaluename.into_param().abi(), dwtype, ::core::mem::transmute(lpdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -291,7 +291,7 @@ where P3: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("ieframe.dll" "system" fn IEShowOpenFileDialog(hwnd : super::super::Foundation:: HWND, lpwstrfilename : ::windows_core::PWSTR, cchmaxfilename : u32, lpwstrinitialdir : ::windows_core::PCWSTR, lpwstrfilter : ::windows_core::PCWSTR, lpwstrdefext : ::windows_core::PCWSTR, dwfilterindex : u32, dwflags : u32, phfile : *mut super::super::Foundation:: HANDLE) -> ::windows_core::HRESULT); - IEShowOpenFileDialog(hwnd.into_param().abi(), ::core::mem::transmute(lpwstrfilename.as_ptr()), lpwstrfilename.len() as _, lpwstrinitialdir.into_param().abi(), lpwstrfilter.into_param().abi(), lpwstrdefext.into_param().abi(), dwfilterindex, dwflags, phfile).ok() + IEShowOpenFileDialog(hwnd.into_param().abi(), ::core::mem::transmute(lpwstrfilename.as_ptr()), lpwstrfilename.len().try_into().unwrap(), lpwstrinitialdir.into_param().abi(), lpwstrfilter.into_param().abi(), lpwstrdefext.into_param().abi(), dwfilterindex, dwflags, phfile).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -382,7 +382,7 @@ where P4: ::windows_core::IntoParam, { ::windows_targets::link!("msrating.dll" "system" fn RatingAddToApprovedSites(hdlg : super::super::Foundation:: HWND, cbpasswordblob : u32, pbpasswordblob : *mut u8, lpszurl : ::windows_core::PCWSTR, falwaysnever : super::super::Foundation:: BOOL, fsitepage : super::super::Foundation:: BOOL, fapprovedsitesenforced : super::super::Foundation:: BOOL) -> ::windows_core::HRESULT); - RatingAddToApprovedSites(hdlg.into_param().abi(), pbpasswordblob.len() as _, ::core::mem::transmute(pbpasswordblob.as_ptr()), lpszurl.into_param().abi(), falwaysnever.into_param().abi(), fsitepage.into_param().abi(), fapprovedsitesenforced.into_param().abi()).ok() + RatingAddToApprovedSites(hdlg.into_param().abi(), pbpasswordblob.len().try_into().unwrap(), ::core::mem::transmute(pbpasswordblob.as_ptr()), lpszurl.into_param().abi(), falwaysnever.into_param().abi(), fsitepage.into_param().abi(), fapprovedsitesenforced.into_param().abi()).ok() } #[inline] pub unsafe fn RatingCheckUserAccess(pszusername: P0, pszurl: P1, pszratinginfo: P2, pdata: ::core::option::Option<&[u8]>, ppratingdetails: ::core::option::Option<*mut *mut ::core::ffi::c_void>) -> ::windows_core::Result<()> @@ -392,7 +392,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("msrating.dll" "system" fn RatingCheckUserAccess(pszusername : ::windows_core::PCSTR, pszurl : ::windows_core::PCSTR, pszratinginfo : ::windows_core::PCSTR, pdata : *const u8, cbdata : u32, ppratingdetails : *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT); - RatingCheckUserAccess(pszusername.into_param().abi(), pszurl.into_param().abi(), pszratinginfo.into_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() as _), ::core::mem::transmute(ppratingdetails.unwrap_or(::std::ptr::null_mut()))).ok() + RatingCheckUserAccess(pszusername.into_param().abi(), pszurl.into_param().abi(), pszratinginfo.into_param().abi(), ::core::mem::transmute(pdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(ppratingdetails.unwrap_or(::std::ptr::null_mut()))).ok() } #[inline] pub unsafe fn RatingCheckUserAccessW(pszusername: P0, pszurl: P1, pszratinginfo: P2, pdata: ::core::option::Option<&[u8]>, ppratingdetails: ::core::option::Option<*mut *mut ::core::ffi::c_void>) -> ::windows_core::Result<()> @@ -402,7 +402,7 @@ where P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("msrating.dll" "system" fn RatingCheckUserAccessW(pszusername : ::windows_core::PCWSTR, pszurl : ::windows_core::PCWSTR, pszratinginfo : ::windows_core::PCWSTR, pdata : *const u8, cbdata : u32, ppratingdetails : *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT); - RatingCheckUserAccessW(pszusername.into_param().abi(), pszurl.into_param().abi(), pszratinginfo.into_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() as _), ::core::mem::transmute(ppratingdetails.unwrap_or(::std::ptr::null_mut()))).ok() + RatingCheckUserAccessW(pszusername.into_param().abi(), pszurl.into_param().abi(), pszratinginfo.into_param().abi(), ::core::mem::transmute(pdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ::core::mem::transmute(ppratingdetails.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] @@ -958,7 +958,7 @@ impl IEnumManagerFrames { #[doc = "Required features: `\"Win32_Foundation\"`"] #[cfg(feature = "Win32_Foundation")] pub unsafe fn Next(&self, ppwindows: &mut [*mut super::super::Foundation::HWND], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppwindows.len() as _, ::core::mem::transmute(ppwindows.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), ppwindows.len().try_into().unwrap(), ::core::mem::transmute(ppwindows.as_ptr()), pceltfetched).ok() } pub unsafe fn Count(&self) -> ::windows_core::Result { let mut result__ = ::std::mem::zeroed(); @@ -1000,7 +1000,7 @@ pub struct IEnumManagerFrames_Vtbl { pub struct IEnumOpenServiceActivity(::windows_core::IUnknown); impl IEnumOpenServiceActivity { pub unsafe fn Next(&self, rgelt: &mut [::core::option::Option], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -1034,7 +1034,7 @@ pub struct IEnumOpenServiceActivity_Vtbl { pub struct IEnumOpenServiceActivityCategory(::windows_core::IUnknown); impl IEnumOpenServiceActivityCategory { pub unsafe fn Next(&self, rgelt: &mut [::core::option::Option], pceltfetched: *mut u32) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len() as _, ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() + (::windows_core::Interface::vtable(self).Next)(::windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), ::core::mem::transmute(rgelt.as_ptr()), pceltfetched).ok() } pub unsafe fn Skip(&self, celt: u32) -> ::windows_core::Result<()> { (::windows_core::Interface::vtable(self).Skip)(::windows_core::Interface::as_raw(self), celt).ok() @@ -3130,7 +3130,7 @@ impl ITargetFrame { (::windows_core::Interface::vtable(self).GetFrameMargins)(::windows_core::Interface::as_raw(self), pdwwidth, pdwheight).ok() } pub unsafe fn RemoteNavigate(&self, puldata: &[u32]) -> ::windows_core::Result<()> { - (::windows_core::Interface::vtable(self).RemoteNavigate)(::windows_core::Interface::as_raw(self), puldata.len() as _, ::core::mem::transmute(puldata.as_ptr())).ok() + (::windows_core::Interface::vtable(self).RemoteNavigate)(::windows_core::Interface::as_raw(self), puldata.len().try_into().unwrap(), ::core::mem::transmute(puldata.as_ptr())).ok() } pub unsafe fn OnChildFrameActivate(&self, punkchildframe: P0) -> ::windows_core::Result<()> where diff --git a/crates/tests/component/src/bindings.rs b/crates/tests/component/src/bindings.rs index a327809a66..e3c2781b95 100644 --- a/crates/tests/component/src/bindings.rs +++ b/crates/tests/component/src/bindings.rs @@ -197,9 +197,9 @@ impl Class { let mut result__ = ::core::mem::MaybeUninit::zeroed(); (::windows_core::Interface::vtable(this).Int32Array)( ::windows_core::Interface::as_raw(this), - a.len() as u32, + a.len().try_into()?, a.as_ptr(), - b.len() as u32, + b.len().try_into()?, b.as_mut_ptr(), c.set_abi_len(), c as *mut _ as _, @@ -220,9 +220,9 @@ impl Class { let mut result__ = ::core::mem::MaybeUninit::zeroed(); (::windows_core::Interface::vtable(this).StringArray)( ::windows_core::Interface::as_raw(this), - a.len() as u32, + a.len().try_into()?, ::core::mem::transmute(a.as_ptr()), - b.len() as u32, + b.len().try_into()?, ::core::mem::transmute_copy(&b), c.set_abi_len(), c as *mut _ as _, diff --git a/crates/tests/component_client/src/bindings.rs b/crates/tests/component_client/src/bindings.rs index 0d8d3b0aa0..efddb83234 100644 --- a/crates/tests/component_client/src/bindings.rs +++ b/crates/tests/component_client/src/bindings.rs @@ -165,9 +165,9 @@ impl Class { let mut result__ = ::core::mem::MaybeUninit::zeroed(); (::windows_core::Interface::vtable(this).Int32Array)( ::windows_core::Interface::as_raw(this), - a.len() as u32, + a.len().try_into().unwrap(), a.as_ptr(), - b.len() as u32, + b.len().try_into().unwrap(), b.as_mut_ptr(), c.set_abi_len(), c as *mut _ as _, @@ -188,9 +188,9 @@ impl Class { let mut result__ = ::core::mem::MaybeUninit::zeroed(); (::windows_core::Interface::vtable(this).StringArray)( ::windows_core::Interface::as_raw(this), - a.len() as u32, + a.len().try_into().unwrap(), ::core::mem::transmute(a.as_ptr()), - b.len() as u32, + b.len().try_into().unwrap(), ::core::mem::transmute_copy(&b), c.set_abi_len(), c as *mut _ as _, diff --git a/crates/tests/standalone/src/b_calendar.rs b/crates/tests/standalone/src/b_calendar.rs index 96563a3bc2..07dba79d98 100644 --- a/crates/tests/standalone/src/b_calendar.rs +++ b/crates/tests/standalone/src/b_calendar.rs @@ -1946,7 +1946,7 @@ impl IIterator { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(this).GetMany)( ::windows_core::Interface::as_raw(this), - items.len() as u32, + items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__, ) @@ -2107,7 +2107,7 @@ impl IVectorView { (::windows_core::Interface::vtable(this).GetMany)( ::windows_core::Interface::as_raw(this), startindex, - items.len() as u32, + items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__, ) diff --git a/crates/tests/standalone/src/b_uri.rs b/crates/tests/standalone/src/b_uri.rs index 96e3bb1001..c2b610a340 100644 --- a/crates/tests/standalone/src/b_uri.rs +++ b/crates/tests/standalone/src/b_uri.rs @@ -127,7 +127,7 @@ impl IIterator { let mut result__ = ::std::mem::zeroed(); (::windows_core::Interface::vtable(this).GetMany)( ::windows_core::Interface::as_raw(this), - items.len() as u32, + items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__, ) @@ -459,7 +459,7 @@ impl IVectorView { (::windows_core::Interface::vtable(this).GetMany)( ::windows_core::Interface::as_raw(this), startindex, - items.len() as u32, + items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__, ) @@ -1070,7 +1070,7 @@ impl WwwFormUrlDecoder { (::windows_core::Interface::vtable(this).GetMany)( ::windows_core::Interface::as_raw(this), startindex, - items.len() as u32, + items.len().try_into().unwrap(), ::core::mem::transmute_copy(&items), &mut result__, ) diff --git a/crates/tools/core/bindings.txt b/crates/tools/core/bindings.txt index 2c61dd4543..6f902cc929 100644 --- a/crates/tools/core/bindings.txt +++ b/crates/tools/core/bindings.txt @@ -6,6 +6,7 @@ --filter Windows.Win32.Foundation.CloseHandle Windows.Win32.Foundation.ERROR_NO_UNICODE_TRANSLATION + Windows.Win32.Foundation.E_INVALIDARG Windows.Win32.Foundation.FreeLibrary Windows.Win32.Foundation.GetLastError Windows.Win32.Foundation.SysAllocStringLen