From 554c48bfc0be09d86a9a407f0d354312fc930cd3 Mon Sep 17 00:00:00 2001 From: Kenny Kerr Date: Fri, 10 Nov 2023 11:03:19 -0600 Subject: [PATCH] windows crate --- .../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 +- .../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/Web/Http/Headers/mod.rs | 52 ++++----- .../libs/windows/src/Windows/Web/Http/mod.rs | 2 +- 48 files changed, 314 insertions(+), 314 deletions(-) diff --git a/crates/libs/windows/src/Windows/AI/MachineLearning/mod.rs b/crates/libs/windows/src/Windows/AI/MachineLearning/mod.rs index 235bb0a4b9..04700395ff 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()?, 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()?, shape.as_ptr(), data.len().try_into()?, 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()?, 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()?, 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()?, shape.as_ptr(), data.len().try_into()?, 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()?, 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()?, 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()?, shape.as_ptr(), data.len().try_into()?, 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()?, 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()?, 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()?, shape.as_ptr(), data.len().try_into()?, 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()?, 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()?, 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()?, shape.as_ptr(), data.len().try_into()?, 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()?, 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()?, 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()?, shape.as_ptr(), data.len().try_into()?, 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()?, 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()?, 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()?, shape.as_ptr(), data.len().try_into()?, 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()?, 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()?, 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()?, shape.as_ptr(), data.len().try_into()?, 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()?, 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()?, ::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()?, shape.as_ptr(), data.len().try_into()?, ::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()?, 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()?, shape.as_ptr(), data.len().try_into()?, 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()?, 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()?, 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()?, shape.as_ptr(), data.len().try_into()?, 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()?, 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()?, 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()?, shape.as_ptr(), data.len().try_into()?, 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()?, 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()?, 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()?, shape.as_ptr(), data.len().try_into()?, 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()?, 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..d3e04669a0 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()?, ::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()?, ::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()?, ::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()?, ::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()?, ::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..02c6dbb0cd 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()?, ::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()?, ::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..8b811f74ba 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()?, ::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()?, ::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..e3cfa998da 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()?, ::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..7858816920 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()?, ::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..a55e6c0537 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()?, 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()?, 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()?, 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()?, 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()?, writebuffer.as_ptr(), readbuffer.len().try_into()?, 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()?, writebuffer.as_ptr(), readbuffer.len().try_into()?, 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..f6e0d402d1 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()?, 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()?, 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()?, 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()?, 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()?, writebuffer.as_ptr(), readbuffer.len().try_into()?, 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()?, writebuffer.as_ptr(), readbuffer.len().try_into()?, 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..12b41c0040 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()?, 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()?, 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()?, 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()?, 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()?, ::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()?, 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()?, 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()?, desiredcolors.as_ptr(), lampindexes.len().try_into()?, 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..fcd827afd9 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()?, 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()?, desiredcolors.as_ptr(), lampindexes.len().try_into()?, 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()?, desiredcolors.as_ptr(), keys.len().try_into()?, 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..f0aab59180 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()?, 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()?, 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..1acae7449f 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()?, 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()?, 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()?, 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..32644f4453 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()?, 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()?, 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()?, writebuffer.as_ptr(), readbuffer.len().try_into()?, 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()?, writebuffer.as_ptr(), readbuffer.len().try_into()?, 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..d9d5ea7f27 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()?, 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()?, 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()?, writebuffer.as_ptr(), readbuffer.len().try_into()?, 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()?, writebuffer.as_ptr(), readbuffer.len().try_into()?, 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/mod.rs b/crates/libs/windows/src/Windows/Foundation/Collections/mod.rs index 2f4562e113..7e35232f97 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()?, ::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()?, ::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()?, ::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()?, ::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()?, ::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()?, ::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..b1f73537b5 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, ::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()?, ::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()?, ::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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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..4e6914d334 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, ::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()?, ::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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, ::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..d6603c60f3 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()?, 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()?, 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()?, 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()?, 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()?, requestmessagebuffer.as_ptr(), responsemessagebuffer.len().try_into()?, 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()?, 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()?, 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()?, 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..1a67593a89 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()?, buttonarray.as_mut_ptr(), switcharray.len().try_into()?, switcharray.as_mut_ptr(), axisarray.len().try_into()?, 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..a0f289eac2 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()?, ::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..d8d57d8eea 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()?, 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..f6e568f84b 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()?, 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()?, extendedpropertyid.as_ptr(), propertyvalue.len().try_into()?, 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..2fe9091284 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()?, 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()?, 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()?, 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()?, keyidentifier.as_ptr(), licensedata.len().try_into()?, 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..7cbb65e802 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()?, coordinates.as_ptr(), results.len().try_into()?, 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()?, pixelcoordinates.as_ptr(), results.len().try_into()?, 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()?, inputs.as_ptr(), results.len().try_into()?, 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()?, inputs.as_ptr(), results.len().try_into()?, 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()?, sourcepoints.as_ptr(), targetcoordinatesystem.into_param().abi(), results.len().try_into()?, 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()?, sourcepoints.as_ptr(), targetcoordinatesystem.into_param().abi(), targetcameraintrinsics.into_param().abi(), results.len().try_into()?, 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..1403fd61b2 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()?, 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()?, extendedpropertyid.as_ptr(), propertyvalue.len().try_into()?, 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..3ab558f8fa 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()?, 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()?, 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()?, 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()?, 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()?, 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..fc610383d1 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()?, ::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()?, ::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()?, ::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..fb1b8a83fb 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()?, 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()?, 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()?, 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()?, sessionidbytes.as_ptr(), challengedatabytes.len().try_into()?, 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()?, transmitterchannelbytes.as_ptr(), sessionidbytes.len().try_into()?, sessionidbytes.as_ptr(), challengedatabytes.len().try_into()?, 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()?, transmitterchannelbytes.as_ptr(), sessionidbytes.len().try_into()?, sessionidbytes.as_ptr(), responsedatabytes.len().try_into()?, 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()?, sessionidbytes.as_ptr(), challengedatabytes.len().try_into()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, customdatatypeidbytes.as_ptr(), customdatabytes.len().try_into()?, 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()?, 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()?, 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()?, 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()?, 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()?, 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()?, sessionidbytes.as_ptr(), challengedatabytes.len().try_into()?, 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()?, transmitterchannelbytes.as_ptr(), sessionidbytes.len().try_into()?, sessionidbytes.as_ptr(), challengedatabytes.len().try_into()?, 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()?, transmitterchannelbytes.as_ptr(), sessionidbytes.len().try_into()?, sessionidbytes.as_ptr(), responsedatabytes.len().try_into()?, 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()?, sessionidbytes.as_ptr(), challengedatabytes.len().try_into()?, 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()?, 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()?, 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()?, contentkeyids.as_ptr(), contentkeyidstrings.len().try_into()?, ::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()?, ::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()?, 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()?, 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()?, 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()?, 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()?, ::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()?, 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()?, 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()?, 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()?, 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()?, ::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()?, 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()?, 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()?, 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..7838460481 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()?, 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..5d04dde69c 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()?, ::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..9c2a0c8cd3 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()?, 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()?, 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..add7ba740f 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()?, 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()?, 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()?, 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()?, 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()?, localsocketaddress.as_ptr(), remotesocketaddress.len().try_into()?, 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()?, 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..80b7aa72ce 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()?, 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()?, 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()?, joints.as_ptr(), jointposes.len().try_into()?, 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()?, joints.as_ptr(), referencejoints.len().try_into()?, referencejoints.as_ptr(), jointposes.len().try_into()?, 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..9a323743a2 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()?, 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()?, 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()?, 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..09a129de71 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()?, 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..2621b4d3fb 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()?, 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..3da0de0040 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()?, ::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..5c78bcdd7f 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()?, ::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()?, ::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()?, ::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..168524c164 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()?, ::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()?, ::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..032b5bc795 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()?, 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()?, 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()?, 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()?, 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..38401debee 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()?, 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()?, 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..debf7be1d3 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()?, 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()?, 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..b55939bfa2 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()?, ::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()?, ::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()?, ::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()?, ::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..d7be4a2b4f 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()?, ::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()?, ::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()?, ::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()?, ::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()?, 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()?, 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()?, 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()?, 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()?, inkpoints.as_ptr(), predictedinkpoints.len().try_into()?, 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..7f1746d600 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()?, 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..576f7d3ddb 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()?, 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()?, 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/Web/Http/Headers/mod.rs b/crates/libs/windows/src/Windows/Web/Http/Headers/mod.rs index 1552efebd4..fade98e651 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()?, ::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()?, ::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()?, ::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()?, ::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()?, ::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()?, ::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()?, ::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()?, ::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()?, ::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()?, ::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()?, ::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()?, ::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()?, ::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()?, ::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()?, ::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()?, ::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()?, ::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()?, ::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()?, ::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()?, ::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()?, ::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()?, ::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()?, ::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()?, ::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()?, ::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()?, ::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..91be3a6573 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()?, ::core::mem::transmute_copy(&items), &mut result__).from_abi(result__) } } }