diff --git a/crates/libs/bindgen/src/delegates.rs b/crates/libs/bindgen/src/delegates.rs index a3928319aa..fafdfafa56 100644 --- a/crates/libs/bindgen/src/delegates.rs +++ b/crates/libs/bindgen/src/delegates.rs @@ -30,7 +30,7 @@ fn gen_win_delegate(def: &TypeDef, gen: &Gen) -> TokenStream { let features = cfg.gen(gen); let vtbl_signature = gen_vtbl_signature(def, &method, gen); let invoke = gen_winrt_method(def, InterfaceKind::Default, &method, &mut MethodNames::new(), &mut MethodNames::new(), gen); - let invoke_upcall = gen_winrt_upcall(&signature, quote! { ((*this).invoke) }, gen); + let invoke_upcall = gen_winrt_upcall(&signature, quote! { ((*this).invoke) }); let mut tokens = quote! { #doc diff --git a/crates/libs/bindgen/src/helpers.rs b/crates/libs/bindgen/src/helpers.rs index 1b894f169c..d0b6a0d44b 100644 --- a/crates/libs/bindgen/src/helpers.rs +++ b/crates/libs/bindgen/src/helpers.rs @@ -361,8 +361,8 @@ pub fn gen_win32_upcall(sig: &MethodSignature, inner: TokenStream) -> TokenStrea } } -pub fn gen_winrt_upcall(sig: &MethodSignature, inner: TokenStream, gen: &Gen) -> TokenStream { - let invoke_args = sig.params.iter().map(|param| gen_winrt_invoke_arg(param, gen)); +pub fn gen_winrt_upcall(sig: &MethodSignature, inner: TokenStream) -> TokenStream { + let invoke_args = sig.params.iter().map(gen_winrt_invoke_arg); match &sig.return_sig { Some(return_sig) if return_sig.is_array => { @@ -406,9 +406,8 @@ fn gen_win32_invoke_arg(param: &MethodParam) -> TokenStream { } } -fn gen_winrt_invoke_arg(param: &MethodParam, gen: &Gen) -> TokenStream { +fn gen_winrt_invoke_arg(param: &MethodParam) -> TokenStream { let name = gen_param_name(¶m.param); - let kind = gen_element_name(¶m.signature.kind, gen); if param.signature.is_array { let abi_size_name: TokenStream = format!("{}_array_size", param.param.name()).into(); @@ -424,9 +423,9 @@ fn gen_winrt_invoke_arg(param: &MethodParam, gen: &Gen) -> TokenStream { if param.signature.kind.is_primitive() { quote! { #name } } else if param.signature.is_const { - quote! { &*(#name as *const <#kind as ::windows::core::Abi>::Abi as *const <#kind as ::windows::core::DefaultType>::DefaultType) } + quote! { ::core::mem::transmute_copy(&#name) } } else { - quote! { &*(&#name as *const <#kind as ::windows::core::Abi>::Abi as *const <#kind as ::windows::core::DefaultType>::DefaultType) } + quote! { ::core::mem::transmute(&#name) } } } else { quote! { ::core::mem::transmute_copy(&#name) } @@ -502,30 +501,40 @@ fn gen_win32_produce_type(param: &MethodParam, gen: &Gen) -> TokenStream { } fn gen_winrt_produce_type(param: &MethodParam, include_param_names: bool, gen: &Gen) -> TokenStream { - let tokens = gen_element_name(¶m.signature.kind, gen); + let kind = gen_element_name(¶m.signature.kind, gen); let sig = if param.signature.is_array { - if param.param.is_input() { - quote! { &[<#tokens as ::windows::core::DefaultType>::DefaultType] } - } else if param.signature.by_ref { - quote! { &mut ::windows::core::Array<#tokens> } + if param.signature.by_ref { + quote! { &mut ::windows::core::Array<#kind> } } else { - quote! { &mut [<#tokens as ::windows::core::DefaultType>::DefaultType] } + let kind = if let ElementType::GenericParam(_) = param.signature.kind { + quote! { <#kind as ::windows::core::DefaultType>::DefaultType } + } else if param.signature.kind.is_nullable() { + quote! { ::core::option::Option<#kind> } + } else { + kind + }; + + if param.param.is_input() { + quote! { &[#kind] } + } else { + quote! { &mut [#kind] } + } } } else if param.param.is_input() { if let ElementType::GenericParam(_) = param.signature.kind { - quote! { &<#tokens as ::windows::core::DefaultType>::DefaultType } + quote! { &<#kind as ::windows::core::DefaultType>::DefaultType } } else if param.signature.kind.is_primitive() { - quote! { #tokens } + quote! { #kind } } else if param.signature.kind.is_nullable() { - quote! { &::core::option::Option<#tokens> } + quote! { &::core::option::Option<#kind> } } else { - quote! { &#tokens } + quote! { &#kind } } } else if param.signature.kind.is_nullable() { - quote! { &mut ::core::option::Option<#tokens> } + quote! { &mut ::core::option::Option<#kind> } } else { - quote! { &mut #tokens } + quote! { &mut #kind } }; if include_param_names { diff --git a/crates/libs/bindgen/src/implements.rs b/crates/libs/bindgen/src/implements.rs index 32b68f924a..df8a0aade4 100644 --- a/crates/libs/bindgen/src/implements.rs +++ b/crates/libs/bindgen/src/implements.rs @@ -73,7 +73,7 @@ pub fn gen(def: &TypeDef, gen: &Gen) -> TokenStream { let signature = method.signature(&def.generics); let vtbl_signature = gen_vtbl_signature(def, &method, gen); - let invoke_upcall = if def.is_winrt() { gen_winrt_upcall(&signature, quote! { (*this).#name }, gen) } else { gen_win32_upcall(&signature, quote! { (*this).#name }) }; + let invoke_upcall = if def.is_winrt() { gen_winrt_upcall(&signature, quote! { (*this).#name }) } else { gen_win32_upcall(&signature, quote! { (*this).#name }) }; quote! { unsafe extern "system" fn #name<#(#constraints)* Identity: ::windows::core::IUnknownImpl, Impl: #impl_ident<#(#generics)*>, const OFFSET: isize> #vtbl_signature { diff --git a/crates/libs/bindgen/src/methods.rs b/crates/libs/bindgen/src/methods.rs index f3c00f6609..589612183e 100644 --- a/crates/libs/bindgen/src/methods.rs +++ b/crates/libs/bindgen/src/methods.rs @@ -263,12 +263,22 @@ pub fn gen_winrt_params(params: &[MethodParam], gen: &Gen) -> TokenStream { let kind = gen_element_name(¶m.signature.kind, gen); if param.signature.is_array { - if param.param.is_input() { - result.combine("e! { #name: &[<#kind as ::windows::core::DefaultType>::DefaultType], }); - } else if param.signature.by_ref { + if param.signature.by_ref { result.combine("e! { #name: &mut ::windows::core::Array<#kind>, }); } else { - result.combine("e! { #name: &mut [<#kind as ::windows::core::DefaultType>::DefaultType], }); + let kind = if let ElementType::GenericParam(_) = param.signature.kind { + quote! { <#kind as ::windows::core::DefaultType>::DefaultType } + } else if param.signature.kind.is_nullable() { + quote! { ::core::option::Option<#kind> } + } else { + kind + }; + + if param.param.is_input() { + result.combine("e! { #name: &[#kind], }); + } else { + result.combine("e! { #name: &mut [#kind], }); + } } } else if param.param.is_input() { if param.is_convertible() { diff --git a/crates/libs/windows/src/Windows/AI/MachineLearning/mod.rs b/crates/libs/windows/src/Windows/AI/MachineLearning/mod.rs index 137d61bdc5..917a3be677 100644 --- a/crates/libs/windows/src/Windows/AI/MachineLearning/mod.rs +++ b/crates/libs/windows/src/Windows/AI/MachineLearning/mod.rs @@ -3241,7 +3241,7 @@ impl TensorBoolean { } #[doc = "*Required features: 'AI_MachineLearning', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn CreateFromArray<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable>>(shape: Param0, data: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateFromArray<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable>>(shape: Param0, data: &[bool]) -> ::windows::core::Result { Self::ITensorBooleanStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromArray)(::core::mem::transmute_copy(this), shape.into_param().abi(), data.len() as u32, ::core::mem::transmute(data.as_ptr()), &mut result__).from_abi::(result__) @@ -3256,7 +3256,7 @@ impl TensorBoolean { }) } #[doc = "*Required features: 'AI_MachineLearning'*"] - pub fn CreateFromShapeArrayAndDataArray(shape: &[::DefaultType], data: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateFromShapeArrayAndDataArray(shape: &[i64], data: &[bool]) -> ::windows::core::Result { Self::ITensorBooleanStatics2(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::core::mem::transmute_copy(this), shape.len() as u32, ::core::mem::transmute(shape.as_ptr()), data.len() as u32, ::core::mem::transmute(data.as_ptr()), &mut result__).from_abi::(result__) @@ -3264,7 +3264,7 @@ impl TensorBoolean { } #[doc = "*Required features: 'AI_MachineLearning', 'Storage_Streams'*"] #[cfg(feature = "Storage_Streams")] - pub fn CreateFromBuffer<'a, Param1: ::windows::core::IntoParam<'a, super::super::Storage::Streams::IBuffer>>(shape: &[::DefaultType], buffer: Param1) -> ::windows::core::Result { + pub fn CreateFromBuffer<'a, Param1: ::windows::core::IntoParam<'a, super::super::Storage::Streams::IBuffer>>(shape: &[i64], buffer: Param1) -> ::windows::core::Result { Self::ITensorBooleanStatics2(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromBuffer)(::core::mem::transmute_copy(this), shape.len() as u32, ::core::mem::transmute(shape.as_ptr()), buffer.into_param().abi(), &mut result__).from_abi::(result__) @@ -3515,7 +3515,7 @@ impl TensorDouble { } #[doc = "*Required features: 'AI_MachineLearning', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn CreateFromArray<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable>>(shape: Param0, data: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateFromArray<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable>>(shape: Param0, data: &[f64]) -> ::windows::core::Result { Self::ITensorDoubleStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromArray)(::core::mem::transmute_copy(this), shape.into_param().abi(), data.len() as u32, ::core::mem::transmute(data.as_ptr()), &mut result__).from_abi::(result__) @@ -3530,7 +3530,7 @@ impl TensorDouble { }) } #[doc = "*Required features: 'AI_MachineLearning'*"] - pub fn CreateFromShapeArrayAndDataArray(shape: &[::DefaultType], data: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateFromShapeArrayAndDataArray(shape: &[i64], data: &[f64]) -> ::windows::core::Result { Self::ITensorDoubleStatics2(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::core::mem::transmute_copy(this), shape.len() as u32, ::core::mem::transmute(shape.as_ptr()), data.len() as u32, ::core::mem::transmute(data.as_ptr()), &mut result__).from_abi::(result__) @@ -3538,7 +3538,7 @@ impl TensorDouble { } #[doc = "*Required features: 'AI_MachineLearning', 'Storage_Streams'*"] #[cfg(feature = "Storage_Streams")] - pub fn CreateFromBuffer<'a, Param1: ::windows::core::IntoParam<'a, super::super::Storage::Streams::IBuffer>>(shape: &[::DefaultType], buffer: Param1) -> ::windows::core::Result { + pub fn CreateFromBuffer<'a, Param1: ::windows::core::IntoParam<'a, super::super::Storage::Streams::IBuffer>>(shape: &[i64], buffer: Param1) -> ::windows::core::Result { Self::ITensorDoubleStatics2(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromBuffer)(::core::mem::transmute_copy(this), shape.len() as u32, ::core::mem::transmute(shape.as_ptr()), buffer.into_param().abi(), &mut result__).from_abi::(result__) @@ -3933,7 +3933,7 @@ impl TensorFloat { } #[doc = "*Required features: 'AI_MachineLearning', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn CreateFromArray<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable>>(shape: Param0, data: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateFromArray<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable>>(shape: Param0, data: &[f32]) -> ::windows::core::Result { Self::ITensorFloatStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromArray)(::core::mem::transmute_copy(this), shape.into_param().abi(), data.len() as u32, ::core::mem::transmute(data.as_ptr()), &mut result__).from_abi::(result__) @@ -3948,7 +3948,7 @@ impl TensorFloat { }) } #[doc = "*Required features: 'AI_MachineLearning'*"] - pub fn CreateFromShapeArrayAndDataArray(shape: &[::DefaultType], data: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateFromShapeArrayAndDataArray(shape: &[i64], data: &[f32]) -> ::windows::core::Result { Self::ITensorFloatStatics2(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::core::mem::transmute_copy(this), shape.len() as u32, ::core::mem::transmute(shape.as_ptr()), data.len() as u32, ::core::mem::transmute(data.as_ptr()), &mut result__).from_abi::(result__) @@ -3956,7 +3956,7 @@ impl TensorFloat { } #[doc = "*Required features: 'AI_MachineLearning', 'Storage_Streams'*"] #[cfg(feature = "Storage_Streams")] - pub fn CreateFromBuffer<'a, Param1: ::windows::core::IntoParam<'a, super::super::Storage::Streams::IBuffer>>(shape: &[::DefaultType], buffer: Param1) -> ::windows::core::Result { + pub fn CreateFromBuffer<'a, Param1: ::windows::core::IntoParam<'a, super::super::Storage::Streams::IBuffer>>(shape: &[i64], buffer: Param1) -> ::windows::core::Result { Self::ITensorFloatStatics2(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromBuffer)(::core::mem::transmute_copy(this), shape.len() as u32, ::core::mem::transmute(shape.as_ptr()), buffer.into_param().abi(), &mut result__).from_abi::(result__) @@ -4207,7 +4207,7 @@ impl TensorFloat16Bit { } #[doc = "*Required features: 'AI_MachineLearning', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn CreateFromArray<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable>>(shape: Param0, data: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateFromArray<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable>>(shape: Param0, data: &[f32]) -> ::windows::core::Result { Self::ITensorFloat16BitStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromArray)(::core::mem::transmute_copy(this), shape.into_param().abi(), data.len() as u32, ::core::mem::transmute(data.as_ptr()), &mut result__).from_abi::(result__) @@ -4222,7 +4222,7 @@ impl TensorFloat16Bit { }) } #[doc = "*Required features: 'AI_MachineLearning'*"] - pub fn CreateFromShapeArrayAndDataArray(shape: &[::DefaultType], data: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateFromShapeArrayAndDataArray(shape: &[i64], data: &[f32]) -> ::windows::core::Result { Self::ITensorFloat16BitStatics2(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::core::mem::transmute_copy(this), shape.len() as u32, ::core::mem::transmute(shape.as_ptr()), data.len() as u32, ::core::mem::transmute(data.as_ptr()), &mut result__).from_abi::(result__) @@ -4230,7 +4230,7 @@ impl TensorFloat16Bit { } #[doc = "*Required features: 'AI_MachineLearning', 'Storage_Streams'*"] #[cfg(feature = "Storage_Streams")] - pub fn CreateFromBuffer<'a, Param1: ::windows::core::IntoParam<'a, super::super::Storage::Streams::IBuffer>>(shape: &[::DefaultType], buffer: Param1) -> ::windows::core::Result { + pub fn CreateFromBuffer<'a, Param1: ::windows::core::IntoParam<'a, super::super::Storage::Streams::IBuffer>>(shape: &[i64], buffer: Param1) -> ::windows::core::Result { Self::ITensorFloat16BitStatics2(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromBuffer)(::core::mem::transmute_copy(this), shape.len() as u32, ::core::mem::transmute(shape.as_ptr()), buffer.into_param().abi(), &mut result__).from_abi::(result__) @@ -4481,7 +4481,7 @@ impl TensorInt16Bit { } #[doc = "*Required features: 'AI_MachineLearning', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn CreateFromArray<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable>>(shape: Param0, data: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateFromArray<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable>>(shape: Param0, data: &[i16]) -> ::windows::core::Result { Self::ITensorInt16BitStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromArray)(::core::mem::transmute_copy(this), shape.into_param().abi(), data.len() as u32, ::core::mem::transmute(data.as_ptr()), &mut result__).from_abi::(result__) @@ -4496,7 +4496,7 @@ impl TensorInt16Bit { }) } #[doc = "*Required features: 'AI_MachineLearning'*"] - pub fn CreateFromShapeArrayAndDataArray(shape: &[::DefaultType], data: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateFromShapeArrayAndDataArray(shape: &[i64], data: &[i16]) -> ::windows::core::Result { Self::ITensorInt16BitStatics2(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::core::mem::transmute_copy(this), shape.len() as u32, ::core::mem::transmute(shape.as_ptr()), data.len() as u32, ::core::mem::transmute(data.as_ptr()), &mut result__).from_abi::(result__) @@ -4504,7 +4504,7 @@ impl TensorInt16Bit { } #[doc = "*Required features: 'AI_MachineLearning', 'Storage_Streams'*"] #[cfg(feature = "Storage_Streams")] - pub fn CreateFromBuffer<'a, Param1: ::windows::core::IntoParam<'a, super::super::Storage::Streams::IBuffer>>(shape: &[::DefaultType], buffer: Param1) -> ::windows::core::Result { + pub fn CreateFromBuffer<'a, Param1: ::windows::core::IntoParam<'a, super::super::Storage::Streams::IBuffer>>(shape: &[i64], buffer: Param1) -> ::windows::core::Result { Self::ITensorInt16BitStatics2(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromBuffer)(::core::mem::transmute_copy(this), shape.len() as u32, ::core::mem::transmute(shape.as_ptr()), buffer.into_param().abi(), &mut result__).from_abi::(result__) @@ -4755,7 +4755,7 @@ impl TensorInt32Bit { } #[doc = "*Required features: 'AI_MachineLearning', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn CreateFromArray<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable>>(shape: Param0, data: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateFromArray<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable>>(shape: Param0, data: &[i32]) -> ::windows::core::Result { Self::ITensorInt32BitStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromArray)(::core::mem::transmute_copy(this), shape.into_param().abi(), data.len() as u32, ::core::mem::transmute(data.as_ptr()), &mut result__).from_abi::(result__) @@ -4770,7 +4770,7 @@ impl TensorInt32Bit { }) } #[doc = "*Required features: 'AI_MachineLearning'*"] - pub fn CreateFromShapeArrayAndDataArray(shape: &[::DefaultType], data: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateFromShapeArrayAndDataArray(shape: &[i64], data: &[i32]) -> ::windows::core::Result { Self::ITensorInt32BitStatics2(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::core::mem::transmute_copy(this), shape.len() as u32, ::core::mem::transmute(shape.as_ptr()), data.len() as u32, ::core::mem::transmute(data.as_ptr()), &mut result__).from_abi::(result__) @@ -4778,7 +4778,7 @@ impl TensorInt32Bit { } #[doc = "*Required features: 'AI_MachineLearning', 'Storage_Streams'*"] #[cfg(feature = "Storage_Streams")] - pub fn CreateFromBuffer<'a, Param1: ::windows::core::IntoParam<'a, super::super::Storage::Streams::IBuffer>>(shape: &[::DefaultType], buffer: Param1) -> ::windows::core::Result { + pub fn CreateFromBuffer<'a, Param1: ::windows::core::IntoParam<'a, super::super::Storage::Streams::IBuffer>>(shape: &[i64], buffer: Param1) -> ::windows::core::Result { Self::ITensorInt32BitStatics2(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromBuffer)(::core::mem::transmute_copy(this), shape.len() as u32, ::core::mem::transmute(shape.as_ptr()), buffer.into_param().abi(), &mut result__).from_abi::(result__) @@ -5029,7 +5029,7 @@ impl TensorInt64Bit { } #[doc = "*Required features: 'AI_MachineLearning', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn CreateFromArray<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable>>(shape: Param0, data: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateFromArray<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable>>(shape: Param0, data: &[i64]) -> ::windows::core::Result { Self::ITensorInt64BitStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromArray)(::core::mem::transmute_copy(this), shape.into_param().abi(), data.len() as u32, ::core::mem::transmute(data.as_ptr()), &mut result__).from_abi::(result__) @@ -5044,7 +5044,7 @@ impl TensorInt64Bit { }) } #[doc = "*Required features: 'AI_MachineLearning'*"] - pub fn CreateFromShapeArrayAndDataArray(shape: &[::DefaultType], data: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateFromShapeArrayAndDataArray(shape: &[i64], data: &[i64]) -> ::windows::core::Result { Self::ITensorInt64BitStatics2(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::core::mem::transmute_copy(this), shape.len() as u32, ::core::mem::transmute(shape.as_ptr()), data.len() as u32, ::core::mem::transmute(data.as_ptr()), &mut result__).from_abi::(result__) @@ -5052,7 +5052,7 @@ impl TensorInt64Bit { } #[doc = "*Required features: 'AI_MachineLearning', 'Storage_Streams'*"] #[cfg(feature = "Storage_Streams")] - pub fn CreateFromBuffer<'a, Param1: ::windows::core::IntoParam<'a, super::super::Storage::Streams::IBuffer>>(shape: &[::DefaultType], buffer: Param1) -> ::windows::core::Result { + pub fn CreateFromBuffer<'a, Param1: ::windows::core::IntoParam<'a, super::super::Storage::Streams::IBuffer>>(shape: &[i64], buffer: Param1) -> ::windows::core::Result { Self::ITensorInt64BitStatics2(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromBuffer)(::core::mem::transmute_copy(this), shape.len() as u32, ::core::mem::transmute(shape.as_ptr()), buffer.into_param().abi(), &mut result__).from_abi::(result__) @@ -5303,7 +5303,7 @@ impl TensorInt8Bit { } #[doc = "*Required features: 'AI_MachineLearning', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn CreateFromArray<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable>>(shape: Param0, data: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateFromArray<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable>>(shape: Param0, data: &[u8]) -> ::windows::core::Result { Self::ITensorInt8BitStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromArray)(::core::mem::transmute_copy(this), shape.into_param().abi(), data.len() as u32, ::core::mem::transmute(data.as_ptr()), &mut result__).from_abi::(result__) @@ -5318,7 +5318,7 @@ impl TensorInt8Bit { }) } #[doc = "*Required features: 'AI_MachineLearning'*"] - pub fn CreateFromShapeArrayAndDataArray(shape: &[::DefaultType], data: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateFromShapeArrayAndDataArray(shape: &[i64], data: &[u8]) -> ::windows::core::Result { Self::ITensorInt8BitStatics2(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::core::mem::transmute_copy(this), shape.len() as u32, ::core::mem::transmute(shape.as_ptr()), data.len() as u32, ::core::mem::transmute(data.as_ptr()), &mut result__).from_abi::(result__) @@ -5326,7 +5326,7 @@ impl TensorInt8Bit { } #[doc = "*Required features: 'AI_MachineLearning', 'Storage_Streams'*"] #[cfg(feature = "Storage_Streams")] - pub fn CreateFromBuffer<'a, Param1: ::windows::core::IntoParam<'a, super::super::Storage::Streams::IBuffer>>(shape: &[::DefaultType], buffer: Param1) -> ::windows::core::Result { + pub fn CreateFromBuffer<'a, Param1: ::windows::core::IntoParam<'a, super::super::Storage::Streams::IBuffer>>(shape: &[i64], buffer: Param1) -> ::windows::core::Result { Self::ITensorInt8BitStatics2(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromBuffer)(::core::mem::transmute_copy(this), shape.len() as u32, ::core::mem::transmute(shape.as_ptr()), buffer.into_param().abi(), &mut result__).from_abi::(result__) @@ -5624,7 +5624,7 @@ impl TensorString { } #[doc = "*Required features: 'AI_MachineLearning', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn CreateFromArray<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable>>(shape: Param0, data: &[<::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result { + pub fn CreateFromArray<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable>>(shape: Param0, data: &[::windows::core::HSTRING]) -> ::windows::core::Result { Self::ITensorStringStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromArray)(::core::mem::transmute_copy(this), shape.into_param().abi(), data.len() as u32, ::core::mem::transmute(data.as_ptr()), &mut result__).from_abi::(result__) @@ -5639,7 +5639,7 @@ impl TensorString { }) } #[doc = "*Required features: 'AI_MachineLearning'*"] - pub fn CreateFromShapeArrayAndDataArray(shape: &[::DefaultType], data: &[<::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result { + pub fn CreateFromShapeArrayAndDataArray(shape: &[i64], data: &[::windows::core::HSTRING]) -> ::windows::core::Result { Self::ITensorStringStatics2(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::core::mem::transmute_copy(this), shape.len() as u32, ::core::mem::transmute(shape.as_ptr()), data.len() as u32, ::core::mem::transmute(data.as_ptr()), &mut result__).from_abi::(result__) @@ -5890,7 +5890,7 @@ impl TensorUInt16Bit { } #[doc = "*Required features: 'AI_MachineLearning', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn CreateFromArray<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable>>(shape: Param0, data: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateFromArray<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable>>(shape: Param0, data: &[u16]) -> ::windows::core::Result { Self::ITensorUInt16BitStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromArray)(::core::mem::transmute_copy(this), shape.into_param().abi(), data.len() as u32, ::core::mem::transmute(data.as_ptr()), &mut result__).from_abi::(result__) @@ -5905,7 +5905,7 @@ impl TensorUInt16Bit { }) } #[doc = "*Required features: 'AI_MachineLearning'*"] - pub fn CreateFromShapeArrayAndDataArray(shape: &[::DefaultType], data: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateFromShapeArrayAndDataArray(shape: &[i64], data: &[u16]) -> ::windows::core::Result { Self::ITensorUInt16BitStatics2(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::core::mem::transmute_copy(this), shape.len() as u32, ::core::mem::transmute(shape.as_ptr()), data.len() as u32, ::core::mem::transmute(data.as_ptr()), &mut result__).from_abi::(result__) @@ -5913,7 +5913,7 @@ impl TensorUInt16Bit { } #[doc = "*Required features: 'AI_MachineLearning', 'Storage_Streams'*"] #[cfg(feature = "Storage_Streams")] - pub fn CreateFromBuffer<'a, Param1: ::windows::core::IntoParam<'a, super::super::Storage::Streams::IBuffer>>(shape: &[::DefaultType], buffer: Param1) -> ::windows::core::Result { + pub fn CreateFromBuffer<'a, Param1: ::windows::core::IntoParam<'a, super::super::Storage::Streams::IBuffer>>(shape: &[i64], buffer: Param1) -> ::windows::core::Result { Self::ITensorUInt16BitStatics2(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromBuffer)(::core::mem::transmute_copy(this), shape.len() as u32, ::core::mem::transmute(shape.as_ptr()), buffer.into_param().abi(), &mut result__).from_abi::(result__) @@ -6164,7 +6164,7 @@ impl TensorUInt32Bit { } #[doc = "*Required features: 'AI_MachineLearning', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn CreateFromArray<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable>>(shape: Param0, data: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateFromArray<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable>>(shape: Param0, data: &[u32]) -> ::windows::core::Result { Self::ITensorUInt32BitStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromArray)(::core::mem::transmute_copy(this), shape.into_param().abi(), data.len() as u32, ::core::mem::transmute(data.as_ptr()), &mut result__).from_abi::(result__) @@ -6179,7 +6179,7 @@ impl TensorUInt32Bit { }) } #[doc = "*Required features: 'AI_MachineLearning'*"] - pub fn CreateFromShapeArrayAndDataArray(shape: &[::DefaultType], data: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateFromShapeArrayAndDataArray(shape: &[i64], data: &[u32]) -> ::windows::core::Result { Self::ITensorUInt32BitStatics2(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::core::mem::transmute_copy(this), shape.len() as u32, ::core::mem::transmute(shape.as_ptr()), data.len() as u32, ::core::mem::transmute(data.as_ptr()), &mut result__).from_abi::(result__) @@ -6187,7 +6187,7 @@ impl TensorUInt32Bit { } #[doc = "*Required features: 'AI_MachineLearning', 'Storage_Streams'*"] #[cfg(feature = "Storage_Streams")] - pub fn CreateFromBuffer<'a, Param1: ::windows::core::IntoParam<'a, super::super::Storage::Streams::IBuffer>>(shape: &[::DefaultType], buffer: Param1) -> ::windows::core::Result { + pub fn CreateFromBuffer<'a, Param1: ::windows::core::IntoParam<'a, super::super::Storage::Streams::IBuffer>>(shape: &[i64], buffer: Param1) -> ::windows::core::Result { Self::ITensorUInt32BitStatics2(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromBuffer)(::core::mem::transmute_copy(this), shape.len() as u32, ::core::mem::transmute(shape.as_ptr()), buffer.into_param().abi(), &mut result__).from_abi::(result__) @@ -6438,7 +6438,7 @@ impl TensorUInt64Bit { } #[doc = "*Required features: 'AI_MachineLearning', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn CreateFromArray<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable>>(shape: Param0, data: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateFromArray<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable>>(shape: Param0, data: &[u64]) -> ::windows::core::Result { Self::ITensorUInt64BitStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromArray)(::core::mem::transmute_copy(this), shape.into_param().abi(), data.len() as u32, ::core::mem::transmute(data.as_ptr()), &mut result__).from_abi::(result__) @@ -6453,7 +6453,7 @@ impl TensorUInt64Bit { }) } #[doc = "*Required features: 'AI_MachineLearning'*"] - pub fn CreateFromShapeArrayAndDataArray(shape: &[::DefaultType], data: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateFromShapeArrayAndDataArray(shape: &[i64], data: &[u64]) -> ::windows::core::Result { Self::ITensorUInt64BitStatics2(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::core::mem::transmute_copy(this), shape.len() as u32, ::core::mem::transmute(shape.as_ptr()), data.len() as u32, ::core::mem::transmute(data.as_ptr()), &mut result__).from_abi::(result__) @@ -6461,7 +6461,7 @@ impl TensorUInt64Bit { } #[doc = "*Required features: 'AI_MachineLearning', 'Storage_Streams'*"] #[cfg(feature = "Storage_Streams")] - pub fn CreateFromBuffer<'a, Param1: ::windows::core::IntoParam<'a, super::super::Storage::Streams::IBuffer>>(shape: &[::DefaultType], buffer: Param1) -> ::windows::core::Result { + pub fn CreateFromBuffer<'a, Param1: ::windows::core::IntoParam<'a, super::super::Storage::Streams::IBuffer>>(shape: &[i64], buffer: Param1) -> ::windows::core::Result { Self::ITensorUInt64BitStatics2(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromBuffer)(::core::mem::transmute_copy(this), shape.len() as u32, ::core::mem::transmute(shape.as_ptr()), buffer.into_param().abi(), &mut result__).from_abi::(result__) @@ -6712,7 +6712,7 @@ impl TensorUInt8Bit { } #[doc = "*Required features: 'AI_MachineLearning', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn CreateFromArray<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable>>(shape: Param0, data: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateFromArray<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Collections::IIterable>>(shape: Param0, data: &[u8]) -> ::windows::core::Result { Self::ITensorUInt8BitStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromArray)(::core::mem::transmute_copy(this), shape.into_param().abi(), data.len() as u32, ::core::mem::transmute(data.as_ptr()), &mut result__).from_abi::(result__) @@ -6727,7 +6727,7 @@ impl TensorUInt8Bit { }) } #[doc = "*Required features: 'AI_MachineLearning'*"] - pub fn CreateFromShapeArrayAndDataArray(shape: &[::DefaultType], data: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateFromShapeArrayAndDataArray(shape: &[i64], data: &[u8]) -> ::windows::core::Result { Self::ITensorUInt8BitStatics2(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromShapeArrayAndDataArray)(::core::mem::transmute_copy(this), shape.len() as u32, ::core::mem::transmute(shape.as_ptr()), data.len() as u32, ::core::mem::transmute(data.as_ptr()), &mut result__).from_abi::(result__) @@ -6735,7 +6735,7 @@ impl TensorUInt8Bit { } #[doc = "*Required features: 'AI_MachineLearning', 'Storage_Streams'*"] #[cfg(feature = "Storage_Streams")] - pub fn CreateFromBuffer<'a, Param1: ::windows::core::IntoParam<'a, super::super::Storage::Streams::IBuffer>>(shape: &[::DefaultType], buffer: Param1) -> ::windows::core::Result { + pub fn CreateFromBuffer<'a, Param1: ::windows::core::IntoParam<'a, super::super::Storage::Streams::IBuffer>>(shape: &[i64], buffer: Param1) -> ::windows::core::Result { Self::ITensorUInt8BitStatics2(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromBuffer)(::core::mem::transmute_copy(this), shape.len() as u32, ::core::mem::transmute(shape.as_ptr()), buffer.into_param().abi(), &mut result__).from_abi::(result__) diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Appointments/impl.rs b/crates/libs/windows/src/Windows/ApplicationModel/Appointments/impl.rs index 0de327fc89..13a6b5f57c 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Appointments/impl.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Appointments/impl.rs @@ -24,7 +24,7 @@ impl IAppointmentParticipant_Vtbl { unsafe extern "system" fn SetDisplayName(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetDisplayName(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetDisplayName(::core::mem::transmute(&value)).into() } unsafe extern "system" fn Address(this: *mut ::core::ffi::c_void, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -41,7 +41,7 @@ impl IAppointmentParticipant_Vtbl { unsafe extern "system" fn SetAddress(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetAddress(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetAddress(::core::mem::transmute(&value)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Background/impl.rs b/crates/libs/windows/src/Windows/ApplicationModel/Background/impl.rs index 7fba619cef..75fabc8890 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Background/impl.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Background/impl.rs @@ -21,7 +21,7 @@ impl IBackgroundTask_Vtbl { unsafe extern "system" fn Run(this: *mut ::core::ffi::c_void, taskinstance: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).Run(&*(&taskinstance as *const ::Abi as *const ::DefaultType)).into() + (*this).Run(::core::mem::transmute(&taskinstance)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), Run: Run:: } } @@ -104,7 +104,7 @@ impl IBackgroundTaskInstance_Vtbl { unsafe extern "system" fn Canceled(this: *mut ::core::ffi::c_void, cancelhandler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).Canceled(&*(&cancelhandler as *const ::Abi as *const ::DefaultType)) { + match (*this).Canceled(::core::mem::transmute(&cancelhandler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -116,7 +116,7 @@ impl IBackgroundTaskInstance_Vtbl { unsafe extern "system" fn RemoveCanceled(this: *mut ::core::ffi::c_void, cookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveCanceled(&*(&cookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveCanceled(::core::mem::transmute(&cookie)).into() } unsafe extern "system" fn SuspendedCount(this: *mut ::core::ffi::c_void, result__: *mut u32) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -264,7 +264,7 @@ impl IBackgroundTaskRegistration_Vtbl { unsafe extern "system" fn Progress(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).Progress(&*(&handler as *const ::Abi as *const ::DefaultType)) { + match (*this).Progress(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -276,12 +276,12 @@ impl IBackgroundTaskRegistration_Vtbl { unsafe extern "system" fn RemoveProgress(this: *mut ::core::ffi::c_void, cookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveProgress(&*(&cookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveProgress(::core::mem::transmute(&cookie)).into() } unsafe extern "system" fn Completed(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).Completed(&*(&handler as *const ::Abi as *const ::DefaultType)) { + match (*this).Completed(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -293,7 +293,7 @@ impl IBackgroundTaskRegistration_Vtbl { unsafe extern "system" fn RemoveCompleted(this: *mut ::core::ffi::c_void, cookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveCompleted(&*(&cookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveCompleted(::core::mem::transmute(&cookie)).into() } unsafe extern "system" fn Unregister(this: *mut ::core::ffi::c_void, canceltask: bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Background/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Background/mod.rs index 84eb147a53..0f589f6232 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Background/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Background/mod.rs @@ -1188,7 +1188,7 @@ impl, BackgroundTaskCa } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: ::windows::core::RawPtr, reason: BackgroundTaskCancellationReason) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const ::Abi as *const ::DefaultType), reason).into() + ((*this).invoke)(::core::mem::transmute(&sender), reason).into() } } impl ::core::clone::Clone for BackgroundTaskCanceledEventHandler { @@ -1395,7 +1395,7 @@ impl, &::core::opti } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: ::windows::core::RawPtr, args: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const ::Abi as *const ::DefaultType), &*(&args as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&args)).into() } } impl ::core::clone::Clone for BackgroundTaskCompletedEventHandler { @@ -1640,7 +1640,7 @@ impl, &::core::opti } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: ::windows::core::RawPtr, args: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const ::Abi as *const ::DefaultType), &*(&args as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&args)).into() } } impl ::core::clone::Clone for BackgroundTaskProgressEventHandler { diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Contacts/impl.rs b/crates/libs/windows/src/Windows/ApplicationModel/Contacts/impl.rs index 34fdbab895..f4e37d51cb 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Contacts/impl.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Contacts/impl.rs @@ -82,7 +82,7 @@ impl IContactFieldFactory_Vtbl { unsafe extern "system" fn CreateField_Default(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, r#type: ContactFieldType, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CreateField_Default(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), r#type) { + match (*this).CreateField_Default(::core::mem::transmute(&value), r#type) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -94,7 +94,7 @@ impl IContactFieldFactory_Vtbl { unsafe extern "system" fn CreateField_Category(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, r#type: ContactFieldType, category: ContactFieldCategory, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CreateField_Category(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), r#type, category) { + match (*this).CreateField_Category(::core::mem::transmute(&value), r#type, category) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -106,7 +106,7 @@ impl IContactFieldFactory_Vtbl { unsafe extern "system" fn CreateField_Custom(this: *mut ::core::ffi::c_void, name: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, r#type: ContactFieldType, category: ContactFieldCategory, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CreateField_Custom(&*(&name as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), &*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), r#type, category) { + match (*this).CreateField_Custom(::core::mem::transmute(&name), ::core::mem::transmute(&value), r#type, category) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -142,7 +142,7 @@ impl IContactInstantMessageFieldFactory_Vtbl { unsafe extern "system" fn CreateInstantMessage_Default(this: *mut ::core::ffi::c_void, username: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CreateInstantMessage_Default(&*(&username as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).CreateInstantMessage_Default(::core::mem::transmute(&username)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -154,7 +154,7 @@ impl IContactInstantMessageFieldFactory_Vtbl { unsafe extern "system" fn CreateInstantMessage_Category(this: *mut ::core::ffi::c_void, username: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, category: ContactFieldCategory, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CreateInstantMessage_Category(&*(&username as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), category) { + match (*this).CreateInstantMessage_Category(::core::mem::transmute(&username), category) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -166,13 +166,7 @@ impl IContactInstantMessageFieldFactory_Vtbl { unsafe extern "system" fn CreateInstantMessage_All(this: *mut ::core::ffi::c_void, username: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, category: ContactFieldCategory, service: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, displaytext: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, verb: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CreateInstantMessage_All( - &*(&username as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), - category, - &*(&service as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), - &*(&displaytext as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), - &*(&verb as *const ::Abi as *const ::DefaultType), - ) { + match (*this).CreateInstantMessage_All(::core::mem::transmute(&username), category, ::core::mem::transmute(&service), ::core::mem::transmute(&displaytext), ::core::mem::transmute(&verb)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -205,7 +199,7 @@ impl IContactLocationFieldFactory_Vtbl { unsafe extern "system" fn CreateLocation_Default(this: *mut ::core::ffi::c_void, unstructuredaddress: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CreateLocation_Default(&*(&unstructuredaddress as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).CreateLocation_Default(::core::mem::transmute(&unstructuredaddress)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -217,7 +211,7 @@ impl IContactLocationFieldFactory_Vtbl { unsafe extern "system" fn CreateLocation_Category(this: *mut ::core::ffi::c_void, unstructuredaddress: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, category: ContactFieldCategory, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CreateLocation_Category(&*(&unstructuredaddress as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), category) { + match (*this).CreateLocation_Category(::core::mem::transmute(&unstructuredaddress), category) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -229,15 +223,7 @@ impl IContactLocationFieldFactory_Vtbl { unsafe extern "system" fn CreateLocation_All(this: *mut ::core::ffi::c_void, unstructuredaddress: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, category: ContactFieldCategory, street: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, city: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, region: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, country: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, postalcode: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CreateLocation_All( - &*(&unstructuredaddress as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), - category, - &*(&street as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), - &*(&city as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), - &*(®ion as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), - &*(&country as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), - &*(&postalcode as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), - ) { + match (*this).CreateLocation_All(::core::mem::transmute(&unstructuredaddress), category, ::core::mem::transmute(&street), ::core::mem::transmute(&city), ::core::mem::transmute(®ion), ::core::mem::transmute(&country), ::core::mem::transmute(&postalcode)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Core/impl.rs b/crates/libs/windows/src/Windows/ApplicationModel/Core/impl.rs index 106c6be68a..6b55685aab 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Core/impl.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Core/impl.rs @@ -13,7 +13,7 @@ impl ICoreApplicationUnhandledError_Vtbl { unsafe extern "system" fn UnhandledErrorDetected(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).UnhandledErrorDetected(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).UnhandledErrorDetected(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -25,7 +25,7 @@ impl ICoreApplicationUnhandledError_Vtbl { unsafe extern "system" fn RemoveUnhandledErrorDetected(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveUnhandledErrorDetected(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveUnhandledErrorDetected(::core::mem::transmute(&token)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -55,17 +55,17 @@ impl IFrameworkView_Vtbl { unsafe extern "system" fn Initialize(this: *mut ::core::ffi::c_void, applicationview: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).Initialize(&*(&applicationview as *const ::Abi as *const ::DefaultType)).into() + (*this).Initialize(::core::mem::transmute(&applicationview)).into() } unsafe extern "system" fn SetWindow(this: *mut ::core::ffi::c_void, window: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetWindow(&*(&window as *const ::Abi as *const ::DefaultType)).into() + (*this).SetWindow(::core::mem::transmute(&window)).into() } unsafe extern "system" fn Load(this: *mut ::core::ffi::c_void, entrypoint: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).Load(&*(&entrypoint as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).Load(::core::mem::transmute(&entrypoint)).into() } unsafe extern "system" fn Run(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; diff --git a/crates/libs/windows/src/Windows/ApplicationModel/DataTransfer/DragDrop/Core/impl.rs b/crates/libs/windows/src/Windows/ApplicationModel/DataTransfer/DragDrop/Core/impl.rs index 3d9d9e3174..555abd4c9e 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/DataTransfer/DragDrop/Core/impl.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/DataTransfer/DragDrop/Core/impl.rs @@ -15,7 +15,7 @@ impl ICoreDropOperationTarget_Vtbl { unsafe extern "system" fn EnterAsync(this: *mut ::core::ffi::c_void, draginfo: ::windows::core::RawPtr, draguioverride: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).EnterAsync(&*(&draginfo as *const ::Abi as *const ::DefaultType), &*(&draguioverride as *const ::Abi as *const ::DefaultType)) { + match (*this).EnterAsync(::core::mem::transmute(&draginfo), ::core::mem::transmute(&draguioverride)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -27,7 +27,7 @@ impl ICoreDropOperationTarget_Vtbl { unsafe extern "system" fn OverAsync(this: *mut ::core::ffi::c_void, draginfo: ::windows::core::RawPtr, draguioverride: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).OverAsync(&*(&draginfo as *const ::Abi as *const ::DefaultType), &*(&draguioverride as *const ::Abi as *const ::DefaultType)) { + match (*this).OverAsync(::core::mem::transmute(&draginfo), ::core::mem::transmute(&draguioverride)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -39,7 +39,7 @@ impl ICoreDropOperationTarget_Vtbl { unsafe extern "system" fn LeaveAsync(this: *mut ::core::ffi::c_void, draginfo: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).LeaveAsync(&*(&draginfo as *const ::Abi as *const ::DefaultType)) { + match (*this).LeaveAsync(::core::mem::transmute(&draginfo)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -51,7 +51,7 @@ impl ICoreDropOperationTarget_Vtbl { unsafe extern "system" fn DropAsync(this: *mut ::core::ffi::c_void, draginfo: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).DropAsync(&*(&draginfo as *const ::Abi as *const ::DefaultType)) { + match (*this).DropAsync(::core::mem::transmute(&draginfo)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/ApplicationModel/DataTransfer/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/DataTransfer/mod.rs index f330edf1eb..cd90555c78 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/DataTransfer/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/DataTransfer/mod.rs @@ -1913,7 +1913,7 @@ impl) -> ::windows::core:: } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, request: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&request as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&request)).into() } } impl ::core::clone::Clone for DataProviderHandler { @@ -3859,7 +3859,7 @@ impl) -> ::windows::cor } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, operation: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&operation as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&operation)).into() } } impl ::core::clone::Clone for ShareProviderHandler { diff --git a/crates/libs/windows/src/Windows/ApplicationModel/Payments/mod.rs b/crates/libs/windows/src/Windows/ApplicationModel/Payments/mod.rs index efad1e4f0d..8e04e30c85 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Payments/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Payments/mod.rs @@ -2353,7 +2353,7 @@ impl, &::core::option::Option

::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&paymentrequest as *const ::Abi as *const ::DefaultType), &*(&args as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&paymentrequest), ::core::mem::transmute(&args)).into() } } impl ::core::clone::Clone for PaymentRequestChangedHandler { 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 500e2f0036..cfbd4ed20a 100644 --- a/crates/libs/windows/src/Windows/ApplicationModel/Resources/Core/mod.rs +++ b/crates/libs/windows/src/Windows/ApplicationModel/Resources/Core/mod.rs @@ -629,7 +629,7 @@ impl ResourceCandidateVectorView { } #[doc = "*Required features: 'ApplicationModel_Resources_Core', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -1030,7 +1030,7 @@ impl ResourceContextLanguagesVectorView { } #[doc = "*Required features: 'ApplicationModel_Resources_Core', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [<::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::windows::core::HSTRING]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -1629,7 +1629,7 @@ impl ResourceMapIterator { } #[doc = "*Required features: 'ApplicationModel_Resources_Core', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, items: &mut [ as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, items: &mut [::core::option::Option>]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -1985,7 +1985,7 @@ impl ResourceMapMapViewIterator { } #[doc = "*Required features: 'ApplicationModel_Resources_Core', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, items: &mut [ as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, items: &mut [::core::option::Option>]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -2763,7 +2763,7 @@ impl ResourceQualifierVectorView { } #[doc = "*Required features: 'ApplicationModel_Resources_Core', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Data/Json/mod.rs b/crates/libs/windows/src/Windows/Data/Json/mod.rs index aebd5d51e7..25675fe0eb 100644 --- a/crates/libs/windows/src/Windows/Data/Json/mod.rs +++ b/crates/libs/windows/src/Windows/Data/Json/mod.rs @@ -473,7 +473,7 @@ impl JsonArray { } #[doc = "*Required features: 'Data_Json', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -482,7 +482,7 @@ impl JsonArray { } #[doc = "*Required features: 'Data_Json', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } diff --git a/crates/libs/windows/src/Windows/Data/Text/mod.rs b/crates/libs/windows/src/Windows/Data/Text/mod.rs index 7fe8c56975..b026ecfdac 100644 --- a/crates/libs/windows/src/Windows/Data/Text/mod.rs +++ b/crates/libs/windows/src/Windows/Data/Text/mod.rs @@ -611,11 +611,7 @@ impl ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)( - &*(&precedingwords as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType), - &*(&words as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType), - ) - .into() + ((*this).invoke)(::core::mem::transmute(&precedingwords), ::core::mem::transmute(&words)).into() } } #[cfg(feature = "Foundation_Collections")] @@ -1834,7 +1830,7 @@ impl ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&precedingwords as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType), &*(&words as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&precedingwords), ::core::mem::transmute(&words)).into() } } #[cfg(feature = "Foundation_Collections")] diff --git a/crates/libs/windows/src/Windows/Data/Xml/Dom/impl.rs b/crates/libs/windows/src/Windows/Data/Xml/Dom/impl.rs index 25d0377a52..753efeac23 100644 --- a/crates/libs/windows/src/Windows/Data/Xml/Dom/impl.rs +++ b/crates/libs/windows/src/Windows/Data/Xml/Dom/impl.rs @@ -28,7 +28,7 @@ impl IXmlCharacterData_Vtbl { unsafe extern "system" fn SetData(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetData(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetData(::core::mem::transmute(&value)).into() } unsafe extern "system" fn Length(this: *mut ::core::ffi::c_void, result__: *mut u32) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -57,12 +57,12 @@ impl IXmlCharacterData_Vtbl { unsafe extern "system" fn AppendData(this: *mut ::core::ffi::c_void, data: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).AppendData(&*(&data as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).AppendData(::core::mem::transmute(&data)).into() } unsafe extern "system" fn InsertData(this: *mut ::core::ffi::c_void, offset: u32, data: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).InsertData(offset, &*(&data as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).InsertData(offset, ::core::mem::transmute(&data)).into() } unsafe extern "system" fn DeleteData(this: *mut ::core::ffi::c_void, offset: u32, count: u32) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -72,7 +72,7 @@ impl IXmlCharacterData_Vtbl { unsafe extern "system" fn ReplaceData(this: *mut ::core::ffi::c_void, offset: u32, count: u32, data: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).ReplaceData(offset, count, &*(&data as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).ReplaceData(offset, count, ::core::mem::transmute(&data)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -135,7 +135,7 @@ impl IXmlNode_Vtbl { unsafe extern "system" fn SetNodeValue(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetNodeValue(&*(&value as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetNodeValue(::core::mem::transmute(&value)).into() } unsafe extern "system" fn NodeType(this: *mut ::core::ffi::c_void, result__: *mut NodeType) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -272,7 +272,7 @@ impl IXmlNode_Vtbl { unsafe extern "system" fn InsertBefore(this: *mut ::core::ffi::c_void, newchild: ::windows::core::RawPtr, referencechild: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).InsertBefore(&*(&newchild as *const ::Abi as *const ::DefaultType), &*(&referencechild as *const ::Abi as *const ::DefaultType)) { + match (*this).InsertBefore(::core::mem::transmute(&newchild), ::core::mem::transmute(&referencechild)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -284,7 +284,7 @@ impl IXmlNode_Vtbl { unsafe extern "system" fn ReplaceChild(this: *mut ::core::ffi::c_void, newchild: ::windows::core::RawPtr, referencechild: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).ReplaceChild(&*(&newchild as *const ::Abi as *const ::DefaultType), &*(&referencechild as *const ::Abi as *const ::DefaultType)) { + match (*this).ReplaceChild(::core::mem::transmute(&newchild), ::core::mem::transmute(&referencechild)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -296,7 +296,7 @@ impl IXmlNode_Vtbl { unsafe extern "system" fn RemoveChild(this: *mut ::core::ffi::c_void, childnode: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).RemoveChild(&*(&childnode as *const ::Abi as *const ::DefaultType)) { + match (*this).RemoveChild(::core::mem::transmute(&childnode)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -308,7 +308,7 @@ impl IXmlNode_Vtbl { unsafe extern "system" fn AppendChild(this: *mut ::core::ffi::c_void, newchild: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).AppendChild(&*(&newchild as *const ::Abi as *const ::DefaultType)) { + match (*this).AppendChild(::core::mem::transmute(&newchild)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -373,7 +373,7 @@ impl IXmlNode_Vtbl { unsafe extern "system" fn SetPrefix(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetPrefix(&*(&value as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetPrefix(::core::mem::transmute(&value)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -420,7 +420,7 @@ impl IXmlNodeSelector_Vtbl { unsafe extern "system" fn SelectSingleNode(this: *mut ::core::ffi::c_void, xpath: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).SelectSingleNode(&*(&xpath as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).SelectSingleNode(::core::mem::transmute(&xpath)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -432,7 +432,7 @@ impl IXmlNodeSelector_Vtbl { unsafe extern "system" fn SelectNodes(this: *mut ::core::ffi::c_void, xpath: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).SelectNodes(&*(&xpath as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).SelectNodes(::core::mem::transmute(&xpath)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -444,7 +444,7 @@ impl IXmlNodeSelector_Vtbl { unsafe extern "system" fn SelectSingleNodeNS(this: *mut ::core::ffi::c_void, xpath: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, namespaces: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).SelectSingleNodeNS(&*(&xpath as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), &*(&namespaces as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)) { + match (*this).SelectSingleNodeNS(::core::mem::transmute(&xpath), ::core::mem::transmute(&namespaces)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -456,7 +456,7 @@ impl IXmlNodeSelector_Vtbl { unsafe extern "system" fn SelectNodesNS(this: *mut ::core::ffi::c_void, xpath: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, namespaces: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).SelectNodesNS(&*(&xpath as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), &*(&namespaces as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)) { + match (*this).SelectNodesNS(::core::mem::transmute(&xpath), ::core::mem::transmute(&namespaces)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -514,7 +514,7 @@ impl IXmlNodeSerializer_Vtbl { unsafe extern "system" fn SetInnerText(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetInnerText(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetInnerText(::core::mem::transmute(&value)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), 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 f16bebde68..bee874d349 100644 --- a/crates/libs/windows/src/Windows/Data/Xml/Dom/mod.rs +++ b/crates/libs/windows/src/Windows/Data/Xml/Dom/mod.rs @@ -6306,7 +6306,7 @@ impl XmlNamedNodeMap { } #[doc = "*Required features: 'Data_Xml_Dom', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -6556,7 +6556,7 @@ impl XmlNodeList { } #[doc = "*Required features: 'Data_Xml_Dom', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Devices/AllJoyn/impl.rs b/crates/libs/windows/src/Windows/Devices/AllJoyn/impl.rs index 33185a216e..be0415dedb 100644 --- a/crates/libs/windows/src/Windows/Devices/AllJoyn/impl.rs +++ b/crates/libs/windows/src/Windows/Devices/AllJoyn/impl.rs @@ -34,7 +34,7 @@ impl IAllJoynProducer_Vtbl { unsafe extern "system" fn SetBusObject(this: *mut ::core::ffi::c_void, busobject: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetBusObject(&*(&busobject as *const ::Abi as *const ::DefaultType)).into() + (*this).SetBusObject(::core::mem::transmute(&busobject)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), SetBusObject: SetBusObject:: } } 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 89f1143812..b8a3850809 100644 --- a/crates/libs/windows/src/Windows/Devices/Enumeration/Pnp/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Enumeration/Pnp/mod.rs @@ -315,7 +315,7 @@ impl PnpObjectCollection { } #[doc = "*Required features: 'Devices_Enumeration_Pnp', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Devices/Enumeration/mod.rs b/crates/libs/windows/src/Windows/Devices/Enumeration/mod.rs index 1d2e793dc3..715db0a5bb 100644 --- a/crates/libs/windows/src/Windows/Devices/Enumeration/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Enumeration/mod.rs @@ -770,7 +770,7 @@ impl DeviceInformationCollection { } #[doc = "*Required features: 'Devices_Enumeration', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Devices/Gpio/Provider/impl.rs b/crates/libs/windows/src/Windows/Devices/Gpio/Provider/impl.rs index 7e0af2406f..178f2f45e5 100644 --- a/crates/libs/windows/src/Windows/Devices/Gpio/Provider/impl.rs +++ b/crates/libs/windows/src/Windows/Devices/Gpio/Provider/impl.rs @@ -65,7 +65,7 @@ impl IGpioPinProvider_Vtbl { unsafe extern "system" fn ValueChanged(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).ValueChanged(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).ValueChanged(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -77,7 +77,7 @@ impl IGpioPinProvider_Vtbl { unsafe extern "system" fn RemoveValueChanged(this: *mut ::core::ffi::c_void, token: super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveValueChanged(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveValueChanged(::core::mem::transmute(&token)).into() } unsafe extern "system" fn DebounceTimeout(this: *mut ::core::ffi::c_void, result__: *mut super::super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -94,7 +94,7 @@ impl IGpioPinProvider_Vtbl { unsafe extern "system" fn SetDebounceTimeout(this: *mut ::core::ffi::c_void, value: super::super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetDebounceTimeout(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetDebounceTimeout(::core::mem::transmute(&value)).into() } unsafe extern "system" fn PinNumber(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; diff --git a/crates/libs/windows/src/Windows/Devices/I2c/Provider/impl.rs b/crates/libs/windows/src/Windows/Devices/I2c/Provider/impl.rs index fc17a15c8c..b14a45609b 100644 --- a/crates/libs/windows/src/Windows/Devices/I2c/Provider/impl.rs +++ b/crates/libs/windows/src/Windows/Devices/I2c/Provider/impl.rs @@ -9,7 +9,7 @@ impl II2cControllerProvider_Vtbl { unsafe extern "system" fn GetDeviceProvider(this: *mut ::core::ffi::c_void, settings: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetDeviceProvider(&*(&settings as *const ::Abi as *const ::DefaultType)) { + match (*this).GetDeviceProvider(::core::mem::transmute(&settings)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -30,12 +30,12 @@ impl II2cControllerProvider_Vtbl { #[cfg(feature = "Foundation")] pub trait II2cDeviceProvider_Impl: Sized + super::super::super::Foundation::IClosable_Impl { fn DeviceId(&mut self) -> ::windows::core::Result<::windows::core::HSTRING>; - fn Write(&mut self, buffer: &[::DefaultType]) -> ::windows::core::Result<()>; - fn WritePartial(&mut self, buffer: &[::DefaultType]) -> ::windows::core::Result; - fn Read(&mut self, buffer: &mut [::DefaultType]) -> ::windows::core::Result<()>; - fn ReadPartial(&mut self, buffer: &mut [::DefaultType]) -> ::windows::core::Result; - fn WriteRead(&mut self, writebuffer: &[::DefaultType], readbuffer: &mut [::DefaultType]) -> ::windows::core::Result<()>; - fn WriteReadPartial(&mut self, writebuffer: &[::DefaultType], readbuffer: &mut [::DefaultType]) -> ::windows::core::Result; + fn Write(&mut self, buffer: &[u8]) -> ::windows::core::Result<()>; + fn WritePartial(&mut self, buffer: &[u8]) -> ::windows::core::Result; + fn Read(&mut self, buffer: &mut [u8]) -> ::windows::core::Result<()>; + fn ReadPartial(&mut self, buffer: &mut [u8]) -> ::windows::core::Result; + fn WriteRead(&mut self, writebuffer: &[u8], readbuffer: &mut [u8]) -> ::windows::core::Result<()>; + fn WriteReadPartial(&mut self, writebuffer: &[u8], readbuffer: &mut [u8]) -> ::windows::core::Result; } #[cfg(feature = "Foundation")] impl ::windows::core::RuntimeName for II2cDeviceProvider { 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 daf6d0432f..8e3e78a622 100644 --- a/crates/libs/windows/src/Windows/Devices/I2c/Provider/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/I2c/Provider/mod.rs @@ -94,12 +94,12 @@ impl II2cDeviceProvider { } } #[doc = "*Required features: 'Devices_I2c_Provider'*"] - pub fn Write(&self, buffer: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn Write(&self, buffer: &[u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).Write)(::core::mem::transmute_copy(this), buffer.len() as u32, ::core::mem::transmute(buffer.as_ptr())).ok() } } #[doc = "*Required features: 'Devices_I2c_Provider'*"] - pub fn WritePartial(&self, buffer: &[::DefaultType]) -> ::windows::core::Result { + pub fn WritePartial(&self, buffer: &[u8]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: ProviderI2cTransferResult = ::core::mem::zeroed(); @@ -107,12 +107,12 @@ impl II2cDeviceProvider { } } #[doc = "*Required features: 'Devices_I2c_Provider'*"] - pub fn Read(&self, buffer: &mut [::DefaultType]) -> ::windows::core::Result<()> { + pub fn Read(&self, buffer: &mut [u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).Read)(::core::mem::transmute_copy(this), buffer.len() as u32, ::core::mem::transmute_copy(&buffer)).ok() } } #[doc = "*Required features: 'Devices_I2c_Provider'*"] - pub fn ReadPartial(&self, buffer: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn ReadPartial(&self, buffer: &mut [u8]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: ProviderI2cTransferResult = ::core::mem::zeroed(); @@ -120,12 +120,12 @@ impl II2cDeviceProvider { } } #[doc = "*Required features: 'Devices_I2c_Provider'*"] - pub fn WriteRead(&self, writebuffer: &[::DefaultType], readbuffer: &mut [::DefaultType]) -> ::windows::core::Result<()> { + pub fn WriteRead(&self, writebuffer: &[u8], readbuffer: &mut [u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).WriteRead)(::core::mem::transmute_copy(this), writebuffer.len() as u32, ::core::mem::transmute(writebuffer.as_ptr()), readbuffer.len() as u32, ::core::mem::transmute_copy(&readbuffer)).ok() } } #[doc = "*Required features: 'Devices_I2c_Provider'*"] - pub fn WriteReadPartial(&self, writebuffer: &[::DefaultType], readbuffer: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn WriteReadPartial(&self, writebuffer: &[u8], readbuffer: &mut [u8]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: ProviderI2cTransferResult = ::core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Devices/I2c/impl.rs b/crates/libs/windows/src/Windows/Devices/I2c/impl.rs index 748e20b9b8..a0b3652bd5 100644 --- a/crates/libs/windows/src/Windows/Devices/I2c/impl.rs +++ b/crates/libs/windows/src/Windows/Devices/I2c/impl.rs @@ -26,7 +26,7 @@ impl II2cDeviceStatics_Vtbl { unsafe extern "system" fn GetDeviceSelectorFromFriendlyName(this: *mut ::core::ffi::c_void, friendlyname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetDeviceSelectorFromFriendlyName(&*(&friendlyname as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).GetDeviceSelectorFromFriendlyName(::core::mem::transmute(&friendlyname)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -38,7 +38,7 @@ impl II2cDeviceStatics_Vtbl { unsafe extern "system" fn FromIdAsync(this: *mut ::core::ffi::c_void, deviceid: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, settings: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).FromIdAsync(&*(&deviceid as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), &*(&settings as *const ::Abi as *const ::DefaultType)) { + match (*this).FromIdAsync(::core::mem::transmute(&deviceid), ::core::mem::transmute(&settings)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/Devices/I2c/mod.rs b/crates/libs/windows/src/Windows/Devices/I2c/mod.rs index fca4db1f54..4ac599dc48 100644 --- a/crates/libs/windows/src/Windows/Devices/I2c/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/I2c/mod.rs @@ -287,12 +287,12 @@ impl I2cDevice { } } #[doc = "*Required features: 'Devices_I2c'*"] - pub fn Write(&self, buffer: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn Write(&self, buffer: &[u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).Write)(::core::mem::transmute_copy(this), buffer.len() as u32, ::core::mem::transmute(buffer.as_ptr())).ok() } } #[doc = "*Required features: 'Devices_I2c'*"] - pub fn WritePartial(&self, buffer: &[::DefaultType]) -> ::windows::core::Result { + pub fn WritePartial(&self, buffer: &[u8]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: I2cTransferResult = ::core::mem::zeroed(); @@ -300,12 +300,12 @@ impl I2cDevice { } } #[doc = "*Required features: 'Devices_I2c'*"] - pub fn Read(&self, buffer: &mut [::DefaultType]) -> ::windows::core::Result<()> { + pub fn Read(&self, buffer: &mut [u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).Read)(::core::mem::transmute_copy(this), buffer.len() as u32, ::core::mem::transmute_copy(&buffer)).ok() } } #[doc = "*Required features: 'Devices_I2c'*"] - pub fn ReadPartial(&self, buffer: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn ReadPartial(&self, buffer: &mut [u8]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: I2cTransferResult = ::core::mem::zeroed(); @@ -313,12 +313,12 @@ impl I2cDevice { } } #[doc = "*Required features: 'Devices_I2c'*"] - pub fn WriteRead(&self, writebuffer: &[::DefaultType], readbuffer: &mut [::DefaultType]) -> ::windows::core::Result<()> { + pub fn WriteRead(&self, writebuffer: &[u8], readbuffer: &mut [u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).WriteRead)(::core::mem::transmute_copy(this), writebuffer.len() as u32, ::core::mem::transmute(writebuffer.as_ptr()), readbuffer.len() as u32, ::core::mem::transmute_copy(&readbuffer)).ok() } } #[doc = "*Required features: 'Devices_I2c'*"] - pub fn WriteReadPartial(&self, writebuffer: &[::DefaultType], readbuffer: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn WriteReadPartial(&self, writebuffer: &[u8], readbuffer: &mut [u8]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: I2cTransferResult = ::core::mem::zeroed(); 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 5981128919..f5521e04ab 100644 --- a/crates/libs/windows/src/Windows/Devices/Lights/Effects/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Lights/Effects/mod.rs @@ -549,7 +549,7 @@ impl LampArrayBitmapEffect { unsafe { (::windows::core::Interface::vtable(this).RemoveBitmapRequested)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() } } #[doc = "*Required features: 'Devices_Lights_Effects'*"] - pub fn CreateInstance<'a, Param0: ::windows::core::IntoParam<'a, super::LampArray>>(lamparray: Param0, lampindexes: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateInstance<'a, Param0: ::windows::core::IntoParam<'a, super::LampArray>>(lamparray: Param0, lampindexes: &[i32]) -> ::windows::core::Result { Self::ILampArrayBitmapEffectFactory(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateInstance)(::core::mem::transmute_copy(this), lamparray.into_param().abi(), lampindexes.len() as u32, ::core::mem::transmute(lampindexes.as_ptr()), &mut result__).from_abi::(result__) @@ -873,7 +873,7 @@ impl LampArrayBlinkEffect { unsafe { (::windows::core::Interface::vtable(this).SetRepetitionMode)(::core::mem::transmute_copy(this), value).ok() } } #[doc = "*Required features: 'Devices_Lights_Effects'*"] - pub fn CreateInstance<'a, Param0: ::windows::core::IntoParam<'a, super::LampArray>>(lamparray: Param0, lampindexes: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateInstance<'a, Param0: ::windows::core::IntoParam<'a, super::LampArray>>(lamparray: Param0, lampindexes: &[i32]) -> ::windows::core::Result { Self::ILampArrayBlinkEffectFactory(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateInstance)(::core::mem::transmute_copy(this), lamparray.into_param().abi(), lampindexes.len() as u32, ::core::mem::transmute(lampindexes.as_ptr()), &mut result__).from_abi::(result__) @@ -1051,7 +1051,7 @@ impl LampArrayColorRampEffect { unsafe { (::windows::core::Interface::vtable(this).SetCompletionBehavior)(::core::mem::transmute_copy(this), value).ok() } } #[doc = "*Required features: 'Devices_Lights_Effects'*"] - pub fn CreateInstance<'a, Param0: ::windows::core::IntoParam<'a, super::LampArray>>(lamparray: Param0, lampindexes: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateInstance<'a, Param0: ::windows::core::IntoParam<'a, super::LampArray>>(lamparray: Param0, lampindexes: &[i32]) -> ::windows::core::Result { Self::ILampArrayColorRampEffectFactory(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateInstance)(::core::mem::transmute_copy(this), lamparray.into_param().abi(), lampindexes.len() as u32, ::core::mem::transmute(lampindexes.as_ptr()), &mut result__).from_abi::(result__) @@ -1216,7 +1216,7 @@ impl LampArrayCustomEffect { unsafe { (::windows::core::Interface::vtable(this).RemoveUpdateRequested)(::core::mem::transmute_copy(this), token.into_param().abi()).ok() } } #[doc = "*Required features: 'Devices_Lights_Effects'*"] - pub fn CreateInstance<'a, Param0: ::windows::core::IntoParam<'a, super::LampArray>>(lamparray: Param0, lampindexes: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateInstance<'a, Param0: ::windows::core::IntoParam<'a, super::LampArray>>(lamparray: Param0, lampindexes: &[i32]) -> ::windows::core::Result { Self::ILampArrayCustomEffectFactory(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateInstance)(::core::mem::transmute_copy(this), lamparray.into_param().abi(), lampindexes.len() as u32, ::core::mem::transmute(lampindexes.as_ptr()), &mut result__).from_abi::(result__) @@ -1492,7 +1492,7 @@ impl LampArrayEffectPlaylist { } #[doc = "*Required features: 'Devices_Lights_Effects', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -1783,7 +1783,7 @@ impl LampArraySolidEffect { unsafe { (::windows::core::Interface::vtable(this).SetCompletionBehavior)(::core::mem::transmute_copy(this), value).ok() } } #[doc = "*Required features: 'Devices_Lights_Effects'*"] - pub fn CreateInstance<'a, Param0: ::windows::core::IntoParam<'a, super::LampArray>>(lamparray: Param0, lampindexes: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateInstance<'a, Param0: ::windows::core::IntoParam<'a, super::LampArray>>(lamparray: Param0, lampindexes: &[i32]) -> ::windows::core::Result { Self::ILampArraySolidEffectFactory(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateInstance)(::core::mem::transmute_copy(this), lamparray.into_param().abi(), lampindexes.len() as u32, ::core::mem::transmute(lampindexes.as_ptr()), &mut result__).from_abi::(result__) @@ -1912,13 +1912,13 @@ impl LampArrayUpdateRequestedEventArgs { } #[doc = "*Required features: 'Devices_Lights_Effects', 'UI'*"] #[cfg(feature = "UI")] - pub fn SetSingleColorForIndices<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::UI::Color>>(&self, desiredcolor: Param0, lampindexes: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn SetSingleColorForIndices<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::UI::Color>>(&self, desiredcolor: Param0, lampindexes: &[i32]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).SetSingleColorForIndices)(::core::mem::transmute_copy(this), desiredcolor.into_param().abi(), lampindexes.len() as u32, ::core::mem::transmute(lampindexes.as_ptr())).ok() } } #[doc = "*Required features: 'Devices_Lights_Effects', 'UI'*"] #[cfg(feature = "UI")] - pub fn SetColorsForIndices(&self, desiredcolors: &[::DefaultType], lampindexes: &[::DefaultType]) -> ::windows::core::Result<()> { + 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)(::core::mem::transmute_copy(this), desiredcolors.len() as u32, ::core::mem::transmute(desiredcolors.as_ptr()), lampindexes.len() as u32, ::core::mem::transmute(lampindexes.as_ptr())).ok() } } diff --git a/crates/libs/windows/src/Windows/Devices/Lights/mod.rs b/crates/libs/windows/src/Windows/Devices/Lights/mod.rs index 6f23a46a84..2aafa23f6a 100644 --- a/crates/libs/windows/src/Windows/Devices/Lights/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Lights/mod.rs @@ -550,13 +550,13 @@ impl LampArray { } #[doc = "*Required features: 'Devices_Lights', 'UI'*"] #[cfg(feature = "UI")] - pub fn SetSingleColorForIndices<'a, Param0: ::windows::core::IntoParam<'a, super::super::UI::Color>>(&self, desiredcolor: Param0, lampindexes: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn SetSingleColorForIndices<'a, Param0: ::windows::core::IntoParam<'a, super::super::UI::Color>>(&self, desiredcolor: Param0, lampindexes: &[i32]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).SetSingleColorForIndices)(::core::mem::transmute_copy(this), desiredcolor.into_param().abi(), lampindexes.len() as u32, ::core::mem::transmute(lampindexes.as_ptr())).ok() } } #[doc = "*Required features: 'Devices_Lights', 'UI'*"] #[cfg(feature = "UI")] - pub fn SetColorsForIndices(&self, desiredcolors: &[::DefaultType], lampindexes: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn SetColorsForIndices(&self, desiredcolors: &[super::super::UI::Color], lampindexes: &[i32]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).SetColorsForIndices)(::core::mem::transmute_copy(this), desiredcolors.len() as u32, ::core::mem::transmute(desiredcolors.as_ptr()), lampindexes.len() as u32, ::core::mem::transmute(lampindexes.as_ptr())).ok() } } @@ -568,7 +568,7 @@ impl LampArray { } #[doc = "*Required features: 'Devices_Lights', 'System', 'UI'*"] #[cfg(all(feature = "System", feature = "UI"))] - pub fn SetColorsForKeys(&self, desiredcolors: &[::DefaultType], keys: &[::DefaultType]) -> ::windows::core::Result<()> { + 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)(::core::mem::transmute_copy(this), desiredcolors.len() as u32, ::core::mem::transmute(desiredcolors.as_ptr()), keys.len() as u32, ::core::mem::transmute(keys.as_ptr())).ok() } } diff --git a/crates/libs/windows/src/Windows/Devices/Midi/impl.rs b/crates/libs/windows/src/Windows/Devices/Midi/impl.rs index 4b5decfc14..6b777ae77a 100644 --- a/crates/libs/windows/src/Windows/Devices/Midi/impl.rs +++ b/crates/libs/windows/src/Windows/Devices/Midi/impl.rs @@ -74,12 +74,12 @@ impl IMidiOutPort_Vtbl { unsafe extern "system" fn SendMessage(this: *mut ::core::ffi::c_void, midimessage: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SendMessage(&*(&midimessage as *const ::Abi as *const ::DefaultType)).into() + (*this).SendMessage(::core::mem::transmute(&midimessage)).into() } unsafe extern "system" fn SendBuffer(this: *mut ::core::ffi::c_void, mididata: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SendBuffer(&*(&mididata as *const ::Abi as *const ::DefaultType)).into() + (*this).SendBuffer(::core::mem::transmute(&mididata)).into() } unsafe extern "system" fn DeviceId(this: *mut ::core::ffi::c_void, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; diff --git a/crates/libs/windows/src/Windows/Devices/Perception/Provider/impl.rs b/crates/libs/windows/src/Windows/Devices/Perception/Provider/impl.rs index 2b5a479bf0..faf2d4e892 100644 --- a/crates/libs/windows/src/Windows/Devices/Perception/Provider/impl.rs +++ b/crates/libs/windows/src/Windows/Devices/Perception/Provider/impl.rs @@ -63,7 +63,7 @@ impl IPerceptionFrameProvider_Vtbl { unsafe extern "system" fn SetProperty(this: *mut ::core::ffi::c_void, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetProperty(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetProperty(::core::mem::transmute(&value)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -93,7 +93,7 @@ impl IPerceptionFrameProviderManager_Vtbl { unsafe extern "system" fn GetFrameProvider(this: *mut ::core::ffi::c_void, frameproviderinfo: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetFrameProvider(&*(&frameproviderinfo as *const ::Abi as *const ::DefaultType)) { + match (*this).GetFrameProvider(::core::mem::transmute(&frameproviderinfo)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/Devices/Perception/Provider/mod.rs b/crates/libs/windows/src/Windows/Devices/Perception/Provider/mod.rs index 9dcfcaa314..31ef64b99e 100644 --- a/crates/libs/windows/src/Windows/Devices/Perception/Provider/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Perception/Provider/mod.rs @@ -1801,7 +1801,7 @@ impl) -> ::w } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - match ((*this).invoke)(&*(&sender as *const ::Abi as *const ::DefaultType)) { + match ((*this).invoke)(::core::mem::transmute(&sender)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -1901,7 +1901,7 @@ impl) -> ::w } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender)).into() } } #[cfg(feature = "deprecated")] diff --git a/crates/libs/windows/src/Windows/Devices/Perception/mod.rs b/crates/libs/windows/src/Windows/Devices/Perception/mod.rs index 2dd451c970..4042f09e31 100644 --- a/crates/libs/windows/src/Windows/Devices/Perception/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Perception/mod.rs @@ -3214,13 +3214,13 @@ impl PerceptionDepthCorrelatedCameraIntrinsics { } #[doc = "*Required features: 'Devices_Perception', 'Foundation', 'Foundation_Numerics', 'deprecated'*"] #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics", feature = "deprecated"))] - pub fn UnprojectPixelsAtCorrelatedDepth<'a, Param1: ::windows::core::IntoParam<'a, PerceptionDepthFrame>>(&self, sourcecoordinates: &[::DefaultType], depthframe: Param1, results: &mut [::DefaultType]) -> ::windows::core::Result<()> { + pub fn UnprojectPixelsAtCorrelatedDepth<'a, Param1: ::windows::core::IntoParam<'a, PerceptionDepthFrame>>(&self, sourcecoordinates: &[super::super::Foundation::Point], depthframe: Param1, results: &mut [super::super::Foundation::Numerics::Vector3]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).UnprojectPixelsAtCorrelatedDepth)(::core::mem::transmute_copy(this), sourcecoordinates.len() as u32, ::core::mem::transmute(sourcecoordinates.as_ptr()), depthframe.into_param().abi(), results.len() as u32, ::core::mem::transmute_copy(&results)).ok() } } #[doc = "*Required features: 'Devices_Perception', 'Foundation', 'Foundation_Numerics', 'deprecated'*"] #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics", feature = "deprecated"))] - pub fn UnprojectRegionPixelsAtCorrelatedDepthAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Rect>, Param1: ::windows::core::IntoParam<'a, PerceptionDepthFrame>>(&self, region: Param0, depthframe: Param1, results: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn UnprojectRegionPixelsAtCorrelatedDepthAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Rect>, Param1: ::windows::core::IntoParam<'a, PerceptionDepthFrame>>(&self, region: Param0, depthframe: Param1, results: &mut [super::super::Foundation::Numerics::Vector3]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); @@ -3229,7 +3229,7 @@ impl PerceptionDepthCorrelatedCameraIntrinsics { } #[doc = "*Required features: 'Devices_Perception', 'Foundation', 'Foundation_Numerics', 'deprecated'*"] #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics", feature = "deprecated"))] - pub fn UnprojectAllPixelsAtCorrelatedDepthAsync<'a, Param0: ::windows::core::IntoParam<'a, PerceptionDepthFrame>>(&self, depthframe: Param0, results: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn UnprojectAllPixelsAtCorrelatedDepthAsync<'a, Param0: ::windows::core::IntoParam<'a, PerceptionDepthFrame>>(&self, depthframe: Param0, results: &mut [super::super::Foundation::Numerics::Vector3]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); @@ -3339,13 +3339,13 @@ impl PerceptionDepthCorrelatedCoordinateMapper { } #[doc = "*Required features: 'Devices_Perception', 'Foundation', 'deprecated'*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn MapPixelsToTarget<'a, Param1: ::windows::core::IntoParam<'a, PerceptionDepthFrame>>(&self, sourcecoordinates: &[::DefaultType], depthframe: Param1, results: &mut [::DefaultType]) -> ::windows::core::Result<()> { + pub fn MapPixelsToTarget<'a, Param1: ::windows::core::IntoParam<'a, PerceptionDepthFrame>>(&self, sourcecoordinates: &[super::super::Foundation::Point], depthframe: Param1, results: &mut [super::super::Foundation::Point]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).MapPixelsToTarget)(::core::mem::transmute_copy(this), sourcecoordinates.len() as u32, ::core::mem::transmute(sourcecoordinates.as_ptr()), depthframe.into_param().abi(), results.len() as u32, ::core::mem::transmute_copy(&results)).ok() } } #[doc = "*Required features: 'Devices_Perception', 'Foundation', 'deprecated'*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn MapRegionOfPixelsToTargetAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Rect>, Param1: ::windows::core::IntoParam<'a, PerceptionDepthFrame>>(&self, region: Param0, depthframe: Param1, targetcoordinates: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn MapRegionOfPixelsToTargetAsync<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::Rect>, Param1: ::windows::core::IntoParam<'a, PerceptionDepthFrame>>(&self, region: Param0, depthframe: Param1, targetcoordinates: &mut [super::super::Foundation::Point]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); @@ -3354,7 +3354,7 @@ impl PerceptionDepthCorrelatedCoordinateMapper { } #[doc = "*Required features: 'Devices_Perception', 'Foundation', 'deprecated'*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn MapAllPixelsToTargetAsync<'a, Param0: ::windows::core::IntoParam<'a, PerceptionDepthFrame>>(&self, depthframe: Param0, targetcoordinates: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn MapAllPixelsToTargetAsync<'a, Param0: ::windows::core::IntoParam<'a, PerceptionDepthFrame>>(&self, depthframe: Param0, targetcoordinates: &mut [super::super::Foundation::Point]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Devices/PointOfService/impl.rs b/crates/libs/windows/src/Windows/Devices/PointOfService/impl.rs index 8275e44bc7..e7843fa90d 100644 --- a/crates/libs/windows/src/Windows/Devices/PointOfService/impl.rs +++ b/crates/libs/windows/src/Windows/Devices/PointOfService/impl.rs @@ -237,7 +237,7 @@ impl ICommonClaimedPosPrinterStation_Vtbl { unsafe extern "system" fn ValidateData(this: *mut ::core::ffi::c_void, data: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).ValidateData(&*(&data as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).ValidateData(::core::mem::transmute(&data)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -634,12 +634,12 @@ impl IPosPrinterJob_Vtbl { unsafe extern "system" fn Print(this: *mut ::core::ffi::c_void, data: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).Print(&*(&data as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).Print(::core::mem::transmute(&data)).into() } unsafe extern "system" fn PrintLine(this: *mut ::core::ffi::c_void, data: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).PrintLine(&*(&data as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).PrintLine(::core::mem::transmute(&data)).into() } unsafe extern "system" fn PrintNewline(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -708,27 +708,27 @@ impl IReceiptOrSlipJob_Vtbl { unsafe extern "system" fn SetPrintArea(this: *mut ::core::ffi::c_void, value: super::super::Foundation::Rect) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetPrintArea(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetPrintArea(::core::mem::transmute(&value)).into() } unsafe extern "system" fn SetBitmap(this: *mut ::core::ffi::c_void, bitmapnumber: u32, bitmap: ::windows::core::RawPtr, alignment: PosPrinterAlignment) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetBitmap(bitmapnumber, &*(&bitmap as *const ::Abi as *const ::DefaultType), alignment).into() + (*this).SetBitmap(bitmapnumber, ::core::mem::transmute(&bitmap), alignment).into() } unsafe extern "system" fn SetBitmapCustomWidthStandardAlign(this: *mut ::core::ffi::c_void, bitmapnumber: u32, bitmap: ::windows::core::RawPtr, alignment: PosPrinterAlignment, width: u32) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetBitmapCustomWidthStandardAlign(bitmapnumber, &*(&bitmap as *const ::Abi as *const ::DefaultType), alignment, width).into() + (*this).SetBitmapCustomWidthStandardAlign(bitmapnumber, ::core::mem::transmute(&bitmap), alignment, width).into() } unsafe extern "system" fn SetCustomAlignedBitmap(this: *mut ::core::ffi::c_void, bitmapnumber: u32, bitmap: ::windows::core::RawPtr, alignmentdistance: u32) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetCustomAlignedBitmap(bitmapnumber, &*(&bitmap as *const ::Abi as *const ::DefaultType), alignmentdistance).into() + (*this).SetCustomAlignedBitmap(bitmapnumber, ::core::mem::transmute(&bitmap), alignmentdistance).into() } unsafe extern "system" fn SetBitmapCustomWidthCustomAlign(this: *mut ::core::ffi::c_void, bitmapnumber: u32, bitmap: ::windows::core::RawPtr, alignmentdistance: u32, width: u32) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetBitmapCustomWidthCustomAlign(bitmapnumber, &*(&bitmap as *const ::Abi as *const ::DefaultType), alignmentdistance, width).into() + (*this).SetBitmapCustomWidthCustomAlign(bitmapnumber, ::core::mem::transmute(&bitmap), alignmentdistance, width).into() } unsafe extern "system" fn PrintSavedBitmap(this: *mut ::core::ffi::c_void, bitmapnumber: u32) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -738,37 +738,37 @@ impl IReceiptOrSlipJob_Vtbl { unsafe extern "system" fn DrawRuledLine(this: *mut ::core::ffi::c_void, positionlist: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, linedirection: PosPrinterLineDirection, linewidth: u32, linestyle: PosPrinterLineStyle, linecolor: u32) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).DrawRuledLine(&*(&positionlist as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), linedirection, linewidth, linestyle, linecolor).into() + (*this).DrawRuledLine(::core::mem::transmute(&positionlist), linedirection, linewidth, linestyle, linecolor).into() } unsafe extern "system" fn PrintBarcode(this: *mut ::core::ffi::c_void, data: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, symbology: u32, height: u32, width: u32, textposition: PosPrinterBarcodeTextPosition, alignment: PosPrinterAlignment) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).PrintBarcode(&*(&data as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), symbology, height, width, textposition, alignment).into() + (*this).PrintBarcode(::core::mem::transmute(&data), symbology, height, width, textposition, alignment).into() } unsafe extern "system" fn PrintBarcodeCustomAlign(this: *mut ::core::ffi::c_void, data: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, symbology: u32, height: u32, width: u32, textposition: PosPrinterBarcodeTextPosition, alignmentdistance: u32) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).PrintBarcodeCustomAlign(&*(&data as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), symbology, height, width, textposition, alignmentdistance).into() + (*this).PrintBarcodeCustomAlign(::core::mem::transmute(&data), symbology, height, width, textposition, alignmentdistance).into() } unsafe extern "system" fn PrintBitmap(this: *mut ::core::ffi::c_void, bitmap: ::windows::core::RawPtr, alignment: PosPrinterAlignment) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).PrintBitmap(&*(&bitmap as *const ::Abi as *const ::DefaultType), alignment).into() + (*this).PrintBitmap(::core::mem::transmute(&bitmap), alignment).into() } unsafe extern "system" fn PrintBitmapCustomWidthStandardAlign(this: *mut ::core::ffi::c_void, bitmap: ::windows::core::RawPtr, alignment: PosPrinterAlignment, width: u32) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).PrintBitmapCustomWidthStandardAlign(&*(&bitmap as *const ::Abi as *const ::DefaultType), alignment, width).into() + (*this).PrintBitmapCustomWidthStandardAlign(::core::mem::transmute(&bitmap), alignment, width).into() } unsafe extern "system" fn PrintCustomAlignedBitmap(this: *mut ::core::ffi::c_void, bitmap: ::windows::core::RawPtr, alignmentdistance: u32) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).PrintCustomAlignedBitmap(&*(&bitmap as *const ::Abi as *const ::DefaultType), alignmentdistance).into() + (*this).PrintCustomAlignedBitmap(::core::mem::transmute(&bitmap), alignmentdistance).into() } unsafe extern "system" fn PrintBitmapCustomWidthCustomAlign(this: *mut ::core::ffi::c_void, bitmap: ::windows::core::RawPtr, alignmentdistance: u32, width: u32) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).PrintBitmapCustomWidthCustomAlign(&*(&bitmap as *const ::Abi as *const ::DefaultType), alignmentdistance, width).into() + (*this).PrintBitmapCustomWidthCustomAlign(::core::mem::transmute(&bitmap), alignmentdistance, width).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Devices/PointOfService/mod.rs b/crates/libs/windows/src/Windows/Devices/PointOfService/mod.rs index 2860c234a5..65c6a58e62 100644 --- a/crates/libs/windows/src/Windows/Devices/PointOfService/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/PointOfService/mod.rs @@ -4323,7 +4323,7 @@ impl ClaimedMagneticStripeReader { } #[doc = "*Required features: 'Devices_PointOfService', 'Foundation'*"] #[cfg(feature = "Foundation")] - pub fn AuthenticateDeviceAsync(&self, responsetoken: &[::DefaultType]) -> ::windows::core::Result { + pub fn AuthenticateDeviceAsync(&self, responsetoken: &[u8]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); @@ -4332,7 +4332,7 @@ impl ClaimedMagneticStripeReader { } #[doc = "*Required features: 'Devices_PointOfService', 'Foundation'*"] #[cfg(feature = "Foundation")] - pub fn DeAuthenticateDeviceAsync(&self, responsetoken: &[::DefaultType]) -> ::windows::core::Result { + pub fn DeAuthenticateDeviceAsync(&self, responsetoken: &[u8]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Devices/Scanners/impl.rs b/crates/libs/windows/src/Windows/Devices/Scanners/impl.rs index 5a8bb06e88..1e7a5df3e5 100644 --- a/crates/libs/windows/src/Windows/Devices/Scanners/impl.rs +++ b/crates/libs/windows/src/Windows/Devices/Scanners/impl.rs @@ -140,7 +140,7 @@ impl IImageScannerSourceConfiguration_Vtbl { unsafe extern "system" fn SetSelectedScanRegion(this: *mut ::core::ffi::c_void, value: super::super::Foundation::Rect) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetSelectedScanRegion(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetSelectedScanRegion(::core::mem::transmute(&value)).into() } unsafe extern "system" fn AutoCroppingMode(this: *mut ::core::ffi::c_void, result__: *mut ImageScannerAutoCroppingMode) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -222,7 +222,7 @@ impl IImageScannerSourceConfiguration_Vtbl { unsafe extern "system" fn SetDesiredResolution(this: *mut ::core::ffi::c_void, value: ImageScannerResolution) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetDesiredResolution(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetDesiredResolution(::core::mem::transmute(&value)).into() } unsafe extern "system" fn ActualResolution(this: *mut ::core::ffi::c_void, result__: *mut ImageScannerResolution) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; diff --git a/crates/libs/windows/src/Windows/Devices/SmartCards/mod.rs b/crates/libs/windows/src/Windows/Devices/SmartCards/mod.rs index 716d6f3e2c..525d7eb9d5 100644 --- a/crates/libs/windows/src/Windows/Devices/SmartCards/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/SmartCards/mod.rs @@ -5142,7 +5142,7 @@ impl, &::core::option::O } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: ::windows::core::RawPtr, request: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const ::Abi as *const ::DefaultType), &*(&request as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&request)).into() } } impl ::core::clone::Clone for SmartCardPinResetHandler { diff --git a/crates/libs/windows/src/Windows/Devices/Sms/impl.rs b/crates/libs/windows/src/Windows/Devices/Sms/impl.rs index 61fc9c76b2..a794628349 100644 --- a/crates/libs/windows/src/Windows/Devices/Sms/impl.rs +++ b/crates/libs/windows/src/Windows/Devices/Sms/impl.rs @@ -3,7 +3,7 @@ pub trait ISmsBinaryMessage_Impl: Sized + ISmsMessage_Impl { fn Format(&mut self) -> ::windows::core::Result; fn SetFormat(&mut self, value: SmsDataFormat) -> ::windows::core::Result<()>; fn GetData(&mut self) -> ::windows::core::Result<::windows::core::Array>; - fn SetData(&mut self, value: &[::DefaultType]) -> ::windows::core::Result<()>; + fn SetData(&mut self, value: &[u8]) -> ::windows::core::Result<()>; } #[cfg(feature = "deprecated")] impl ::windows::core::RuntimeName for ISmsBinaryMessage { @@ -82,7 +82,7 @@ impl ISmsDevice_Vtbl { unsafe extern "system" fn SendMessageAsync(this: *mut ::core::ffi::c_void, message: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).SendMessageAsync(&*(&message as *const ::Abi as *const ::DefaultType)) { + match (*this).SendMessageAsync(::core::mem::transmute(&message)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -94,7 +94,7 @@ impl ISmsDevice_Vtbl { unsafe extern "system" fn CalculateLength(this: *mut ::core::ffi::c_void, message: ::windows::core::RawPtr, result__: *mut SmsEncodedLength) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CalculateLength(&*(&message as *const ::Abi as *const ::DefaultType)) { + match (*this).CalculateLength(::core::mem::transmute(&message)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -154,7 +154,7 @@ impl ISmsDevice_Vtbl { unsafe extern "system" fn SmsMessageReceived(this: *mut ::core::ffi::c_void, eventhandler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).SmsMessageReceived(&*(&eventhandler as *const ::Abi as *const ::DefaultType)) { + match (*this).SmsMessageReceived(::core::mem::transmute(&eventhandler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -166,12 +166,12 @@ impl ISmsDevice_Vtbl { unsafe extern "system" fn RemoveSmsMessageReceived(this: *mut ::core::ffi::c_void, eventcookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveSmsMessageReceived(&*(&eventcookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveSmsMessageReceived(::core::mem::transmute(&eventcookie)).into() } unsafe extern "system" fn SmsDeviceStatusChanged(this: *mut ::core::ffi::c_void, eventhandler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).SmsDeviceStatusChanged(&*(&eventhandler as *const ::Abi as *const ::DefaultType)) { + match (*this).SmsDeviceStatusChanged(::core::mem::transmute(&eventhandler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -183,7 +183,7 @@ impl ISmsDevice_Vtbl { unsafe extern "system" fn RemoveSmsDeviceStatusChanged(this: *mut ::core::ffi::c_void, eventcookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveSmsDeviceStatusChanged(&*(&eventcookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveSmsDeviceStatusChanged(::core::mem::transmute(&eventcookie)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -417,7 +417,7 @@ impl ISmsTextMessage_Vtbl { unsafe extern "system" fn SetTo(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetTo(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetTo(::core::mem::transmute(&value)).into() } unsafe extern "system" fn From(this: *mut ::core::ffi::c_void, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -434,7 +434,7 @@ impl ISmsTextMessage_Vtbl { unsafe extern "system" fn SetFrom(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetFrom(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetFrom(::core::mem::transmute(&value)).into() } unsafe extern "system" fn Body(this: *mut ::core::ffi::c_void, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -451,7 +451,7 @@ impl ISmsTextMessage_Vtbl { unsafe extern "system" fn SetBody(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetBody(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetBody(::core::mem::transmute(&value)).into() } unsafe extern "system" fn Encoding(this: *mut ::core::ffi::c_void, result__: *mut SmsEncoding) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; diff --git a/crates/libs/windows/src/Windows/Devices/Sms/mod.rs b/crates/libs/windows/src/Windows/Devices/Sms/mod.rs index 84cc37b511..c20f3d8405 100644 --- a/crates/libs/windows/src/Windows/Devices/Sms/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Sms/mod.rs @@ -1287,7 +1287,7 @@ impl ISmsBinaryMessage { } #[doc = "*Required features: 'Devices_Sms', 'deprecated'*"] #[cfg(feature = "deprecated")] - pub fn SetData(&self, value: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn SetData(&self, value: &[u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).SetData)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr())).ok() } } @@ -3242,7 +3242,7 @@ impl SmsBinaryMessage { } #[doc = "*Required features: 'Devices_Sms', 'deprecated'*"] #[cfg(feature = "deprecated")] - pub fn SetData(&self, value: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn SetData(&self, value: &[u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).SetData)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr())).ok() } } @@ -4352,7 +4352,7 @@ impl) -> ::windows::core::Result<()> } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender)).into() } } #[cfg(feature = "deprecated")] @@ -5092,7 +5092,7 @@ impl, &::core::option::Option ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const ::Abi as *const ::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } #[cfg(feature = "deprecated")] @@ -6068,7 +6068,7 @@ impl SmsTextMessage { } #[doc = "*Required features: 'Devices_Sms', 'deprecated'*"] #[cfg(feature = "deprecated")] - pub fn FromBinaryData(format: SmsDataFormat, value: &[::DefaultType]) -> ::windows::core::Result { + pub fn FromBinaryData(format: SmsDataFormat, value: &[u8]) -> ::windows::core::Result { Self::ISmsTextMessageStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).FromBinaryData)(::core::mem::transmute_copy(this), format, value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::(result__) diff --git a/crates/libs/windows/src/Windows/Devices/Spi/Provider/impl.rs b/crates/libs/windows/src/Windows/Devices/Spi/Provider/impl.rs index 993bfd8e05..45f0c46d2f 100644 --- a/crates/libs/windows/src/Windows/Devices/Spi/Provider/impl.rs +++ b/crates/libs/windows/src/Windows/Devices/Spi/Provider/impl.rs @@ -9,7 +9,7 @@ impl ISpiControllerProvider_Vtbl { unsafe extern "system" fn GetDeviceProvider(this: *mut ::core::ffi::c_void, settings: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetDeviceProvider(&*(&settings as *const ::Abi as *const ::DefaultType)) { + match (*this).GetDeviceProvider(::core::mem::transmute(&settings)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -31,10 +31,10 @@ impl ISpiControllerProvider_Vtbl { pub trait ISpiDeviceProvider_Impl: Sized + super::super::super::Foundation::IClosable_Impl { fn DeviceId(&mut self) -> ::windows::core::Result<::windows::core::HSTRING>; fn ConnectionSettings(&mut self) -> ::windows::core::Result; - fn Write(&mut self, buffer: &[::DefaultType]) -> ::windows::core::Result<()>; - fn Read(&mut self, buffer: &mut [::DefaultType]) -> ::windows::core::Result<()>; - fn TransferSequential(&mut self, writebuffer: &[::DefaultType], readbuffer: &mut [::DefaultType]) -> ::windows::core::Result<()>; - fn TransferFullDuplex(&mut self, writebuffer: &[::DefaultType], readbuffer: &mut [::DefaultType]) -> ::windows::core::Result<()>; + fn Write(&mut self, buffer: &[u8]) -> ::windows::core::Result<()>; + fn Read(&mut self, buffer: &mut [u8]) -> ::windows::core::Result<()>; + fn TransferSequential(&mut self, writebuffer: &[u8], readbuffer: &mut [u8]) -> ::windows::core::Result<()>; + fn TransferFullDuplex(&mut self, writebuffer: &[u8], readbuffer: &mut [u8]) -> ::windows::core::Result<()>; } #[cfg(feature = "Foundation")] impl ::windows::core::RuntimeName for ISpiDeviceProvider { 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 717ccda968..e8092071c4 100644 --- a/crates/libs/windows/src/Windows/Devices/Spi/Provider/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Spi/Provider/mod.rs @@ -137,22 +137,22 @@ impl ISpiDeviceProvider { } } #[doc = "*Required features: 'Devices_Spi_Provider'*"] - pub fn Write(&self, buffer: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn Write(&self, buffer: &[u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).Write)(::core::mem::transmute_copy(this), buffer.len() as u32, ::core::mem::transmute(buffer.as_ptr())).ok() } } #[doc = "*Required features: 'Devices_Spi_Provider'*"] - pub fn Read(&self, buffer: &mut [::DefaultType]) -> ::windows::core::Result<()> { + pub fn Read(&self, buffer: &mut [u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).Read)(::core::mem::transmute_copy(this), buffer.len() as u32, ::core::mem::transmute_copy(&buffer)).ok() } } #[doc = "*Required features: 'Devices_Spi_Provider'*"] - pub fn TransferSequential(&self, writebuffer: &[::DefaultType], readbuffer: &mut [::DefaultType]) -> ::windows::core::Result<()> { + pub fn TransferSequential(&self, writebuffer: &[u8], readbuffer: &mut [u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).TransferSequential)(::core::mem::transmute_copy(this), writebuffer.len() as u32, ::core::mem::transmute(writebuffer.as_ptr()), readbuffer.len() as u32, ::core::mem::transmute_copy(&readbuffer)).ok() } } #[doc = "*Required features: 'Devices_Spi_Provider'*"] - pub fn TransferFullDuplex(&self, writebuffer: &[::DefaultType], readbuffer: &mut [::DefaultType]) -> ::windows::core::Result<()> { + pub fn TransferFullDuplex(&self, writebuffer: &[u8], readbuffer: &mut [u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).TransferFullDuplex)(::core::mem::transmute_copy(this), writebuffer.len() as u32, ::core::mem::transmute(writebuffer.as_ptr()), readbuffer.len() as u32, ::core::mem::transmute_copy(&readbuffer)).ok() } } diff --git a/crates/libs/windows/src/Windows/Devices/Spi/impl.rs b/crates/libs/windows/src/Windows/Devices/Spi/impl.rs index a5d89e593e..040430be8f 100644 --- a/crates/libs/windows/src/Windows/Devices/Spi/impl.rs +++ b/crates/libs/windows/src/Windows/Devices/Spi/impl.rs @@ -27,7 +27,7 @@ impl ISpiDeviceStatics_Vtbl { unsafe extern "system" fn GetDeviceSelectorFromFriendlyName(this: *mut ::core::ffi::c_void, friendlyname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetDeviceSelectorFromFriendlyName(&*(&friendlyname as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).GetDeviceSelectorFromFriendlyName(::core::mem::transmute(&friendlyname)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -39,7 +39,7 @@ impl ISpiDeviceStatics_Vtbl { unsafe extern "system" fn GetBusInfo(this: *mut ::core::ffi::c_void, busid: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetBusInfo(&*(&busid as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).GetBusInfo(::core::mem::transmute(&busid)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -51,7 +51,7 @@ impl ISpiDeviceStatics_Vtbl { unsafe extern "system" fn FromIdAsync(this: *mut ::core::ffi::c_void, busid: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, settings: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).FromIdAsync(&*(&busid as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), &*(&settings as *const ::Abi as *const ::DefaultType)) { + match (*this).FromIdAsync(::core::mem::transmute(&busid), ::core::mem::transmute(&settings)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/Devices/Spi/mod.rs b/crates/libs/windows/src/Windows/Devices/Spi/mod.rs index 50a02ad6b7..4fb01dab13 100644 --- a/crates/libs/windows/src/Windows/Devices/Spi/mod.rs +++ b/crates/libs/windows/src/Windows/Devices/Spi/mod.rs @@ -604,22 +604,22 @@ impl SpiDevice { } } #[doc = "*Required features: 'Devices_Spi'*"] - pub fn Write(&self, buffer: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn Write(&self, buffer: &[u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).Write)(::core::mem::transmute_copy(this), buffer.len() as u32, ::core::mem::transmute(buffer.as_ptr())).ok() } } #[doc = "*Required features: 'Devices_Spi'*"] - pub fn Read(&self, buffer: &mut [::DefaultType]) -> ::windows::core::Result<()> { + pub fn Read(&self, buffer: &mut [u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).Read)(::core::mem::transmute_copy(this), buffer.len() as u32, ::core::mem::transmute_copy(&buffer)).ok() } } #[doc = "*Required features: 'Devices_Spi'*"] - pub fn TransferSequential(&self, writebuffer: &[::DefaultType], readbuffer: &mut [::DefaultType]) -> ::windows::core::Result<()> { + pub fn TransferSequential(&self, writebuffer: &[u8], readbuffer: &mut [u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).TransferSequential)(::core::mem::transmute_copy(this), writebuffer.len() as u32, ::core::mem::transmute(writebuffer.as_ptr()), readbuffer.len() as u32, ::core::mem::transmute_copy(&readbuffer)).ok() } } #[doc = "*Required features: 'Devices_Spi'*"] - pub fn TransferFullDuplex(&self, writebuffer: &[::DefaultType], readbuffer: &mut [::DefaultType]) -> ::windows::core::Result<()> { + pub fn TransferFullDuplex(&self, writebuffer: &[u8], readbuffer: &mut [u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).TransferFullDuplex)(::core::mem::transmute_copy(this), writebuffer.len() as u32, ::core::mem::transmute(writebuffer.as_ptr()), readbuffer.len() as u32, ::core::mem::transmute_copy(&readbuffer)).ok() } } diff --git a/crates/libs/windows/src/Windows/Foundation/Collections/impl.rs b/crates/libs/windows/src/Windows/Foundation/Collections/impl.rs index 96ae5229b1..f1ed37dd7e 100644 --- a/crates/libs/windows/src/Windows/Foundation/Collections/impl.rs +++ b/crates/libs/windows/src/Windows/Foundation/Collections/impl.rs @@ -176,7 +176,7 @@ impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, key: ::Abi, result__: *mut ::Abi) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).Lookup(&*(&key as *const ::Abi as *const ::DefaultType)) { + match (*this).Lookup(::core::mem::transmute(&key)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -200,7 +200,7 @@ impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, key: ::Abi, result__: *mut bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).HasKey(&*(&key as *const ::Abi as *const ::DefaultType)) { + match (*this).HasKey(::core::mem::transmute(&key)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -224,7 +224,7 @@ impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, key: ::Abi, value: ::Abi, result__: *mut bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).Insert(&*(&key as *const ::Abi as *const ::DefaultType), &*(&value as *const ::Abi as *const ::DefaultType)) { + match (*this).Insert(::core::mem::transmute(&key), ::core::mem::transmute(&value)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -236,7 +236,7 @@ impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, key: ::Abi) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).Remove(&*(&key as *const ::Abi as *const ::DefaultType)).into() + (*this).Remove(::core::mem::transmute(&key)).into() } unsafe extern "system" fn Clear, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -325,7 +325,7 @@ impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, key: ::Abi, result__: *mut ::Abi) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).Lookup(&*(&key as *const ::Abi as *const ::DefaultType)) { + match (*this).Lookup(::core::mem::transmute(&key)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -349,7 +349,7 @@ impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, key: ::Abi, result__: *mut bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).HasKey(&*(&key as *const ::Abi as *const ::DefaultType)) { + match (*this).HasKey(::core::mem::transmute(&key)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -393,7 +393,7 @@ impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, vhnd: ::windows::core::RawPtr, result__: *mut super::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).MapChanged(&*(&vhnd as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).MapChanged(::core::mem::transmute(&vhnd)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -405,7 +405,7 @@ impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, token: super::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveMapChanged(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveMapChanged(::core::mem::transmute(&token)).into() } Self { base: ::windows::core::IInspectableVtbl::new::, OFFSET>(), @@ -434,7 +434,7 @@ impl IObservableVector_Vtbl { unsafe extern "system" fn VectorChanged, const OFFSET: isize>(this: *mut ::core::ffi::c_void, vhnd: ::windows::core::RawPtr, result__: *mut super::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).VectorChanged(&*(&vhnd as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).VectorChanged(::core::mem::transmute(&vhnd)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -446,7 +446,7 @@ impl IObservableVector_Vtbl { unsafe extern "system" fn RemoveVectorChanged, const OFFSET: isize>(this: *mut ::core::ffi::c_void, token: super::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveVectorChanged(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveVectorChanged(::core::mem::transmute(&token)).into() } Self { base: ::windows::core::IInspectableVtbl::new::, OFFSET>(), @@ -532,7 +532,7 @@ impl IVector_Vtbl { unsafe extern "system" fn IndexOf, const OFFSET: isize>(this: *mut ::core::ffi::c_void, value: ::Abi, index: *mut u32, result__: *mut bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).IndexOf(&*(&value as *const ::Abi as *const ::DefaultType), ::core::mem::transmute_copy(&index)) { + match (*this).IndexOf(::core::mem::transmute(&value), ::core::mem::transmute_copy(&index)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -544,12 +544,12 @@ impl IVector_Vtbl { unsafe extern "system" fn SetAt, const OFFSET: isize>(this: *mut ::core::ffi::c_void, index: u32, value: ::Abi) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetAt(index, &*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetAt(index, ::core::mem::transmute(&value)).into() } unsafe extern "system" fn InsertAt, const OFFSET: isize>(this: *mut ::core::ffi::c_void, index: u32, value: ::Abi) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).InsertAt(index, &*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).InsertAt(index, ::core::mem::transmute(&value)).into() } unsafe extern "system" fn RemoveAt, const OFFSET: isize>(this: *mut ::core::ffi::c_void, index: u32) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -559,7 +559,7 @@ impl IVector_Vtbl { unsafe extern "system" fn Append, const OFFSET: isize>(this: *mut ::core::ffi::c_void, value: ::Abi) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).Append(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).Append(::core::mem::transmute(&value)).into() } unsafe extern "system" fn RemoveAtEnd, const OFFSET: isize>(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -693,7 +693,7 @@ impl IVectorView_Vtbl { unsafe extern "system" fn IndexOf, const OFFSET: isize>(this: *mut ::core::ffi::c_void, value: ::Abi, index: *mut u32, result__: *mut bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).IndexOf(&*(&value as *const ::Abi as *const ::DefaultType), ::core::mem::transmute_copy(&index)) { + match (*this).IndexOf(::core::mem::transmute(&value), ::core::mem::transmute_copy(&index)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/Foundation/Collections/mod.rs b/crates/libs/windows/src/Windows/Foundation/Collections/mod.rs index 2c4ba81a35..e6fccdc910 100644 --- a/crates/libs/windows/src/Windows/Foundation/Collections/mod.rs +++ b/crates/libs/windows/src/Windows/Foundation/Collections/mod.rs @@ -2036,7 +2036,7 @@ impl ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType), &*(&event as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&event)).into() } } impl ::core::clone::Clone for MapChangedEventHandler { @@ -2872,7 +2872,7 @@ impl ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType), &*(&event as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&event)).into() } } impl ::core::clone::Clone for VectorChangedEventHandler { diff --git a/crates/libs/windows/src/Windows/Foundation/Diagnostics/impl.rs b/crates/libs/windows/src/Windows/Foundation/Diagnostics/impl.rs index f57503c42f..2128741a41 100644 --- a/crates/libs/windows/src/Windows/Foundation/Diagnostics/impl.rs +++ b/crates/libs/windows/src/Windows/Foundation/Diagnostics/impl.rs @@ -66,17 +66,17 @@ impl IFileLoggingSession_Vtbl { unsafe extern "system" fn AddLoggingChannel(this: *mut ::core::ffi::c_void, loggingchannel: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).AddLoggingChannel(&*(&loggingchannel as *const ::Abi as *const ::DefaultType)).into() + (*this).AddLoggingChannel(::core::mem::transmute(&loggingchannel)).into() } unsafe extern "system" fn AddLoggingChannelWithLevel(this: *mut ::core::ffi::c_void, loggingchannel: ::windows::core::RawPtr, maxlevel: LoggingLevel) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).AddLoggingChannelWithLevel(&*(&loggingchannel as *const ::Abi as *const ::DefaultType), maxlevel).into() + (*this).AddLoggingChannelWithLevel(::core::mem::transmute(&loggingchannel), maxlevel).into() } unsafe extern "system" fn RemoveLoggingChannel(this: *mut ::core::ffi::c_void, loggingchannel: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveLoggingChannel(&*(&loggingchannel as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveLoggingChannel(::core::mem::transmute(&loggingchannel)).into() } unsafe extern "system" fn CloseAndSaveToFileAsync(this: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -93,7 +93,7 @@ impl IFileLoggingSession_Vtbl { unsafe extern "system" fn LogFileGenerated(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).LogFileGenerated(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).LogFileGenerated(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -105,7 +105,7 @@ impl IFileLoggingSession_Vtbl { unsafe extern "system" fn RemoveLogFileGenerated(this: *mut ::core::ffi::c_void, token: super::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveLogFileGenerated(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveLogFileGenerated(::core::mem::transmute(&token)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -177,27 +177,27 @@ impl ILoggingChannel_Vtbl { unsafe extern "system" fn LogMessage(this: *mut ::core::ffi::c_void, eventstring: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).LogMessage(&*(&eventstring as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).LogMessage(::core::mem::transmute(&eventstring)).into() } unsafe extern "system" fn LogMessageWithLevel(this: *mut ::core::ffi::c_void, eventstring: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, level: LoggingLevel) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).LogMessageWithLevel(&*(&eventstring as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), level).into() + (*this).LogMessageWithLevel(::core::mem::transmute(&eventstring), level).into() } unsafe extern "system" fn LogValuePair(this: *mut ::core::ffi::c_void, value1: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, value2: i32) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).LogValuePair(&*(&value1 as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), value2).into() + (*this).LogValuePair(::core::mem::transmute(&value1), value2).into() } unsafe extern "system" fn LogValuePairWithLevel(this: *mut ::core::ffi::c_void, value1: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, value2: i32, level: LoggingLevel) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).LogValuePairWithLevel(&*(&value1 as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), value2, level).into() + (*this).LogValuePairWithLevel(::core::mem::transmute(&value1), value2, level).into() } unsafe extern "system" fn LoggingEnabled(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).LoggingEnabled(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).LoggingEnabled(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -209,7 +209,7 @@ impl ILoggingChannel_Vtbl { unsafe extern "system" fn RemoveLoggingEnabled(this: *mut ::core::ffi::c_void, token: super::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveLoggingEnabled(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveLoggingEnabled(::core::mem::transmute(&token)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -258,7 +258,7 @@ impl ILoggingSession_Vtbl { unsafe extern "system" fn SaveToFileAsync(this: *mut ::core::ffi::c_void, folder: ::windows::core::RawPtr, filename: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).SaveToFileAsync(&*(&folder as *const ::Abi as *const ::DefaultType), &*(&filename as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).SaveToFileAsync(::core::mem::transmute(&folder), ::core::mem::transmute(&filename)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -270,17 +270,17 @@ impl ILoggingSession_Vtbl { unsafe extern "system" fn AddLoggingChannel(this: *mut ::core::ffi::c_void, loggingchannel: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).AddLoggingChannel(&*(&loggingchannel as *const ::Abi as *const ::DefaultType)).into() + (*this).AddLoggingChannel(::core::mem::transmute(&loggingchannel)).into() } unsafe extern "system" fn AddLoggingChannelWithLevel(this: *mut ::core::ffi::c_void, loggingchannel: ::windows::core::RawPtr, maxlevel: LoggingLevel) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).AddLoggingChannelWithLevel(&*(&loggingchannel as *const ::Abi as *const ::DefaultType), maxlevel).into() + (*this).AddLoggingChannelWithLevel(::core::mem::transmute(&loggingchannel), maxlevel).into() } unsafe extern "system" fn RemoveLoggingChannel(this: *mut ::core::ffi::c_void, loggingchannel: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveLoggingChannel(&*(&loggingchannel as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveLoggingChannel(::core::mem::transmute(&loggingchannel)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -352,29 +352,27 @@ impl ILoggingTarget_Vtbl { unsafe extern "system" fn LogEvent(this: *mut ::core::ffi::c_void, eventname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).LogEvent(&*(&eventname as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).LogEvent(::core::mem::transmute(&eventname)).into() } unsafe extern "system" fn LogEventWithFields(this: *mut ::core::ffi::c_void, eventname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, fields: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).LogEventWithFields(&*(&eventname as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), &*(&fields as *const ::Abi as *const ::DefaultType)).into() + (*this).LogEventWithFields(::core::mem::transmute(&eventname), ::core::mem::transmute(&fields)).into() } unsafe extern "system" fn LogEventWithFieldsAndLevel(this: *mut ::core::ffi::c_void, eventname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, fields: ::windows::core::RawPtr, level: LoggingLevel) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).LogEventWithFieldsAndLevel(&*(&eventname as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), &*(&fields as *const ::Abi as *const ::DefaultType), level).into() + (*this).LogEventWithFieldsAndLevel(::core::mem::transmute(&eventname), ::core::mem::transmute(&fields), level).into() } unsafe extern "system" fn LogEventWithFieldsAndOptions(this: *mut ::core::ffi::c_void, eventname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, fields: ::windows::core::RawPtr, level: LoggingLevel, options: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this) - .LogEventWithFieldsAndOptions(&*(&eventname as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), &*(&fields as *const ::Abi as *const ::DefaultType), level, &*(&options as *const ::Abi as *const ::DefaultType)) - .into() + (*this).LogEventWithFieldsAndOptions(::core::mem::transmute(&eventname), ::core::mem::transmute(&fields), level, ::core::mem::transmute(&options)).into() } unsafe extern "system" fn StartActivity(this: *mut ::core::ffi::c_void, starteventname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).StartActivity(&*(&starteventname as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).StartActivity(::core::mem::transmute(&starteventname)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -386,7 +384,7 @@ impl ILoggingTarget_Vtbl { unsafe extern "system" fn StartActivityWithFields(this: *mut ::core::ffi::c_void, starteventname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, fields: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).StartActivityWithFields(&*(&starteventname as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), &*(&fields as *const ::Abi as *const ::DefaultType)) { + match (*this).StartActivityWithFields(::core::mem::transmute(&starteventname), ::core::mem::transmute(&fields)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -398,7 +396,7 @@ impl ILoggingTarget_Vtbl { unsafe extern "system" fn StartActivityWithFieldsAndLevel(this: *mut ::core::ffi::c_void, starteventname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, fields: ::windows::core::RawPtr, level: LoggingLevel, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).StartActivityWithFieldsAndLevel(&*(&starteventname as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), &*(&fields as *const ::Abi as *const ::DefaultType), level) { + match (*this).StartActivityWithFieldsAndLevel(::core::mem::transmute(&starteventname), ::core::mem::transmute(&fields), level) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -410,7 +408,7 @@ impl ILoggingTarget_Vtbl { unsafe extern "system" fn StartActivityWithFieldsAndOptions(this: *mut ::core::ffi::c_void, starteventname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, fields: ::windows::core::RawPtr, level: LoggingLevel, options: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).StartActivityWithFieldsAndOptions(&*(&starteventname as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), &*(&fields as *const ::Abi as *const ::DefaultType), level, &*(&options as *const ::Abi as *const ::DefaultType)) { + match (*this).StartActivityWithFieldsAndOptions(::core::mem::transmute(&starteventname), ::core::mem::transmute(&fields), level, ::core::mem::transmute(&options)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/Foundation/Diagnostics/mod.rs b/crates/libs/windows/src/Windows/Foundation/Diagnostics/mod.rs index ed0841f116..9a0823e60b 100644 --- a/crates/libs/windows/src/Windows/Foundation/Diagnostics/mod.rs +++ b/crates/libs/windows/src/Windows/Foundation/Diagnostics/mod.rs @@ -2494,17 +2494,17 @@ impl LoggingFields { unsafe { (::windows::core::Interface::vtable(this).AddUInt8WithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value, format, tags).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddUInt8Array<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn AddUInt8Array<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddUInt8Array)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr())).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddUInt8ArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType], format: LoggingFieldFormat) -> ::windows::core::Result<()> { + pub fn AddUInt8ArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[u8], format: LoggingFieldFormat) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddUInt8ArrayWithFormat)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddUInt8ArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { + pub fn AddUInt8ArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[u8], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddUInt8ArrayWithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format, tags).ok() } } @@ -2524,17 +2524,17 @@ impl LoggingFields { unsafe { (::windows::core::Interface::vtable(this).AddInt16WithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value, format, tags).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddInt16Array<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn AddInt16Array<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[i16]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddInt16Array)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr())).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddInt16ArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType], format: LoggingFieldFormat) -> ::windows::core::Result<()> { + pub fn AddInt16ArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[i16], format: LoggingFieldFormat) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddInt16ArrayWithFormat)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddInt16ArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { + pub fn AddInt16ArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[i16], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddInt16ArrayWithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format, tags).ok() } } @@ -2554,17 +2554,17 @@ impl LoggingFields { unsafe { (::windows::core::Interface::vtable(this).AddUInt16WithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value, format, tags).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddUInt16Array<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn AddUInt16Array<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[u16]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddUInt16Array)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr())).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddUInt16ArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType], format: LoggingFieldFormat) -> ::windows::core::Result<()> { + pub fn AddUInt16ArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[u16], format: LoggingFieldFormat) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddUInt16ArrayWithFormat)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddUInt16ArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { + pub fn AddUInt16ArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[u16], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddUInt16ArrayWithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format, tags).ok() } } @@ -2584,17 +2584,17 @@ impl LoggingFields { unsafe { (::windows::core::Interface::vtable(this).AddInt32WithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value, format, tags).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddInt32Array<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn AddInt32Array<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[i32]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddInt32Array)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr())).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddInt32ArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType], format: LoggingFieldFormat) -> ::windows::core::Result<()> { + pub fn AddInt32ArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[i32], format: LoggingFieldFormat) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddInt32ArrayWithFormat)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddInt32ArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { + pub fn AddInt32ArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[i32], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddInt32ArrayWithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format, tags).ok() } } @@ -2614,17 +2614,17 @@ impl LoggingFields { unsafe { (::windows::core::Interface::vtable(this).AddUInt32WithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value, format, tags).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddUInt32Array<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn AddUInt32Array<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[u32]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddUInt32Array)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr())).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddUInt32ArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType], format: LoggingFieldFormat) -> ::windows::core::Result<()> { + pub fn AddUInt32ArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[u32], format: LoggingFieldFormat) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddUInt32ArrayWithFormat)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddUInt32ArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { + pub fn AddUInt32ArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[u32], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddUInt32ArrayWithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format, tags).ok() } } @@ -2644,17 +2644,17 @@ impl LoggingFields { unsafe { (::windows::core::Interface::vtable(this).AddInt64WithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value, format, tags).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddInt64Array<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn AddInt64Array<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[i64]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddInt64Array)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr())).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddInt64ArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType], format: LoggingFieldFormat) -> ::windows::core::Result<()> { + pub fn AddInt64ArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[i64], format: LoggingFieldFormat) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddInt64ArrayWithFormat)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddInt64ArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { + pub fn AddInt64ArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[i64], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddInt64ArrayWithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format, tags).ok() } } @@ -2674,17 +2674,17 @@ impl LoggingFields { unsafe { (::windows::core::Interface::vtable(this).AddUInt64WithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value, format, tags).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddUInt64Array<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn AddUInt64Array<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[u64]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddUInt64Array)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr())).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddUInt64ArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType], format: LoggingFieldFormat) -> ::windows::core::Result<()> { + pub fn AddUInt64ArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[u64], format: LoggingFieldFormat) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddUInt64ArrayWithFormat)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddUInt64ArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { + pub fn AddUInt64ArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[u64], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddUInt64ArrayWithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format, tags).ok() } } @@ -2704,17 +2704,17 @@ impl LoggingFields { unsafe { (::windows::core::Interface::vtable(this).AddSingleWithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value, format, tags).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddSingleArray<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn AddSingleArray<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[f32]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddSingleArray)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr())).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddSingleArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType], format: LoggingFieldFormat) -> ::windows::core::Result<()> { + pub fn AddSingleArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[f32], format: LoggingFieldFormat) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddSingleArrayWithFormat)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddSingleArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { + pub fn AddSingleArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[f32], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddSingleArrayWithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format, tags).ok() } } @@ -2734,17 +2734,17 @@ impl LoggingFields { unsafe { (::windows::core::Interface::vtable(this).AddDoubleWithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value, format, tags).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddDoubleArray<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn AddDoubleArray<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[f64]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddDoubleArray)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr())).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddDoubleArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType], format: LoggingFieldFormat) -> ::windows::core::Result<()> { + pub fn AddDoubleArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[f64], format: LoggingFieldFormat) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddDoubleArrayWithFormat)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddDoubleArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { + pub fn AddDoubleArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[f64], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddDoubleArrayWithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format, tags).ok() } } @@ -2764,17 +2764,17 @@ impl LoggingFields { unsafe { (::windows::core::Interface::vtable(this).AddChar16WithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value, format, tags).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddChar16Array<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn AddChar16Array<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[u16]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddChar16Array)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr())).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddChar16ArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType], format: LoggingFieldFormat) -> ::windows::core::Result<()> { + pub fn AddChar16ArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[u16], format: LoggingFieldFormat) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddChar16ArrayWithFormat)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddChar16ArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { + pub fn AddChar16ArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[u16], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddChar16ArrayWithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format, tags).ok() } } @@ -2794,17 +2794,17 @@ impl LoggingFields { unsafe { (::windows::core::Interface::vtable(this).AddBooleanWithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value, format, tags).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddBooleanArray<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn AddBooleanArray<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[bool]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddBooleanArray)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr())).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddBooleanArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType], format: LoggingFieldFormat) -> ::windows::core::Result<()> { + pub fn AddBooleanArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[bool], format: LoggingFieldFormat) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddBooleanArrayWithFormat)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddBooleanArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { + pub fn AddBooleanArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[bool], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddBooleanArrayWithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format, tags).ok() } } @@ -2824,17 +2824,17 @@ impl LoggingFields { unsafe { (::windows::core::Interface::vtable(this).AddStringWithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value.into_param().abi(), format, tags).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddStringArray<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[<::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result<()> { + pub fn AddStringArray<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::windows::core::HSTRING]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddStringArray)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr())).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddStringArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[<::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType], format: LoggingFieldFormat) -> ::windows::core::Result<()> { + pub fn AddStringArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::windows::core::HSTRING], format: LoggingFieldFormat) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddStringArrayWithFormat)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddStringArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[<::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { + pub fn AddStringArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::windows::core::HSTRING], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddStringArrayWithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format, tags).ok() } } @@ -2854,17 +2854,17 @@ impl LoggingFields { unsafe { (::windows::core::Interface::vtable(this).AddGuidWithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value.into_param().abi(), format, tags).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddGuidArray<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[<::windows::core::GUID as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result<()> { + pub fn AddGuidArray<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::windows::core::GUID]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddGuidArray)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr())).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddGuidArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[<::windows::core::GUID as ::windows::core::DefaultType>::DefaultType], format: LoggingFieldFormat) -> ::windows::core::Result<()> { + pub fn AddGuidArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::windows::core::GUID], format: LoggingFieldFormat) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddGuidArrayWithFormat)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddGuidArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[<::windows::core::GUID as ::windows::core::DefaultType>::DefaultType], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { + pub fn AddGuidArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::windows::core::GUID], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddGuidArrayWithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format, tags).ok() } } @@ -2884,17 +2884,17 @@ impl LoggingFields { unsafe { (::windows::core::Interface::vtable(this).AddDateTimeWithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value.into_param().abi(), format, tags).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddDateTimeArray<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn AddDateTimeArray<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[super::DateTime]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddDateTimeArray)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr())).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddDateTimeArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType], format: LoggingFieldFormat) -> ::windows::core::Result<()> { + pub fn AddDateTimeArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[super::DateTime], format: LoggingFieldFormat) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddDateTimeArrayWithFormat)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddDateTimeArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { + pub fn AddDateTimeArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[super::DateTime], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddDateTimeArrayWithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format, tags).ok() } } @@ -2914,17 +2914,17 @@ impl LoggingFields { unsafe { (::windows::core::Interface::vtable(this).AddTimeSpanWithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value.into_param().abi(), format, tags).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddTimeSpanArray<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn AddTimeSpanArray<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[super::TimeSpan]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddTimeSpanArray)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr())).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddTimeSpanArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType], format: LoggingFieldFormat) -> ::windows::core::Result<()> { + pub fn AddTimeSpanArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[super::TimeSpan], format: LoggingFieldFormat) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddTimeSpanArrayWithFormat)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddTimeSpanArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { + pub fn AddTimeSpanArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[super::TimeSpan], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddTimeSpanArrayWithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format, tags).ok() } } @@ -2944,17 +2944,17 @@ impl LoggingFields { unsafe { (::windows::core::Interface::vtable(this).AddPointWithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value.into_param().abi(), format, tags).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddPointArray<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn AddPointArray<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[super::Point]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddPointArray)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr())).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddPointArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType], format: LoggingFieldFormat) -> ::windows::core::Result<()> { + pub fn AddPointArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[super::Point], format: LoggingFieldFormat) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddPointArrayWithFormat)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddPointArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { + pub fn AddPointArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[super::Point], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddPointArrayWithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format, tags).ok() } } @@ -2974,17 +2974,17 @@ impl LoggingFields { unsafe { (::windows::core::Interface::vtable(this).AddSizeWithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value.into_param().abi(), format, tags).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddSizeArray<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn AddSizeArray<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[super::Size]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddSizeArray)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr())).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddSizeArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType], format: LoggingFieldFormat) -> ::windows::core::Result<()> { + pub fn AddSizeArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[super::Size], format: LoggingFieldFormat) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddSizeArrayWithFormat)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddSizeArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { + pub fn AddSizeArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[super::Size], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddSizeArrayWithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format, tags).ok() } } @@ -3004,17 +3004,17 @@ impl LoggingFields { unsafe { (::windows::core::Interface::vtable(this).AddRectWithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value.into_param().abi(), format, tags).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddRectArray<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn AddRectArray<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[super::Rect]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddRectArray)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr())).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddRectArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType], format: LoggingFieldFormat) -> ::windows::core::Result<()> { + pub fn AddRectArrayWithFormat<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[super::Rect], format: LoggingFieldFormat) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddRectArrayWithFormat)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format).ok() } } #[doc = "*Required features: 'Foundation_Diagnostics'*"] - pub fn AddRectArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[::DefaultType], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { + pub fn AddRectArrayWithFormatAndTags<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, name: Param0, value: &[super::Rect], format: LoggingFieldFormat, tags: i32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddRectArrayWithFormatAndTags)(::core::mem::transmute_copy(this), name.into_param().abi(), value.len() as u32, ::core::mem::transmute(value.as_ptr()), format, tags).ok() } } diff --git a/crates/libs/windows/src/Windows/Foundation/impl.rs b/crates/libs/windows/src/Windows/Foundation/impl.rs index 06f48d4ebb..28874ebb69 100644 --- a/crates/libs/windows/src/Windows/Foundation/impl.rs +++ b/crates/libs/windows/src/Windows/Foundation/impl.rs @@ -11,7 +11,7 @@ impl IAsyncAction_Vtbl { unsafe extern "system" fn SetCompleted(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetCompleted(&*(&handler as *const ::Abi as *const ::DefaultType)).into() + (*this).SetCompleted(::core::mem::transmute(&handler)).into() } unsafe extern "system" fn Completed(this: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -59,7 +59,7 @@ impl IAsyncActionWithProgress unsafe extern "system" fn SetProgress, const OFFSET: isize>(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetProgress(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetProgress(::core::mem::transmute(&handler)).into() } unsafe extern "system" fn Progress, const OFFSET: isize>(this: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -76,7 +76,7 @@ impl IAsyncActionWithProgress unsafe extern "system" fn SetCompleted, const OFFSET: isize>(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetCompleted(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetCompleted(::core::mem::transmute(&handler)).into() } unsafe extern "system" fn Completed, const OFFSET: isize>(this: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -196,7 +196,7 @@ impl IAsyncOperation_Vtbl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetCompleted(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetCompleted(::core::mem::transmute(&handler)).into() } unsafe extern "system" fn Completed, const OFFSET: isize>(this: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -253,7 +253,7 @@ impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetProgress(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetProgress(::core::mem::transmute(&handler)).into() } unsafe extern "system" fn Progress, const OFFSET: isize>(this: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -270,7 +270,7 @@ impl, const OFFSET: isize>(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetCompleted(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetCompleted(::core::mem::transmute(&handler)).into() } unsafe extern "system" fn Completed, const OFFSET: isize>(this: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -341,7 +341,7 @@ impl IGetActivationFactory_Vtbl { unsafe extern "system" fn GetActivationFactory(this: *mut ::core::ffi::c_void, activatableclassid: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetActivationFactory(&*(&activatableclassid as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).GetActivationFactory(::core::mem::transmute(&activatableclassid)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -410,7 +410,7 @@ impl IMemoryBufferReference_Vtbl { unsafe extern "system" fn Closed(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).Closed(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).Closed(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -422,7 +422,7 @@ impl IMemoryBufferReference_Vtbl { unsafe extern "system" fn RemoveClosed(this: *mut ::core::ffi::c_void, cookie: EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveClosed(&*(&cookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveClosed(::core::mem::transmute(&cookie)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Foundation/mod.rs b/crates/libs/windows/src/Windows/Foundation/mod.rs index dd27981891..2c7103b1a3 100644 --- a/crates/libs/windows/src/Windows/Foundation/mod.rs +++ b/crates/libs/windows/src/Windows/Foundation/mod.rs @@ -53,7 +53,7 @@ impl, AsyncStatus) -> ::windows:: } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, asyncinfo: ::windows::core::RawPtr, asyncstatus: AsyncStatus) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&asyncinfo as *const ::Abi as *const ::DefaultType), asyncstatus).into() + ((*this).invoke)(::core::mem::transmute(&asyncinfo), asyncstatus).into() } } impl ::core::clone::Clone for AsyncActionCompletedHandler { @@ -140,7 +140,7 @@ impl::Abi) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&asyncinfo as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType), &*(&progressinfo as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&asyncinfo), ::core::mem::transmute(&progressinfo)).into() } } impl ::core::clone::Clone for AsyncActionProgressHandler { @@ -231,7 +231,7 @@ impl ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&asyncinfo as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType), asyncstatus).into() + ((*this).invoke)(::core::mem::transmute(&asyncinfo), asyncstatus).into() } } impl ::core::clone::Clone for AsyncActionWithProgressCompletedHandler { @@ -322,7 +322,7 @@ impl ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&asyncinfo as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType), asyncstatus).into() + ((*this).invoke)(::core::mem::transmute(&asyncinfo), asyncstatus).into() } } impl ::core::clone::Clone for AsyncOperationCompletedHandler { @@ -416,7 +416,7 @@ impl::Abi) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&asyncinfo as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType), &*(&progressinfo as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&asyncinfo), ::core::mem::transmute(&progressinfo)).into() } } impl ::core::clone::Clone for AsyncOperationProgressHandler { @@ -512,7 +512,7 @@ impl ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&asyncinfo as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType), asyncstatus).into() + ((*this).invoke)(::core::mem::transmute(&asyncinfo), asyncstatus).into() } } impl ::core::clone::Clone for AsyncOperationWithProgressCompletedHandler { @@ -871,7 +871,7 @@ impl::Abi) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&args as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&args)).into() } } impl ::core::clone::Clone for EventHandler { @@ -4138,133 +4138,133 @@ impl PropertyValue { }) } #[doc = "*Required features: 'Foundation'*"] - pub fn CreateUInt8Array(value: &[::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateUInt8Array(value: &[u8]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateUInt8Array)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } #[doc = "*Required features: 'Foundation'*"] - pub fn CreateInt16Array(value: &[::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateInt16Array(value: &[i16]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateInt16Array)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } #[doc = "*Required features: 'Foundation'*"] - pub fn CreateUInt16Array(value: &[::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateUInt16Array(value: &[u16]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateUInt16Array)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } #[doc = "*Required features: 'Foundation'*"] - pub fn CreateInt32Array(value: &[::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateInt32Array(value: &[i32]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateInt32Array)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } #[doc = "*Required features: 'Foundation'*"] - pub fn CreateUInt32Array(value: &[::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateUInt32Array(value: &[u32]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateUInt32Array)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } #[doc = "*Required features: 'Foundation'*"] - pub fn CreateInt64Array(value: &[::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateInt64Array(value: &[i64]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateInt64Array)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } #[doc = "*Required features: 'Foundation'*"] - pub fn CreateUInt64Array(value: &[::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateUInt64Array(value: &[u64]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateUInt64Array)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } #[doc = "*Required features: 'Foundation'*"] - pub fn CreateSingleArray(value: &[::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateSingleArray(value: &[f32]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateSingleArray)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } #[doc = "*Required features: 'Foundation'*"] - pub fn CreateDoubleArray(value: &[::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateDoubleArray(value: &[f64]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateDoubleArray)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } #[doc = "*Required features: 'Foundation'*"] - pub fn CreateChar16Array(value: &[::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateChar16Array(value: &[u16]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateChar16Array)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } #[doc = "*Required features: 'Foundation'*"] - pub fn CreateBooleanArray(value: &[::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateBooleanArray(value: &[bool]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateBooleanArray)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } #[doc = "*Required features: 'Foundation'*"] - pub fn CreateStringArray(value: &[<::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateStringArray(value: &[::windows::core::HSTRING]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateStringArray)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } #[doc = "*Required features: 'Foundation'*"] - pub fn CreateInspectableArray(value: &[<::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateInspectableArray(value: &[::core::option::Option<::windows::core::IInspectable>]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateInspectableArray)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } #[doc = "*Required features: 'Foundation'*"] - pub fn CreateGuidArray(value: &[<::windows::core::GUID as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateGuidArray(value: &[::windows::core::GUID]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateGuidArray)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } #[doc = "*Required features: 'Foundation'*"] - pub fn CreateDateTimeArray(value: &[::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateDateTimeArray(value: &[DateTime]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateDateTimeArray)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } #[doc = "*Required features: 'Foundation'*"] - pub fn CreateTimeSpanArray(value: &[::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateTimeSpanArray(value: &[TimeSpan]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateTimeSpanArray)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } #[doc = "*Required features: 'Foundation'*"] - pub fn CreatePointArray(value: &[::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreatePointArray(value: &[Point]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreatePointArray)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } #[doc = "*Required features: 'Foundation'*"] - pub fn CreateSizeArray(value: &[::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateSizeArray(value: &[Size]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateSizeArray)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } #[doc = "*Required features: 'Foundation'*"] - pub fn CreateRectArray(value: &[::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateRectArray(value: &[Rect]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateRectArray)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) @@ -4464,7 +4464,7 @@ impl::Abi, args: ::Abi) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const ::Abi as *const ::DefaultType), &*(&args as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&args)).into() } } impl ::core::clone::Clone for TypedEventHandler { @@ -4837,7 +4837,7 @@ impl WwwFormUrlDecoder { } #[doc = "*Required features: 'Foundation', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Gaming/Input/Custom/impl.rs b/crates/libs/windows/src/Windows/Gaming/Input/Custom/impl.rs index 23a6d0e8b4..b16daf9f55 100644 --- a/crates/libs/windows/src/Windows/Gaming/Input/Custom/impl.rs +++ b/crates/libs/windows/src/Windows/Gaming/Input/Custom/impl.rs @@ -11,7 +11,7 @@ impl ICustomGameControllerFactory_Vtbl { unsafe extern "system" fn CreateGameController(this: *mut ::core::ffi::c_void, provider: ::windows::core::RawPtr, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CreateGameController(&*(&provider as *const ::Abi as *const ::DefaultType)) { + match (*this).CreateGameController(::core::mem::transmute(&provider)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -23,12 +23,12 @@ impl ICustomGameControllerFactory_Vtbl { unsafe extern "system" fn OnGameControllerAdded(this: *mut ::core::ffi::c_void, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnGameControllerAdded(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).OnGameControllerAdded(::core::mem::transmute(&value)).into() } unsafe extern "system" fn OnGameControllerRemoved(this: *mut ::core::ffi::c_void, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnGameControllerRemoved(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).OnGameControllerRemoved(::core::mem::transmute(&value)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -157,7 +157,7 @@ impl IGameControllerProvider_Vtbl { } pub trait IGipGameControllerInputSink_Impl: Sized + IGameControllerInputSink_Impl { fn OnKeyReceived(&mut self, timestamp: u64, keycode: u8, ispressed: bool) -> ::windows::core::Result<()>; - fn OnMessageReceived(&mut self, timestamp: u64, messageclass: GipMessageClass, messageid: u8, sequenceid: u8, messagebuffer: &[::DefaultType]) -> ::windows::core::Result<()>; + fn OnMessageReceived(&mut self, timestamp: u64, messageclass: GipMessageClass, messageid: u8, sequenceid: u8, messagebuffer: &[u8]) -> ::windows::core::Result<()>; } impl ::windows::core::RuntimeName for IGipGameControllerInputSink { const NAME: &'static str = "Windows.Gaming.Input.Custom.IGipGameControllerInputSink"; @@ -185,7 +185,7 @@ impl IGipGameControllerInputSink_Vtbl { } } pub trait IHidGameControllerInputSink_Impl: Sized + IGameControllerInputSink_Impl { - fn OnInputReportReceived(&mut self, timestamp: u64, reportid: u8, reportbuffer: &[::DefaultType]) -> ::windows::core::Result<()>; + fn OnInputReportReceived(&mut self, timestamp: u64, reportid: u8, reportbuffer: &[u8]) -> ::windows::core::Result<()>; } impl ::windows::core::RuntimeName for IHidGameControllerInputSink { const NAME: &'static str = "Windows.Gaming.Input.Custom.IHidGameControllerInputSink"; @@ -207,7 +207,7 @@ impl IHidGameControllerInputSink_Vtbl { } } pub trait IXusbGameControllerInputSink_Impl: Sized + IGameControllerInputSink_Impl { - fn OnInputReceived(&mut self, timestamp: u64, reportid: u8, inputbuffer: &[::DefaultType]) -> ::windows::core::Result<()>; + fn OnInputReceived(&mut self, timestamp: u64, reportid: u8, inputbuffer: &[u8]) -> ::windows::core::Result<()>; } impl ::windows::core::RuntimeName for IXusbGameControllerInputSink { const NAME: &'static str = "Windows.Gaming.Input.Custom.IXusbGameControllerInputSink"; 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 1922b76293..e53ec62ec5 100644 --- a/crates/libs/windows/src/Windows/Gaming/Input/Custom/mod.rs +++ b/crates/libs/windows/src/Windows/Gaming/Input/Custom/mod.rs @@ -287,12 +287,12 @@ impl GipGameControllerProvider { } } #[doc = "*Required features: 'Gaming_Input_Custom'*"] - pub fn SendMessage(&self, messageclass: GipMessageClass, messageid: u8, messagebuffer: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn SendMessage(&self, messageclass: GipMessageClass, messageid: u8, messagebuffer: &[u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).SendMessage)(::core::mem::transmute_copy(this), messageclass, messageid, messagebuffer.len() as u32, ::core::mem::transmute(messagebuffer.as_ptr())).ok() } } #[doc = "*Required features: 'Gaming_Input_Custom'*"] - pub fn SendReceiveMessage(&self, messageclass: GipMessageClass, messageid: u8, requestmessagebuffer: &[::DefaultType], responsemessagebuffer: &mut [::DefaultType]) -> ::windows::core::Result<()> { + 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)(::core::mem::transmute_copy(this), messageclass, messageid, requestmessagebuffer.len() as u32, ::core::mem::transmute(requestmessagebuffer.as_ptr()), responsemessagebuffer.len() as u32, ::core::mem::transmute_copy(&responsemessagebuffer)).ok() } } @@ -491,17 +491,17 @@ impl HidGameControllerProvider { } } #[doc = "*Required features: 'Gaming_Input_Custom'*"] - pub fn GetFeatureReport(&self, reportid: u8, reportbuffer: &mut [::DefaultType]) -> ::windows::core::Result<()> { + pub fn GetFeatureReport(&self, reportid: u8, reportbuffer: &mut [u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).GetFeatureReport)(::core::mem::transmute_copy(this), reportid, reportbuffer.len() as u32, ::core::mem::transmute_copy(&reportbuffer)).ok() } } #[doc = "*Required features: 'Gaming_Input_Custom'*"] - pub fn SendFeatureReport(&self, reportid: u8, reportbuffer: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn SendFeatureReport(&self, reportid: u8, reportbuffer: &[u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).SendFeatureReport)(::core::mem::transmute_copy(this), reportid, reportbuffer.len() as u32, ::core::mem::transmute(reportbuffer.as_ptr())).ok() } } #[doc = "*Required features: 'Gaming_Input_Custom'*"] - pub fn SendOutputReport(&self, reportid: u8, reportbuffer: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn SendOutputReport(&self, reportid: u8, reportbuffer: &[u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).SendOutputReport)(::core::mem::transmute_copy(this), reportid, reportbuffer.len() as u32, ::core::mem::transmute(reportbuffer.as_ptr())).ok() } } @@ -946,7 +946,7 @@ impl IGipGameControllerInputSink { unsafe { (::windows::core::Interface::vtable(this).OnKeyReceived)(::core::mem::transmute_copy(this), timestamp, keycode, ispressed).ok() } } #[doc = "*Required features: 'Gaming_Input_Custom'*"] - pub fn OnMessageReceived(&self, timestamp: u64, messageclass: GipMessageClass, messageid: u8, sequenceid: u8, messagebuffer: &[::DefaultType]) -> ::windows::core::Result<()> { + 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)(::core::mem::transmute_copy(this), timestamp, messageclass, messageid, sequenceid, messagebuffer.len() as u32, ::core::mem::transmute(messagebuffer.as_ptr())).ok() } } @@ -1076,7 +1076,7 @@ pub struct IGipGameControllerProvider_Vtbl { pub struct IHidGameControllerInputSink(::windows::core::IUnknown); impl IHidGameControllerInputSink { #[doc = "*Required features: 'Gaming_Input_Custom'*"] - pub fn OnInputReportReceived(&self, timestamp: u64, reportid: u8, reportbuffer: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn OnInputReportReceived(&self, timestamp: u64, reportid: u8, reportbuffer: &[u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).OnInputReportReceived)(::core::mem::transmute_copy(this), timestamp, reportid, reportbuffer.len() as u32, ::core::mem::transmute(reportbuffer.as_ptr())).ok() } } @@ -1204,7 +1204,7 @@ pub struct IHidGameControllerProvider_Vtbl { pub struct IXusbGameControllerInputSink(::windows::core::IUnknown); impl IXusbGameControllerInputSink { #[doc = "*Required features: 'Gaming_Input_Custom'*"] - pub fn OnInputReceived(&self, timestamp: u64, reportid: u8, inputbuffer: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn OnInputReceived(&self, timestamp: u64, reportid: u8, inputbuffer: &[u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).OnInputReceived)(::core::mem::transmute_copy(this), timestamp, reportid, inputbuffer.len() as u32, ::core::mem::transmute(inputbuffer.as_ptr())).ok() } } diff --git a/crates/libs/windows/src/Windows/Gaming/Input/impl.rs b/crates/libs/windows/src/Windows/Gaming/Input/impl.rs index 907774e687..955a52ec89 100644 --- a/crates/libs/windows/src/Windows/Gaming/Input/impl.rs +++ b/crates/libs/windows/src/Windows/Gaming/Input/impl.rs @@ -20,7 +20,7 @@ impl IGameController_Vtbl { unsafe extern "system" fn HeadsetConnected(this: *mut ::core::ffi::c_void, value: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).HeadsetConnected(&*(&value as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).HeadsetConnected(::core::mem::transmute(&value)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -32,12 +32,12 @@ impl IGameController_Vtbl { unsafe extern "system" fn RemoveHeadsetConnected(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveHeadsetConnected(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveHeadsetConnected(::core::mem::transmute(&token)).into() } unsafe extern "system" fn HeadsetDisconnected(this: *mut ::core::ffi::c_void, value: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).HeadsetDisconnected(&*(&value as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).HeadsetDisconnected(::core::mem::transmute(&value)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -49,12 +49,12 @@ impl IGameController_Vtbl { unsafe extern "system" fn RemoveHeadsetDisconnected(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveHeadsetDisconnected(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveHeadsetDisconnected(::core::mem::transmute(&token)).into() } unsafe extern "system" fn UserChanged(this: *mut ::core::ffi::c_void, value: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).UserChanged(&*(&value as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).UserChanged(::core::mem::transmute(&value)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -66,7 +66,7 @@ impl IGameController_Vtbl { unsafe extern "system" fn RemoveUserChanged(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveUserChanged(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveUserChanged(::core::mem::transmute(&token)).into() } unsafe extern "system" fn Headset(this: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; diff --git a/crates/libs/windows/src/Windows/Gaming/Input/mod.rs b/crates/libs/windows/src/Windows/Gaming/Input/mod.rs index 0297d9f7a2..df8db3a95a 100644 --- a/crates/libs/windows/src/Windows/Gaming/Input/mod.rs +++ b/crates/libs/windows/src/Windows/Gaming/Input/mod.rs @@ -2783,7 +2783,7 @@ impl RawGameController { } } #[doc = "*Required features: 'Gaming_Input'*"] - pub fn GetCurrentReading(&self, buttonarray: &mut [::DefaultType], switcharray: &mut [::DefaultType], axisarray: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetCurrentReading(&self, buttonarray: &mut [bool], switcharray: &mut [GameControllerSwitchPosition], axisarray: &mut [f64]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u64 = ::core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Gaming/Preview/GamesEnumeration/mod.rs b/crates/libs/windows/src/Windows/Gaming/Preview/GamesEnumeration/mod.rs index f790dbbe5b..5ba032368c 100644 --- a/crates/libs/windows/src/Windows/Gaming/Preview/GamesEnumeration/mod.rs +++ b/crates/libs/windows/src/Windows/Gaming/Preview/GamesEnumeration/mod.rs @@ -167,7 +167,7 @@ impl) -> ::windows::core::Result } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, game: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&game as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&game)).into() } } impl ::core::clone::Clone for GameListChangedEventHandler { @@ -487,7 +487,7 @@ impl ::windows::core::Result<()> + ::core } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, identifier: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&identifier as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&identifier)).into() } } impl ::core::clone::Clone for GameListRemovedEventHandler { diff --git a/crates/libs/windows/src/Windows/Globalization/Collation/mod.rs b/crates/libs/windows/src/Windows/Globalization/Collation/mod.rs index aff05d2607..d7a589c8fb 100644 --- a/crates/libs/windows/src/Windows/Globalization/Collation/mod.rs +++ b/crates/libs/windows/src/Windows/Globalization/Collation/mod.rs @@ -152,7 +152,7 @@ impl CharacterGroupings { } #[doc = "*Required features: 'Globalization_Collation', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Globalization/NumberFormatting/impl.rs b/crates/libs/windows/src/Windows/Globalization/NumberFormatting/impl.rs index 0280fa4d0f..420e1825a4 100644 --- a/crates/libs/windows/src/Windows/Globalization/NumberFormatting/impl.rs +++ b/crates/libs/windows/src/Windows/Globalization/NumberFormatting/impl.rs @@ -243,7 +243,7 @@ impl INumberFormatterOptions_Vtbl { unsafe extern "system" fn SetNumeralSystem(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetNumeralSystem(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetNumeralSystem(::core::mem::transmute(&value)).into() } unsafe extern "system" fn ResolvedLanguage(this: *mut ::core::ffi::c_void, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -307,7 +307,7 @@ impl INumberParser_Vtbl { unsafe extern "system" fn ParseInt(this: *mut ::core::ffi::c_void, text: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).ParseInt(&*(&text as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).ParseInt(::core::mem::transmute(&text)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -319,7 +319,7 @@ impl INumberParser_Vtbl { unsafe extern "system" fn ParseUInt(this: *mut ::core::ffi::c_void, text: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).ParseUInt(&*(&text as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).ParseUInt(::core::mem::transmute(&text)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -331,7 +331,7 @@ impl INumberParser_Vtbl { unsafe extern "system" fn ParseDouble(this: *mut ::core::ffi::c_void, text: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).ParseDouble(&*(&text as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).ParseDouble(::core::mem::transmute(&text)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -474,7 +474,7 @@ impl INumberRounderOption_Vtbl { unsafe extern "system" fn SetNumberRounder(this: *mut ::core::ffi::c_void, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetNumberRounder(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetNumberRounder(::core::mem::transmute(&value)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Graphics/Display/mod.rs b/crates/libs/windows/src/Windows/Graphics/Display/mod.rs index 2d801b3c28..184fd2fb6b 100644 --- a/crates/libs/windows/src/Windows/Graphics/Display/mod.rs +++ b/crates/libs/windows/src/Windows/Graphics/Display/mod.rs @@ -1683,7 +1683,7 @@ impl) -> ::windo } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender)).into() } } #[cfg(feature = "deprecated")] diff --git a/crates/libs/windows/src/Windows/Graphics/Effects/impl.rs b/crates/libs/windows/src/Windows/Graphics/Effects/impl.rs index ea5ef33a24..1703338595 100644 --- a/crates/libs/windows/src/Windows/Graphics/Effects/impl.rs +++ b/crates/libs/windows/src/Windows/Graphics/Effects/impl.rs @@ -22,7 +22,7 @@ impl IGraphicsEffect_Vtbl { unsafe extern "system" fn SetName(this: *mut ::core::ffi::c_void, name: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetName(&*(&name as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetName(::core::mem::transmute(&name)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Graphics/Imaging/impl.rs b/crates/libs/windows/src/Windows/Graphics/Imaging/impl.rs index 9c9514d275..81972a6283 100644 --- a/crates/libs/windows/src/Windows/Graphics/Imaging/impl.rs +++ b/crates/libs/windows/src/Windows/Graphics/Imaging/impl.rs @@ -155,7 +155,7 @@ impl IBitmapFrame_Vtbl { unsafe extern "system" fn GetPixelDataTransformedAsync(this: *mut ::core::ffi::c_void, pixelformat: BitmapPixelFormat, alphamode: BitmapAlphaMode, transform: ::windows::core::RawPtr, exiforientationmode: ExifOrientationMode, colormanagementmode: ColorManagementMode, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetPixelDataTransformedAsync(pixelformat, alphamode, &*(&transform as *const ::Abi as *const ::DefaultType), exiforientationmode, colormanagementmode) { + match (*this).GetPixelDataTransformedAsync(pixelformat, alphamode, ::core::mem::transmute(&transform), exiforientationmode, colormanagementmode) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -224,7 +224,7 @@ impl IBitmapFrameWithSoftwareBitmap_Vtbl { unsafe extern "system" fn GetSoftwareBitmapTransformedAsync(this: *mut ::core::ffi::c_void, pixelformat: BitmapPixelFormat, alphamode: BitmapAlphaMode, transform: ::windows::core::RawPtr, exiforientationmode: ExifOrientationMode, colormanagementmode: ColorManagementMode, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetSoftwareBitmapTransformedAsync(pixelformat, alphamode, &*(&transform as *const ::Abi as *const ::DefaultType), exiforientationmode, colormanagementmode) { + match (*this).GetSoftwareBitmapTransformedAsync(pixelformat, alphamode, ::core::mem::transmute(&transform), exiforientationmode, colormanagementmode) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -258,7 +258,7 @@ impl IBitmapPropertiesView_Vtbl { unsafe extern "system" fn GetPropertiesAsync(this: *mut ::core::ffi::c_void, propertiestoretrieve: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetPropertiesAsync(&*(&propertiestoretrieve as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).GetPropertiesAsync(::core::mem::transmute(&propertiestoretrieve)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/Graphics/Imaging/mod.rs b/crates/libs/windows/src/Windows/Graphics/Imaging/mod.rs index b56a17d9a0..356eadc7ab 100644 --- a/crates/libs/windows/src/Windows/Graphics/Imaging/mod.rs +++ b/crates/libs/windows/src/Windows/Graphics/Imaging/mod.rs @@ -827,7 +827,7 @@ impl BitmapEncoder { } } #[doc = "*Required features: 'Graphics_Imaging'*"] - pub fn SetPixelData(&self, pixelformat: BitmapPixelFormat, alphamode: BitmapAlphaMode, width: u32, height: u32, dpix: f64, dpiy: f64, pixels: &[::DefaultType]) -> ::windows::core::Result<()> { + 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)(::core::mem::transmute_copy(this), pixelformat, alphamode, width, height, dpix, dpiy, pixels.len() as u32, ::core::mem::transmute(pixels.as_ptr())).ok() } } diff --git a/crates/libs/windows/src/Windows/Graphics/Printing/OptionDetails/impl.rs b/crates/libs/windows/src/Windows/Graphics/Printing/OptionDetails/impl.rs index d97fc6d6a7..71eb5e0a03 100644 --- a/crates/libs/windows/src/Windows/Graphics/Printing/OptionDetails/impl.rs +++ b/crates/libs/windows/src/Windows/Graphics/Printing/OptionDetails/impl.rs @@ -10,7 +10,7 @@ impl IPrintCustomOptionDetails_Vtbl { unsafe extern "system" fn SetDisplayName(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetDisplayName(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetDisplayName(::core::mem::transmute(&value)).into() } unsafe extern "system" fn DisplayName(this: *mut ::core::ffi::c_void, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -148,7 +148,7 @@ impl IPrintOptionDetails_Vtbl { unsafe extern "system" fn SetErrorText(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetErrorText(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetErrorText(::core::mem::transmute(&value)).into() } unsafe extern "system" fn ErrorText(this: *mut ::core::ffi::c_void, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -194,7 +194,7 @@ impl IPrintOptionDetails_Vtbl { unsafe extern "system" fn TrySetValue(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).TrySetValue(&*(&value as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)) { + match (*this).TrySetValue(::core::mem::transmute(&value)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/Graphics/Printing/mod.rs b/crates/libs/windows/src/Windows/Graphics/Printing/mod.rs index 9d32d7163e..2abe3edb70 100644 --- a/crates/libs/windows/src/Windows/Graphics/Printing/mod.rs +++ b/crates/libs/windows/src/Windows/Graphics/Printing/mod.rs @@ -3282,7 +3282,7 @@ impl) -> ::window } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, args: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&args as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&args)).into() } } impl ::core::clone::Clone for PrintTaskSourceRequestedHandler { diff --git a/crates/libs/windows/src/Windows/Graphics/Printing3D/mod.rs b/crates/libs/windows/src/Windows/Graphics/Printing3D/mod.rs index 1840d0e869..55b93ed71e 100644 --- a/crates/libs/windows/src/Windows/Graphics/Printing3D/mod.rs +++ b/crates/libs/windows/src/Windows/Graphics/Printing3D/mod.rs @@ -1575,7 +1575,7 @@ impl) -> ::wind } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, args: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&args as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&args)).into() } } impl ::core::clone::Clone for Print3DTaskSourceRequestedHandler { diff --git a/crates/libs/windows/src/Windows/Media/Audio/impl.rs b/crates/libs/windows/src/Windows/Media/Audio/impl.rs index f122dfb241..f7689584dd 100644 --- a/crates/libs/windows/src/Windows/Media/Audio/impl.rs +++ b/crates/libs/windows/src/Windows/Media/Audio/impl.rs @@ -27,17 +27,17 @@ impl IAudioInputNode_Vtbl { unsafe extern "system" fn AddOutgoingConnection(this: *mut ::core::ffi::c_void, destination: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).AddOutgoingConnection(&*(&destination as *const ::Abi as *const ::DefaultType)).into() + (*this).AddOutgoingConnection(::core::mem::transmute(&destination)).into() } unsafe extern "system" fn AddOutgoingConnectionWithGain(this: *mut ::core::ffi::c_void, destination: ::windows::core::RawPtr, gain: f64) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).AddOutgoingConnectionWithGain(&*(&destination as *const ::Abi as *const ::DefaultType), gain).into() + (*this).AddOutgoingConnectionWithGain(::core::mem::transmute(&destination), gain).into() } unsafe extern "system" fn RemoveOutgoingConnection(this: *mut ::core::ffi::c_void, destination: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveOutgoingConnection(&*(&destination as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveOutgoingConnection(::core::mem::transmute(&destination)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -177,12 +177,12 @@ impl IAudioNode_Vtbl { unsafe extern "system" fn DisableEffectsByDefinition(this: *mut ::core::ffi::c_void, definition: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).DisableEffectsByDefinition(&*(&definition as *const ::Abi as *const ::DefaultType)).into() + (*this).DisableEffectsByDefinition(::core::mem::transmute(&definition)).into() } unsafe extern "system" fn EnableEffectsByDefinition(this: *mut ::core::ffi::c_void, definition: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).EnableEffectsByDefinition(&*(&definition as *const ::Abi as *const ::DefaultType)).into() + (*this).EnableEffectsByDefinition(::core::mem::transmute(&definition)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -218,7 +218,7 @@ impl IAudioNodeWithListener_Vtbl { unsafe extern "system" fn SetListener(this: *mut ::core::ffi::c_void, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetListener(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetListener(::core::mem::transmute(&value)).into() } unsafe extern "system" fn Listener(this: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; 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 3e1324ac43..c7b311e610 100644 --- a/crates/libs/windows/src/Windows/Media/Capture/Frames/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Capture/Frames/mod.rs @@ -1830,7 +1830,7 @@ impl MediaFrameSourceController { } #[doc = "*Required features: 'Media_Capture_Frames', 'Foundation'*"] #[cfg(feature = "Foundation")] - pub fn GetPropertyByExtendedIdAsync<'a, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::IReference>>(&self, extendedpropertyid: &[::DefaultType], maxpropertyvaluesize: Param1) -> ::windows::core::Result> { + pub fn GetPropertyByExtendedIdAsync<'a, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::IReference>>(&self, extendedpropertyid: &[u8], maxpropertyvaluesize: Param1) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); @@ -1839,7 +1839,7 @@ impl MediaFrameSourceController { } #[doc = "*Required features: 'Media_Capture_Frames', 'Foundation'*"] #[cfg(feature = "Foundation")] - pub fn SetPropertyByExtendedIdAsync(&self, extendedpropertyid: &[::DefaultType], propertyvalue: &[::DefaultType]) -> ::windows::core::Result> { + pub fn SetPropertyByExtendedIdAsync(&self, extendedpropertyid: &[u8], propertyvalue: &[u8]) -> ::windows::core::Result> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Media/Capture/mod.rs b/crates/libs/windows/src/Windows/Media/Capture/mod.rs index def4bb7339..417eb19cd7 100644 --- a/crates/libs/windows/src/Windows/Media/Capture/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Capture/mod.rs @@ -12372,7 +12372,7 @@ impl, &::core::option::Option ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const ::Abi as *const ::DefaultType), &*(&erroreventargs as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&erroreventargs)).into() } } impl ::core::clone::Clone for MediaCaptureFailedEventHandler { @@ -14217,7 +14217,7 @@ impl) -> ::windows::core::Result< } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender)).into() } } impl ::core::clone::Clone for RecordLimitationExceededEventHandler { diff --git a/crates/libs/windows/src/Windows/Media/Core/impl.rs b/crates/libs/windows/src/Windows/Media/Core/impl.rs index 2d907c5224..92e7818588 100644 --- a/crates/libs/windows/src/Windows/Media/Core/impl.rs +++ b/crates/libs/windows/src/Windows/Media/Core/impl.rs @@ -17,7 +17,7 @@ impl IMediaCue_Vtbl { unsafe extern "system" fn SetStartTime(this: *mut ::core::ffi::c_void, value: super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetStartTime(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetStartTime(::core::mem::transmute(&value)).into() } unsafe extern "system" fn StartTime(this: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -34,7 +34,7 @@ impl IMediaCue_Vtbl { unsafe extern "system" fn SetDuration(this: *mut ::core::ffi::c_void, value: super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetDuration(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetDuration(::core::mem::transmute(&value)).into() } unsafe extern "system" fn Duration(this: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -51,7 +51,7 @@ impl IMediaCue_Vtbl { unsafe extern "system" fn SetId(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetId(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetId(::core::mem::transmute(&value)).into() } unsafe extern "system" fn Id(this: *mut ::core::ffi::c_void, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -118,7 +118,7 @@ impl IMediaStreamDescriptor_Vtbl { unsafe extern "system" fn SetName(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetName(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetName(::core::mem::transmute(&value)).into() } unsafe extern "system" fn Name(this: *mut ::core::ffi::c_void, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -135,7 +135,7 @@ impl IMediaStreamDescriptor_Vtbl { unsafe extern "system" fn SetLanguage(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetLanguage(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetLanguage(::core::mem::transmute(&value)).into() } unsafe extern "system" fn Language(this: *mut ::core::ffi::c_void, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -174,7 +174,7 @@ impl IMediaStreamDescriptor2_Vtbl { unsafe extern "system" fn SetLabel(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetLabel(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetLabel(::core::mem::transmute(&value)).into() } unsafe extern "system" fn Label(this: *mut ::core::ffi::c_void, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -249,7 +249,7 @@ impl IMediaTrack_Vtbl { unsafe extern "system" fn SetLabel(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetLabel(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetLabel(::core::mem::transmute(&value)).into() } unsafe extern "system" fn Label(this: *mut ::core::ffi::c_void, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -293,7 +293,7 @@ impl ISingleSelectMediaTrackList_Vtbl { unsafe extern "system" fn SelectedIndexChanged(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).SelectedIndexChanged(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).SelectedIndexChanged(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -305,7 +305,7 @@ impl ISingleSelectMediaTrackList_Vtbl { unsafe extern "system" fn RemoveSelectedIndexChanged(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveSelectedIndexChanged(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveSelectedIndexChanged(::core::mem::transmute(&token)).into() } unsafe extern "system" fn SetSelectedIndex(this: *mut ::core::ffi::c_void, value: i32) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; diff --git a/crates/libs/windows/src/Windows/Media/Core/mod.rs b/crates/libs/windows/src/Windows/Media/Core/mod.rs index d666105fd4..6a4aa7c30a 100644 --- a/crates/libs/windows/src/Windows/Media/Core/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Core/mod.rs @@ -7505,7 +7505,7 @@ unsafe impl ::core::marker::Sync for MediaStreamSamplePropertySet {} pub struct MediaStreamSampleProtectionProperties(::windows::core::IUnknown); impl MediaStreamSampleProtectionProperties { #[doc = "*Required features: 'Media_Core'*"] - pub fn SetKeyIdentifier(&self, value: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn SetKeyIdentifier(&self, value: &[u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).SetKeyIdentifier)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr())).ok() } } @@ -7515,7 +7515,7 @@ impl MediaStreamSampleProtectionProperties { unsafe { (::windows::core::Interface::vtable(this).GetKeyIdentifier)(::core::mem::transmute_copy(this), value.set_abi_len(), value as *mut _ as _).ok() } } #[doc = "*Required features: 'Media_Core'*"] - pub fn SetInitializationVector(&self, value: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn SetInitializationVector(&self, value: &[u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).SetInitializationVector)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr())).ok() } } @@ -7525,7 +7525,7 @@ impl MediaStreamSampleProtectionProperties { unsafe { (::windows::core::Interface::vtable(this).GetInitializationVector)(::core::mem::transmute_copy(this), value.set_abi_len(), value as *mut _ as _).ok() } } #[doc = "*Required features: 'Media_Core'*"] - pub fn SetSubSampleMapping(&self, value: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn SetSubSampleMapping(&self, value: &[u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).SetSubSampleMapping)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr())).ok() } } @@ -7790,7 +7790,7 @@ impl MediaStreamSource { } } #[doc = "*Required features: 'Media_Core'*"] - pub fn AddProtectionKey<'a, Param0: ::windows::core::IntoParam<'a, IMediaStreamDescriptor>>(&self, streamdescriptor: Param0, keyidentifier: &[::DefaultType], licensedata: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn AddProtectionKey<'a, Param0: ::windows::core::IntoParam<'a, IMediaStreamDescriptor>>(&self, streamdescriptor: Param0, keyidentifier: &[u8], licensedata: &[u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).AddProtectionKey)(::core::mem::transmute_copy(this), streamdescriptor.into_param().abi(), keyidentifier.len() as u32, ::core::mem::transmute(keyidentifier.as_ptr()), licensedata.len() as u32, ::core::mem::transmute(licensedata.as_ptr())).ok() } } 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 fe1398c531..99f4707316 100644 --- a/crates/libs/windows/src/Windows/Media/Devices/Core/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Devices/Core/mod.rs @@ -75,13 +75,13 @@ impl CameraIntrinsics { } #[doc = "*Required features: 'Media_Devices_Core', 'Foundation', 'Foundation_Numerics'*"] #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] - pub fn ProjectManyOntoFrame(&self, coordinates: &[::DefaultType], results: &mut [::DefaultType]) -> ::windows::core::Result<()> { + 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)(::core::mem::transmute_copy(this), coordinates.len() as u32, ::core::mem::transmute(coordinates.as_ptr()), results.len() as u32, ::core::mem::transmute_copy(&results)).ok() } } #[doc = "*Required features: 'Media_Devices_Core', 'Foundation', 'Foundation_Numerics'*"] #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics"))] - pub fn UnprojectPixelsAtUnitDepth(&self, pixelcoordinates: &[::DefaultType], results: &mut [::DefaultType]) -> ::windows::core::Result<()> { + 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)(::core::mem::transmute_copy(this), pixelcoordinates.len() as u32, ::core::mem::transmute(pixelcoordinates.as_ptr()), results.len() as u32, ::core::mem::transmute_copy(&results)).ok() } } @@ -105,7 +105,7 @@ impl CameraIntrinsics { } #[doc = "*Required features: 'Media_Devices_Core', 'Foundation'*"] #[cfg(feature = "Foundation")] - pub fn DistortPoints(&self, inputs: &[::DefaultType], results: &mut [::DefaultType]) -> ::windows::core::Result<()> { + pub fn DistortPoints(&self, inputs: &[super::super::super::Foundation::Point], results: &mut [super::super::super::Foundation::Point]) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; unsafe { (::windows::core::Interface::vtable(this).DistortPoints)(::core::mem::transmute_copy(this), inputs.len() as u32, ::core::mem::transmute(inputs.as_ptr()), results.len() as u32, ::core::mem::transmute_copy(&results)).ok() } } @@ -120,7 +120,7 @@ impl CameraIntrinsics { } #[doc = "*Required features: 'Media_Devices_Core', 'Foundation'*"] #[cfg(feature = "Foundation")] - pub fn UndistortPoints(&self, inputs: &[::DefaultType], results: &mut [::DefaultType]) -> ::windows::core::Result<()> { + pub fn UndistortPoints(&self, inputs: &[super::super::super::Foundation::Point], results: &mut [super::super::super::Foundation::Point]) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; unsafe { (::windows::core::Interface::vtable(this).UndistortPoints)(::core::mem::transmute_copy(this), inputs.len() as u32, ::core::mem::transmute(inputs.as_ptr()), results.len() as u32, ::core::mem::transmute_copy(&results)).ok() } } @@ -227,7 +227,7 @@ impl DepthCorrelatedCoordinateMapper { } #[doc = "*Required features: 'Media_Devices_Core', 'Foundation', 'Foundation_Numerics', 'Perception_Spatial'*"] #[cfg(all(feature = "Foundation", feature = "Foundation_Numerics", feature = "Perception_Spatial"))] - pub fn UnprojectPoints<'a, Param1: ::windows::core::IntoParam<'a, super::super::super::Perception::Spatial::SpatialCoordinateSystem>>(&self, sourcepoints: &[::DefaultType], targetcoordinatesystem: Param1, results: &mut [::DefaultType]) -> ::windows::core::Result<()> { + pub fn UnprojectPoints<'a, Param1: ::windows::core::IntoParam<'a, super::super::super::Perception::Spatial::SpatialCoordinateSystem>>(&self, sourcepoints: &[super::super::super::Foundation::Point], targetcoordinatesystem: Param1, results: &mut [super::super::super::Foundation::Numerics::Vector3]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).UnprojectPoints)(::core::mem::transmute_copy(this), sourcepoints.len() as u32, ::core::mem::transmute(sourcepoints.as_ptr()), targetcoordinatesystem.into_param().abi(), results.len() as u32, ::core::mem::transmute_copy(&results)).ok() } } @@ -242,7 +242,7 @@ impl DepthCorrelatedCoordinateMapper { } #[doc = "*Required features: 'Media_Devices_Core', 'Foundation', 'Perception_Spatial'*"] #[cfg(all(feature = "Foundation", feature = "Perception_Spatial"))] - pub fn MapPoints<'a, Param1: ::windows::core::IntoParam<'a, super::super::super::Perception::Spatial::SpatialCoordinateSystem>, Param2: ::windows::core::IntoParam<'a, CameraIntrinsics>>(&self, sourcepoints: &[::DefaultType], targetcoordinatesystem: Param1, targetcameraintrinsics: Param2, results: &mut [::DefaultType]) -> ::windows::core::Result<()> { + pub fn MapPoints<'a, Param1: ::windows::core::IntoParam<'a, super::super::super::Perception::Spatial::SpatialCoordinateSystem>, Param2: ::windows::core::IntoParam<'a, CameraIntrinsics>>(&self, sourcepoints: &[super::super::super::Foundation::Point], targetcoordinatesystem: Param1, targetcameraintrinsics: Param2, results: &mut [super::super::super::Foundation::Point]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).MapPoints)(::core::mem::transmute_copy(this), sourcepoints.len() as u32, ::core::mem::transmute(sourcepoints.as_ptr()), targetcoordinatesystem.into_param().abi(), targetcameraintrinsics.into_param().abi(), results.len() as u32, ::core::mem::transmute_copy(&results)).ok() } } diff --git a/crates/libs/windows/src/Windows/Media/Devices/impl.rs b/crates/libs/windows/src/Windows/Media/Devices/impl.rs index e1370d8898..87d75d35a8 100644 --- a/crates/libs/windows/src/Windows/Media/Devices/impl.rs +++ b/crates/libs/windows/src/Windows/Media/Devices/impl.rs @@ -81,7 +81,7 @@ impl IMediaDeviceController_Vtbl { unsafe extern "system" fn SetMediaStreamPropertiesAsync(this: *mut ::core::ffi::c_void, mediastreamtype: super::Capture::MediaStreamType, mediaencodingproperties: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).SetMediaStreamPropertiesAsync(mediastreamtype, &*(&mediaencodingproperties as *const ::Abi as *const ::DefaultType)) { + match (*this).SetMediaStreamPropertiesAsync(mediastreamtype, ::core::mem::transmute(&mediaencodingproperties)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/Media/Devices/mod.rs b/crates/libs/windows/src/Windows/Media/Devices/mod.rs index ae1cd86cc6..fd23962977 100644 --- a/crates/libs/windows/src/Windows/Media/Devices/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Devices/mod.rs @@ -1035,7 +1035,7 @@ impl) -> ::windows::core::Result<( } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender)).into() } } impl ::core::clone::Clone for CallControlEventHandler { @@ -1880,7 +1880,7 @@ impl, &::core::option::Option ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const ::Abi as *const ::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for DialRequestedEventHandler { @@ -5490,7 +5490,7 @@ impl, &::core::option::Option ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const ::Abi as *const ::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for KeypadPressedEventHandler { @@ -6844,7 +6844,7 @@ impl, &::core::option::Option ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const ::Abi as *const ::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for RedialRequestedEventHandler { @@ -7725,7 +7725,7 @@ impl VideoDeviceController { } #[doc = "*Required features: 'Media_Devices', 'Foundation'*"] #[cfg(feature = "Foundation")] - pub fn GetDevicePropertyByExtendedId<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::IReference>>(&self, extendedpropertyid: &[::DefaultType], maxpropertyvaluesize: Param1) -> ::windows::core::Result { + pub fn GetDevicePropertyByExtendedId<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::IReference>>(&self, extendedpropertyid: &[u8], maxpropertyvaluesize: Param1) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); @@ -7733,7 +7733,7 @@ impl VideoDeviceController { } } #[doc = "*Required features: 'Media_Devices'*"] - pub fn SetDevicePropertyByExtendedId(&self, extendedpropertyid: &[::DefaultType], propertyvalue: &[::DefaultType]) -> ::windows::core::Result { + pub fn SetDevicePropertyByExtendedId(&self, extendedpropertyid: &[u8], propertyvalue: &[u8]) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__: VideoDeviceControllerSetDevicePropertyStatus = ::core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Media/Effects/impl.rs b/crates/libs/windows/src/Windows/Media/Effects/impl.rs index 35812d4761..0e53008d7d 100644 --- a/crates/libs/windows/src/Windows/Media/Effects/impl.rs +++ b/crates/libs/windows/src/Windows/Media/Effects/impl.rs @@ -87,12 +87,12 @@ impl IBasicAudioEffect_Vtbl { unsafe extern "system" fn SetEncodingProperties(this: *mut ::core::ffi::c_void, encodingproperties: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetEncodingProperties(&*(&encodingproperties as *const ::Abi as *const ::DefaultType)).into() + (*this).SetEncodingProperties(::core::mem::transmute(&encodingproperties)).into() } unsafe extern "system" fn ProcessFrame(this: *mut ::core::ffi::c_void, context: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).ProcessFrame(&*(&context as *const ::Abi as *const ::DefaultType)).into() + (*this).ProcessFrame(::core::mem::transmute(&context)).into() } unsafe extern "system" fn Close(this: *mut ::core::ffi::c_void, reason: MediaEffectClosedReason) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -187,14 +187,12 @@ impl IBasicVideoEffect_Vtbl { unsafe extern "system" fn SetEncodingProperties(this: *mut ::core::ffi::c_void, encodingproperties: ::windows::core::RawPtr, device: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this) - .SetEncodingProperties(&*(&encodingproperties as *const ::Abi as *const ::DefaultType), &*(&device as *const ::Abi as *const ::DefaultType)) - .into() + (*this).SetEncodingProperties(::core::mem::transmute(&encodingproperties), ::core::mem::transmute(&device)).into() } unsafe extern "system" fn ProcessFrame(this: *mut ::core::ffi::c_void, context: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).ProcessFrame(&*(&context as *const ::Abi as *const ::DefaultType)).into() + (*this).ProcessFrame(::core::mem::transmute(&context)).into() } unsafe extern "system" fn Close(this: *mut ::core::ffi::c_void, reason: MediaEffectClosedReason) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -252,14 +250,12 @@ impl IVideoCompositor_Vtbl { unsafe extern "system" fn SetEncodingProperties(this: *mut ::core::ffi::c_void, backgroundproperties: ::windows::core::RawPtr, device: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this) - .SetEncodingProperties(&*(&backgroundproperties as *const ::Abi as *const ::DefaultType), &*(&device as *const ::Abi as *const ::DefaultType)) - .into() + (*this).SetEncodingProperties(::core::mem::transmute(&backgroundproperties), ::core::mem::transmute(&device)).into() } unsafe extern "system" fn CompositeFrame(this: *mut ::core::ffi::c_void, context: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).CompositeFrame(&*(&context as *const ::Abi as *const ::DefaultType)).into() + (*this).CompositeFrame(::core::mem::transmute(&context)).into() } unsafe extern "system" fn Close(this: *mut ::core::ffi::c_void, reason: MediaEffectClosedReason) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; diff --git a/crates/libs/windows/src/Windows/Media/MediaProperties/impl.rs b/crates/libs/windows/src/Windows/Media/MediaProperties/impl.rs index 0b63ed1421..56c866a77d 100644 --- a/crates/libs/windows/src/Windows/Media/MediaProperties/impl.rs +++ b/crates/libs/windows/src/Windows/Media/MediaProperties/impl.rs @@ -39,7 +39,7 @@ impl IMediaEncodingProperties_Vtbl { unsafe extern "system" fn SetSubtype(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetSubtype(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetSubtype(::core::mem::transmute(&value)).into() } unsafe extern "system" fn Subtype(this: *mut ::core::ffi::c_void, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; diff --git a/crates/libs/windows/src/Windows/Media/MediaProperties/mod.rs b/crates/libs/windows/src/Windows/Media/MediaProperties/mod.rs index 3fc1e8af82..fb282826c2 100644 --- a/crates/libs/windows/src/Windows/Media/MediaProperties/mod.rs +++ b/crates/libs/windows/src/Windows/Media/MediaProperties/mod.rs @@ -128,7 +128,7 @@ impl AudioEncodingProperties { }) } #[doc = "*Required features: 'Media_MediaProperties'*"] - pub fn SetFormatUserData(&self, value: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn SetFormatUserData(&self, value: &[u8]) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; unsafe { (::windows::core::Interface::vtable(this).SetFormatUserData)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr())).ok() } } @@ -2797,7 +2797,7 @@ impl TimedMetadataEncodingProperties { } } #[doc = "*Required features: 'Media_MediaProperties'*"] - pub fn SetFormatUserData(&self, value: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn SetFormatUserData(&self, value: &[u8]) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; unsafe { (::windows::core::Interface::vtable(this).SetFormatUserData)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr())).ok() } } @@ -2829,14 +2829,14 @@ impl TimedMetadataEncodingProperties { }) } #[doc = "*Required features: 'Media_MediaProperties'*"] - pub fn CreateSsa(formatuserdata: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateSsa(formatuserdata: &[u8]) -> ::windows::core::Result { Self::ITimedMetadataEncodingPropertiesStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateSsa)(::core::mem::transmute_copy(this), formatuserdata.len() as u32, ::core::mem::transmute(formatuserdata.as_ptr()), &mut result__).from_abi::(result__) }) } #[doc = "*Required features: 'Media_MediaProperties'*"] - pub fn CreateVobSub(formatuserdata: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateVobSub(formatuserdata: &[u8]) -> ::windows::core::Result { Self::ITimedMetadataEncodingPropertiesStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateVobSub)(::core::mem::transmute_copy(this), formatuserdata.len() as u32, ::core::mem::transmute(formatuserdata.as_ptr()), &mut result__).from_abi::(result__) @@ -3035,7 +3035,7 @@ impl VideoEncodingProperties { } } #[doc = "*Required features: 'Media_MediaProperties'*"] - pub fn SetFormatUserData(&self, value: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn SetFormatUserData(&self, value: &[u8]) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; unsafe { (::windows::core::Interface::vtable(this).SetFormatUserData)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr())).ok() } } diff --git a/crates/libs/windows/src/Windows/Media/Playback/impl.rs b/crates/libs/windows/src/Windows/Media/Playback/impl.rs index 6bdc938ade..ca4f93b356 100644 --- a/crates/libs/windows/src/Windows/Media/Playback/impl.rs +++ b/crates/libs/windows/src/Windows/Media/Playback/impl.rs @@ -25,7 +25,7 @@ impl IMediaEnginePlaybackSource_Vtbl { unsafe extern "system" fn SetPlaybackSource(this: *mut ::core::ffi::c_void, source: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetPlaybackSource(&*(&source as *const ::Abi as *const ::DefaultType)).into() + (*this).SetPlaybackSource(::core::mem::transmute(&source)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Media/Playback/mod.rs b/crates/libs/windows/src/Windows/Media/Playback/mod.rs index e2d5277259..60fffa306e 100644 --- a/crates/libs/windows/src/Windows/Media/Playback/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Playback/mod.rs @@ -3205,7 +3205,7 @@ impl MediaPlaybackAudioTrackList { } #[doc = "*Required features: 'Media_Playback', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -6687,7 +6687,7 @@ impl MediaPlaybackTimedMetadataTrackList { } #[doc = "*Required features: 'Media_Playback', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -6922,7 +6922,7 @@ impl MediaPlaybackVideoTrackList { } #[doc = "*Required features: 'Media_Playback', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Media/Protection/PlayReady/impl.rs b/crates/libs/windows/src/Windows/Media/Protection/PlayReady/impl.rs index 7bb6544b49..196bedda7f 100644 --- a/crates/libs/windows/src/Windows/Media/Protection/PlayReady/impl.rs +++ b/crates/libs/windows/src/Windows/Media/Protection/PlayReady/impl.rs @@ -109,7 +109,7 @@ impl INDCustomData_Vtbl { } #[cfg(all(feature = "Foundation", feature = "deprecated"))] pub trait INDDownloadEngine_Impl: Sized { - fn Open(&mut self, uri: &::core::option::Option, sessionidbytes: &[::DefaultType]) -> ::windows::core::Result<()>; + fn Open(&mut self, uri: &::core::option::Option, sessionidbytes: &[u8]) -> ::windows::core::Result<()>; fn Pause(&mut self) -> ::windows::core::Result<()>; fn Resume(&mut self) -> ::windows::core::Result<()>; fn Close(&mut self) -> ::windows::core::Result<()>; @@ -129,7 +129,7 @@ impl INDDownloadEngine_Vtbl { unsafe extern "system" fn Open(this: *mut ::core::ffi::c_void, uri: ::windows::core::RawPtr, sessionIDBytes_array_size: u32, sessionidbytes: *const u8) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).Open(&*(&uri as *const ::Abi as *const ::DefaultType), ::core::slice::from_raw_parts(::core::mem::transmute_copy(&sessionidbytes), sessionIDBytes_array_size as _)).into() + (*this).Open(::core::mem::transmute(&uri), ::core::slice::from_raw_parts(::core::mem::transmute_copy(&sessionidbytes), sessionIDBytes_array_size as _)).into() } unsafe extern "system" fn Pause(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -149,7 +149,7 @@ impl INDDownloadEngine_Vtbl { unsafe extern "system" fn Seek(this: *mut ::core::ffi::c_void, startposition: super::super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).Seek(&*(&startposition as *const ::Abi as *const ::DefaultType)).into() + (*this).Seek(::core::mem::transmute(&startposition)).into() } unsafe extern "system" fn CanSeek(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -219,9 +219,9 @@ impl INDDownloadEngine_Vtbl { #[cfg(feature = "deprecated")] pub trait INDDownloadEngineNotifier_Impl: Sized { fn OnStreamOpened(&mut self) -> ::windows::core::Result<()>; - fn OnPlayReadyObjectReceived(&mut self, databytes: &[::DefaultType]) -> ::windows::core::Result<()>; + fn OnPlayReadyObjectReceived(&mut self, databytes: &[u8]) -> ::windows::core::Result<()>; fn OnContentIDReceived(&mut self, licensefetchdescriptor: &::core::option::Option) -> ::windows::core::Result<()>; - fn OnDataReceived(&mut self, databytes: &[::DefaultType], bytesreceived: u32) -> ::windows::core::Result<()>; + fn OnDataReceived(&mut self, databytes: &[u8], bytesreceived: u32) -> ::windows::core::Result<()>; fn OnEndOfStream(&mut self) -> ::windows::core::Result<()>; fn OnNetworkError(&mut self) -> ::windows::core::Result<()>; } @@ -245,7 +245,7 @@ impl INDDownloadEngineNotifier_Vtbl { unsafe extern "system" fn OnContentIDReceived(this: *mut ::core::ffi::c_void, licensefetchdescriptor: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnContentIDReceived(&*(&licensefetchdescriptor as *const ::Abi as *const ::DefaultType)).into() + (*this).OnContentIDReceived(::core::mem::transmute(&licensefetchdescriptor)).into() } unsafe extern "system" fn OnDataReceived(this: *mut ::core::ffi::c_void, dataBytes_array_size: u32, databytes: *const u8, bytesreceived: u32) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -362,7 +362,7 @@ impl INDLicenseFetchDescriptor_Vtbl { unsafe extern "system" fn SetLicenseFetchChallengeCustomData(this: *mut ::core::ffi::c_void, licensefetchchallengecustomdata: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetLicenseFetchChallengeCustomData(&*(&licensefetchchallengecustomdata as *const ::Abi as *const ::DefaultType)).into() + (*this).SetLicenseFetchChallengeCustomData(::core::mem::transmute(&licensefetchchallengecustomdata)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -410,10 +410,10 @@ impl INDLicenseFetchResult_Vtbl { } #[cfg(all(feature = "Foundation", feature = "deprecated"))] pub trait INDMessenger_Impl: Sized { - fn SendRegistrationRequestAsync(&mut self, sessionidbytes: &[::DefaultType], challengedatabytes: &[::DefaultType]) -> ::windows::core::Result>; - fn SendProximityDetectionStartAsync(&mut self, pdtype: NDProximityDetectionType, transmitterchannelbytes: &[::DefaultType], sessionidbytes: &[::DefaultType], challengedatabytes: &[::DefaultType]) -> ::windows::core::Result>; - fn SendProximityDetectionResponseAsync(&mut self, pdtype: NDProximityDetectionType, transmitterchannelbytes: &[::DefaultType], sessionidbytes: &[::DefaultType], responsedatabytes: &[::DefaultType]) -> ::windows::core::Result>; - fn SendLicenseFetchRequestAsync(&mut self, sessionidbytes: &[::DefaultType], challengedatabytes: &[::DefaultType]) -> ::windows::core::Result>; + fn SendRegistrationRequestAsync(&mut self, sessionidbytes: &[u8], challengedatabytes: &[u8]) -> ::windows::core::Result>; + fn SendProximityDetectionStartAsync(&mut self, pdtype: NDProximityDetectionType, transmitterchannelbytes: &[u8], sessionidbytes: &[u8], challengedatabytes: &[u8]) -> ::windows::core::Result>; + fn SendProximityDetectionResponseAsync(&mut self, pdtype: NDProximityDetectionType, transmitterchannelbytes: &[u8], sessionidbytes: &[u8], responsedatabytes: &[u8]) -> ::windows::core::Result>; + fn SendLicenseFetchRequestAsync(&mut self, sessionidbytes: &[u8], challengedatabytes: &[u8]) -> ::windows::core::Result>; } #[cfg(all(feature = "Foundation", feature = "deprecated"))] impl ::windows::core::RuntimeName for INDMessenger { @@ -657,7 +657,7 @@ impl INDStorageFileHelper_Vtbl { unsafe extern "system" fn GetFileURLs(this: *mut ::core::ffi::c_void, file: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetFileURLs(&*(&file as *const ::Abi as *const ::DefaultType)) { + match (*this).GetFileURLs(::core::mem::transmute(&file)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -674,7 +674,7 @@ impl INDStorageFileHelper_Vtbl { } #[cfg(all(feature = "Media_Core", feature = "deprecated"))] pub trait INDStreamParser_Impl: Sized { - fn ParseData(&mut self, databytes: &[::DefaultType]) -> ::windows::core::Result<()>; + fn ParseData(&mut self, databytes: &[u8]) -> ::windows::core::Result<()>; fn GetStreamInformation(&mut self, descriptor: &::core::option::Option, streamtype: &mut NDMediaStreamType) -> ::windows::core::Result; fn BeginOfStream(&mut self) -> ::windows::core::Result<()>; fn EndOfStream(&mut self) -> ::windows::core::Result<()>; @@ -695,7 +695,7 @@ impl INDStreamParser_Vtbl { unsafe extern "system" fn GetStreamInformation(this: *mut ::core::ffi::c_void, descriptor: ::windows::core::RawPtr, streamtype: *mut NDMediaStreamType, result__: *mut u32) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetStreamInformation(&*(&descriptor as *const ::Abi as *const ::DefaultType), ::core::mem::transmute_copy(&streamtype)) { + match (*this).GetStreamInformation(::core::mem::transmute(&descriptor), ::core::mem::transmute_copy(&streamtype)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -743,8 +743,8 @@ impl INDStreamParser_Vtbl { pub trait INDStreamParserNotifier_Impl: Sized { fn OnContentIDReceived(&mut self, licensefetchdescriptor: &::core::option::Option) -> ::windows::core::Result<()>; fn OnMediaStreamDescriptorCreated(&mut self, audiostreamdescriptors: &::core::option::Option>, videostreamdescriptors: &::core::option::Option>) -> ::windows::core::Result<()>; - fn OnSampleParsed(&mut self, streamid: u32, streamtype: NDMediaStreamType, streamsample: &::core::option::Option, pts: i64, ccformat: NDClosedCaptionFormat, ccdatabytes: &[::DefaultType]) -> ::windows::core::Result<()>; - fn OnBeginSetupDecryptor(&mut self, descriptor: &::core::option::Option, keyid: &::windows::core::GUID, probytes: &[::DefaultType]) -> ::windows::core::Result<()>; + fn OnSampleParsed(&mut self, streamid: u32, streamtype: NDMediaStreamType, streamsample: &::core::option::Option, pts: i64, ccformat: NDClosedCaptionFormat, ccdatabytes: &[u8]) -> ::windows::core::Result<()>; + fn OnBeginSetupDecryptor(&mut self, descriptor: &::core::option::Option, keyid: &::windows::core::GUID, probytes: &[u8]) -> ::windows::core::Result<()>; } #[cfg(all(feature = "Foundation_Collections", feature = "Media_Core", feature = "deprecated"))] impl ::windows::core::RuntimeName for INDStreamParserNotifier { @@ -756,29 +756,22 @@ impl INDStreamParserNotifier_Vtbl { unsafe extern "system" fn OnContentIDReceived(this: *mut ::core::ffi::c_void, licensefetchdescriptor: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnContentIDReceived(&*(&licensefetchdescriptor as *const ::Abi as *const ::DefaultType)).into() + (*this).OnContentIDReceived(::core::mem::transmute(&licensefetchdescriptor)).into() } unsafe extern "system" fn OnMediaStreamDescriptorCreated(this: *mut ::core::ffi::c_void, audiostreamdescriptors: ::windows::core::RawPtr, videostreamdescriptors: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this) - .OnMediaStreamDescriptorCreated( - &*(&audiostreamdescriptors as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType), - &*(&videostreamdescriptors as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType), - ) - .into() + (*this).OnMediaStreamDescriptorCreated(::core::mem::transmute(&audiostreamdescriptors), ::core::mem::transmute(&videostreamdescriptors)).into() } unsafe extern "system" fn OnSampleParsed(this: *mut ::core::ffi::c_void, streamid: u32, streamtype: NDMediaStreamType, streamsample: ::windows::core::RawPtr, pts: i64, ccformat: NDClosedCaptionFormat, ccDataBytes_array_size: u32, ccdatabytes: *const u8) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnSampleParsed(streamid, streamtype, &*(&streamsample as *const ::Abi as *const ::DefaultType), pts, ccformat, ::core::slice::from_raw_parts(::core::mem::transmute_copy(&ccdatabytes), ccDataBytes_array_size as _)).into() + (*this).OnSampleParsed(streamid, streamtype, ::core::mem::transmute(&streamsample), pts, ccformat, ::core::slice::from_raw_parts(::core::mem::transmute_copy(&ccdatabytes), ccDataBytes_array_size as _)).into() } unsafe extern "system" fn OnBeginSetupDecryptor(this: *mut ::core::ffi::c_void, descriptor: ::windows::core::RawPtr, keyid: ::windows::core::GUID, proBytes_array_size: u32, probytes: *const u8) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this) - .OnBeginSetupDecryptor(&*(&descriptor as *const ::Abi as *const ::DefaultType), &*(&keyid as *const <::windows::core::GUID as ::windows::core::Abi>::Abi as *const <::windows::core::GUID as ::windows::core::DefaultType>::DefaultType), ::core::slice::from_raw_parts(::core::mem::transmute_copy(&probytes), proBytes_array_size as _)) - .into() + (*this).OnBeginSetupDecryptor(::core::mem::transmute(&descriptor), ::core::mem::transmute(&keyid), ::core::slice::from_raw_parts(::core::mem::transmute_copy(&probytes), proBytes_array_size as _)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -1200,7 +1193,7 @@ impl IPlayReadyLicenseAcquisitionServiceRequest_Vtbl { unsafe extern "system" fn SetContentHeader(this: *mut ::core::ffi::c_void, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetContentHeader(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetContentHeader(::core::mem::transmute(&value)).into() } unsafe extern "system" fn DomainServiceId(this: *mut ::core::ffi::c_void, result__: *mut ::windows::core::GUID) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -1217,7 +1210,7 @@ impl IPlayReadyLicenseAcquisitionServiceRequest_Vtbl { unsafe extern "system" fn SetDomainServiceId(this: *mut ::core::ffi::c_void, value: ::windows::core::GUID) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetDomainServiceId(&*(&value as *const <::windows::core::GUID as ::windows::core::Abi>::Abi as *const <::windows::core::GUID as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetDomainServiceId(::core::mem::transmute(&value)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -1255,7 +1248,7 @@ impl IPlayReadyLicenseSession_Vtbl { unsafe extern "system" fn ConfigureMediaProtectionManager(this: *mut ::core::ffi::c_void, mpm: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).ConfigureMediaProtectionManager(&*(&mpm as *const ::Abi as *const ::DefaultType)).into() + (*this).ConfigureMediaProtectionManager(::core::mem::transmute(&mpm)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -1281,7 +1274,7 @@ impl IPlayReadyLicenseSession2_Vtbl { unsafe extern "system" fn CreateLicenseIterable(this: *mut ::core::ffi::c_void, contentheader: ::windows::core::RawPtr, fullyevaluated: bool, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CreateLicenseIterable(&*(&contentheader as *const ::Abi as *const ::DefaultType), fullyevaluated) { + match (*this).CreateLicenseIterable(::core::mem::transmute(&contentheader), fullyevaluated) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -1398,7 +1391,7 @@ pub trait IPlayReadyServiceRequest_Impl: Sized + super::IMediaProtectionServiceR fn BeginServiceRequest(&mut self) -> ::windows::core::Result; fn NextServiceRequest(&mut self) -> ::windows::core::Result; fn GenerateManualEnablingChallenge(&mut self) -> ::windows::core::Result; - fn ProcessManualEnablingResponse(&mut self, responsebytes: &[::DefaultType]) -> ::windows::core::Result<::windows::core::HRESULT>; + fn ProcessManualEnablingResponse(&mut self, responsebytes: &[u8]) -> ::windows::core::Result<::windows::core::HRESULT>; } #[cfg(feature = "Foundation")] impl ::windows::core::RuntimeName for IPlayReadyServiceRequest { @@ -1422,7 +1415,7 @@ impl IPlayReadyServiceRequest_Vtbl { unsafe extern "system" fn SetUri(this: *mut ::core::ffi::c_void, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetUri(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetUri(::core::mem::transmute(&value)).into() } unsafe extern "system" fn ResponseCustomData(this: *mut ::core::ffi::c_void, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -1451,7 +1444,7 @@ impl IPlayReadyServiceRequest_Vtbl { unsafe extern "system" fn SetChallengeCustomData(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetChallengeCustomData(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetChallengeCustomData(::core::mem::transmute(&value)).into() } unsafe extern "system" fn BeginServiceRequest(this: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; 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 6650e4001a..f25d616921 100644 --- a/crates/libs/windows/src/Windows/Media/Protection/PlayReady/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Protection/PlayReady/mod.rs @@ -361,7 +361,7 @@ pub struct INDDownloadEngine(::windows::core::IUnknown); impl INDDownloadEngine { #[doc = "*Required features: 'Media_Protection_PlayReady', 'Foundation', 'deprecated'*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn Open<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::Uri>>(&self, uri: Param0, sessionidbytes: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn Open<'a, Param0: ::windows::core::IntoParam<'a, super::super::super::Foundation::Uri>>(&self, uri: Param0, sessionidbytes: &[u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).Open)(::core::mem::transmute_copy(this), uri.into_param().abi(), sessionidbytes.len() as u32, ::core::mem::transmute(sessionidbytes.as_ptr())).ok() } } @@ -559,7 +559,7 @@ impl INDDownloadEngineNotifier { } #[doc = "*Required features: 'Media_Protection_PlayReady', 'deprecated'*"] #[cfg(feature = "deprecated")] - pub fn OnPlayReadyObjectReceived(&self, databytes: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn OnPlayReadyObjectReceived(&self, databytes: &[u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).OnPlayReadyObjectReceived)(::core::mem::transmute_copy(this), databytes.len() as u32, ::core::mem::transmute(databytes.as_ptr())).ok() } } @@ -571,7 +571,7 @@ impl INDDownloadEngineNotifier { } #[doc = "*Required features: 'Media_Protection_PlayReady', 'deprecated'*"] #[cfg(feature = "deprecated")] - pub fn OnDataReceived(&self, databytes: &[::DefaultType], bytesreceived: u32) -> ::windows::core::Result<()> { + pub fn OnDataReceived(&self, databytes: &[u8], bytesreceived: u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).OnDataReceived)(::core::mem::transmute_copy(this), databytes.len() as u32, ::core::mem::transmute(databytes.as_ptr()), bytesreceived).ok() } } @@ -1067,7 +1067,7 @@ pub struct INDMessenger(::windows::core::IUnknown); impl INDMessenger { #[doc = "*Required features: 'Media_Protection_PlayReady', 'Foundation', 'deprecated'*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SendRegistrationRequestAsync(&self, sessionidbytes: &[::DefaultType], challengedatabytes: &[::DefaultType]) -> ::windows::core::Result> { + pub fn SendRegistrationRequestAsync(&self, sessionidbytes: &[u8], challengedatabytes: &[u8]) -> ::windows::core::Result> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); @@ -1076,7 +1076,7 @@ impl INDMessenger { } #[doc = "*Required features: 'Media_Protection_PlayReady', 'Foundation', 'deprecated'*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SendProximityDetectionStartAsync(&self, pdtype: NDProximityDetectionType, transmitterchannelbytes: &[::DefaultType], sessionidbytes: &[::DefaultType], challengedatabytes: &[::DefaultType]) -> ::windows::core::Result> { + pub fn SendProximityDetectionStartAsync(&self, pdtype: NDProximityDetectionType, transmitterchannelbytes: &[u8], sessionidbytes: &[u8], challengedatabytes: &[u8]) -> ::windows::core::Result> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); @@ -1085,7 +1085,7 @@ impl INDMessenger { } #[doc = "*Required features: 'Media_Protection_PlayReady', 'Foundation', 'deprecated'*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SendProximityDetectionResponseAsync(&self, pdtype: NDProximityDetectionType, transmitterchannelbytes: &[::DefaultType], sessionidbytes: &[::DefaultType], responsedatabytes: &[::DefaultType]) -> ::windows::core::Result> { + pub fn SendProximityDetectionResponseAsync(&self, pdtype: NDProximityDetectionType, transmitterchannelbytes: &[u8], sessionidbytes: &[u8], responsedatabytes: &[u8]) -> ::windows::core::Result> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); @@ -1094,7 +1094,7 @@ impl INDMessenger { } #[doc = "*Required features: 'Media_Protection_PlayReady', 'Foundation', 'deprecated'*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SendLicenseFetchRequestAsync(&self, sessionidbytes: &[::DefaultType], challengedatabytes: &[::DefaultType]) -> ::windows::core::Result> { + pub fn SendLicenseFetchRequestAsync(&self, sessionidbytes: &[u8], challengedatabytes: &[u8]) -> ::windows::core::Result> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); @@ -1760,7 +1760,7 @@ pub struct INDStreamParser(::windows::core::IUnknown); impl INDStreamParser { #[doc = "*Required features: 'Media_Protection_PlayReady', 'deprecated'*"] #[cfg(feature = "deprecated")] - pub fn ParseData(&self, databytes: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ParseData(&self, databytes: &[u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).ParseData)(::core::mem::transmute_copy(this), databytes.len() as u32, ::core::mem::transmute(databytes.as_ptr())).ok() } } @@ -1918,13 +1918,13 @@ impl INDStreamParserNotifier { } #[doc = "*Required features: 'Media_Protection_PlayReady', 'Media_Core', 'deprecated'*"] #[cfg(all(feature = "Media_Core", feature = "deprecated"))] - pub fn OnSampleParsed<'a, Param2: ::windows::core::IntoParam<'a, super::super::Core::MediaStreamSample>>(&self, streamid: u32, streamtype: NDMediaStreamType, streamsample: Param2, pts: i64, ccformat: NDClosedCaptionFormat, ccdatabytes: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn OnSampleParsed<'a, Param2: ::windows::core::IntoParam<'a, super::super::Core::MediaStreamSample>>(&self, streamid: u32, streamtype: NDMediaStreamType, streamsample: Param2, pts: i64, ccformat: NDClosedCaptionFormat, ccdatabytes: &[u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).OnSampleParsed)(::core::mem::transmute_copy(this), streamid, streamtype, streamsample.into_param().abi(), pts, ccformat, ccdatabytes.len() as u32, ::core::mem::transmute(ccdatabytes.as_ptr())).ok() } } #[doc = "*Required features: 'Media_Protection_PlayReady', 'Media_Core', 'deprecated'*"] #[cfg(all(feature = "Media_Core", feature = "deprecated"))] - pub fn OnBeginSetupDecryptor<'a, Param0: ::windows::core::IntoParam<'a, super::super::Core::IMediaStreamDescriptor>, Param1: ::windows::core::IntoParam<'a, ::windows::core::GUID>>(&self, descriptor: Param0, keyid: Param1, probytes: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn OnBeginSetupDecryptor<'a, Param0: ::windows::core::IntoParam<'a, super::super::Core::IMediaStreamDescriptor>, Param1: ::windows::core::IntoParam<'a, ::windows::core::GUID>>(&self, descriptor: Param0, keyid: Param1, probytes: &[u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).OnBeginSetupDecryptor)(::core::mem::transmute_copy(this), descriptor.into_param().abi(), keyid.into_param().abi(), probytes.len() as u32, ::core::mem::transmute(probytes.as_ptr())).ok() } } @@ -2836,7 +2836,7 @@ impl IPlayReadyLicenseAcquisitionServiceRequest { } } #[doc = "*Required features: 'Media_Protection_PlayReady'*"] - pub fn ProcessManualEnablingResponse(&self, responsebytes: &[::DefaultType]) -> ::windows::core::Result<::windows::core::HRESULT> { + pub fn ProcessManualEnablingResponse(&self, responsebytes: &[u8]) -> ::windows::core::Result<::windows::core::HRESULT> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__: ::windows::core::HRESULT = ::core::mem::zeroed(); @@ -3412,7 +3412,7 @@ impl IPlayReadySecureStopServiceRequest { } } #[doc = "*Required features: 'Media_Protection_PlayReady'*"] - pub fn ProcessManualEnablingResponse(&self, responsebytes: &[::DefaultType]) -> ::windows::core::Result<::windows::core::HRESULT> { + pub fn ProcessManualEnablingResponse(&self, responsebytes: &[u8]) -> ::windows::core::Result<::windows::core::HRESULT> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__: ::windows::core::HRESULT = ::core::mem::zeroed(); @@ -3623,7 +3623,7 @@ impl IPlayReadyServiceRequest { } } #[doc = "*Required features: 'Media_Protection_PlayReady'*"] - pub fn ProcessManualEnablingResponse(&self, responsebytes: &[::DefaultType]) -> ::windows::core::Result<::windows::core::HRESULT> { + pub fn ProcessManualEnablingResponse(&self, responsebytes: &[u8]) -> ::windows::core::Result<::windows::core::HRESULT> { let this = self; unsafe { let mut result__: ::windows::core::HRESULT = ::core::mem::zeroed(); @@ -4332,7 +4332,7 @@ impl NDCustomData { } #[doc = "*Required features: 'Media_Protection_PlayReady', 'deprecated'*"] #[cfg(feature = "deprecated")] - pub fn CreateInstance(customdatatypeidbytes: &[::DefaultType], customdatabytes: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateInstance(customdatatypeidbytes: &[u8], customdatabytes: &[u8]) -> ::windows::core::Result { Self::INDCustomDataFactory(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateInstance)(::core::mem::transmute_copy(this), customdatatypeidbytes.len() as u32, ::core::mem::transmute(customdatatypeidbytes.as_ptr()), customdatabytes.len() as u32, ::core::mem::transmute(customdatabytes.as_ptr()), &mut result__).from_abi::(result__) @@ -4473,7 +4473,7 @@ impl NDDownloadEngineNotifier { } #[doc = "*Required features: 'Media_Protection_PlayReady', 'deprecated'*"] #[cfg(feature = "deprecated")] - pub fn OnPlayReadyObjectReceived(&self, databytes: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn OnPlayReadyObjectReceived(&self, databytes: &[u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).OnPlayReadyObjectReceived)(::core::mem::transmute_copy(this), databytes.len() as u32, ::core::mem::transmute(databytes.as_ptr())).ok() } } @@ -4485,7 +4485,7 @@ impl NDDownloadEngineNotifier { } #[doc = "*Required features: 'Media_Protection_PlayReady', 'deprecated'*"] #[cfg(feature = "deprecated")] - pub fn OnDataReceived(&self, databytes: &[::DefaultType], bytesreceived: u32) -> ::windows::core::Result<()> { + pub fn OnDataReceived(&self, databytes: &[u8], bytesreceived: u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).OnDataReceived)(::core::mem::transmute_copy(this), databytes.len() as u32, ::core::mem::transmute(databytes.as_ptr()), bytesreceived).ok() } } @@ -4650,7 +4650,7 @@ impl NDLicenseFetchDescriptor { } #[doc = "*Required features: 'Media_Protection_PlayReady', 'deprecated'*"] #[cfg(feature = "deprecated")] - pub fn CreateInstance<'a, Param2: ::windows::core::IntoParam<'a, INDCustomData>>(contentidtype: NDContentIDType, contentidbytes: &[::DefaultType], licensefetchchallengecustomdata: Param2) -> ::windows::core::Result { + pub fn CreateInstance<'a, Param2: ::windows::core::IntoParam<'a, INDCustomData>>(contentidtype: NDContentIDType, contentidbytes: &[u8], licensefetchchallengecustomdata: Param2) -> ::windows::core::Result { Self::INDLicenseFetchDescriptorFactory(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateInstance)(::core::mem::transmute_copy(this), contentidtype, contentidbytes.len() as u32, ::core::mem::transmute(contentidbytes.as_ptr()), licensefetchchallengecustomdata.into_param().abi(), &mut result__).from_abi::(result__) @@ -5054,13 +5054,13 @@ impl NDStreamParserNotifier { } #[doc = "*Required features: 'Media_Protection_PlayReady', 'Media_Core', 'deprecated'*"] #[cfg(all(feature = "Media_Core", feature = "deprecated"))] - pub fn OnSampleParsed<'a, Param2: ::windows::core::IntoParam<'a, super::super::Core::MediaStreamSample>>(&self, streamid: u32, streamtype: NDMediaStreamType, streamsample: Param2, pts: i64, ccformat: NDClosedCaptionFormat, ccdatabytes: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn OnSampleParsed<'a, Param2: ::windows::core::IntoParam<'a, super::super::Core::MediaStreamSample>>(&self, streamid: u32, streamtype: NDMediaStreamType, streamsample: Param2, pts: i64, ccformat: NDClosedCaptionFormat, ccdatabytes: &[u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).OnSampleParsed)(::core::mem::transmute_copy(this), streamid, streamtype, streamsample.into_param().abi(), pts, ccformat, ccdatabytes.len() as u32, ::core::mem::transmute(ccdatabytes.as_ptr())).ok() } } #[doc = "*Required features: 'Media_Protection_PlayReady', 'Media_Core', 'deprecated'*"] #[cfg(all(feature = "Media_Core", feature = "deprecated"))] - pub fn OnBeginSetupDecryptor<'a, Param0: ::windows::core::IntoParam<'a, super::super::Core::IMediaStreamDescriptor>, Param1: ::windows::core::IntoParam<'a, ::windows::core::GUID>>(&self, descriptor: Param0, keyid: Param1, probytes: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn OnBeginSetupDecryptor<'a, Param0: ::windows::core::IntoParam<'a, super::super::Core::IMediaStreamDescriptor>, Param1: ::windows::core::IntoParam<'a, ::windows::core::GUID>>(&self, descriptor: Param0, keyid: Param1, probytes: &[u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).OnBeginSetupDecryptor)(::core::mem::transmute_copy(this), descriptor.into_param().abi(), keyid.into_param().abi(), probytes.len() as u32, ::core::mem::transmute(probytes.as_ptr())).ok() } } @@ -5180,7 +5180,7 @@ pub struct NDTCPMessenger(::windows::core::IUnknown); impl NDTCPMessenger { #[doc = "*Required features: 'Media_Protection_PlayReady', 'Foundation', 'deprecated'*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SendRegistrationRequestAsync(&self, sessionidbytes: &[::DefaultType], challengedatabytes: &[::DefaultType]) -> ::windows::core::Result> { + pub fn SendRegistrationRequestAsync(&self, sessionidbytes: &[u8], challengedatabytes: &[u8]) -> ::windows::core::Result> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); @@ -5189,7 +5189,7 @@ impl NDTCPMessenger { } #[doc = "*Required features: 'Media_Protection_PlayReady', 'Foundation', 'deprecated'*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SendProximityDetectionStartAsync(&self, pdtype: NDProximityDetectionType, transmitterchannelbytes: &[::DefaultType], sessionidbytes: &[::DefaultType], challengedatabytes: &[::DefaultType]) -> ::windows::core::Result> { + pub fn SendProximityDetectionStartAsync(&self, pdtype: NDProximityDetectionType, transmitterchannelbytes: &[u8], sessionidbytes: &[u8], challengedatabytes: &[u8]) -> ::windows::core::Result> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); @@ -5198,7 +5198,7 @@ impl NDTCPMessenger { } #[doc = "*Required features: 'Media_Protection_PlayReady', 'Foundation', 'deprecated'*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SendProximityDetectionResponseAsync(&self, pdtype: NDProximityDetectionType, transmitterchannelbytes: &[::DefaultType], sessionidbytes: &[::DefaultType], responsedatabytes: &[::DefaultType]) -> ::windows::core::Result> { + pub fn SendProximityDetectionResponseAsync(&self, pdtype: NDProximityDetectionType, transmitterchannelbytes: &[u8], sessionidbytes: &[u8], responsedatabytes: &[u8]) -> ::windows::core::Result> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); @@ -5207,7 +5207,7 @@ impl NDTCPMessenger { } #[doc = "*Required features: 'Media_Protection_PlayReady', 'Foundation', 'deprecated'*"] #[cfg(all(feature = "Foundation", feature = "deprecated"))] - pub fn SendLicenseFetchRequestAsync(&self, sessionidbytes: &[::DefaultType], challengedatabytes: &[::DefaultType]) -> ::windows::core::Result> { + pub fn SendLicenseFetchRequestAsync(&self, sessionidbytes: &[u8], challengedatabytes: &[u8]) -> ::windows::core::Result> { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); @@ -5440,7 +5440,7 @@ impl PlayReadyContentHeader { } #[doc = "*Required features: 'Media_Protection_PlayReady', 'Foundation'*"] #[cfg(feature = "Foundation")] - pub fn CreateInstanceFromWindowsMediaDrmHeader<'a, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::Uri>, Param2: ::windows::core::IntoParam<'a, super::super::super::Foundation::Uri>, Param3: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param4: ::windows::core::IntoParam<'a, ::windows::core::GUID>>(headerbytes: &[::DefaultType], licenseacquisitionurl: Param1, licenseacquisitionuserinterfaceurl: Param2, customattributes: Param3, domainserviceid: Param4) -> ::windows::core::Result { + pub fn CreateInstanceFromWindowsMediaDrmHeader<'a, Param1: ::windows::core::IntoParam<'a, super::super::super::Foundation::Uri>, Param2: ::windows::core::IntoParam<'a, super::super::super::Foundation::Uri>, Param3: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param4: ::windows::core::IntoParam<'a, ::windows::core::GUID>>(headerbytes: &[u8], licenseacquisitionurl: Param1, licenseacquisitionuserinterfaceurl: Param2, customattributes: Param3, domainserviceid: Param4) -> ::windows::core::Result { Self::IPlayReadyContentHeaderFactory(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateInstanceFromWindowsMediaDrmHeader)(::core::mem::transmute_copy(this), headerbytes.len() as u32, ::core::mem::transmute(headerbytes.as_ptr()), licenseacquisitionurl.into_param().abi(), licenseacquisitionuserinterfaceurl.into_param().abi(), customattributes.into_param().abi(), domainserviceid.into_param().abi(), &mut result__).from_abi::(result__) @@ -5455,7 +5455,7 @@ impl PlayReadyContentHeader { }) } #[doc = "*Required features: 'Media_Protection_PlayReady'*"] - pub fn CreateInstanceFromPlayReadyHeader(headerbytes: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateInstanceFromPlayReadyHeader(headerbytes: &[u8]) -> ::windows::core::Result { Self::IPlayReadyContentHeaderFactory(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateInstanceFromPlayReadyHeader)(::core::mem::transmute_copy(this), headerbytes.len() as u32, ::core::mem::transmute(headerbytes.as_ptr()), &mut result__).from_abi::(result__) @@ -5463,7 +5463,7 @@ impl PlayReadyContentHeader { } #[doc = "*Required features: 'Media_Protection_PlayReady', 'Foundation'*"] #[cfg(feature = "Foundation")] - pub fn CreateInstanceFromComponents2<'a, Param4: ::windows::core::IntoParam<'a, super::super::super::Foundation::Uri>, Param5: ::windows::core::IntoParam<'a, super::super::super::Foundation::Uri>, Param6: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param7: ::windows::core::IntoParam<'a, ::windows::core::GUID>>(dwflags: u32, contentkeyids: &[<::windows::core::GUID as ::windows::core::DefaultType>::DefaultType], contentkeyidstrings: &[<::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType], contentencryptionalgorithm: PlayReadyEncryptionAlgorithm, licenseacquisitionurl: Param4, licenseacquisitionuserinterfaceurl: Param5, customattributes: Param6, domainserviceid: Param7) -> ::windows::core::Result { + pub fn CreateInstanceFromComponents2<'a, Param4: ::windows::core::IntoParam<'a, super::super::super::Foundation::Uri>, Param5: ::windows::core::IntoParam<'a, super::super::super::Foundation::Uri>, Param6: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>, Param7: ::windows::core::IntoParam<'a, ::windows::core::GUID>>(dwflags: u32, contentkeyids: &[::windows::core::GUID], contentkeyidstrings: &[::windows::core::HSTRING], contentencryptionalgorithm: PlayReadyEncryptionAlgorithm, licenseacquisitionurl: Param4, licenseacquisitionuserinterfaceurl: Param5, customattributes: Param6, domainserviceid: Param7) -> ::windows::core::Result { Self::IPlayReadyContentHeaderFactory2(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateInstanceFromComponents2)(::core::mem::transmute_copy(this), dwflags, contentkeyids.len() as u32, ::core::mem::transmute(contentkeyids.as_ptr()), contentkeyidstrings.len() as u32, ::core::mem::transmute(contentkeyidstrings.as_ptr()), contentencryptionalgorithm, licenseacquisitionurl.into_param().abi(), licenseacquisitionuserinterfaceurl.into_param().abi(), customattributes.into_param().abi(), domainserviceid.into_param().abi(), &mut result__).from_abi::(result__) @@ -5919,7 +5919,7 @@ impl PlayReadyDomainIterator { } #[doc = "*Required features: 'Media_Protection_PlayReady', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -6162,7 +6162,7 @@ impl PlayReadyDomainJoinServiceRequest { } } #[doc = "*Required features: 'Media_Protection_PlayReady'*"] - pub fn ProcessManualEnablingResponse(&self, responsebytes: &[::DefaultType]) -> ::windows::core::Result<::windows::core::HRESULT> { + pub fn ProcessManualEnablingResponse(&self, responsebytes: &[u8]) -> ::windows::core::Result<::windows::core::HRESULT> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__: ::windows::core::HRESULT = ::core::mem::zeroed(); @@ -6395,7 +6395,7 @@ impl PlayReadyDomainLeaveServiceRequest { } } #[doc = "*Required features: 'Media_Protection_PlayReady'*"] - pub fn ProcessManualEnablingResponse(&self, responsebytes: &[::DefaultType]) -> ::windows::core::Result<::windows::core::HRESULT> { + pub fn ProcessManualEnablingResponse(&self, responsebytes: &[u8]) -> ::windows::core::Result<::windows::core::HRESULT> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__: ::windows::core::HRESULT = ::core::mem::zeroed(); @@ -6793,7 +6793,7 @@ impl PlayReadyIndividualizationServiceRequest { } } #[doc = "*Required features: 'Media_Protection_PlayReady'*"] - pub fn ProcessManualEnablingResponse(&self, responsebytes: &[::DefaultType]) -> ::windows::core::Result<::windows::core::HRESULT> { + pub fn ProcessManualEnablingResponse(&self, responsebytes: &[u8]) -> ::windows::core::Result<::windows::core::HRESULT> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__: ::windows::core::HRESULT = ::core::mem::zeroed(); @@ -7225,7 +7225,7 @@ impl PlayReadyLicenseAcquisitionServiceRequest { } } #[doc = "*Required features: 'Media_Protection_PlayReady'*"] - pub fn ProcessManualEnablingResponse(&self, responsebytes: &[::DefaultType]) -> ::windows::core::Result<::windows::core::HRESULT> { + pub fn ProcessManualEnablingResponse(&self, responsebytes: &[u8]) -> ::windows::core::Result<::windows::core::HRESULT> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__: ::windows::core::HRESULT = ::core::mem::zeroed(); @@ -7559,7 +7559,7 @@ impl PlayReadyLicenseIterator { } #[doc = "*Required features: 'Media_Protection_PlayReady', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -7880,7 +7880,7 @@ impl PlayReadyMeteringReportServiceRequest { } } #[doc = "*Required features: 'Media_Protection_PlayReady'*"] - pub fn SetMeteringCertificate(&self, meteringcertbytes: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn SetMeteringCertificate(&self, meteringcertbytes: &[u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).SetMeteringCertificate)(::core::mem::transmute_copy(this), meteringcertbytes.len() as u32, ::core::mem::transmute(meteringcertbytes.as_ptr())).ok() } } @@ -7946,7 +7946,7 @@ impl PlayReadyMeteringReportServiceRequest { } } #[doc = "*Required features: 'Media_Protection_PlayReady'*"] - pub fn ProcessManualEnablingResponse(&self, responsebytes: &[::DefaultType]) -> ::windows::core::Result<::windows::core::HRESULT> { + pub fn ProcessManualEnablingResponse(&self, responsebytes: &[u8]) -> ::windows::core::Result<::windows::core::HRESULT> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__: ::windows::core::HRESULT = ::core::mem::zeroed(); @@ -8153,7 +8153,7 @@ impl PlayReadyRevocationServiceRequest { } } #[doc = "*Required features: 'Media_Protection_PlayReady'*"] - pub fn ProcessManualEnablingResponse(&self, responsebytes: &[::DefaultType]) -> ::windows::core::Result<::windows::core::HRESULT> { + pub fn ProcessManualEnablingResponse(&self, responsebytes: &[u8]) -> ::windows::core::Result<::windows::core::HRESULT> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__: ::windows::core::HRESULT = ::core::mem::zeroed(); @@ -8288,7 +8288,7 @@ impl PlayReadySecureStopIterable { } #[doc = "*Required features: 'Media_Protection_PlayReady', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn CreateInstance(publishercertbytes: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateInstance(publishercertbytes: &[u8]) -> ::windows::core::Result { Self::IPlayReadySecureStopIterableFactory(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateInstance)(::core::mem::transmute_copy(this), publishercertbytes.len() as u32, ::core::mem::transmute(publishercertbytes.as_ptr()), &mut result__).from_abi::(result__) @@ -8458,7 +8458,7 @@ impl PlayReadySecureStopIterator { } #[doc = "*Required features: 'Media_Protection_PlayReady', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -8636,14 +8636,14 @@ impl PlayReadySecureStopServiceRequest { } } #[doc = "*Required features: 'Media_Protection_PlayReady'*"] - pub fn CreateInstance(publishercertbytes: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateInstance(publishercertbytes: &[u8]) -> ::windows::core::Result { Self::IPlayReadySecureStopServiceRequestFactory(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateInstance)(::core::mem::transmute_copy(this), publishercertbytes.len() as u32, ::core::mem::transmute(publishercertbytes.as_ptr()), &mut result__).from_abi::(result__) }) } #[doc = "*Required features: 'Media_Protection_PlayReady'*"] - pub fn CreateInstanceFromSessionID<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::GUID>>(sessionid: Param0, publishercertbytes: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateInstanceFromSessionID<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::GUID>>(sessionid: Param0, publishercertbytes: &[u8]) -> ::windows::core::Result { Self::IPlayReadySecureStopServiceRequestFactory(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateInstanceFromSessionID)(::core::mem::transmute_copy(this), sessionid.into_param().abi(), publishercertbytes.len() as u32, ::core::mem::transmute(publishercertbytes.as_ptr()), &mut result__).from_abi::(result__) @@ -8711,7 +8711,7 @@ impl PlayReadySecureStopServiceRequest { } } #[doc = "*Required features: 'Media_Protection_PlayReady'*"] - pub fn ProcessManualEnablingResponse(&self, responsebytes: &[::DefaultType]) -> ::windows::core::Result<::windows::core::HRESULT> { + pub fn ProcessManualEnablingResponse(&self, responsebytes: &[u8]) -> ::windows::core::Result<::windows::core::HRESULT> { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__: ::windows::core::HRESULT = ::core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Media/Protection/mod.rs b/crates/libs/windows/src/Windows/Media/Protection/mod.rs index 5dc759d522..813f0d687e 100644 --- a/crates/libs/windows/src/Windows/Media/Protection/mod.rs +++ b/crates/libs/windows/src/Windows/Media/Protection/mod.rs @@ -136,7 +136,7 @@ impl, &::core::option:: } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: ::windows::core::RawPtr, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const ::Abi as *const ::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for ComponentLoadFailedEventHandler { @@ -1233,7 +1233,7 @@ impl) -> ::windows::cor } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender)).into() } } impl ::core::clone::Clone for RebootNeededEventHandler { @@ -1714,7 +1714,7 @@ impl, &::core::option:: } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: ::windows::core::RawPtr, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const ::Abi as *const ::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for ServiceRequestedEventHandler { diff --git a/crates/libs/windows/src/Windows/Media/SpeechRecognition/impl.rs b/crates/libs/windows/src/Windows/Media/SpeechRecognition/impl.rs index 495c0685d3..1bd614d29f 100644 --- a/crates/libs/windows/src/Windows/Media/SpeechRecognition/impl.rs +++ b/crates/libs/windows/src/Windows/Media/SpeechRecognition/impl.rs @@ -44,7 +44,7 @@ impl ISpeechRecognitionConstraint_Vtbl { unsafe extern "system" fn SetTag(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetTag(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetTag(::core::mem::transmute(&value)).into() } unsafe extern "system" fn Type(this: *mut ::core::ffi::c_void, result__: *mut SpeechRecognitionConstraintType) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; diff --git a/crates/libs/windows/src/Windows/Media/impl.rs b/crates/libs/windows/src/Windows/Media/impl.rs index 705d38d2c9..8b35ebd08a 100644 --- a/crates/libs/windows/src/Windows/Media/impl.rs +++ b/crates/libs/windows/src/Windows/Media/impl.rs @@ -12,7 +12,7 @@ impl IMediaExtension_Vtbl { unsafe extern "system" fn SetProperties(this: *mut ::core::ffi::c_void, configuration: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetProperties(&*(&configuration as *const ::Abi as *const ::DefaultType)).into() + (*this).SetProperties(::core::mem::transmute(&configuration)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), SetProperties: SetProperties:: } } @@ -68,7 +68,7 @@ impl IMediaFrame_Vtbl { unsafe extern "system" fn SetRelativeTime(this: *mut ::core::ffi::c_void, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetRelativeTime(&*(&value as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetRelativeTime(::core::mem::transmute(&value)).into() } unsafe extern "system" fn RelativeTime(this: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -85,7 +85,7 @@ impl IMediaFrame_Vtbl { unsafe extern "system" fn SetSystemRelativeTime(this: *mut ::core::ffi::c_void, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetSystemRelativeTime(&*(&value as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetSystemRelativeTime(::core::mem::transmute(&value)).into() } unsafe extern "system" fn SystemRelativeTime(this: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -102,7 +102,7 @@ impl IMediaFrame_Vtbl { unsafe extern "system" fn SetDuration(this: *mut ::core::ffi::c_void, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetDuration(&*(&value as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetDuration(::core::mem::transmute(&value)).into() } unsafe extern "system" fn Duration(this: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; diff --git a/crates/libs/windows/src/Windows/Networking/BackgroundTransfer/impl.rs b/crates/libs/windows/src/Windows/Networking/BackgroundTransfer/impl.rs index 81d09db3ff..9a4eeaf980 100644 --- a/crates/libs/windows/src/Windows/Networking/BackgroundTransfer/impl.rs +++ b/crates/libs/windows/src/Windows/Networking/BackgroundTransfer/impl.rs @@ -22,7 +22,7 @@ impl IBackgroundTransferBase_Vtbl { unsafe extern "system" fn SetRequestHeader(this: *mut ::core::ffi::c_void, headername: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, headervalue: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetRequestHeader(&*(&headername as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), &*(&headervalue as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetRequestHeader(::core::mem::transmute(&headername), ::core::mem::transmute(&headervalue)).into() } unsafe extern "system" fn ServerCredential(this: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -39,7 +39,7 @@ impl IBackgroundTransferBase_Vtbl { unsafe extern "system" fn SetServerCredential(this: *mut ::core::ffi::c_void, credential: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetServerCredential(&*(&credential as *const ::Abi as *const ::DefaultType)).into() + (*this).SetServerCredential(::core::mem::transmute(&credential)).into() } unsafe extern "system" fn ProxyCredential(this: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -56,7 +56,7 @@ impl IBackgroundTransferBase_Vtbl { unsafe extern "system" fn SetProxyCredential(this: *mut ::core::ffi::c_void, credential: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetProxyCredential(&*(&credential as *const ::Abi as *const ::DefaultType)).into() + (*this).SetProxyCredential(::core::mem::transmute(&credential)).into() } unsafe extern "system" fn Method(this: *mut ::core::ffi::c_void, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -73,7 +73,7 @@ impl IBackgroundTransferBase_Vtbl { unsafe extern "system" fn SetMethod(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetMethod(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetMethod(::core::mem::transmute(&value)).into() } unsafe extern "system" fn Group(this: *mut ::core::ffi::c_void, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -90,7 +90,7 @@ impl IBackgroundTransferBase_Vtbl { unsafe extern "system" fn SetGroup(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetGroup(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetGroup(::core::mem::transmute(&value)).into() } unsafe extern "system" fn CostPolicy(this: *mut ::core::ffi::c_void, result__: *mut BackgroundTransferCostPolicy) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -140,7 +140,7 @@ impl IBackgroundTransferContentPartFactory_Vtbl { unsafe extern "system" fn CreateWithName(this: *mut ::core::ffi::c_void, name: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CreateWithName(&*(&name as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).CreateWithName(::core::mem::transmute(&name)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -152,7 +152,7 @@ impl IBackgroundTransferContentPartFactory_Vtbl { unsafe extern "system" fn CreateWithNameAndFileName(this: *mut ::core::ffi::c_void, name: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, filename: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CreateWithNameAndFileName(&*(&name as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), &*(&filename as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).CreateWithNameAndFileName(::core::mem::transmute(&name), ::core::mem::transmute(&filename)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/Networking/Connectivity/mod.rs b/crates/libs/windows/src/Windows/Networking/Connectivity/mod.rs index d970962c03..69c2a6b4f8 100644 --- a/crates/libs/windows/src/Windows/Networking/Connectivity/mod.rs +++ b/crates/libs/windows/src/Windows/Networking/Connectivity/mod.rs @@ -3295,7 +3295,7 @@ impl) -> ::windo } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender)).into() } } impl ::core::clone::Clone for NetworkStatusChangedEventHandler { diff --git a/crates/libs/windows/src/Windows/Networking/NetworkOperators/mod.rs b/crates/libs/windows/src/Windows/Networking/NetworkOperators/mod.rs index 7bdd55047f..ee47bb8b34 100644 --- a/crates/libs/windows/src/Windows/Networking/NetworkOperators/mod.rs +++ b/crates/libs/windows/src/Windows/Networking/NetworkOperators/mod.rs @@ -12295,7 +12295,7 @@ impl UssdMessage { } } #[doc = "*Required features: 'Networking_NetworkOperators'*"] - pub fn SetPayload(&self, value: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn SetPayload(&self, value: &[u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).SetPayload)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr())).ok() } } diff --git a/crates/libs/windows/src/Windows/Networking/Proximity/mod.rs b/crates/libs/windows/src/Windows/Networking/Proximity/mod.rs index 21261bd175..0ad48927bf 100644 --- a/crates/libs/windows/src/Windows/Networking/Proximity/mod.rs +++ b/crates/libs/windows/src/Windows/Networking/Proximity/mod.rs @@ -126,7 +126,7 @@ impl) -> ::windows::core::Resu } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender)).into() } } impl ::core::clone::Clone for DeviceArrivedEventHandler { @@ -204,7 +204,7 @@ impl) -> ::windows::core::Resu } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender)).into() } } impl ::core::clone::Clone for DeviceDepartedEventHandler { @@ -573,7 +573,7 @@ impl, &::core::option::Option< } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: ::windows::core::RawPtr, message: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const ::Abi as *const ::DefaultType), &*(&message as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&message)).into() } } impl ::core::clone::Clone for MessageReceivedHandler { @@ -651,7 +651,7 @@ impl, i64) -> ::windows::core: } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: ::windows::core::RawPtr, messageid: i64) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const ::Abi as *const ::DefaultType), messageid).into() + ((*this).invoke)(::core::mem::transmute(&sender), messageid).into() } } impl ::core::clone::Clone for MessageTransmittedHandler { 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 369aa66118..8fbcb3a5ec 100644 --- a/crates/libs/windows/src/Windows/Networking/ServiceDiscovery/Dnssd/mod.rs +++ b/crates/libs/windows/src/Windows/Networking/ServiceDiscovery/Dnssd/mod.rs @@ -447,7 +447,7 @@ impl DnssdServiceInstanceCollection { } #[doc = "*Required features: 'Networking_ServiceDiscovery_Dnssd', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Networking/Sockets/impl.rs b/crates/libs/windows/src/Windows/Networking/Sockets/impl.rs index af97aee4d8..b8e4b6786d 100644 --- a/crates/libs/windows/src/Windows/Networking/Sockets/impl.rs +++ b/crates/libs/windows/src/Windows/Networking/Sockets/impl.rs @@ -115,7 +115,7 @@ impl IWebSocket_Vtbl { unsafe extern "system" fn ConnectAsync(this: *mut ::core::ffi::c_void, uri: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).ConnectAsync(&*(&uri as *const ::Abi as *const ::DefaultType)) { + match (*this).ConnectAsync(::core::mem::transmute(&uri)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -127,12 +127,12 @@ impl IWebSocket_Vtbl { unsafe extern "system" fn SetRequestHeader(this: *mut ::core::ffi::c_void, headername: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, headervalue: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetRequestHeader(&*(&headername as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), &*(&headervalue as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetRequestHeader(::core::mem::transmute(&headername), ::core::mem::transmute(&headervalue)).into() } unsafe extern "system" fn Closed(this: *mut ::core::ffi::c_void, eventhandler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).Closed(&*(&eventhandler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).Closed(::core::mem::transmute(&eventhandler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -144,12 +144,12 @@ impl IWebSocket_Vtbl { unsafe extern "system" fn RemoveClosed(this: *mut ::core::ffi::c_void, eventcookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveClosed(&*(&eventcookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveClosed(::core::mem::transmute(&eventcookie)).into() } unsafe extern "system" fn CloseWithStatus(this: *mut ::core::ffi::c_void, code: u16, reason: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).CloseWithStatus(code, &*(&reason as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).CloseWithStatus(code, ::core::mem::transmute(&reason)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -214,7 +214,7 @@ impl IWebSocketControl_Vtbl { unsafe extern "system" fn SetServerCredential(this: *mut ::core::ffi::c_void, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetServerCredential(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetServerCredential(::core::mem::transmute(&value)).into() } unsafe extern "system" fn ProxyCredential(this: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -231,7 +231,7 @@ impl IWebSocketControl_Vtbl { unsafe extern "system" fn SetProxyCredential(this: *mut ::core::ffi::c_void, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetProxyCredential(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetProxyCredential(::core::mem::transmute(&value)).into() } unsafe extern "system" fn SupportedProtocols(this: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; diff --git a/crates/libs/windows/src/Windows/Networking/Vpn/impl.rs b/crates/libs/windows/src/Windows/Networking/Vpn/impl.rs index 603be53fd8..3b198cfe13 100644 --- a/crates/libs/windows/src/Windows/Networking/Vpn/impl.rs +++ b/crates/libs/windows/src/Windows/Networking/Vpn/impl.rs @@ -9,7 +9,7 @@ impl IVpnChannelStatics_Vtbl { unsafe extern "system" fn ProcessEventAsync(this: *mut ::core::ffi::c_void, thirdpartyplugin: *mut ::core::ffi::c_void, event: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).ProcessEventAsync(&*(&thirdpartyplugin as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&event as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)).into() + (*this).ProcessEventAsync(::core::mem::transmute(&thirdpartyplugin), ::core::mem::transmute(&event)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -110,7 +110,7 @@ impl IVpnCustomPrompt_Vtbl { unsafe extern "system" fn SetLabel(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetLabel(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetLabel(::core::mem::transmute(&value)).into() } unsafe extern "system" fn Label(this: *mut ::core::ffi::c_void, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -188,7 +188,7 @@ impl IVpnCustomPromptElement_Vtbl { unsafe extern "system" fn SetDisplayName(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetDisplayName(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetDisplayName(::core::mem::transmute(&value)).into() } unsafe extern "system" fn DisplayName(this: *mut ::core::ffi::c_void, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -264,12 +264,7 @@ impl IVpnDomainNameInfoFactory_Vtbl { unsafe extern "system" fn CreateVpnDomainNameInfo(this: *mut ::core::ffi::c_void, name: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, nametype: VpnDomainNameType, dnsserverlist: ::windows::core::RawPtr, proxyserverlist: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CreateVpnDomainNameInfo( - &*(&name as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), - nametype, - &*(&dnsserverlist as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType), - &*(&proxyserverlist as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType), - ) { + match (*this).CreateVpnDomainNameInfo(::core::mem::transmute(&name), nametype, ::core::mem::transmute(&dnsserverlist), ::core::mem::transmute(&proxyserverlist)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -288,7 +283,7 @@ impl IVpnDomainNameInfoFactory_Vtbl { } } pub trait IVpnInterfaceIdFactory_Impl: Sized { - fn CreateVpnInterfaceId(&mut self, address: &[::DefaultType]) -> ::windows::core::Result; + fn CreateVpnInterfaceId(&mut self, address: &[u8]) -> ::windows::core::Result; } impl ::windows::core::RuntimeName for IVpnInterfaceIdFactory { const NAME: &'static str = "Windows.Networking.Vpn.IVpnInterfaceIdFactory"; @@ -330,11 +325,7 @@ impl IVpnNamespaceInfoFactory_Vtbl { unsafe extern "system" fn CreateVpnNamespaceInfo(this: *mut ::core::ffi::c_void, name: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, dnsserverlist: ::windows::core::RawPtr, proxyserverlist: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CreateVpnNamespaceInfo( - &*(&name as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), - &*(&dnsserverlist as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType), - &*(&proxyserverlist as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType), - ) { + match (*this).CreateVpnNamespaceInfo(::core::mem::transmute(&name), ::core::mem::transmute(&dnsserverlist), ::core::mem::transmute(&proxyserverlist)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -363,7 +354,7 @@ impl IVpnPacketBufferFactory_Vtbl { unsafe extern "system" fn CreateVpnPacketBuffer(this: *mut ::core::ffi::c_void, parentbuffer: ::windows::core::RawPtr, offset: u32, length: u32, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CreateVpnPacketBuffer(&*(&parentbuffer as *const ::Abi as *const ::DefaultType), offset, length) { + match (*this).CreateVpnPacketBuffer(::core::mem::transmute(&parentbuffer), offset, length) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -396,34 +387,27 @@ impl IVpnPlugIn_Vtbl { unsafe extern "system" fn Connect(this: *mut ::core::ffi::c_void, channel: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).Connect(&*(&channel as *const ::Abi as *const ::DefaultType)).into() + (*this).Connect(::core::mem::transmute(&channel)).into() } unsafe extern "system" fn Disconnect(this: *mut ::core::ffi::c_void, channel: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).Disconnect(&*(&channel as *const ::Abi as *const ::DefaultType)).into() + (*this).Disconnect(::core::mem::transmute(&channel)).into() } unsafe extern "system" fn GetKeepAlivePayload(this: *mut ::core::ffi::c_void, channel: ::windows::core::RawPtr, keepalivepacket: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).GetKeepAlivePayload(&*(&channel as *const ::Abi as *const ::DefaultType), ::core::mem::transmute_copy(&keepalivepacket)).into() + (*this).GetKeepAlivePayload(::core::mem::transmute(&channel), ::core::mem::transmute_copy(&keepalivepacket)).into() } unsafe extern "system" fn Encapsulate(this: *mut ::core::ffi::c_void, channel: ::windows::core::RawPtr, packets: ::windows::core::RawPtr, encapulatedpackets: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).Encapsulate(&*(&channel as *const ::Abi as *const ::DefaultType), &*(&packets as *const ::Abi as *const ::DefaultType), &*(&encapulatedpackets as *const ::Abi as *const ::DefaultType)).into() + (*this).Encapsulate(::core::mem::transmute(&channel), ::core::mem::transmute(&packets), ::core::mem::transmute(&encapulatedpackets)).into() } unsafe extern "system" fn Decapsulate(this: *mut ::core::ffi::c_void, channel: ::windows::core::RawPtr, encapbuffer: ::windows::core::RawPtr, decapsulatedpackets: ::windows::core::RawPtr, controlpacketstosend: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this) - .Decapsulate( - &*(&channel as *const ::Abi as *const ::DefaultType), - &*(&encapbuffer as *const ::Abi as *const ::DefaultType), - &*(&decapsulatedpackets as *const ::Abi as *const ::DefaultType), - &*(&controlpacketstosend as *const ::Abi as *const ::DefaultType), - ) - .into() + (*this).Decapsulate(::core::mem::transmute(&channel), ::core::mem::transmute(&encapbuffer), ::core::mem::transmute(&decapsulatedpackets), ::core::mem::transmute(&controlpacketstosend)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -473,7 +457,7 @@ impl IVpnProfile_Vtbl { unsafe extern "system" fn SetProfileName(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetProfileName(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetProfileName(::core::mem::transmute(&value)).into() } unsafe extern "system" fn AppTriggers(this: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -586,7 +570,7 @@ impl IVpnRouteFactory_Vtbl { unsafe extern "system" fn CreateVpnRoute(this: *mut ::core::ffi::c_void, address: ::windows::core::RawPtr, prefixsize: u8, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CreateVpnRoute(&*(&address as *const ::Abi as *const ::DefaultType), prefixsize) { + match (*this).CreateVpnRoute(::core::mem::transmute(&address), prefixsize) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/Networking/Vpn/mod.rs b/crates/libs/windows/src/Windows/Networking/Vpn/mod.rs index 8535b307d8..c14e76a66f 100644 --- a/crates/libs/windows/src/Windows/Networking/Vpn/mod.rs +++ b/crates/libs/windows/src/Windows/Networking/Vpn/mod.rs @@ -1018,7 +1018,7 @@ pub struct IVpnInterfaceId_Vtbl { pub struct IVpnInterfaceIdFactory(::windows::core::IUnknown); impl IVpnInterfaceIdFactory { #[doc = "*Required features: 'Networking_Vpn'*"] - pub fn CreateVpnInterfaceId(&self, address: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateVpnInterfaceId(&self, address: &[u8]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); @@ -5212,7 +5212,7 @@ impl VpnInterfaceId { unsafe { (::windows::core::Interface::vtable(this).GetAddressInfo)(::core::mem::transmute_copy(this), id.set_abi_len(), id as *mut _ as _).ok() } } #[doc = "*Required features: 'Networking_Vpn'*"] - pub fn CreateVpnInterfaceId(address: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateVpnInterfaceId(address: &[u8]) -> ::windows::core::Result { Self::IVpnInterfaceIdFactory(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateVpnInterfaceId)(::core::mem::transmute_copy(this), address.len() as u32, ::core::mem::transmute(address.as_ptr()), &mut result__).from_abi::(result__) diff --git a/crates/libs/windows/src/Windows/Networking/XboxLive/mod.rs b/crates/libs/windows/src/Windows/Networking/XboxLive/mod.rs index 1407edb41d..c005c4dcf6 100644 --- a/crates/libs/windows/src/Windows/Networking/XboxLive/mod.rs +++ b/crates/libs/windows/src/Windows/Networking/XboxLive/mod.rs @@ -351,7 +351,7 @@ impl XboxLiveDeviceAddress { } } #[doc = "*Required features: 'Networking_XboxLive'*"] - pub fn GetSnapshotAsBytes(&self, buffer: &mut [::DefaultType], byteswritten: &mut u32) -> ::windows::core::Result<()> { + pub fn GetSnapshotAsBytes(&self, buffer: &mut [u8], byteswritten: &mut u32) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).GetSnapshotAsBytes)(::core::mem::transmute_copy(this), buffer.len() as u32, ::core::mem::transmute_copy(&buffer), byteswritten).ok() } } @@ -403,7 +403,7 @@ impl XboxLiveDeviceAddress { }) } #[doc = "*Required features: 'Networking_XboxLive'*"] - pub fn CreateFromSnapshotBytes(buffer: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateFromSnapshotBytes(buffer: &[u8]) -> ::windows::core::Result { Self::IXboxLiveDeviceAddressStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromSnapshotBytes)(::core::mem::transmute_copy(this), buffer.len() as u32, ::core::mem::transmute(buffer.as_ptr()), &mut result__).from_abi::(result__) @@ -526,12 +526,12 @@ impl XboxLiveEndpointPair { } } #[doc = "*Required features: 'Networking_XboxLive'*"] - pub fn GetRemoteSocketAddressBytes(&self, socketaddress: &mut [::DefaultType]) -> ::windows::core::Result<()> { + pub fn GetRemoteSocketAddressBytes(&self, socketaddress: &mut [u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).GetRemoteSocketAddressBytes)(::core::mem::transmute_copy(this), socketaddress.len() as u32, ::core::mem::transmute_copy(&socketaddress)).ok() } } #[doc = "*Required features: 'Networking_XboxLive'*"] - pub fn GetLocalSocketAddressBytes(&self, socketaddress: &mut [::DefaultType]) -> ::windows::core::Result<()> { + pub fn GetLocalSocketAddressBytes(&self, socketaddress: &mut [u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).GetLocalSocketAddressBytes)(::core::mem::transmute_copy(this), socketaddress.len() as u32, ::core::mem::transmute_copy(&socketaddress)).ok() } } @@ -592,7 +592,7 @@ impl XboxLiveEndpointPair { } } #[doc = "*Required features: 'Networking_XboxLive'*"] - pub fn FindEndpointPairBySocketAddressBytes(localsocketaddress: &[::DefaultType], remotesocketaddress: &[::DefaultType]) -> ::windows::core::Result { + pub fn FindEndpointPairBySocketAddressBytes(localsocketaddress: &[u8], remotesocketaddress: &[u8]) -> ::windows::core::Result { Self::IXboxLiveEndpointPairStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).FindEndpointPairBySocketAddressBytes)(::core::mem::transmute_copy(this), localsocketaddress.len() as u32, ::core::mem::transmute(localsocketaddress.as_ptr()), remotesocketaddress.len() as u32, ::core::mem::transmute(remotesocketaddress.as_ptr()), &mut result__).from_abi::(result__) @@ -1466,7 +1466,7 @@ impl XboxLiveQualityOfServiceMeasurement { } } #[doc = "*Required features: 'Networking_XboxLive'*"] - pub fn PublishPrivatePayloadBytes(payload: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn PublishPrivatePayloadBytes(payload: &[u8]) -> ::windows::core::Result<()> { Self::IXboxLiveQualityOfServiceMeasurementStatics(|this| unsafe { (::windows::core::Interface::vtable(this).PublishPrivatePayloadBytes)(::core::mem::transmute_copy(this), payload.len() as u32, ::core::mem::transmute(payload.as_ptr())).ok() }) } #[doc = "*Required features: 'Networking_XboxLive'*"] diff --git a/crates/libs/windows/src/Windows/Perception/People/mod.rs b/crates/libs/windows/src/Windows/Perception/People/mod.rs index 49e9ecf2e0..2c69dc7af7 100644 --- a/crates/libs/windows/src/Windows/Perception/People/mod.rs +++ b/crates/libs/windows/src/Windows/Perception/People/mod.rs @@ -204,7 +204,7 @@ impl HandMeshObserver { } } #[doc = "*Required features: 'Perception_People'*"] - pub fn GetTriangleIndices(&self, indices: &mut [::DefaultType]) -> ::windows::core::Result<()> { + pub fn GetTriangleIndices(&self, indices: &mut [u16]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).GetTriangleIndices)(::core::mem::transmute_copy(this), indices.len() as u32, ::core::mem::transmute_copy(&indices)).ok() } } @@ -371,7 +371,7 @@ impl HandMeshVertexState { } #[doc = "*Required features: 'Perception_People', 'Foundation_Numerics'*"] #[cfg(feature = "Foundation_Numerics")] - pub fn GetVertices(&self, vertices: &mut [::DefaultType]) -> ::windows::core::Result<()> { + pub fn GetVertices(&self, vertices: &mut [HandMeshVertex]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).GetVertices)(::core::mem::transmute_copy(this), vertices.len() as u32, ::core::mem::transmute_copy(&vertices)).ok() } } @@ -467,7 +467,7 @@ impl HandPose { } #[doc = "*Required features: 'Perception_People', 'Foundation_Numerics', 'Perception_Spatial'*"] #[cfg(all(feature = "Foundation_Numerics", feature = "Perception_Spatial"))] - pub fn TryGetJoints<'a, Param0: ::windows::core::IntoParam<'a, super::Spatial::SpatialCoordinateSystem>>(&self, coordinatesystem: Param0, joints: &[::DefaultType], jointposes: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn TryGetJoints<'a, Param0: ::windows::core::IntoParam<'a, super::Spatial::SpatialCoordinateSystem>>(&self, coordinatesystem: Param0, joints: &[HandJointKind], jointposes: &mut [JointPose]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); @@ -485,7 +485,7 @@ impl HandPose { } #[doc = "*Required features: 'Perception_People', 'Foundation_Numerics'*"] #[cfg(feature = "Foundation_Numerics")] - pub fn GetRelativeJoints(&self, joints: &[::DefaultType], referencejoints: &[::DefaultType], jointposes: &mut [::DefaultType]) -> ::windows::core::Result<()> { + pub fn GetRelativeJoints(&self, joints: &[HandJointKind], referencejoints: &[HandJointKind], jointposes: &mut [JointPose]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).GetRelativeJoints)(::core::mem::transmute_copy(this), joints.len() as u32, ::core::mem::transmute(joints.as_ptr()), referencejoints.len() as u32, ::core::mem::transmute(referencejoints.as_ptr()), jointposes.len() as u32, ::core::mem::transmute_copy(&jointposes)).ok() } } diff --git a/crates/libs/windows/src/Windows/Phone/PersonalInformation/impl.rs b/crates/libs/windows/src/Windows/Phone/PersonalInformation/impl.rs index 90fcf791a9..76d24154ff 100644 --- a/crates/libs/windows/src/Windows/Phone/PersonalInformation/impl.rs +++ b/crates/libs/windows/src/Windows/Phone/PersonalInformation/impl.rs @@ -39,7 +39,7 @@ impl IContactInformation_Vtbl { unsafe extern "system" fn SetDisplayName(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetDisplayName(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetDisplayName(::core::mem::transmute(&value)).into() } unsafe extern "system" fn FamilyName(this: *mut ::core::ffi::c_void, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -56,7 +56,7 @@ impl IContactInformation_Vtbl { unsafe extern "system" fn SetFamilyName(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetFamilyName(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetFamilyName(::core::mem::transmute(&value)).into() } unsafe extern "system" fn GivenName(this: *mut ::core::ffi::c_void, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -73,7 +73,7 @@ impl IContactInformation_Vtbl { unsafe extern "system" fn SetGivenName(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetGivenName(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetGivenName(::core::mem::transmute(&value)).into() } unsafe extern "system" fn HonorificPrefix(this: *mut ::core::ffi::c_void, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -90,7 +90,7 @@ impl IContactInformation_Vtbl { unsafe extern "system" fn SetHonorificPrefix(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetHonorificPrefix(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetHonorificPrefix(::core::mem::transmute(&value)).into() } unsafe extern "system" fn HonorificSuffix(this: *mut ::core::ffi::c_void, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -107,7 +107,7 @@ impl IContactInformation_Vtbl { unsafe extern "system" fn SetHonorificSuffix(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetHonorificSuffix(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetHonorificSuffix(::core::mem::transmute(&value)).into() } unsafe extern "system" fn GetDisplayPictureAsync(this: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -124,7 +124,7 @@ impl IContactInformation_Vtbl { unsafe extern "system" fn SetDisplayPictureAsync(this: *mut ::core::ffi::c_void, stream: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).SetDisplayPictureAsync(&*(&stream as *const ::Abi as *const ::DefaultType)) { + match (*this).SetDisplayPictureAsync(::core::mem::transmute(&stream)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -232,7 +232,7 @@ impl IContactInformation2_Vtbl { unsafe extern "system" fn SetDisplayPictureDate(this: *mut ::core::ffi::c_void, returnvalue: super::super::Foundation::DateTime) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetDisplayPictureDate(&*(&returnvalue as *const ::Abi as *const ::DefaultType)).into() + (*this).SetDisplayPictureDate(::core::mem::transmute(&returnvalue)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Phone/StartScreen/impl.rs b/crates/libs/windows/src/Windows/Phone/StartScreen/impl.rs index a11d743988..c87f3c3b8a 100644 --- a/crates/libs/windows/src/Windows/Phone/StartScreen/impl.rs +++ b/crates/libs/windows/src/Windows/Phone/StartScreen/impl.rs @@ -12,7 +12,7 @@ impl IToastNotificationManagerStatics3_Vtbl { unsafe extern "system" fn CreateToastNotifierForSecondaryTile(this: *mut ::core::ffi::c_void, tileid: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CreateToastNotifierForSecondaryTile(&*(&tileid as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).CreateToastNotifierForSecondaryTile(::core::mem::transmute(&tileid)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/Security/Authentication/Web/Provider/impl.rs b/crates/libs/windows/src/Windows/Security/Authentication/Web/Provider/impl.rs index fb0d7910bd..67cd019229 100644 --- a/crates/libs/windows/src/Windows/Security/Authentication/Web/Provider/impl.rs +++ b/crates/libs/windows/src/Windows/Security/Authentication/Web/Provider/impl.rs @@ -18,7 +18,7 @@ impl IWebAccountProviderBaseReportOperation_Vtbl { unsafe extern "system" fn ReportError(this: *mut ::core::ffi::c_void, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).ReportError(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).ReportError(::core::mem::transmute(&value)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -76,7 +76,7 @@ impl IWebAccountProviderSilentReportOperation_Vtbl { unsafe extern "system" fn ReportUserInteractionRequiredWithError(this: *mut ::core::ffi::c_void, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).ReportUserInteractionRequiredWithError(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).ReportUserInteractionRequiredWithError(::core::mem::transmute(&value)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -187,7 +187,7 @@ impl IWebAccountProviderTokenOperation_Vtbl { unsafe extern "system" fn SetCacheExpirationTime(this: *mut ::core::ffi::c_void, value: super::super::super::super::Foundation::DateTime) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetCacheExpirationTime(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetCacheExpirationTime(::core::mem::transmute(&value)).into() } unsafe extern "system" fn CacheExpirationTime(this: *mut ::core::ffi::c_void, result__: *mut super::super::super::super::Foundation::DateTime) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; 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 c957ac72df..6e8ed8ea30 100644 --- a/crates/libs/windows/src/Windows/Security/Cryptography/Certificates/mod.rs +++ b/crates/libs/windows/src/Windows/Security/Cryptography/Certificates/mod.rs @@ -533,7 +533,7 @@ impl CertificateExtension { } } #[doc = "*Required features: 'Security_Cryptography_Certificates'*"] - pub fn SetValue(&self, value: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn SetValue(&self, value: &[u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).SetValue)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr())).ok() } } @@ -845,7 +845,7 @@ impl CertificateQuery { } } #[doc = "*Required features: 'Security_Cryptography_Certificates'*"] - pub fn SetThumbprint(&self, value: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn SetThumbprint(&self, value: &[u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).SetThumbprint)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr())).ok() } } @@ -1159,7 +1159,7 @@ impl CertificateRequestProperties { } } #[doc = "*Required features: 'Security_Cryptography_Certificates'*"] - pub fn SetCurveParameters(&self, value: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn SetCurveParameters(&self, value: &[u8]) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::(self)?; unsafe { (::windows::core::Interface::vtable(this).SetCurveParameters)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr())).ok() } } 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 6bb9004337..72edddb1ce 100644 --- a/crates/libs/windows/src/Windows/Security/Cryptography/Core/mod.rs +++ b/crates/libs/windows/src/Windows/Security/Cryptography/Core/mod.rs @@ -228,7 +228,7 @@ impl AsymmetricKeyAlgorithmProvider { } } #[doc = "*Required features: 'Security_Cryptography_Core'*"] - pub fn CreateKeyPairWithCurveParameters(&self, parameters: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateKeyPairWithCurveParameters(&self, parameters: &[u8]) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::(self)?; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Security/Cryptography/mod.rs b/crates/libs/windows/src/Windows/Security/Cryptography/mod.rs index 82c1e28ac9..f4727d1995 100644 --- a/crates/libs/windows/src/Windows/Security/Cryptography/mod.rs +++ b/crates/libs/windows/src/Windows/Security/Cryptography/mod.rs @@ -67,7 +67,7 @@ impl CryptographicBuffer { } #[doc = "*Required features: 'Security_Cryptography', 'Storage_Streams'*"] #[cfg(feature = "Storage_Streams")] - pub fn CreateFromByteArray(value: &[::DefaultType]) -> ::windows::core::Result { + pub fn CreateFromByteArray(value: &[u8]) -> ::windows::core::Result { Self::ICryptographicBufferStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateFromByteArray)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::(result__) diff --git a/crates/libs/windows/src/Windows/Security/Isolation/mod.rs b/crates/libs/windows/src/Windows/Security/Isolation/mod.rs index bf5786e26b..309503a3a0 100644 --- a/crates/libs/windows/src/Windows/Security/Isolation/mod.rs +++ b/crates/libs/windows/src/Windows/Security/Isolation/mod.rs @@ -50,7 +50,7 @@ impl ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&receiverid as *const <::windows::core::GUID as ::windows::core::Abi>::Abi as *const <::windows::core::GUID as ::windows::core::DefaultType>::DefaultType), &*(&message as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&receiverid), ::core::mem::transmute(&message)).into() } } #[cfg(feature = "Foundation_Collections")] @@ -3121,7 +3121,7 @@ impl ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&receiverid as *const <::windows::core::GUID as ::windows::core::Abi>::Abi as *const <::windows::core::GUID as ::windows::core::DefaultType>::DefaultType), &*(&message as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&receiverid), ::core::mem::transmute(&message)).into() } } #[cfg(feature = "Foundation_Collections")] diff --git a/crates/libs/windows/src/Windows/Storage/AccessCache/impl.rs b/crates/libs/windows/src/Windows/Storage/AccessCache/impl.rs index 1fb9c82f0d..835dde695d 100644 --- a/crates/libs/windows/src/Windows/Storage/AccessCache/impl.rs +++ b/crates/libs/windows/src/Windows/Storage/AccessCache/impl.rs @@ -27,7 +27,7 @@ impl IStorageItemAccessList_Vtbl { unsafe extern "system" fn AddOverloadDefaultMetadata(this: *mut ::core::ffi::c_void, file: ::windows::core::RawPtr, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).AddOverloadDefaultMetadata(&*(&file as *const ::Abi as *const ::DefaultType)) { + match (*this).AddOverloadDefaultMetadata(::core::mem::transmute(&file)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -39,7 +39,7 @@ impl IStorageItemAccessList_Vtbl { unsafe extern "system" fn Add(this: *mut ::core::ffi::c_void, file: ::windows::core::RawPtr, metadata: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).Add(&*(&file as *const ::Abi as *const ::DefaultType), &*(&metadata as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).Add(::core::mem::transmute(&file), ::core::mem::transmute(&metadata)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -51,19 +51,17 @@ impl IStorageItemAccessList_Vtbl { unsafe extern "system" fn AddOrReplaceOverloadDefaultMetadata(this: *mut ::core::ffi::c_void, token: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, file: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).AddOrReplaceOverloadDefaultMetadata(&*(&token as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), &*(&file as *const ::Abi as *const ::DefaultType)).into() + (*this).AddOrReplaceOverloadDefaultMetadata(::core::mem::transmute(&token), ::core::mem::transmute(&file)).into() } unsafe extern "system" fn AddOrReplace(this: *mut ::core::ffi::c_void, token: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, file: ::windows::core::RawPtr, metadata: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this) - .AddOrReplace(&*(&token as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), &*(&file as *const ::Abi as *const ::DefaultType), &*(&metadata as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) - .into() + (*this).AddOrReplace(::core::mem::transmute(&token), ::core::mem::transmute(&file), ::core::mem::transmute(&metadata)).into() } unsafe extern "system" fn GetItemAsync(this: *mut ::core::ffi::c_void, token: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetItemAsync(&*(&token as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).GetItemAsync(::core::mem::transmute(&token)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -75,7 +73,7 @@ impl IStorageItemAccessList_Vtbl { unsafe extern "system" fn GetFileAsync(this: *mut ::core::ffi::c_void, token: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetFileAsync(&*(&token as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).GetFileAsync(::core::mem::transmute(&token)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -87,7 +85,7 @@ impl IStorageItemAccessList_Vtbl { unsafe extern "system" fn GetFolderAsync(this: *mut ::core::ffi::c_void, token: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetFolderAsync(&*(&token as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).GetFolderAsync(::core::mem::transmute(&token)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -99,7 +97,7 @@ impl IStorageItemAccessList_Vtbl { unsafe extern "system" fn GetItemWithOptionsAsync(this: *mut ::core::ffi::c_void, token: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, options: AccessCacheOptions, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetItemWithOptionsAsync(&*(&token as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), options) { + match (*this).GetItemWithOptionsAsync(::core::mem::transmute(&token), options) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -111,7 +109,7 @@ impl IStorageItemAccessList_Vtbl { unsafe extern "system" fn GetFileWithOptionsAsync(this: *mut ::core::ffi::c_void, token: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, options: AccessCacheOptions, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetFileWithOptionsAsync(&*(&token as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), options) { + match (*this).GetFileWithOptionsAsync(::core::mem::transmute(&token), options) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -123,7 +121,7 @@ impl IStorageItemAccessList_Vtbl { unsafe extern "system" fn GetFolderWithOptionsAsync(this: *mut ::core::ffi::c_void, token: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, options: AccessCacheOptions, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetFolderWithOptionsAsync(&*(&token as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), options) { + match (*this).GetFolderWithOptionsAsync(::core::mem::transmute(&token), options) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -135,12 +133,12 @@ impl IStorageItemAccessList_Vtbl { unsafe extern "system" fn Remove(this: *mut ::core::ffi::c_void, token: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).Remove(&*(&token as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).Remove(::core::mem::transmute(&token)).into() } unsafe extern "system" fn ContainsItem(this: *mut ::core::ffi::c_void, token: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).ContainsItem(&*(&token as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).ContainsItem(::core::mem::transmute(&token)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -157,7 +155,7 @@ impl IStorageItemAccessList_Vtbl { unsafe extern "system" fn CheckAccess(this: *mut ::core::ffi::c_void, file: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CheckAccess(&*(&file as *const ::Abi as *const ::DefaultType)) { + match (*this).CheckAccess(::core::mem::transmute(&file)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/Storage/AccessCache/mod.rs b/crates/libs/windows/src/Windows/Storage/AccessCache/mod.rs index 6f320b1919..35067098dc 100644 --- a/crates/libs/windows/src/Windows/Storage/AccessCache/mod.rs +++ b/crates/libs/windows/src/Windows/Storage/AccessCache/mod.rs @@ -143,7 +143,7 @@ impl AccessListEntryView { } #[doc = "*Required features: 'Storage_AccessCache', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [AccessListEntry]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Storage/BulkAccess/impl.rs b/crates/libs/windows/src/Windows/Storage/BulkAccess/impl.rs index 4bb0c4ca1c..abffdea808 100644 --- a/crates/libs/windows/src/Windows/Storage/BulkAccess/impl.rs +++ b/crates/libs/windows/src/Windows/Storage/BulkAccess/impl.rs @@ -93,7 +93,7 @@ impl IStorageItemInformation_Vtbl { unsafe extern "system" fn ThumbnailUpdated(this: *mut ::core::ffi::c_void, changedhandler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).ThumbnailUpdated(&*(&changedhandler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).ThumbnailUpdated(::core::mem::transmute(&changedhandler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -105,12 +105,12 @@ impl IStorageItemInformation_Vtbl { unsafe extern "system" fn RemoveThumbnailUpdated(this: *mut ::core::ffi::c_void, eventcookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveThumbnailUpdated(&*(&eventcookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveThumbnailUpdated(::core::mem::transmute(&eventcookie)).into() } unsafe extern "system" fn PropertiesUpdated(this: *mut ::core::ffi::c_void, changedhandler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).PropertiesUpdated(&*(&changedhandler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).PropertiesUpdated(::core::mem::transmute(&changedhandler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -122,7 +122,7 @@ impl IStorageItemInformation_Vtbl { unsafe extern "system" fn RemovePropertiesUpdated(this: *mut ::core::ffi::c_void, eventcookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemovePropertiesUpdated(&*(&eventcookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemovePropertiesUpdated(::core::mem::transmute(&eventcookie)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Storage/FileProperties/impl.rs b/crates/libs/windows/src/Windows/Storage/FileProperties/impl.rs index 06570a14ab..c6d1ae4856 100644 --- a/crates/libs/windows/src/Windows/Storage/FileProperties/impl.rs +++ b/crates/libs/windows/src/Windows/Storage/FileProperties/impl.rs @@ -14,7 +14,7 @@ impl IStorageItemExtraProperties_Vtbl { unsafe extern "system" fn RetrievePropertiesAsync(this: *mut ::core::ffi::c_void, propertiestoretrieve: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).RetrievePropertiesAsync(&*(&propertiestoretrieve as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).RetrievePropertiesAsync(::core::mem::transmute(&propertiestoretrieve)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -26,7 +26,7 @@ impl IStorageItemExtraProperties_Vtbl { unsafe extern "system" fn SavePropertiesAsync(this: *mut ::core::ffi::c_void, propertiestosave: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).SavePropertiesAsync(&*(&propertiestosave as *const > as ::windows::core::Abi>::Abi as *const > as ::windows::core::DefaultType>::DefaultType)) { + match (*this).SavePropertiesAsync(::core::mem::transmute(&propertiestosave)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/Storage/Pickers/mod.rs b/crates/libs/windows/src/Windows/Storage/Pickers/mod.rs index 9c9f19e75c..52aef7ebcd 100644 --- a/crates/libs/windows/src/Windows/Storage/Pickers/mod.rs +++ b/crates/libs/windows/src/Windows/Storage/Pickers/mod.rs @@ -90,7 +90,7 @@ impl FileExtensionVector { } #[doc = "*Required features: 'Storage_Pickers', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [<::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::windows::core::HSTRING]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -99,7 +99,7 @@ impl FileExtensionVector { } #[doc = "*Required features: 'Storage_Pickers', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[<::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::windows::core::HSTRING]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -751,7 +751,7 @@ impl FilePickerSelectedFilesArray { } #[doc = "*Required features: 'Storage_Pickers', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Storage/Provider/impl.rs b/crates/libs/windows/src/Windows/Storage/Provider/impl.rs index fb25ba838e..7e4bdafaed 100644 --- a/crates/libs/windows/src/Windows/Storage/Provider/impl.rs +++ b/crates/libs/windows/src/Windows/Storage/Provider/impl.rs @@ -9,7 +9,7 @@ impl IStorageProviderHandlerFactory_Vtbl { unsafe extern "system" fn GetStatusSource(this: *mut ::core::ffi::c_void, syncrootid: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetStatusSource(&*(&syncrootid as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).GetStatusSource(::core::mem::transmute(&syncrootid)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -41,7 +41,7 @@ impl IStorageProviderItemPropertySource_Vtbl { unsafe extern "system" fn GetItemProperties(this: *mut ::core::ffi::c_void, itempath: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetItemProperties(&*(&itempath as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).GetItemProperties(::core::mem::transmute(&itempath)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -70,7 +70,7 @@ impl IStorageProviderPropertyCapabilities_Vtbl { unsafe extern "system" fn IsPropertySupported(this: *mut ::core::ffi::c_void, propertycanonicalname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).IsPropertySupported(&*(&propertycanonicalname as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).IsPropertySupported(::core::mem::transmute(&propertycanonicalname)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -116,7 +116,7 @@ impl IStorageProviderStatusSource_Vtbl { unsafe extern "system" fn Changed(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).Changed(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).Changed(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -128,7 +128,7 @@ impl IStorageProviderStatusSource_Vtbl { unsafe extern "system" fn RemoveChanged(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveChanged(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveChanged(::core::mem::transmute(&token)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -153,12 +153,12 @@ impl IStorageProviderUriSource_Vtbl { unsafe extern "system" fn GetPathForContentUri(this: *mut ::core::ffi::c_void, contenturi: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).GetPathForContentUri(&*(&contenturi as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), &*(&result as *const ::Abi as *const ::DefaultType)).into() + (*this).GetPathForContentUri(::core::mem::transmute(&contenturi), ::core::mem::transmute(&result)).into() } unsafe extern "system" fn GetContentInfoForPath(this: *mut ::core::ffi::c_void, path: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).GetContentInfoForPath(&*(&path as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), &*(&result as *const ::Abi as *const ::DefaultType)).into() + (*this).GetContentInfoForPath(::core::mem::transmute(&path), ::core::mem::transmute(&result)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Storage/Search/impl.rs b/crates/libs/windows/src/Windows/Storage/Search/impl.rs index a6c8d43cdd..adf679375d 100644 --- a/crates/libs/windows/src/Windows/Storage/Search/impl.rs +++ b/crates/libs/windows/src/Windows/Storage/Search/impl.rs @@ -30,7 +30,7 @@ impl IIndexableContent_Vtbl { unsafe extern "system" fn SetId(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetId(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetId(::core::mem::transmute(&value)).into() } unsafe extern "system" fn Properties(this: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -59,7 +59,7 @@ impl IIndexableContent_Vtbl { unsafe extern "system" fn SetStream(this: *mut ::core::ffi::c_void, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetStream(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetStream(::core::mem::transmute(&value)).into() } unsafe extern "system" fn StreamContentType(this: *mut ::core::ffi::c_void, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -76,7 +76,7 @@ impl IIndexableContent_Vtbl { unsafe extern "system" fn SetStreamContentType(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetStreamContentType(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetStreamContentType(::core::mem::transmute(&value)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -159,7 +159,7 @@ impl IStorageFolderQueryOperations_Vtbl { unsafe extern "system" fn CreateFileQueryWithOptions(this: *mut ::core::ffi::c_void, queryoptions: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CreateFileQueryWithOptions(&*(&queryoptions as *const ::Abi as *const ::DefaultType)) { + match (*this).CreateFileQueryWithOptions(::core::mem::transmute(&queryoptions)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -195,7 +195,7 @@ impl IStorageFolderQueryOperations_Vtbl { unsafe extern "system" fn CreateFolderQueryWithOptions(this: *mut ::core::ffi::c_void, queryoptions: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CreateFolderQueryWithOptions(&*(&queryoptions as *const ::Abi as *const ::DefaultType)) { + match (*this).CreateFolderQueryWithOptions(::core::mem::transmute(&queryoptions)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -219,7 +219,7 @@ impl IStorageFolderQueryOperations_Vtbl { unsafe extern "system" fn CreateItemQueryWithOptions(this: *mut ::core::ffi::c_void, queryoptions: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CreateItemQueryWithOptions(&*(&queryoptions as *const ::Abi as *const ::DefaultType)) { + match (*this).CreateItemQueryWithOptions(::core::mem::transmute(&queryoptions)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -291,7 +291,7 @@ impl IStorageFolderQueryOperations_Vtbl { unsafe extern "system" fn AreQueryOptionsSupported(this: *mut ::core::ffi::c_void, queryoptions: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).AreQueryOptionsSupported(&*(&queryoptions as *const ::Abi as *const ::DefaultType)) { + match (*this).AreQueryOptionsSupported(::core::mem::transmute(&queryoptions)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -395,7 +395,7 @@ impl IStorageQueryResultBase_Vtbl { unsafe extern "system" fn ContentsChanged(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).ContentsChanged(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).ContentsChanged(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -407,12 +407,12 @@ impl IStorageQueryResultBase_Vtbl { unsafe extern "system" fn RemoveContentsChanged(this: *mut ::core::ffi::c_void, eventcookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveContentsChanged(&*(&eventcookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveContentsChanged(::core::mem::transmute(&eventcookie)).into() } unsafe extern "system" fn OptionsChanged(this: *mut ::core::ffi::c_void, changedhandler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).OptionsChanged(&*(&changedhandler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).OptionsChanged(::core::mem::transmute(&changedhandler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -424,12 +424,12 @@ impl IStorageQueryResultBase_Vtbl { unsafe extern "system" fn RemoveOptionsChanged(this: *mut ::core::ffi::c_void, eventcookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveOptionsChanged(&*(&eventcookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveOptionsChanged(::core::mem::transmute(&eventcookie)).into() } unsafe extern "system" fn FindStartIndexAsync(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).FindStartIndexAsync(&*(&value as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)) { + match (*this).FindStartIndexAsync(::core::mem::transmute(&value)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -453,7 +453,7 @@ impl IStorageQueryResultBase_Vtbl { unsafe extern "system" fn ApplyNewQueryOptions(this: *mut ::core::ffi::c_void, newqueryoptions: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).ApplyNewQueryOptions(&*(&newqueryoptions as *const ::Abi as *const ::DefaultType)).into() + (*this).ApplyNewQueryOptions(::core::mem::transmute(&newqueryoptions)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Storage/Search/mod.rs b/crates/libs/windows/src/Windows/Storage/Search/mod.rs index 20105249ca..aa260f1797 100644 --- a/crates/libs/windows/src/Windows/Storage/Search/mod.rs +++ b/crates/libs/windows/src/Windows/Storage/Search/mod.rs @@ -1898,7 +1898,7 @@ impl SortEntryVector { } #[doc = "*Required features: 'Storage_Search', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [SortEntry]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -1907,7 +1907,7 @@ impl SortEntryVector { } #[doc = "*Required features: 'Storage_Search', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[SortEntry]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } diff --git a/crates/libs/windows/src/Windows/Storage/Streams/impl.rs b/crates/libs/windows/src/Windows/Storage/Streams/impl.rs index 0dbd430240..50fe566eee 100644 --- a/crates/libs/windows/src/Windows/Storage/Streams/impl.rs +++ b/crates/libs/windows/src/Windows/Storage/Streams/impl.rs @@ -84,7 +84,7 @@ pub trait IDataReader_Impl: Sized { fn InputStreamOptions(&mut self) -> ::windows::core::Result; fn SetInputStreamOptions(&mut self, value: InputStreamOptions) -> ::windows::core::Result<()>; fn ReadByte(&mut self) -> ::windows::core::Result; - fn ReadBytes(&mut self, value: &mut [::DefaultType]) -> ::windows::core::Result<()>; + fn ReadBytes(&mut self, value: &mut [u8]) -> ::windows::core::Result<()>; fn ReadBuffer(&mut self, length: u32) -> ::windows::core::Result; fn ReadBoolean(&mut self) -> ::windows::core::Result; fn ReadGuid(&mut self) -> ::windows::core::Result<::windows::core::GUID>; @@ -436,7 +436,7 @@ pub trait IDataWriter_Impl: Sized { fn ByteOrder(&mut self) -> ::windows::core::Result; fn SetByteOrder(&mut self, value: ByteOrder) -> ::windows::core::Result<()>; fn WriteByte(&mut self, value: u8) -> ::windows::core::Result<()>; - fn WriteBytes(&mut self, value: &[::DefaultType]) -> ::windows::core::Result<()>; + fn WriteBytes(&mut self, value: &[u8]) -> ::windows::core::Result<()>; fn WriteBuffer(&mut self, buffer: &::core::option::Option) -> ::windows::core::Result<()>; fn WriteBufferRange(&mut self, buffer: &::core::option::Option, start: u32, count: u32) -> ::windows::core::Result<()>; fn WriteBoolean(&mut self, value: bool) -> ::windows::core::Result<()>; @@ -524,12 +524,12 @@ impl IDataWriter_Vtbl { unsafe extern "system" fn WriteBuffer(this: *mut ::core::ffi::c_void, buffer: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).WriteBuffer(&*(&buffer as *const ::Abi as *const ::DefaultType)).into() + (*this).WriteBuffer(::core::mem::transmute(&buffer)).into() } unsafe extern "system" fn WriteBufferRange(this: *mut ::core::ffi::c_void, buffer: ::windows::core::RawPtr, start: u32, count: u32) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).WriteBufferRange(&*(&buffer as *const ::Abi as *const ::DefaultType), start, count).into() + (*this).WriteBufferRange(::core::mem::transmute(&buffer), start, count).into() } unsafe extern "system" fn WriteBoolean(this: *mut ::core::ffi::c_void, value: bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -539,7 +539,7 @@ impl IDataWriter_Vtbl { unsafe extern "system" fn WriteGuid(this: *mut ::core::ffi::c_void, value: ::windows::core::GUID) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).WriteGuid(&*(&value as *const <::windows::core::GUID as ::windows::core::Abi>::Abi as *const <::windows::core::GUID as ::windows::core::DefaultType>::DefaultType)).into() + (*this).WriteGuid(::core::mem::transmute(&value)).into() } unsafe extern "system" fn WriteInt16(this: *mut ::core::ffi::c_void, value: i16) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -584,17 +584,17 @@ impl IDataWriter_Vtbl { unsafe extern "system" fn WriteDateTime(this: *mut ::core::ffi::c_void, value: super::super::Foundation::DateTime) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).WriteDateTime(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).WriteDateTime(::core::mem::transmute(&value)).into() } unsafe extern "system" fn WriteTimeSpan(this: *mut ::core::ffi::c_void, value: super::super::Foundation::TimeSpan) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).WriteTimeSpan(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).WriteTimeSpan(::core::mem::transmute(&value)).into() } unsafe extern "system" fn WriteString(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut u32) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).WriteString(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).WriteString(::core::mem::transmute(&value)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -606,7 +606,7 @@ impl IDataWriter_Vtbl { unsafe extern "system" fn MeasureString(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut u32) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).MeasureString(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).MeasureString(::core::mem::transmute(&value)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -712,7 +712,7 @@ impl IInputStream_Vtbl { unsafe extern "system" fn ReadAsync(this: *mut ::core::ffi::c_void, buffer: ::windows::core::RawPtr, count: u32, options: InputStreamOptions, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).ReadAsync(&*(&buffer as *const ::Abi as *const ::DefaultType), count, options) { + match (*this).ReadAsync(::core::mem::transmute(&buffer), count, options) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -774,7 +774,7 @@ impl IOutputStream_Vtbl { unsafe extern "system" fn WriteAsync(this: *mut ::core::ffi::c_void, buffer: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).WriteAsync(&*(&buffer as *const ::Abi as *const ::DefaultType)) { + match (*this).WriteAsync(::core::mem::transmute(&buffer)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -820,7 +820,7 @@ impl IPropertySetSerializer_Vtbl { unsafe extern "system" fn Serialize(this: *mut ::core::ffi::c_void, propertyset: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).Serialize(&*(&propertyset as *const ::Abi as *const ::DefaultType)) { + match (*this).Serialize(::core::mem::transmute(&propertyset)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -832,7 +832,7 @@ impl IPropertySetSerializer_Vtbl { unsafe extern "system" fn Deserialize(this: *mut ::core::ffi::c_void, propertyset: ::windows::core::RawPtr, buffer: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).Deserialize(&*(&propertyset as *const ::Abi as *const ::DefaultType), &*(&buffer as *const ::Abi as *const ::DefaultType)).into() + (*this).Deserialize(::core::mem::transmute(&propertyset), ::core::mem::transmute(&buffer)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Storage/Streams/mod.rs b/crates/libs/windows/src/Windows/Storage/Streams/mod.rs index 5bf715e3f4..4b0d5bdf85 100644 --- a/crates/libs/windows/src/Windows/Storage/Streams/mod.rs +++ b/crates/libs/windows/src/Windows/Storage/Streams/mod.rs @@ -247,7 +247,7 @@ impl DataReader { } } #[doc = "*Required features: 'Storage_Streams'*"] - pub fn ReadBytes(&self, value: &mut [::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReadBytes(&self, value: &mut [u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).ReadBytes)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute_copy(&value)).ok() } } @@ -826,7 +826,7 @@ impl DataWriter { unsafe { (::windows::core::Interface::vtable(this).WriteByte)(::core::mem::transmute_copy(this), value).ok() } } #[doc = "*Required features: 'Storage_Streams'*"] - pub fn WriteBytes(&self, value: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn WriteBytes(&self, value: &[u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).WriteBytes)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr())).ok() } } @@ -2241,7 +2241,7 @@ impl IDataReader { } } #[doc = "*Required features: 'Storage_Streams'*"] - pub fn ReadBytes(&self, value: &mut [::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReadBytes(&self, value: &mut [u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).ReadBytes)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute_copy(&value)).ok() } } @@ -2558,7 +2558,7 @@ impl IDataWriter { unsafe { (::windows::core::Interface::vtable(this).WriteByte)(::core::mem::transmute_copy(this), value).ok() } } #[doc = "*Required features: 'Storage_Streams'*"] - pub fn WriteBytes(&self, value: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn WriteBytes(&self, value: &[u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).WriteBytes)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr())).ok() } } diff --git a/crates/libs/windows/src/Windows/Storage/impl.rs b/crates/libs/windows/src/Windows/Storage/impl.rs index c67b5287b5..f85bae51e4 100644 --- a/crates/libs/windows/src/Windows/Storage/impl.rs +++ b/crates/libs/windows/src/Windows/Storage/impl.rs @@ -71,7 +71,7 @@ impl IStorageFile_Vtbl { unsafe extern "system" fn CopyOverloadDefaultNameAndOptions(this: *mut ::core::ffi::c_void, destinationfolder: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CopyOverloadDefaultNameAndOptions(&*(&destinationfolder as *const ::Abi as *const ::DefaultType)) { + match (*this).CopyOverloadDefaultNameAndOptions(::core::mem::transmute(&destinationfolder)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -83,7 +83,7 @@ impl IStorageFile_Vtbl { unsafe extern "system" fn CopyOverloadDefaultOptions(this: *mut ::core::ffi::c_void, destinationfolder: ::windows::core::RawPtr, desirednewname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CopyOverloadDefaultOptions(&*(&destinationfolder as *const ::Abi as *const ::DefaultType), &*(&desirednewname as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).CopyOverloadDefaultOptions(::core::mem::transmute(&destinationfolder), ::core::mem::transmute(&desirednewname)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -95,7 +95,7 @@ impl IStorageFile_Vtbl { unsafe extern "system" fn CopyOverload(this: *mut ::core::ffi::c_void, destinationfolder: ::windows::core::RawPtr, desirednewname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, option: NameCollisionOption, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CopyOverload(&*(&destinationfolder as *const ::Abi as *const ::DefaultType), &*(&desirednewname as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), option) { + match (*this).CopyOverload(::core::mem::transmute(&destinationfolder), ::core::mem::transmute(&desirednewname), option) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -107,7 +107,7 @@ impl IStorageFile_Vtbl { unsafe extern "system" fn CopyAndReplaceAsync(this: *mut ::core::ffi::c_void, filetoreplace: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CopyAndReplaceAsync(&*(&filetoreplace as *const ::Abi as *const ::DefaultType)) { + match (*this).CopyAndReplaceAsync(::core::mem::transmute(&filetoreplace)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -119,7 +119,7 @@ impl IStorageFile_Vtbl { unsafe extern "system" fn MoveOverloadDefaultNameAndOptions(this: *mut ::core::ffi::c_void, destinationfolder: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).MoveOverloadDefaultNameAndOptions(&*(&destinationfolder as *const ::Abi as *const ::DefaultType)) { + match (*this).MoveOverloadDefaultNameAndOptions(::core::mem::transmute(&destinationfolder)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -131,7 +131,7 @@ impl IStorageFile_Vtbl { unsafe extern "system" fn MoveOverloadDefaultOptions(this: *mut ::core::ffi::c_void, destinationfolder: ::windows::core::RawPtr, desirednewname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).MoveOverloadDefaultOptions(&*(&destinationfolder as *const ::Abi as *const ::DefaultType), &*(&desirednewname as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).MoveOverloadDefaultOptions(::core::mem::transmute(&destinationfolder), ::core::mem::transmute(&desirednewname)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -143,7 +143,7 @@ impl IStorageFile_Vtbl { unsafe extern "system" fn MoveOverload(this: *mut ::core::ffi::c_void, destinationfolder: ::windows::core::RawPtr, desirednewname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, option: NameCollisionOption, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).MoveOverload(&*(&destinationfolder as *const ::Abi as *const ::DefaultType), &*(&desirednewname as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), option) { + match (*this).MoveOverload(::core::mem::transmute(&destinationfolder), ::core::mem::transmute(&desirednewname), option) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -155,7 +155,7 @@ impl IStorageFile_Vtbl { unsafe extern "system" fn MoveAndReplaceAsync(this: *mut ::core::ffi::c_void, filetoreplace: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).MoveAndReplaceAsync(&*(&filetoreplace as *const ::Abi as *const ::DefaultType)) { + match (*this).MoveAndReplaceAsync(::core::mem::transmute(&filetoreplace)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -282,7 +282,7 @@ impl IStorageFolder_Vtbl { unsafe extern "system" fn CreateFileAsyncOverloadDefaultOptions(this: *mut ::core::ffi::c_void, desiredname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CreateFileAsyncOverloadDefaultOptions(&*(&desiredname as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).CreateFileAsyncOverloadDefaultOptions(::core::mem::transmute(&desiredname)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -294,7 +294,7 @@ impl IStorageFolder_Vtbl { unsafe extern "system" fn CreateFileAsync(this: *mut ::core::ffi::c_void, desiredname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, options: CreationCollisionOption, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CreateFileAsync(&*(&desiredname as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), options) { + match (*this).CreateFileAsync(::core::mem::transmute(&desiredname), options) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -306,7 +306,7 @@ impl IStorageFolder_Vtbl { unsafe extern "system" fn CreateFolderAsyncOverloadDefaultOptions(this: *mut ::core::ffi::c_void, desiredname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CreateFolderAsyncOverloadDefaultOptions(&*(&desiredname as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).CreateFolderAsyncOverloadDefaultOptions(::core::mem::transmute(&desiredname)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -318,7 +318,7 @@ impl IStorageFolder_Vtbl { unsafe extern "system" fn CreateFolderAsync(this: *mut ::core::ffi::c_void, desiredname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, options: CreationCollisionOption, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CreateFolderAsync(&*(&desiredname as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), options) { + match (*this).CreateFolderAsync(::core::mem::transmute(&desiredname), options) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -330,7 +330,7 @@ impl IStorageFolder_Vtbl { unsafe extern "system" fn GetFileAsync(this: *mut ::core::ffi::c_void, name: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetFileAsync(&*(&name as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).GetFileAsync(::core::mem::transmute(&name)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -342,7 +342,7 @@ impl IStorageFolder_Vtbl { unsafe extern "system" fn GetFolderAsync(this: *mut ::core::ffi::c_void, name: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetFolderAsync(&*(&name as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).GetFolderAsync(::core::mem::transmute(&name)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -354,7 +354,7 @@ impl IStorageFolder_Vtbl { unsafe extern "system" fn GetItemAsync(this: *mut ::core::ffi::c_void, name: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetItemAsync(&*(&name as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).GetItemAsync(::core::mem::transmute(&name)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -431,7 +431,7 @@ impl IStorageFolder2_Vtbl { unsafe extern "system" fn TryGetItemAsync(this: *mut ::core::ffi::c_void, name: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).TryGetItemAsync(&*(&name as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).TryGetItemAsync(::core::mem::transmute(&name)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -469,7 +469,7 @@ impl IStorageItem_Vtbl { unsafe extern "system" fn RenameAsyncOverloadDefaultOptions(this: *mut ::core::ffi::c_void, desiredname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).RenameAsyncOverloadDefaultOptions(&*(&desiredname as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).RenameAsyncOverloadDefaultOptions(::core::mem::transmute(&desiredname)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -481,7 +481,7 @@ impl IStorageItem_Vtbl { unsafe extern "system" fn RenameAsync(this: *mut ::core::ffi::c_void, desiredname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, option: NameCollisionOption, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).RenameAsync(&*(&desiredname as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), option) { + match (*this).RenameAsync(::core::mem::transmute(&desiredname), option) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -631,7 +631,7 @@ impl IStorageItem2_Vtbl { unsafe extern "system" fn IsEqual(this: *mut ::core::ffi::c_void, item: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).IsEqual(&*(&item as *const ::Abi as *const ::DefaultType)) { + match (*this).IsEqual(::core::mem::transmute(&item)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/Storage/mod.rs b/crates/libs/windows/src/Windows/Storage/mod.rs index 928cf0db98..94bb72fec1 100644 --- a/crates/libs/windows/src/Windows/Storage/mod.rs +++ b/crates/libs/windows/src/Windows/Storage/mod.rs @@ -1306,7 +1306,7 @@ impl) -> ::windows::core::Re } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, setversionrequest: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&setversionrequest as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&setversionrequest)).into() } } impl ::core::clone::Clone for ApplicationDataSetVersionHandler { @@ -1693,7 +1693,7 @@ impl FileIO { } #[doc = "*Required features: 'Storage', 'Foundation'*"] #[cfg(feature = "Foundation")] - pub fn WriteBytesAsync<'a, Param0: ::windows::core::IntoParam<'a, IStorageFile>>(file: Param0, buffer: &[::DefaultType]) -> ::windows::core::Result { + pub fn WriteBytesAsync<'a, Param0: ::windows::core::IntoParam<'a, IStorageFile>>(file: Param0, buffer: &[u8]) -> ::windows::core::Result { Self::IFileIOStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).WriteBytesAsync)(::core::mem::transmute_copy(this), file.into_param().abi(), buffer.len() as u32, ::core::mem::transmute(buffer.as_ptr()), &mut result__).from_abi::(result__) @@ -5209,7 +5209,7 @@ impl PathIO { } #[doc = "*Required features: 'Storage', 'Foundation'*"] #[cfg(feature = "Foundation")] - pub fn WriteBytesAsync<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(absolutepath: Param0, buffer: &[::DefaultType]) -> ::windows::core::Result { + pub fn WriteBytesAsync<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(absolutepath: Param0, buffer: &[u8]) -> ::windows::core::Result { Self::IPathIOStatics(|this| unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).WriteBytesAsync)(::core::mem::transmute_copy(this), absolutepath.into_param().abi(), buffer.len() as u32, ::core::mem::transmute(buffer.as_ptr()), &mut result__).from_abi::(result__) @@ -8164,7 +8164,7 @@ impl) -> ::windows::co } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, stream: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&stream as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&stream)).into() } } #[cfg(feature = "Storage_Streams")] diff --git a/crates/libs/windows/src/Windows/System/Implementation/FileExplorer/impl.rs b/crates/libs/windows/src/Windows/System/Implementation/FileExplorer/impl.rs index 8c42e42e65..f4342b2867 100644 --- a/crates/libs/windows/src/Windows/System/Implementation/FileExplorer/impl.rs +++ b/crates/libs/windows/src/Windows/System/Implementation/FileExplorer/impl.rs @@ -13,7 +13,7 @@ impl ISysStorageProviderEventSource_Vtbl { unsafe extern "system" fn EventReceived(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).EventReceived(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).EventReceived(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -25,7 +25,7 @@ impl ISysStorageProviderEventSource_Vtbl { unsafe extern "system" fn RemoveEventReceived(this: *mut ::core::ffi::c_void, token: super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveEventReceived(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveEventReceived(::core::mem::transmute(&token)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -49,7 +49,7 @@ impl ISysStorageProviderHandlerFactory_Vtbl { unsafe extern "system" fn GetHttpRequestProvider(this: *mut ::core::ffi::c_void, syncrootid: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetHttpRequestProvider(&*(&syncrootid as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).GetHttpRequestProvider(::core::mem::transmute(&syncrootid)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -61,7 +61,7 @@ impl ISysStorageProviderHandlerFactory_Vtbl { unsafe extern "system" fn GetEventSource(this: *mut ::core::ffi::c_void, syncrootid: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, eventname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetEventSource(&*(&syncrootid as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), &*(&eventname as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).GetEventSource(::core::mem::transmute(&syncrootid), ::core::mem::transmute(&eventname)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -94,7 +94,7 @@ impl ISysStorageProviderHttpRequestProvider_Vtbl { unsafe extern "system" fn SendRequestAsync(this: *mut ::core::ffi::c_void, request: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).SendRequestAsync(&*(&request as *const ::Abi as *const ::DefaultType)) { + match (*this).SendRequestAsync(::core::mem::transmute(&request)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); 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 980472b290..7e350e7198 100644 --- a/crates/libs/windows/src/Windows/System/RemoteDesktop/Input/mod.rs +++ b/crates/libs/windows/src/Windows/System/RemoteDesktop/Input/mod.rs @@ -63,7 +63,7 @@ impl RemoteTextConnection { unsafe { (::windows::core::Interface::vtable(this).UnregisterThread)(::core::mem::transmute_copy(this), threadid).ok() } } #[doc = "*Required features: 'System_RemoteDesktop_Input'*"] - pub fn ReportDataReceived(&self, pdudata: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReportDataReceived(&self, pdudata: &[u8]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).ReportDataReceived)(::core::mem::transmute_copy(this), pdudata.len() as u32, ::core::mem::transmute(pdudata.as_ptr())).ok() } } @@ -178,12 +178,12 @@ unsafe impl ::core::marker::Sync for RemoteTextConnection {} #[repr(transparent)] pub struct RemoteTextConnectionDataHandler(pub ::windows::core::IUnknown); impl RemoteTextConnectionDataHandler { - pub fn new::DefaultType]) -> ::windows::core::Result + ::core::marker::Send + 'static>(invoke: F) -> Self { + pub fn new ::windows::core::Result + ::core::marker::Send + 'static>(invoke: F) -> Self { let com = RemoteTextConnectionDataHandlerBox:: { vtable: &RemoteTextConnectionDataHandlerBox::::VTABLE, count: ::windows::core::RefCount::new(1), invoke }; unsafe { ::core::mem::transmute(::windows::core::alloc::boxed::Box::new(com)) } } #[doc = "*Required features: 'System_RemoteDesktop_Input'*"] - pub fn Invoke(&self, pdudata: &[::DefaultType]) -> ::windows::core::Result { + pub fn Invoke(&self, pdudata: &[u8]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: bool = ::core::mem::zeroed(); @@ -192,12 +192,12 @@ impl RemoteTextConnectionDataHandler { } } #[repr(C)] -struct RemoteTextConnectionDataHandlerBox::DefaultType]) -> ::windows::core::Result + ::core::marker::Send + 'static> { +struct RemoteTextConnectionDataHandlerBox ::windows::core::Result + ::core::marker::Send + 'static> { vtable: *const RemoteTextConnectionDataHandler_Vtbl, invoke: F, count: ::windows::core::RefCount, } -impl::DefaultType]) -> ::windows::core::Result + ::core::marker::Send + 'static> RemoteTextConnectionDataHandlerBox { +impl ::windows::core::Result + ::core::marker::Send + 'static> RemoteTextConnectionDataHandlerBox { const VTABLE: RemoteTextConnectionDataHandler_Vtbl = RemoteTextConnectionDataHandler_Vtbl { base: ::windows::core::IUnknownVtbl { QueryInterface: Self::QueryInterface, AddRef: Self::AddRef, Release: Self::Release }, Invoke: Self::Invoke }; unsafe extern "system" fn QueryInterface(this: ::windows::core::RawPtr, iid: &::windows::core::GUID, interface: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; diff --git a/crates/libs/windows/src/Windows/System/Threading/Core/mod.rs b/crates/libs/windows/src/Windows/System/Threading/Core/mod.rs index 66a3659d4a..5a660b53c2 100644 --- a/crates/libs/windows/src/Windows/System/Threading/Core/mod.rs +++ b/crates/libs/windows/src/Windows/System/Threading/Core/mod.rs @@ -232,7 +232,7 @@ impl, bool) -> ::windows::core: } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, signalnotifier: ::windows::core::RawPtr, timedout: bool) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&signalnotifier as *const ::Abi as *const ::DefaultType), timedout).into() + ((*this).invoke)(::core::mem::transmute(&signalnotifier), timedout).into() } } impl ::core::clone::Clone for SignalHandler { diff --git a/crates/libs/windows/src/Windows/System/Threading/mod.rs b/crates/libs/windows/src/Windows/System/Threading/mod.rs index eeb62ca83f..5551667819 100644 --- a/crates/libs/windows/src/Windows/System/Threading/mod.rs +++ b/crates/libs/windows/src/Windows/System/Threading/mod.rs @@ -289,7 +289,7 @@ impl) -> ::windows::core::Resu } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, timer: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&timer as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&timer)).into() } } impl ::core::clone::Clone for TimerDestroyedHandler { @@ -367,7 +367,7 @@ impl) -> ::windows::core::Resu } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, timer: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&timer as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&timer)).into() } } impl ::core::clone::Clone for TimerElapsedHandler { @@ -450,7 +450,7 @@ impl) - } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, operation: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&operation as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&operation)).into() } } #[cfg(feature = "Foundation")] diff --git a/crates/libs/windows/src/Windows/UI/ApplicationSettings/mod.rs b/crates/libs/windows/src/Windows/UI/ApplicationSettings/mod.rs index 9768ebf367..f35c642b68 100644 --- a/crates/libs/windows/src/Windows/UI/ApplicationSettings/mod.rs +++ b/crates/libs/windows/src/Windows/UI/ApplicationSettings/mod.rs @@ -511,7 +511,7 @@ impl) -> ::windows::core::Re } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, command: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&command as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&command)).into() } } impl ::core::clone::Clone for CredentialCommandCredentialDeletedHandler { @@ -1721,7 +1721,7 @@ impl, &::core::option::Optio } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, command: ::windows::core::RawPtr, args: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&command as *const ::Abi as *const ::DefaultType), &*(&args as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&command), ::core::mem::transmute(&args)).into() } } impl ::core::clone::Clone for WebAccountCommandInvokedHandler { @@ -1979,7 +1979,7 @@ impl) -> ::windows:: } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, command: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&command as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&command)).into() } } impl ::core::clone::Clone for WebAccountProviderCommandInvokedHandler { diff --git a/crates/libs/windows/src/Windows/UI/Composition/Interactions/impl.rs b/crates/libs/windows/src/Windows/UI/Composition/Interactions/impl.rs index 0d7cfed394..5d623bef4f 100644 --- a/crates/libs/windows/src/Windows/UI/Composition/Interactions/impl.rs +++ b/crates/libs/windows/src/Windows/UI/Composition/Interactions/impl.rs @@ -26,32 +26,32 @@ impl IInteractionTrackerOwner_Vtbl { unsafe extern "system" fn CustomAnimationStateEntered(this: *mut ::core::ffi::c_void, sender: ::windows::core::RawPtr, args: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).CustomAnimationStateEntered(&*(&sender as *const ::Abi as *const ::DefaultType), &*(&args as *const ::Abi as *const ::DefaultType)).into() + (*this).CustomAnimationStateEntered(::core::mem::transmute(&sender), ::core::mem::transmute(&args)).into() } unsafe extern "system" fn IdleStateEntered(this: *mut ::core::ffi::c_void, sender: ::windows::core::RawPtr, args: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).IdleStateEntered(&*(&sender as *const ::Abi as *const ::DefaultType), &*(&args as *const ::Abi as *const ::DefaultType)).into() + (*this).IdleStateEntered(::core::mem::transmute(&sender), ::core::mem::transmute(&args)).into() } unsafe extern "system" fn InertiaStateEntered(this: *mut ::core::ffi::c_void, sender: ::windows::core::RawPtr, args: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).InertiaStateEntered(&*(&sender as *const ::Abi as *const ::DefaultType), &*(&args as *const ::Abi as *const ::DefaultType)).into() + (*this).InertiaStateEntered(::core::mem::transmute(&sender), ::core::mem::transmute(&args)).into() } unsafe extern "system" fn InteractingStateEntered(this: *mut ::core::ffi::c_void, sender: ::windows::core::RawPtr, args: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).InteractingStateEntered(&*(&sender as *const ::Abi as *const ::DefaultType), &*(&args as *const ::Abi as *const ::DefaultType)).into() + (*this).InteractingStateEntered(::core::mem::transmute(&sender), ::core::mem::transmute(&args)).into() } unsafe extern "system" fn RequestIgnored(this: *mut ::core::ffi::c_void, sender: ::windows::core::RawPtr, args: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RequestIgnored(&*(&sender as *const ::Abi as *const ::DefaultType), &*(&args as *const ::Abi as *const ::DefaultType)).into() + (*this).RequestIgnored(::core::mem::transmute(&sender), ::core::mem::transmute(&args)).into() } unsafe extern "system" fn ValuesChanged(this: *mut ::core::ffi::c_void, sender: ::windows::core::RawPtr, args: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).ValuesChanged(&*(&sender as *const ::Abi as *const ::DefaultType), &*(&args as *const ::Abi as *const ::DefaultType)).into() + (*this).ValuesChanged(::core::mem::transmute(&sender), ::core::mem::transmute(&args)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), 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 ca4c31b53c..bcd0a93756 100644 --- a/crates/libs/windows/src/Windows/UI/Composition/Scenes/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Composition/Scenes/mod.rs @@ -1322,7 +1322,7 @@ impl SceneComponentCollection { } #[doc = "*Required features: 'UI_Composition_Scenes', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -1331,7 +1331,7 @@ impl SceneComponentCollection { } #[doc = "*Required features: 'UI_Composition_Scenes', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -4536,7 +4536,7 @@ impl SceneNodeCollection { } #[doc = "*Required features: 'UI_Composition_Scenes', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -4545,7 +4545,7 @@ impl SceneNodeCollection { } #[doc = "*Required features: 'UI_Composition_Scenes', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } diff --git a/crates/libs/windows/src/Windows/UI/Composition/impl.rs b/crates/libs/windows/src/Windows/UI/Composition/impl.rs index f7f74075ee..b666e3acb5 100644 --- a/crates/libs/windows/src/Windows/UI/Composition/impl.rs +++ b/crates/libs/windows/src/Windows/UI/Composition/impl.rs @@ -9,7 +9,7 @@ impl IAnimationObject_Vtbl { unsafe extern "system" fn PopulatePropertyInfo(this: *mut ::core::ffi::c_void, propertyname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, propertyinfo: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).PopulatePropertyInfo(&*(&propertyname as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), &*(&propertyinfo as *const ::Abi as *const ::DefaultType)).into() + (*this).PopulatePropertyInfo(::core::mem::transmute(&propertyname), ::core::mem::transmute(&propertyinfo)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -56,7 +56,7 @@ impl ICompositionSupportsSystemBackdrop_Vtbl { unsafe extern "system" fn SetSystemBackdrop(this: *mut ::core::ffi::c_void, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetSystemBackdrop(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetSystemBackdrop(::core::mem::transmute(&value)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), diff --git a/crates/libs/windows/src/Windows/UI/Composition/mod.rs b/crates/libs/windows/src/Windows/UI/Composition/mod.rs index 8cb5f1658f..19e8452e81 100644 --- a/crates/libs/windows/src/Windows/UI/Composition/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Composition/mod.rs @@ -7244,7 +7244,7 @@ impl CompositionColorGradientStopCollection { } #[doc = "*Required features: 'UI_Composition', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -7253,7 +7253,7 @@ impl CompositionColorGradientStopCollection { } #[doc = "*Required features: 'UI_Composition', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -18060,7 +18060,7 @@ impl CompositionShapeCollection { } #[doc = "*Required features: 'UI_Composition', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -18069,7 +18069,7 @@ impl CompositionShapeCollection { } #[doc = "*Required features: 'UI_Composition', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -19059,7 +19059,7 @@ impl CompositionStrokeDashArray { } #[doc = "*Required features: 'UI_Composition', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [f32]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -19068,7 +19068,7 @@ impl CompositionStrokeDashArray { } #[doc = "*Required features: 'UI_Composition', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[f32]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -20749,7 +20749,7 @@ impl CompositionVirtualDrawingSurface { } #[doc = "*Required features: 'UI_Composition', 'Graphics'*"] #[cfg(feature = "Graphics")] - pub fn Trim(&self, rects: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn Trim(&self, rects: &[super::super::Graphics::RectInt32]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).Trim)(::core::mem::transmute_copy(this), rects.len() as u32, ::core::mem::transmute(rects.as_ptr())).ok() } } @@ -22960,7 +22960,7 @@ impl DelegatedInkTrailVisual { } #[doc = "*Required features: 'UI_Composition', 'Foundation'*"] #[cfg(feature = "Foundation")] - pub fn AddTrailPoints(&self, inkpoints: &[::DefaultType]) -> ::windows::core::Result { + pub fn AddTrailPoints(&self, inkpoints: &[InkTrailPoint]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -22969,7 +22969,7 @@ impl DelegatedInkTrailVisual { } #[doc = "*Required features: 'UI_Composition', 'Foundation'*"] #[cfg(feature = "Foundation")] - pub fn AddTrailPointsWithPrediction(&self, inkpoints: &[::DefaultType], predictedinkpoints: &[::DefaultType]) -> ::windows::core::Result { + pub fn AddTrailPointsWithPrediction(&self, inkpoints: &[InkTrailPoint], predictedinkpoints: &[InkTrailPoint]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/UI/Core/impl.rs b/crates/libs/windows/src/Windows/UI/Core/impl.rs index a43c32ec20..ce884196d4 100644 --- a/crates/libs/windows/src/Windows/UI/Core/impl.rs +++ b/crates/libs/windows/src/Windows/UI/Core/impl.rs @@ -13,7 +13,7 @@ impl ICoreAcceleratorKeys_Vtbl { unsafe extern "system" fn AcceleratorKeyActivated(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).AcceleratorKeyActivated(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).AcceleratorKeyActivated(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -25,7 +25,7 @@ impl ICoreAcceleratorKeys_Vtbl { unsafe extern "system" fn RemoveAcceleratorKeyActivated(this: *mut ::core::ffi::c_void, cookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveAcceleratorKeyActivated(&*(&cookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveAcceleratorKeyActivated(::core::mem::transmute(&cookie)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -84,7 +84,7 @@ impl ICoreInputSourceBase_Vtbl { unsafe extern "system" fn InputEnabled(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).InputEnabled(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).InputEnabled(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -96,7 +96,7 @@ impl ICoreInputSourceBase_Vtbl { unsafe extern "system" fn RemoveInputEnabled(this: *mut ::core::ffi::c_void, cookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveInputEnabled(&*(&cookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveInputEnabled(::core::mem::transmute(&cookie)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -190,12 +190,12 @@ impl ICorePointerInputSource_Vtbl { unsafe extern "system" fn SetPointerCursor(this: *mut ::core::ffi::c_void, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetPointerCursor(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetPointerCursor(::core::mem::transmute(&value)).into() } unsafe extern "system" fn PointerCaptureLost(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).PointerCaptureLost(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).PointerCaptureLost(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -207,12 +207,12 @@ impl ICorePointerInputSource_Vtbl { unsafe extern "system" fn RemovePointerCaptureLost(this: *mut ::core::ffi::c_void, cookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemovePointerCaptureLost(&*(&cookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemovePointerCaptureLost(::core::mem::transmute(&cookie)).into() } unsafe extern "system" fn PointerEntered(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).PointerEntered(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).PointerEntered(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -224,12 +224,12 @@ impl ICorePointerInputSource_Vtbl { unsafe extern "system" fn RemovePointerEntered(this: *mut ::core::ffi::c_void, cookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemovePointerEntered(&*(&cookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemovePointerEntered(::core::mem::transmute(&cookie)).into() } unsafe extern "system" fn PointerExited(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).PointerExited(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).PointerExited(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -241,12 +241,12 @@ impl ICorePointerInputSource_Vtbl { unsafe extern "system" fn RemovePointerExited(this: *mut ::core::ffi::c_void, cookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemovePointerExited(&*(&cookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemovePointerExited(::core::mem::transmute(&cookie)).into() } unsafe extern "system" fn PointerMoved(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).PointerMoved(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).PointerMoved(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -258,12 +258,12 @@ impl ICorePointerInputSource_Vtbl { unsafe extern "system" fn RemovePointerMoved(this: *mut ::core::ffi::c_void, cookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemovePointerMoved(&*(&cookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemovePointerMoved(::core::mem::transmute(&cookie)).into() } unsafe extern "system" fn PointerPressed(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).PointerPressed(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).PointerPressed(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -275,12 +275,12 @@ impl ICorePointerInputSource_Vtbl { unsafe extern "system" fn RemovePointerPressed(this: *mut ::core::ffi::c_void, cookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemovePointerPressed(&*(&cookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemovePointerPressed(::core::mem::transmute(&cookie)).into() } unsafe extern "system" fn PointerReleased(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).PointerReleased(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).PointerReleased(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -292,12 +292,12 @@ impl ICorePointerInputSource_Vtbl { unsafe extern "system" fn RemovePointerReleased(this: *mut ::core::ffi::c_void, cookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemovePointerReleased(&*(&cookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemovePointerReleased(::core::mem::transmute(&cookie)).into() } unsafe extern "system" fn PointerWheelChanged(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).PointerWheelChanged(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).PointerWheelChanged(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -309,7 +309,7 @@ impl ICorePointerInputSource_Vtbl { unsafe extern "system" fn RemovePointerWheelChanged(this: *mut ::core::ffi::c_void, cookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemovePointerWheelChanged(&*(&cookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemovePointerWheelChanged(::core::mem::transmute(&cookie)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -390,7 +390,7 @@ impl ICorePointerRedirector_Vtbl { unsafe extern "system" fn PointerRoutedAway(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).PointerRoutedAway(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).PointerRoutedAway(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -402,12 +402,12 @@ impl ICorePointerRedirector_Vtbl { unsafe extern "system" fn RemovePointerRoutedAway(this: *mut ::core::ffi::c_void, cookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemovePointerRoutedAway(&*(&cookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemovePointerRoutedAway(::core::mem::transmute(&cookie)).into() } unsafe extern "system" fn PointerRoutedTo(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).PointerRoutedTo(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).PointerRoutedTo(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -419,12 +419,12 @@ impl ICorePointerRedirector_Vtbl { unsafe extern "system" fn RemovePointerRoutedTo(this: *mut ::core::ffi::c_void, cookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemovePointerRoutedTo(&*(&cookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemovePointerRoutedTo(::core::mem::transmute(&cookie)).into() } unsafe extern "system" fn PointerRoutedReleased(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).PointerRoutedReleased(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).PointerRoutedReleased(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -436,7 +436,7 @@ impl ICorePointerRedirector_Vtbl { unsafe extern "system" fn RemovePointerRoutedReleased(this: *mut ::core::ffi::c_void, cookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemovePointerRoutedReleased(&*(&cookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemovePointerRoutedReleased(::core::mem::transmute(&cookie)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -611,7 +611,7 @@ impl ICoreWindow_Vtbl { unsafe extern "system" fn SetPointerCursor(this: *mut ::core::ffi::c_void, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetPointerCursor(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetPointerCursor(::core::mem::transmute(&value)).into() } unsafe extern "system" fn PointerPosition(this: *mut ::core::ffi::c_void, result__: *mut super::super::Foundation::Point) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -684,7 +684,7 @@ impl ICoreWindow_Vtbl { unsafe extern "system" fn Activated(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).Activated(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).Activated(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -696,12 +696,12 @@ impl ICoreWindow_Vtbl { unsafe extern "system" fn RemoveActivated(this: *mut ::core::ffi::c_void, cookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveActivated(&*(&cookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveActivated(::core::mem::transmute(&cookie)).into() } unsafe extern "system" fn AutomationProviderRequested(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).AutomationProviderRequested(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).AutomationProviderRequested(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -713,12 +713,12 @@ impl ICoreWindow_Vtbl { unsafe extern "system" fn RemoveAutomationProviderRequested(this: *mut ::core::ffi::c_void, cookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveAutomationProviderRequested(&*(&cookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveAutomationProviderRequested(::core::mem::transmute(&cookie)).into() } unsafe extern "system" fn CharacterReceived(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CharacterReceived(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).CharacterReceived(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -730,12 +730,12 @@ impl ICoreWindow_Vtbl { unsafe extern "system" fn RemoveCharacterReceived(this: *mut ::core::ffi::c_void, cookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveCharacterReceived(&*(&cookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveCharacterReceived(::core::mem::transmute(&cookie)).into() } unsafe extern "system" fn Closed(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).Closed(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).Closed(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -747,12 +747,12 @@ impl ICoreWindow_Vtbl { unsafe extern "system" fn RemoveClosed(this: *mut ::core::ffi::c_void, cookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveClosed(&*(&cookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveClosed(::core::mem::transmute(&cookie)).into() } unsafe extern "system" fn InputEnabled(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).InputEnabled(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).InputEnabled(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -764,12 +764,12 @@ impl ICoreWindow_Vtbl { unsafe extern "system" fn RemoveInputEnabled(this: *mut ::core::ffi::c_void, cookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveInputEnabled(&*(&cookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveInputEnabled(::core::mem::transmute(&cookie)).into() } unsafe extern "system" fn KeyDown(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).KeyDown(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).KeyDown(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -781,12 +781,12 @@ impl ICoreWindow_Vtbl { unsafe extern "system" fn RemoveKeyDown(this: *mut ::core::ffi::c_void, cookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveKeyDown(&*(&cookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveKeyDown(::core::mem::transmute(&cookie)).into() } unsafe extern "system" fn KeyUp(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).KeyUp(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).KeyUp(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -798,12 +798,12 @@ impl ICoreWindow_Vtbl { unsafe extern "system" fn RemoveKeyUp(this: *mut ::core::ffi::c_void, cookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveKeyUp(&*(&cookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveKeyUp(::core::mem::transmute(&cookie)).into() } unsafe extern "system" fn PointerCaptureLost(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).PointerCaptureLost(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).PointerCaptureLost(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -815,12 +815,12 @@ impl ICoreWindow_Vtbl { unsafe extern "system" fn RemovePointerCaptureLost(this: *mut ::core::ffi::c_void, cookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemovePointerCaptureLost(&*(&cookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemovePointerCaptureLost(::core::mem::transmute(&cookie)).into() } unsafe extern "system" fn PointerEntered(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).PointerEntered(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).PointerEntered(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -832,12 +832,12 @@ impl ICoreWindow_Vtbl { unsafe extern "system" fn RemovePointerEntered(this: *mut ::core::ffi::c_void, cookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemovePointerEntered(&*(&cookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemovePointerEntered(::core::mem::transmute(&cookie)).into() } unsafe extern "system" fn PointerExited(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).PointerExited(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).PointerExited(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -849,12 +849,12 @@ impl ICoreWindow_Vtbl { unsafe extern "system" fn RemovePointerExited(this: *mut ::core::ffi::c_void, cookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemovePointerExited(&*(&cookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemovePointerExited(::core::mem::transmute(&cookie)).into() } unsafe extern "system" fn PointerMoved(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).PointerMoved(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).PointerMoved(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -866,12 +866,12 @@ impl ICoreWindow_Vtbl { unsafe extern "system" fn RemovePointerMoved(this: *mut ::core::ffi::c_void, cookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemovePointerMoved(&*(&cookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemovePointerMoved(::core::mem::transmute(&cookie)).into() } unsafe extern "system" fn PointerPressed(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).PointerPressed(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).PointerPressed(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -883,12 +883,12 @@ impl ICoreWindow_Vtbl { unsafe extern "system" fn RemovePointerPressed(this: *mut ::core::ffi::c_void, cookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemovePointerPressed(&*(&cookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemovePointerPressed(::core::mem::transmute(&cookie)).into() } unsafe extern "system" fn PointerReleased(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).PointerReleased(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).PointerReleased(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -900,12 +900,12 @@ impl ICoreWindow_Vtbl { unsafe extern "system" fn RemovePointerReleased(this: *mut ::core::ffi::c_void, cookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemovePointerReleased(&*(&cookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemovePointerReleased(::core::mem::transmute(&cookie)).into() } unsafe extern "system" fn TouchHitTesting(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).TouchHitTesting(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).TouchHitTesting(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -917,12 +917,12 @@ impl ICoreWindow_Vtbl { unsafe extern "system" fn RemoveTouchHitTesting(this: *mut ::core::ffi::c_void, cookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveTouchHitTesting(&*(&cookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveTouchHitTesting(::core::mem::transmute(&cookie)).into() } unsafe extern "system" fn PointerWheelChanged(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).PointerWheelChanged(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).PointerWheelChanged(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -934,12 +934,12 @@ impl ICoreWindow_Vtbl { unsafe extern "system" fn RemovePointerWheelChanged(this: *mut ::core::ffi::c_void, cookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemovePointerWheelChanged(&*(&cookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemovePointerWheelChanged(::core::mem::transmute(&cookie)).into() } unsafe extern "system" fn SizeChanged(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).SizeChanged(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).SizeChanged(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -951,12 +951,12 @@ impl ICoreWindow_Vtbl { unsafe extern "system" fn RemoveSizeChanged(this: *mut ::core::ffi::c_void, cookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveSizeChanged(&*(&cookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveSizeChanged(::core::mem::transmute(&cookie)).into() } unsafe extern "system" fn VisibilityChanged(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).VisibilityChanged(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).VisibilityChanged(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -968,7 +968,7 @@ impl ICoreWindow_Vtbl { unsafe extern "system" fn RemoveVisibilityChanged(this: *mut ::core::ffi::c_void, cookie: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveVisibilityChanged(&*(&cookie as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveVisibilityChanged(::core::mem::transmute(&cookie)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -1077,7 +1077,7 @@ impl IInitializeWithCoreWindow_Vtbl { unsafe extern "system" fn Initialize(this: *mut ::core::ffi::c_void, window: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).Initialize(&*(&window as *const ::Abi as *const ::DefaultType)).into() + (*this).Initialize(::core::mem::transmute(&window)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), Initialize: Initialize:: } } diff --git a/crates/libs/windows/src/Windows/UI/Core/mod.rs b/crates/libs/windows/src/Windows/UI/Core/mod.rs index 3561c000c8..68fe6fd8e9 100644 --- a/crates/libs/windows/src/Windows/UI/Core/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Core/mod.rs @@ -6600,7 +6600,7 @@ impl) -> ::windows:: } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for IdleDispatchedHandler { @@ -7263,7 +7263,7 @@ impl TouchHitTestingEventArgs { } #[doc = "*Required features: 'UI_Core', 'Foundation'*"] #[cfg(feature = "Foundation")] - pub fn EvaluateProximityToPolygon(&self, controlvertices: &[::DefaultType]) -> ::windows::core::Result { + pub fn EvaluateProximityToPolygon(&self, controlvertices: &[super::super::Foundation::Point]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: CoreProximityEvaluation = ::core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/UI/Input/Inking/impl.rs b/crates/libs/windows/src/Windows/UI/Input/Inking/impl.rs index 5aa7fb3bc8..ccdef53243 100644 --- a/crates/libs/windows/src/Windows/UI/Input/Inking/impl.rs +++ b/crates/libs/windows/src/Windows/UI/Input/Inking/impl.rs @@ -12,7 +12,7 @@ impl IInkPointFactory_Vtbl { unsafe extern "system" fn CreateInkPoint(this: *mut ::core::ffi::c_void, position: super::super::super::Foundation::Point, pressure: f32, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CreateInkPoint(&*(&position as *const ::Abi as *const ::DefaultType), pressure) { + match (*this).CreateInkPoint(::core::mem::transmute(&position), pressure) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -38,7 +38,7 @@ impl IInkPresenterRulerFactory_Vtbl { unsafe extern "system" fn Create(this: *mut ::core::ffi::c_void, inkpresenter: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).Create(&*(&inkpresenter as *const ::Abi as *const ::DefaultType)) { + match (*this).Create(::core::mem::transmute(&inkpresenter)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -116,7 +116,7 @@ impl IInkPresenterStencil_Vtbl { unsafe extern "system" fn SetBackgroundColor(this: *mut ::core::ffi::c_void, value: super::super::Color) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetBackgroundColor(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetBackgroundColor(::core::mem::transmute(&value)).into() } unsafe extern "system" fn ForegroundColor(this: *mut ::core::ffi::c_void, result__: *mut super::super::Color) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -133,7 +133,7 @@ impl IInkPresenterStencil_Vtbl { unsafe extern "system" fn SetForegroundColor(this: *mut ::core::ffi::c_void, value: super::super::Color) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetForegroundColor(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetForegroundColor(::core::mem::transmute(&value)).into() } unsafe extern "system" fn Transform(this: *mut ::core::ffi::c_void, result__: *mut super::super::super::Foundation::Numerics::Matrix3x2) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -150,7 +150,7 @@ impl IInkPresenterStencil_Vtbl { unsafe extern "system" fn SetTransform(this: *mut ::core::ffi::c_void, value: super::super::super::Foundation::Numerics::Matrix3x2) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetTransform(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetTransform(::core::mem::transmute(&value)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -185,12 +185,12 @@ impl IInkRecognizerContainer_Vtbl { unsafe extern "system" fn SetDefaultRecognizer(this: *mut ::core::ffi::c_void, recognizer: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetDefaultRecognizer(&*(&recognizer as *const ::Abi as *const ::DefaultType)).into() + (*this).SetDefaultRecognizer(::core::mem::transmute(&recognizer)).into() } unsafe extern "system" fn RecognizeAsync(this: *mut ::core::ffi::c_void, strokecollection: ::windows::core::RawPtr, recognitiontarget: InkRecognitionTarget, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).RecognizeAsync(&*(&strokecollection as *const ::Abi as *const ::DefaultType), recognitiontarget) { + match (*this).RecognizeAsync(::core::mem::transmute(&strokecollection), recognitiontarget) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -261,7 +261,7 @@ impl IInkStrokeContainer_Vtbl { unsafe extern "system" fn AddStroke(this: *mut ::core::ffi::c_void, stroke: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).AddStroke(&*(&stroke as *const ::Abi as *const ::DefaultType)).into() + (*this).AddStroke(::core::mem::transmute(&stroke)).into() } unsafe extern "system" fn DeleteSelected(this: *mut ::core::ffi::c_void, result__: *mut super::super::super::Foundation::Rect) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -278,7 +278,7 @@ impl IInkStrokeContainer_Vtbl { unsafe extern "system" fn MoveSelected(this: *mut ::core::ffi::c_void, translation: super::super::super::Foundation::Point, result__: *mut super::super::super::Foundation::Rect) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).MoveSelected(&*(&translation as *const ::Abi as *const ::DefaultType)) { + match (*this).MoveSelected(::core::mem::transmute(&translation)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -290,7 +290,7 @@ impl IInkStrokeContainer_Vtbl { unsafe extern "system" fn SelectWithPolyLine(this: *mut ::core::ffi::c_void, polyline: ::windows::core::RawPtr, result__: *mut super::super::super::Foundation::Rect) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).SelectWithPolyLine(&*(&polyline as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).SelectWithPolyLine(::core::mem::transmute(&polyline)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -302,7 +302,7 @@ impl IInkStrokeContainer_Vtbl { unsafe extern "system" fn SelectWithLine(this: *mut ::core::ffi::c_void, from: super::super::super::Foundation::Point, to: super::super::super::Foundation::Point, result__: *mut super::super::super::Foundation::Rect) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).SelectWithLine(&*(&from as *const ::Abi as *const ::DefaultType), &*(&to as *const ::Abi as *const ::DefaultType)) { + match (*this).SelectWithLine(::core::mem::transmute(&from), ::core::mem::transmute(&to)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -319,7 +319,7 @@ impl IInkStrokeContainer_Vtbl { unsafe extern "system" fn PasteFromClipboard(this: *mut ::core::ffi::c_void, position: super::super::super::Foundation::Point, result__: *mut super::super::super::Foundation::Rect) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).PasteFromClipboard(&*(&position as *const ::Abi as *const ::DefaultType)) { + match (*this).PasteFromClipboard(::core::mem::transmute(&position)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -343,7 +343,7 @@ impl IInkStrokeContainer_Vtbl { unsafe extern "system" fn LoadAsync(this: *mut ::core::ffi::c_void, inputstream: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).LoadAsync(&*(&inputstream as *const ::Abi as *const ::DefaultType)) { + match (*this).LoadAsync(::core::mem::transmute(&inputstream)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -355,7 +355,7 @@ impl IInkStrokeContainer_Vtbl { unsafe extern "system" fn SaveAsync(this: *mut ::core::ffi::c_void, outputstream: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).SaveAsync(&*(&outputstream as *const ::Abi as *const ::DefaultType)) { + match (*this).SaveAsync(::core::mem::transmute(&outputstream)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -367,7 +367,7 @@ impl IInkStrokeContainer_Vtbl { unsafe extern "system" fn UpdateRecognitionResults(this: *mut ::core::ffi::c_void, recognitionresults: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).UpdateRecognitionResults(&*(&recognitionresults as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)).into() + (*this).UpdateRecognitionResults(::core::mem::transmute(&recognitionresults)).into() } unsafe extern "system" fn GetStrokes(this: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; diff --git a/crates/libs/windows/src/Windows/UI/Input/impl.rs b/crates/libs/windows/src/Windows/UI/Input/impl.rs index 2a67761878..f36f8d9c95 100644 --- a/crates/libs/windows/src/Windows/UI/Input/impl.rs +++ b/crates/libs/windows/src/Windows/UI/Input/impl.rs @@ -26,7 +26,7 @@ impl IPointerPointTransform_Vtbl { unsafe extern "system" fn TryTransform(this: *mut ::core::ffi::c_void, inpoint: super::super::Foundation::Point, outpoint: *mut super::super::Foundation::Point, result__: *mut bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).TryTransform(&*(&inpoint as *const ::Abi as *const ::DefaultType), ::core::mem::transmute_copy(&outpoint)) { + match (*this).TryTransform(::core::mem::transmute(&inpoint), ::core::mem::transmute_copy(&outpoint)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -38,7 +38,7 @@ impl IPointerPointTransform_Vtbl { unsafe extern "system" fn TransformBounds(this: *mut ::core::ffi::c_void, rect: super::super::Foundation::Rect, result__: *mut super::super::Foundation::Rect) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).TransformBounds(&*(&rect as *const ::Abi as *const ::DefaultType)) { + match (*this).TransformBounds(::core::mem::transmute(&rect)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/UI/Popups/impl.rs b/crates/libs/windows/src/Windows/UI/Popups/impl.rs index 1cfcfecd35..6f7633087e 100644 --- a/crates/libs/windows/src/Windows/UI/Popups/impl.rs +++ b/crates/libs/windows/src/Windows/UI/Popups/impl.rs @@ -26,7 +26,7 @@ impl IUICommand_Vtbl { unsafe extern "system" fn SetLabel(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetLabel(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetLabel(::core::mem::transmute(&value)).into() } unsafe extern "system" fn Invoked(this: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -43,7 +43,7 @@ impl IUICommand_Vtbl { unsafe extern "system" fn SetInvoked(this: *mut ::core::ffi::c_void, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetInvoked(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetInvoked(::core::mem::transmute(&value)).into() } unsafe extern "system" fn Id(this: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -60,7 +60,7 @@ impl IUICommand_Vtbl { unsafe extern "system" fn SetId(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetId(&*(&value as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetId(::core::mem::transmute(&value)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), diff --git a/crates/libs/windows/src/Windows/UI/Popups/mod.rs b/crates/libs/windows/src/Windows/UI/Popups/mod.rs index 814eb34b13..83591501cd 100644 --- a/crates/libs/windows/src/Windows/UI/Popups/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Popups/mod.rs @@ -801,7 +801,7 @@ impl) -> ::windows::core::Result<() } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, command: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&command as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&command)).into() } } impl ::core::clone::Clone for UICommandInvokedHandler { diff --git a/crates/libs/windows/src/Windows/UI/Shell/impl.rs b/crates/libs/windows/src/Windows/UI/Shell/impl.rs index ddc868c9cb..fdb7a56871 100644 --- a/crates/libs/windows/src/Windows/UI/Shell/impl.rs +++ b/crates/libs/windows/src/Windows/UI/Shell/impl.rs @@ -35,7 +35,7 @@ impl IAdaptiveCardBuilderStatics_Vtbl { unsafe extern "system" fn CreateAdaptiveCardFromJson(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CreateAdaptiveCardFromJson(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).CreateAdaptiveCardFromJson(::core::mem::transmute(&value)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/UI/Text/impl.rs b/crates/libs/windows/src/Windows/UI/Text/impl.rs index e3c29b3368..9d62bc9276 100644 --- a/crates/libs/windows/src/Windows/UI/Text/impl.rs +++ b/crates/libs/windows/src/Windows/UI/Text/impl.rs @@ -87,7 +87,7 @@ impl ITextCharacterFormat_Vtbl { unsafe extern "system" fn SetBackgroundColor(this: *mut ::core::ffi::c_void, value: super::Color) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetBackgroundColor(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetBackgroundColor(::core::mem::transmute(&value)).into() } unsafe extern "system" fn Bold(this: *mut ::core::ffi::c_void, result__: *mut FormatEffect) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -155,7 +155,7 @@ impl ITextCharacterFormat_Vtbl { unsafe extern "system" fn SetForegroundColor(this: *mut ::core::ffi::c_void, value: super::Color) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetForegroundColor(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetForegroundColor(::core::mem::transmute(&value)).into() } unsafe extern "system" fn Hidden(this: *mut ::core::ffi::c_void, result__: *mut FormatEffect) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -223,7 +223,7 @@ impl ITextCharacterFormat_Vtbl { unsafe extern "system" fn SetLanguageTag(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetLanguageTag(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetLanguageTag(::core::mem::transmute(&value)).into() } unsafe extern "system" fn LinkType(this: *mut ::core::ffi::c_void, result__: *mut LinkType) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -252,7 +252,7 @@ impl ITextCharacterFormat_Vtbl { unsafe extern "system" fn SetName(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetName(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetName(::core::mem::transmute(&value)).into() } unsafe extern "system" fn Outline(this: *mut ::core::ffi::c_void, result__: *mut FormatEffect) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -461,7 +461,7 @@ impl ITextCharacterFormat_Vtbl { unsafe extern "system" fn SetClone(this: *mut ::core::ffi::c_void, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetClone(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetClone(::core::mem::transmute(&value)).into() } unsafe extern "system" fn GetClone(this: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -478,7 +478,7 @@ impl ITextCharacterFormat_Vtbl { unsafe extern "system" fn IsEqual(this: *mut ::core::ffi::c_void, format: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).IsEqual(&*(&format as *const ::Abi as *const ::DefaultType)) { + match (*this).IsEqual(::core::mem::transmute(&format)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -766,7 +766,7 @@ impl ITextDocument_Vtbl { unsafe extern "system" fn GetRangeFromPoint(this: *mut ::core::ffi::c_void, point: super::super::Foundation::Point, options: PointOptions, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetRangeFromPoint(&*(&point as *const ::Abi as *const ::DefaultType), options) { + match (*this).GetRangeFromPoint(::core::mem::transmute(&point), options) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -783,7 +783,7 @@ impl ITextDocument_Vtbl { unsafe extern "system" fn LoadFromStream(this: *mut ::core::ffi::c_void, options: TextSetOptions, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).LoadFromStream(options, &*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).LoadFromStream(options, ::core::mem::transmute(&value)).into() } unsafe extern "system" fn Redo(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -793,22 +793,22 @@ impl ITextDocument_Vtbl { unsafe extern "system" fn SaveToStream(this: *mut ::core::ffi::c_void, options: TextGetOptions, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SaveToStream(options, &*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SaveToStream(options, ::core::mem::transmute(&value)).into() } unsafe extern "system" fn SetDefaultCharacterFormat(this: *mut ::core::ffi::c_void, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetDefaultCharacterFormat(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetDefaultCharacterFormat(::core::mem::transmute(&value)).into() } unsafe extern "system" fn SetDefaultParagraphFormat(this: *mut ::core::ffi::c_void, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetDefaultParagraphFormat(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetDefaultParagraphFormat(::core::mem::transmute(&value)).into() } unsafe extern "system" fn SetText(this: *mut ::core::ffi::c_void, options: TextSetOptions, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetText(options, &*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetText(options, ::core::mem::transmute(&value)).into() } unsafe extern "system" fn Undo(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -1289,7 +1289,7 @@ impl ITextParagraphFormat_Vtbl { unsafe extern "system" fn IsEqual(this: *mut ::core::ffi::c_void, format: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).IsEqual(&*(&format as *const ::Abi as *const ::DefaultType)) { + match (*this).IsEqual(::core::mem::transmute(&format)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -1301,7 +1301,7 @@ impl ITextParagraphFormat_Vtbl { unsafe extern "system" fn SetClone(this: *mut ::core::ffi::c_void, format: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetClone(&*(&format as *const ::Abi as *const ::DefaultType)).into() + (*this).SetClone(::core::mem::transmute(&format)).into() } unsafe extern "system" fn SetIndents(this: *mut ::core::ffi::c_void, start: f32, left: f32, right: f32) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -1463,7 +1463,7 @@ impl ITextRange_Vtbl { unsafe extern "system" fn SetCharacterFormat(this: *mut ::core::ffi::c_void, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetCharacterFormat(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetCharacterFormat(::core::mem::transmute(&value)).into() } unsafe extern "system" fn FormattedText(this: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -1480,7 +1480,7 @@ impl ITextRange_Vtbl { unsafe extern "system" fn SetFormattedText(this: *mut ::core::ffi::c_void, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetFormattedText(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetFormattedText(::core::mem::transmute(&value)).into() } unsafe extern "system" fn EndPosition(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -1543,7 +1543,7 @@ impl ITextRange_Vtbl { unsafe extern "system" fn SetLink(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetLink(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetLink(::core::mem::transmute(&value)).into() } unsafe extern "system" fn ParagraphFormat(this: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -1560,7 +1560,7 @@ impl ITextRange_Vtbl { unsafe extern "system" fn SetParagraphFormat(this: *mut ::core::ffi::c_void, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetParagraphFormat(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetParagraphFormat(::core::mem::transmute(&value)).into() } unsafe extern "system" fn StartPosition(this: *mut ::core::ffi::c_void, result__: *mut i32) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -1606,7 +1606,7 @@ impl ITextRange_Vtbl { unsafe extern "system" fn SetText(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetText(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetText(::core::mem::transmute(&value)).into() } unsafe extern "system" fn CanPaste(this: *mut ::core::ffi::c_void, format: i32, result__: *mut bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -1679,7 +1679,7 @@ impl ITextRange_Vtbl { unsafe extern "system" fn FindText(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, scanlength: i32, options: FindOptions, result__: *mut i32) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).FindText(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), scanlength, options) { + match (*this).FindText(::core::mem::transmute(&value), scanlength, options) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -1735,12 +1735,12 @@ impl ITextRange_Vtbl { unsafe extern "system" fn GetTextViaStream(this: *mut ::core::ffi::c_void, options: TextGetOptions, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).GetTextViaStream(options, &*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).GetTextViaStream(options, ::core::mem::transmute(&value)).into() } unsafe extern "system" fn InRange(this: *mut ::core::ffi::c_void, range: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).InRange(&*(&range as *const ::Abi as *const ::DefaultType)) { + match (*this).InRange(::core::mem::transmute(&range)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -1752,12 +1752,12 @@ impl ITextRange_Vtbl { unsafe extern "system" fn InsertImage(this: *mut ::core::ffi::c_void, width: i32, height: i32, ascent: i32, verticalalign: VerticalCharacterAlignment, alternatetext: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).InsertImage(width, height, ascent, verticalalign, &*(&alternatetext as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), &*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).InsertImage(width, height, ascent, verticalalign, ::core::mem::transmute(&alternatetext), ::core::mem::transmute(&value)).into() } unsafe extern "system" fn InStory(this: *mut ::core::ffi::c_void, range: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).InStory(&*(&range as *const ::Abi as *const ::DefaultType)) { + match (*this).InStory(::core::mem::transmute(&range)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -1769,7 +1769,7 @@ impl ITextRange_Vtbl { unsafe extern "system" fn IsEqual(this: *mut ::core::ffi::c_void, range: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).IsEqual(&*(&range as *const ::Abi as *const ::DefaultType)) { + match (*this).IsEqual(::core::mem::transmute(&range)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -1837,7 +1837,7 @@ impl ITextRange_Vtbl { unsafe extern "system" fn SetPoint(this: *mut ::core::ffi::c_void, point: super::super::Foundation::Point, options: PointOptions, extend: bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetPoint(&*(&point as *const ::Abi as *const ::DefaultType), options, extend).into() + (*this).SetPoint(::core::mem::transmute(&point), options, extend).into() } unsafe extern "system" fn SetRange(this: *mut ::core::ffi::c_void, startposition: i32, endposition: i32) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -1847,12 +1847,12 @@ impl ITextRange_Vtbl { unsafe extern "system" fn SetText2(this: *mut ::core::ffi::c_void, options: TextSetOptions, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetText2(options, &*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetText2(options, ::core::mem::transmute(&value)).into() } unsafe extern "system" fn SetTextViaStream(this: *mut ::core::ffi::c_void, options: TextSetOptions, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetTextViaStream(options, &*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetTextViaStream(options, ::core::mem::transmute(&value)).into() } unsafe extern "system" fn StartOf(this: *mut ::core::ffi::c_void, unit: TextRangeUnit, extend: bool, result__: *mut i32) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -2050,7 +2050,7 @@ impl ITextSelection_Vtbl { unsafe extern "system" fn TypeText(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).TypeText(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).TypeText(::core::mem::transmute(&value)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), diff --git a/crates/libs/windows/src/Windows/UI/UIAutomation/Core/impl.rs b/crates/libs/windows/src/Windows/UI/UIAutomation/Core/impl.rs index 4e6b832c4a..38f6f56b47 100644 --- a/crates/libs/windows/src/Windows/UI/UIAutomation/Core/impl.rs +++ b/crates/libs/windows/src/Windows/UI/UIAutomation/Core/impl.rs @@ -28,7 +28,7 @@ impl ICoreAutomationConnectionBoundObjectProvider_Vtbl { } } pub trait ICoreAutomationRemoteOperationExtensionProvider_Impl: Sized { - fn CallExtension(&mut self, extensionid: &::windows::core::GUID, context: &::core::option::Option, operandids: &[::DefaultType]) -> ::windows::core::Result<()>; + fn CallExtension(&mut self, extensionid: &::windows::core::GUID, context: &::core::option::Option, operandids: &[AutomationRemoteOperationOperandId]) -> ::windows::core::Result<()>; fn IsExtensionSupported(&mut self, extensionid: &::windows::core::GUID) -> ::windows::core::Result; } impl ::windows::core::RuntimeName for ICoreAutomationRemoteOperationExtensionProvider { @@ -39,12 +39,12 @@ impl ICoreAutomationRemoteOperationExtensionProvider_Vtbl { unsafe extern "system" fn CallExtension(this: *mut ::core::ffi::c_void, extensionid: ::windows::core::GUID, context: ::windows::core::RawPtr, operandIds_array_size: u32, operandids: *const AutomationRemoteOperationOperandId) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).CallExtension(&*(&extensionid as *const <::windows::core::GUID as ::windows::core::Abi>::Abi as *const <::windows::core::GUID as ::windows::core::DefaultType>::DefaultType), &*(&context as *const ::Abi as *const ::DefaultType), ::core::slice::from_raw_parts(::core::mem::transmute_copy(&operandids), operandIds_array_size as _)).into() + (*this).CallExtension(::core::mem::transmute(&extensionid), ::core::mem::transmute(&context), ::core::slice::from_raw_parts(::core::mem::transmute_copy(&operandids), operandIds_array_size as _)).into() } unsafe extern "system" fn IsExtensionSupported(this: *mut ::core::ffi::c_void, extensionid: ::windows::core::GUID, result__: *mut bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).IsExtensionSupported(&*(&extensionid as *const <::windows::core::GUID as ::windows::core::Abi>::Abi as *const <::windows::core::GUID as ::windows::core::DefaultType>::DefaultType)) { + match (*this).IsExtensionSupported(::core::mem::transmute(&extensionid)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); 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 3e93926e7d..05e6be6000 100644 --- a/crates/libs/windows/src/Windows/UI/UIAutomation/Core/mod.rs +++ b/crates/libs/windows/src/Windows/UI/UIAutomation/Core/mod.rs @@ -278,7 +278,7 @@ impl CoreAutomationRemoteOperation { unsafe { (::windows::core::Interface::vtable(this).AddToResults)(::core::mem::transmute_copy(this), operandid.into_param().abi()).ok() } } #[doc = "*Required features: 'UI_UIAutomation_Core'*"] - pub fn Execute(&self, bytecodebuffer: &[::DefaultType]) -> ::windows::core::Result { + pub fn Execute(&self, bytecodebuffer: &[u8]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: ::windows::core::RawPtr = ::core::mem::zeroed(); @@ -613,7 +613,7 @@ pub struct ICoreAutomationRemoteOperationContext_Vtbl { pub struct ICoreAutomationRemoteOperationExtensionProvider(::windows::core::IUnknown); impl ICoreAutomationRemoteOperationExtensionProvider { #[doc = "*Required features: 'UI_UIAutomation_Core'*"] - pub fn CallExtension<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::GUID>, Param1: ::windows::core::IntoParam<'a, CoreAutomationRemoteOperationContext>>(&self, extensionid: Param0, context: Param1, operandids: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn CallExtension<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::GUID>, Param1: ::windows::core::IntoParam<'a, CoreAutomationRemoteOperationContext>>(&self, extensionid: Param0, context: Param1, operandids: &[AutomationRemoteOperationOperandId]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).CallExtension)(::core::mem::transmute_copy(this), extensionid.into_param().abi(), context.into_param().abi(), operandids.len() as u32, ::core::mem::transmute(operandids.as_ptr())).ok() } } diff --git a/crates/libs/windows/src/Windows/UI/WebUI/Core/mod.rs b/crates/libs/windows/src/Windows/UI/WebUI/Core/mod.rs index b01fbede34..189565ef62 100644 --- a/crates/libs/windows/src/Windows/UI/WebUI/Core/mod.rs +++ b/crates/libs/windows/src/Windows/UI/WebUI/Core/mod.rs @@ -562,7 +562,7 @@ impl) -> : } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, eventargs: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&eventargs as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&eventargs)).into() } } impl ::core::clone::Clone for SizeChangedEventHandler { diff --git a/crates/libs/windows/src/Windows/UI/WebUI/mod.rs b/crates/libs/windows/src/Windows/UI/WebUI/mod.rs index f42cad8acb..42cf7d60a7 100644 --- a/crates/libs/windows/src/Windows/UI/WebUI/mod.rs +++ b/crates/libs/windows/src/Windows/UI/WebUI/mod.rs @@ -128,7 +128,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, eventargs: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&eventargs as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&eventargs)).into() } } #[cfg(feature = "ApplicationModel_Activation")] @@ -427,7 +427,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, eventargs: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&eventargs as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&eventargs)).into() } } #[cfg(feature = "ApplicationModel_Activation")] @@ -647,7 +647,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } #[cfg(feature = "ApplicationModel")] @@ -1659,7 +1659,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } #[cfg(feature = "ApplicationModel")] @@ -1747,7 +1747,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for NavigatedEventHandler { @@ -1965,7 +1965,7 @@ impl) -> ::windo } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender)).into() } } impl ::core::clone::Clone for ResumingEventHandler { @@ -2291,7 +2291,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } #[cfg(feature = "ApplicationModel")] diff --git a/crates/libs/windows/src/Windows/UI/Xaml/Automation/Peers/impl.rs b/crates/libs/windows/src/Windows/UI/Xaml/Automation/Peers/impl.rs index 40ab0aad93..26663317f6 100644 --- a/crates/libs/windows/src/Windows/UI/Xaml/Automation/Peers/impl.rs +++ b/crates/libs/windows/src/Windows/UI/Xaml/Automation/Peers/impl.rs @@ -333,7 +333,7 @@ impl IAutomationPeerOverrides_Vtbl { unsafe extern "system" fn GetPeerFromPointCore(this: *mut ::core::ffi::c_void, point: super::super::super::super::Foundation::Point, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetPeerFromPointCore(&*(&point as *const ::Abi as *const ::DefaultType)) { + match (*this).GetPeerFromPointCore(::core::mem::transmute(&point)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -462,7 +462,7 @@ impl IAutomationPeerOverrides3_Vtbl { unsafe extern "system" fn GetElementFromPointCore(this: *mut ::core::ffi::c_void, pointinwindowcoordinates: super::super::super::super::Foundation::Point, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetElementFromPointCore(&*(&pointinwindowcoordinates as *const ::Abi as *const ::DefaultType)) { + match (*this).GetElementFromPointCore(::core::mem::transmute(&pointinwindowcoordinates)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -789,7 +789,7 @@ impl IItemsControlAutomationPeerOverrides2_Vtbl { unsafe extern "system" fn OnCreateItemAutomationPeer(this: *mut ::core::ffi::c_void, item: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).OnCreateItemAutomationPeer(&*(&item as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)) { + match (*this).OnCreateItemAutomationPeer(::core::mem::transmute(&item)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/UI/Xaml/Automation/Provider/impl.rs b/crates/libs/windows/src/Windows/UI/Xaml/Automation/Provider/impl.rs index 92a771739c..1977d71633 100644 --- a/crates/libs/windows/src/Windows/UI/Xaml/Automation/Provider/impl.rs +++ b/crates/libs/windows/src/Windows/UI/Xaml/Automation/Provider/impl.rs @@ -483,11 +483,7 @@ impl IItemContainerProvider_Vtbl { unsafe extern "system" fn FindItemByProperty(this: *mut ::core::ffi::c_void, startafter: ::windows::core::RawPtr, automationproperty: ::windows::core::RawPtr, value: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).FindItemByProperty( - &*(&startafter as *const ::Abi as *const ::DefaultType), - &*(&automationproperty as *const ::Abi as *const ::DefaultType), - &*(&value as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), - ) { + match (*this).FindItemByProperty(::core::mem::transmute(&startafter), ::core::mem::transmute(&automationproperty), ::core::mem::transmute(&value)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -1032,7 +1028,7 @@ impl ISpreadsheetProvider_Vtbl { unsafe extern "system" fn GetItemByName(this: *mut ::core::ffi::c_void, name: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetItemByName(&*(&name as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).GetItemByName(::core::mem::transmute(&name)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -1451,7 +1447,7 @@ impl ITextProvider_Vtbl { unsafe extern "system" fn RangeFromChild(this: *mut ::core::ffi::c_void, childelement: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).RangeFromChild(&*(&childelement as *const ::Abi as *const ::DefaultType)) { + match (*this).RangeFromChild(::core::mem::transmute(&childelement)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -1463,7 +1459,7 @@ impl ITextProvider_Vtbl { unsafe extern "system" fn RangeFromPoint(this: *mut ::core::ffi::c_void, screenlocation: super::super::super::super::Foundation::Point, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).RangeFromPoint(&*(&screenlocation as *const ::Abi as *const ::DefaultType)) { + match (*this).RangeFromPoint(::core::mem::transmute(&screenlocation)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -1501,7 +1497,7 @@ impl ITextProvider2_Vtbl { unsafe extern "system" fn RangeFromAnnotation(this: *mut ::core::ffi::c_void, annotationelement: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).RangeFromAnnotation(&*(&annotationelement as *const ::Abi as *const ::DefaultType)) { + match (*this).RangeFromAnnotation(::core::mem::transmute(&annotationelement)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -1575,7 +1571,7 @@ impl ITextRangeProvider_Vtbl { unsafe extern "system" fn Compare(this: *mut ::core::ffi::c_void, textrangeprovider: ::windows::core::RawPtr, result__: *mut bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).Compare(&*(&textrangeprovider as *const ::Abi as *const ::DefaultType)) { + match (*this).Compare(::core::mem::transmute(&textrangeprovider)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -1587,7 +1583,7 @@ impl ITextRangeProvider_Vtbl { unsafe extern "system" fn CompareEndpoints(this: *mut ::core::ffi::c_void, endpoint: super::Text::TextPatternRangeEndpoint, textrangeprovider: ::windows::core::RawPtr, targetendpoint: super::Text::TextPatternRangeEndpoint, result__: *mut i32) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CompareEndpoints(endpoint, &*(&textrangeprovider as *const ::Abi as *const ::DefaultType), targetendpoint) { + match (*this).CompareEndpoints(endpoint, ::core::mem::transmute(&textrangeprovider), targetendpoint) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -1604,7 +1600,7 @@ impl ITextRangeProvider_Vtbl { unsafe extern "system" fn FindAttribute(this: *mut ::core::ffi::c_void, attributeid: i32, value: *mut ::core::ffi::c_void, backward: bool, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).FindAttribute(attributeid, &*(&value as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), backward) { + match (*this).FindAttribute(attributeid, ::core::mem::transmute(&value), backward) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -1616,7 +1612,7 @@ impl ITextRangeProvider_Vtbl { unsafe extern "system" fn FindText(this: *mut ::core::ffi::c_void, text: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, backward: bool, ignorecase: bool, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).FindText(&*(&text as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), backward, ignorecase) { + match (*this).FindText(::core::mem::transmute(&text), backward, ignorecase) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -1693,7 +1689,7 @@ impl ITextRangeProvider_Vtbl { unsafe extern "system" fn MoveEndpointByRange(this: *mut ::core::ffi::c_void, endpoint: super::Text::TextPatternRangeEndpoint, textrangeprovider: ::windows::core::RawPtr, targetendpoint: super::Text::TextPatternRangeEndpoint) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).MoveEndpointByRange(endpoint, &*(&textrangeprovider as *const ::Abi as *const ::DefaultType), targetendpoint).into() + (*this).MoveEndpointByRange(endpoint, ::core::mem::transmute(&textrangeprovider), targetendpoint).into() } unsafe extern "system" fn Select(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -2015,7 +2011,7 @@ impl IValueProvider_Vtbl { unsafe extern "system" fn SetValue(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetValue(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetValue(::core::mem::transmute(&value)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), diff --git a/crates/libs/windows/src/Windows/UI/Xaml/Controls/Primitives/impl.rs b/crates/libs/windows/src/Windows/UI/Xaml/Controls/Primitives/impl.rs index 4bd81221a7..d913802054 100644 --- a/crates/libs/windows/src/Windows/UI/Xaml/Controls/Primitives/impl.rs +++ b/crates/libs/windows/src/Windows/UI/Xaml/Controls/Primitives/impl.rs @@ -43,7 +43,7 @@ impl IFlyoutBaseOverrides4_Vtbl { unsafe extern "system" fn OnProcessKeyboardAccelerators(this: *mut ::core::ffi::c_void, args: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnProcessKeyboardAccelerators(&*(&args as *const ::Abi as *const ::DefaultType)).into() + (*this).OnProcessKeyboardAccelerators(::core::mem::transmute(&args)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -179,7 +179,7 @@ impl IScrollSnapPointsInfo_Vtbl { unsafe extern "system" fn HorizontalSnapPointsChanged(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).HorizontalSnapPointsChanged(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).HorizontalSnapPointsChanged(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -191,12 +191,12 @@ impl IScrollSnapPointsInfo_Vtbl { unsafe extern "system" fn RemoveHorizontalSnapPointsChanged(this: *mut ::core::ffi::c_void, token: super::super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveHorizontalSnapPointsChanged(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveHorizontalSnapPointsChanged(::core::mem::transmute(&token)).into() } unsafe extern "system" fn VerticalSnapPointsChanged(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).VerticalSnapPointsChanged(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).VerticalSnapPointsChanged(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -208,7 +208,7 @@ impl IScrollSnapPointsInfo_Vtbl { unsafe extern "system" fn RemoveVerticalSnapPointsChanged(this: *mut ::core::ffi::c_void, token: super::super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveVerticalSnapPointsChanged(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveVerticalSnapPointsChanged(::core::mem::transmute(&token)).into() } unsafe extern "system" fn GetIrregularSnapPoints(this: *mut ::core::ffi::c_void, orientation: super::Orientation, alignment: SnapPointsAlignment, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; diff --git a/crates/libs/windows/src/Windows/UI/Xaml/Controls/Primitives/mod.rs b/crates/libs/windows/src/Windows/UI/Xaml/Controls/Primitives/mod.rs index b79126a02e..b337da7c1d 100644 --- a/crates/libs/windows/src/Windows/UI/Xaml/Controls/Primitives/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Xaml/Controls/Primitives/mod.rs @@ -3493,7 +3493,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for DragCompletedEventHandler { @@ -3700,7 +3700,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for DragDeltaEventHandler { @@ -3907,7 +3907,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for DragStartedEventHandler { @@ -8958,7 +8958,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for ItemsChangedEventHandler { @@ -15255,7 +15255,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for RangeBaseValueChangedEventHandler { @@ -16058,7 +16058,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for ScrollEventHandler { diff --git a/crates/libs/windows/src/Windows/UI/Xaml/Controls/impl.rs b/crates/libs/windows/src/Windows/UI/Xaml/Controls/impl.rs index 1ae05a0cc5..3e5be6a108 100644 --- a/crates/libs/windows/src/Windows/UI/Xaml/Controls/impl.rs +++ b/crates/libs/windows/src/Windows/UI/Xaml/Controls/impl.rs @@ -14,12 +14,12 @@ impl IAppBarOverrides_Vtbl { unsafe extern "system" fn OnClosed(this: *mut ::core::ffi::c_void, e: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnClosed(&*(&e as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)).into() + (*this).OnClosed(::core::mem::transmute(&e)).into() } unsafe extern "system" fn OnOpened(this: *mut ::core::ffi::c_void, e: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnOpened(&*(&e as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)).into() + (*this).OnOpened(::core::mem::transmute(&e)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -47,12 +47,12 @@ impl IAppBarOverrides3_Vtbl { unsafe extern "system" fn OnClosing(this: *mut ::core::ffi::c_void, e: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnClosing(&*(&e as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)).into() + (*this).OnClosing(::core::mem::transmute(&e)).into() } unsafe extern "system" fn OnOpening(this: *mut ::core::ffi::c_void, e: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnOpening(&*(&e as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)).into() + (*this).OnOpening(::core::mem::transmute(&e)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -80,12 +80,12 @@ impl IComboBoxOverrides_Vtbl { unsafe extern "system" fn OnDropDownClosed(this: *mut ::core::ffi::c_void, e: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnDropDownClosed(&*(&e as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)).into() + (*this).OnDropDownClosed(::core::mem::transmute(&e)).into() } unsafe extern "system" fn OnDropDownOpened(this: *mut ::core::ffi::c_void, e: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnDropDownOpened(&*(&e as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)).into() + (*this).OnDropDownOpened(::core::mem::transmute(&e)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -202,17 +202,17 @@ impl IContentControlOverrides_Vtbl { unsafe extern "system" fn OnContentChanged(this: *mut ::core::ffi::c_void, oldcontent: *mut ::core::ffi::c_void, newcontent: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnContentChanged(&*(&oldcontent as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&newcontent as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)).into() + (*this).OnContentChanged(::core::mem::transmute(&oldcontent), ::core::mem::transmute(&newcontent)).into() } unsafe extern "system" fn OnContentTemplateChanged(this: *mut ::core::ffi::c_void, oldcontenttemplate: ::windows::core::RawPtr, newcontenttemplate: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnContentTemplateChanged(&*(&oldcontenttemplate as *const ::Abi as *const ::DefaultType), &*(&newcontenttemplate as *const ::Abi as *const ::DefaultType)).into() + (*this).OnContentTemplateChanged(::core::mem::transmute(&oldcontenttemplate), ::core::mem::transmute(&newcontenttemplate)).into() } unsafe extern "system" fn OnContentTemplateSelectorChanged(this: *mut ::core::ffi::c_void, oldcontenttemplateselector: ::windows::core::RawPtr, newcontenttemplateselector: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnContentTemplateSelectorChanged(&*(&oldcontenttemplateselector as *const ::Abi as *const ::DefaultType), &*(&newcontenttemplateselector as *const ::Abi as *const ::DefaultType)).into() + (*this).OnContentTemplateSelectorChanged(::core::mem::transmute(&oldcontenttemplateselector), ::core::mem::transmute(&newcontenttemplateselector)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -241,12 +241,12 @@ impl IContentPresenterOverrides_Vtbl { unsafe extern "system" fn OnContentTemplateChanged(this: *mut ::core::ffi::c_void, oldcontenttemplate: ::windows::core::RawPtr, newcontenttemplate: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnContentTemplateChanged(&*(&oldcontenttemplate as *const ::Abi as *const ::DefaultType), &*(&newcontenttemplate as *const ::Abi as *const ::DefaultType)).into() + (*this).OnContentTemplateChanged(::core::mem::transmute(&oldcontenttemplate), ::core::mem::transmute(&newcontenttemplate)).into() } unsafe extern "system" fn OnContentTemplateSelectorChanged(this: *mut ::core::ffi::c_void, oldcontenttemplateselector: ::windows::core::RawPtr, newcontenttemplateselector: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnContentTemplateSelectorChanged(&*(&oldcontenttemplateselector as *const ::Abi as *const ::DefaultType), &*(&newcontenttemplateselector as *const ::Abi as *const ::DefaultType)).into() + (*this).OnContentTemplateSelectorChanged(::core::mem::transmute(&oldcontenttemplateselector), ::core::mem::transmute(&newcontenttemplateselector)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -346,127 +346,127 @@ impl IControlOverrides_Vtbl { unsafe extern "system" fn OnPointerEntered(this: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnPointerEntered(&*(&e as *const ::Abi as *const ::DefaultType)).into() + (*this).OnPointerEntered(::core::mem::transmute(&e)).into() } unsafe extern "system" fn OnPointerPressed(this: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnPointerPressed(&*(&e as *const ::Abi as *const ::DefaultType)).into() + (*this).OnPointerPressed(::core::mem::transmute(&e)).into() } unsafe extern "system" fn OnPointerMoved(this: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnPointerMoved(&*(&e as *const ::Abi as *const ::DefaultType)).into() + (*this).OnPointerMoved(::core::mem::transmute(&e)).into() } unsafe extern "system" fn OnPointerReleased(this: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnPointerReleased(&*(&e as *const ::Abi as *const ::DefaultType)).into() + (*this).OnPointerReleased(::core::mem::transmute(&e)).into() } unsafe extern "system" fn OnPointerExited(this: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnPointerExited(&*(&e as *const ::Abi as *const ::DefaultType)).into() + (*this).OnPointerExited(::core::mem::transmute(&e)).into() } unsafe extern "system" fn OnPointerCaptureLost(this: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnPointerCaptureLost(&*(&e as *const ::Abi as *const ::DefaultType)).into() + (*this).OnPointerCaptureLost(::core::mem::transmute(&e)).into() } unsafe extern "system" fn OnPointerCanceled(this: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnPointerCanceled(&*(&e as *const ::Abi as *const ::DefaultType)).into() + (*this).OnPointerCanceled(::core::mem::transmute(&e)).into() } unsafe extern "system" fn OnPointerWheelChanged(this: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnPointerWheelChanged(&*(&e as *const ::Abi as *const ::DefaultType)).into() + (*this).OnPointerWheelChanged(::core::mem::transmute(&e)).into() } unsafe extern "system" fn OnTapped(this: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnTapped(&*(&e as *const ::Abi as *const ::DefaultType)).into() + (*this).OnTapped(::core::mem::transmute(&e)).into() } unsafe extern "system" fn OnDoubleTapped(this: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnDoubleTapped(&*(&e as *const ::Abi as *const ::DefaultType)).into() + (*this).OnDoubleTapped(::core::mem::transmute(&e)).into() } unsafe extern "system" fn OnHolding(this: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnHolding(&*(&e as *const ::Abi as *const ::DefaultType)).into() + (*this).OnHolding(::core::mem::transmute(&e)).into() } unsafe extern "system" fn OnRightTapped(this: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnRightTapped(&*(&e as *const ::Abi as *const ::DefaultType)).into() + (*this).OnRightTapped(::core::mem::transmute(&e)).into() } unsafe extern "system" fn OnManipulationStarting(this: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnManipulationStarting(&*(&e as *const ::Abi as *const ::DefaultType)).into() + (*this).OnManipulationStarting(::core::mem::transmute(&e)).into() } unsafe extern "system" fn OnManipulationInertiaStarting(this: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnManipulationInertiaStarting(&*(&e as *const ::Abi as *const ::DefaultType)).into() + (*this).OnManipulationInertiaStarting(::core::mem::transmute(&e)).into() } unsafe extern "system" fn OnManipulationStarted(this: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnManipulationStarted(&*(&e as *const ::Abi as *const ::DefaultType)).into() + (*this).OnManipulationStarted(::core::mem::transmute(&e)).into() } unsafe extern "system" fn OnManipulationDelta(this: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnManipulationDelta(&*(&e as *const ::Abi as *const ::DefaultType)).into() + (*this).OnManipulationDelta(::core::mem::transmute(&e)).into() } unsafe extern "system" fn OnManipulationCompleted(this: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnManipulationCompleted(&*(&e as *const ::Abi as *const ::DefaultType)).into() + (*this).OnManipulationCompleted(::core::mem::transmute(&e)).into() } unsafe extern "system" fn OnKeyUp(this: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnKeyUp(&*(&e as *const ::Abi as *const ::DefaultType)).into() + (*this).OnKeyUp(::core::mem::transmute(&e)).into() } unsafe extern "system" fn OnKeyDown(this: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnKeyDown(&*(&e as *const ::Abi as *const ::DefaultType)).into() + (*this).OnKeyDown(::core::mem::transmute(&e)).into() } unsafe extern "system" fn OnGotFocus(this: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnGotFocus(&*(&e as *const ::Abi as *const ::DefaultType)).into() + (*this).OnGotFocus(::core::mem::transmute(&e)).into() } unsafe extern "system" fn OnLostFocus(this: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnLostFocus(&*(&e as *const ::Abi as *const ::DefaultType)).into() + (*this).OnLostFocus(::core::mem::transmute(&e)).into() } unsafe extern "system" fn OnDragEnter(this: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnDragEnter(&*(&e as *const ::Abi as *const ::DefaultType)).into() + (*this).OnDragEnter(::core::mem::transmute(&e)).into() } unsafe extern "system" fn OnDragLeave(this: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnDragLeave(&*(&e as *const ::Abi as *const ::DefaultType)).into() + (*this).OnDragLeave(::core::mem::transmute(&e)).into() } unsafe extern "system" fn OnDragOver(this: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnDragOver(&*(&e as *const ::Abi as *const ::DefaultType)).into() + (*this).OnDragOver(::core::mem::transmute(&e)).into() } unsafe extern "system" fn OnDrop(this: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnDrop(&*(&e as *const ::Abi as *const ::DefaultType)).into() + (*this).OnDrop(::core::mem::transmute(&e)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -523,17 +523,17 @@ impl IControlOverrides6_Vtbl { unsafe extern "system" fn OnPreviewKeyDown(this: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnPreviewKeyDown(&*(&e as *const ::Abi as *const ::DefaultType)).into() + (*this).OnPreviewKeyDown(::core::mem::transmute(&e)).into() } unsafe extern "system" fn OnPreviewKeyUp(this: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnPreviewKeyUp(&*(&e as *const ::Abi as *const ::DefaultType)).into() + (*this).OnPreviewKeyUp(::core::mem::transmute(&e)).into() } unsafe extern "system" fn OnCharacterReceived(this: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnCharacterReceived(&*(&e as *const ::Abi as *const ::DefaultType)).into() + (*this).OnCharacterReceived(::core::mem::transmute(&e)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -557,7 +557,7 @@ impl IDataTemplateSelectorOverrides_Vtbl { unsafe extern "system" fn SelectTemplateCore(this: *mut ::core::ffi::c_void, item: *mut ::core::ffi::c_void, container: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).SelectTemplateCore(&*(&item as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&container as *const ::Abi as *const ::DefaultType)) { + match (*this).SelectTemplateCore(::core::mem::transmute(&item), ::core::mem::transmute(&container)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -586,7 +586,7 @@ impl IDataTemplateSelectorOverrides2_Vtbl { unsafe extern "system" fn SelectTemplateForItemCore(this: *mut ::core::ffi::c_void, item: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).SelectTemplateForItemCore(&*(&item as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)) { + match (*this).SelectTemplateForItemCore(::core::mem::transmute(&item)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -615,7 +615,7 @@ impl IGroupStyleSelectorOverrides_Vtbl { unsafe extern "system" fn SelectGroupStyleCore(this: *mut ::core::ffi::c_void, group: *mut ::core::ffi::c_void, level: u32, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).SelectGroupStyleCore(&*(&group as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), level) { + match (*this).SelectGroupStyleCore(::core::mem::transmute(&group), level) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -647,7 +647,7 @@ impl IInkToolbarCustomPenOverrides_Vtbl { unsafe extern "system" fn CreateInkDrawingAttributesCore(this: *mut ::core::ffi::c_void, brush: ::windows::core::RawPtr, strokewidth: f64, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CreateInkDrawingAttributesCore(&*(&brush as *const ::Abi as *const ::DefaultType), strokewidth) { + match (*this).CreateInkDrawingAttributesCore(::core::mem::transmute(&brush), strokewidth) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -679,7 +679,7 @@ impl IInsertionPanel_Vtbl { unsafe extern "system" fn GetInsertionIndexes(this: *mut ::core::ffi::c_void, position: super::super::super::Foundation::Point, first: *mut i32, second: *mut i32) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).GetInsertionIndexes(&*(&position as *const ::Abi as *const ::DefaultType), ::core::mem::transmute_copy(&first), ::core::mem::transmute_copy(&second)).into() + (*this).GetInsertionIndexes(::core::mem::transmute(&position), ::core::mem::transmute_copy(&first), ::core::mem::transmute_copy(&second)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -704,7 +704,7 @@ impl IItemContainerMapping_Vtbl { unsafe extern "system" fn ItemFromContainer(this: *mut ::core::ffi::c_void, container: ::windows::core::RawPtr, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).ItemFromContainer(&*(&container as *const ::Abi as *const ::DefaultType)) { + match (*this).ItemFromContainer(::core::mem::transmute(&container)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -716,7 +716,7 @@ impl IItemContainerMapping_Vtbl { unsafe extern "system" fn ContainerFromItem(this: *mut ::core::ffi::c_void, item: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).ContainerFromItem(&*(&item as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)) { + match (*this).ContainerFromItem(::core::mem::transmute(&item)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -728,7 +728,7 @@ impl IItemContainerMapping_Vtbl { unsafe extern "system" fn IndexFromContainer(this: *mut ::core::ffi::c_void, container: ::windows::core::RawPtr, result__: *mut i32) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).IndexFromContainer(&*(&container as *const ::Abi as *const ::DefaultType)) { + match (*this).IndexFromContainer(::core::mem::transmute(&container)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -797,7 +797,7 @@ impl IItemsControlOverrides_Vtbl { unsafe extern "system" fn IsItemItsOwnContainerOverride(this: *mut ::core::ffi::c_void, item: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).IsItemItsOwnContainerOverride(&*(&item as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)) { + match (*this).IsItemItsOwnContainerOverride(::core::mem::transmute(&item)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -821,42 +821,42 @@ impl IItemsControlOverrides_Vtbl { unsafe extern "system" fn ClearContainerForItemOverride(this: *mut ::core::ffi::c_void, element: ::windows::core::RawPtr, item: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).ClearContainerForItemOverride(&*(&element as *const ::Abi as *const ::DefaultType), &*(&item as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)).into() + (*this).ClearContainerForItemOverride(::core::mem::transmute(&element), ::core::mem::transmute(&item)).into() } unsafe extern "system" fn PrepareContainerForItemOverride(this: *mut ::core::ffi::c_void, element: ::windows::core::RawPtr, item: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).PrepareContainerForItemOverride(&*(&element as *const ::Abi as *const ::DefaultType), &*(&item as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)).into() + (*this).PrepareContainerForItemOverride(::core::mem::transmute(&element), ::core::mem::transmute(&item)).into() } unsafe extern "system" fn OnItemsChanged(this: *mut ::core::ffi::c_void, e: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnItemsChanged(&*(&e as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)).into() + (*this).OnItemsChanged(::core::mem::transmute(&e)).into() } unsafe extern "system" fn OnItemContainerStyleChanged(this: *mut ::core::ffi::c_void, olditemcontainerstyle: ::windows::core::RawPtr, newitemcontainerstyle: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnItemContainerStyleChanged(&*(&olditemcontainerstyle as *const ::Abi as *const ::DefaultType), &*(&newitemcontainerstyle as *const ::Abi as *const ::DefaultType)).into() + (*this).OnItemContainerStyleChanged(::core::mem::transmute(&olditemcontainerstyle), ::core::mem::transmute(&newitemcontainerstyle)).into() } unsafe extern "system" fn OnItemContainerStyleSelectorChanged(this: *mut ::core::ffi::c_void, olditemcontainerstyleselector: ::windows::core::RawPtr, newitemcontainerstyleselector: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnItemContainerStyleSelectorChanged(&*(&olditemcontainerstyleselector as *const ::Abi as *const ::DefaultType), &*(&newitemcontainerstyleselector as *const ::Abi as *const ::DefaultType)).into() + (*this).OnItemContainerStyleSelectorChanged(::core::mem::transmute(&olditemcontainerstyleselector), ::core::mem::transmute(&newitemcontainerstyleselector)).into() } unsafe extern "system" fn OnItemTemplateChanged(this: *mut ::core::ffi::c_void, olditemtemplate: ::windows::core::RawPtr, newitemtemplate: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnItemTemplateChanged(&*(&olditemtemplate as *const ::Abi as *const ::DefaultType), &*(&newitemtemplate as *const ::Abi as *const ::DefaultType)).into() + (*this).OnItemTemplateChanged(::core::mem::transmute(&olditemtemplate), ::core::mem::transmute(&newitemtemplate)).into() } unsafe extern "system" fn OnItemTemplateSelectorChanged(this: *mut ::core::ffi::c_void, olditemtemplateselector: ::windows::core::RawPtr, newitemtemplateselector: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnItemTemplateSelectorChanged(&*(&olditemtemplateselector as *const ::Abi as *const ::DefaultType), &*(&newitemtemplateselector as *const ::Abi as *const ::DefaultType)).into() + (*this).OnItemTemplateSelectorChanged(::core::mem::transmute(&olditemtemplateselector), ::core::mem::transmute(&newitemtemplateselector)).into() } unsafe extern "system" fn OnGroupStyleSelectorChanged(this: *mut ::core::ffi::c_void, oldgroupstyleselector: ::windows::core::RawPtr, newgroupstyleselector: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnGroupStyleSelectorChanged(&*(&oldgroupstyleselector as *const ::Abi as *const ::DefaultType), &*(&newgroupstyleselector as *const ::Abi as *const ::DefaultType)).into() + (*this).OnGroupStyleSelectorChanged(::core::mem::transmute(&oldgroupstyleselector), ::core::mem::transmute(&newgroupstyleselector)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -890,7 +890,7 @@ impl INavigate_Vtbl { unsafe extern "system" fn Navigate(this: *mut ::core::ffi::c_void, sourcepagetype: ::core::mem::ManuallyDrop, result__: *mut bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).Navigate(&*(&sourcepagetype as *const ::Abi as *const ::DefaultType)) { + match (*this).Navigate(::core::mem::transmute(&sourcepagetype)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -927,17 +927,17 @@ impl IPageOverrides_Vtbl { unsafe extern "system" fn OnNavigatedFrom(this: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnNavigatedFrom(&*(&e as *const ::Abi as *const ::DefaultType)).into() + (*this).OnNavigatedFrom(::core::mem::transmute(&e)).into() } unsafe extern "system" fn OnNavigatedTo(this: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnNavigatedTo(&*(&e as *const ::Abi as *const ::DefaultType)).into() + (*this).OnNavigatedTo(::core::mem::transmute(&e)).into() } unsafe extern "system" fn OnNavigatingFrom(this: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnNavigatingFrom(&*(&e as *const ::Abi as *const ::DefaultType)).into() + (*this).OnNavigatingFrom(::core::mem::transmute(&e)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -975,12 +975,12 @@ impl IScrollAnchorProvider_Vtbl { unsafe extern "system" fn RegisterAnchorCandidate(this: *mut ::core::ffi::c_void, element: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RegisterAnchorCandidate(&*(&element as *const ::Abi as *const ::DefaultType)).into() + (*this).RegisterAnchorCandidate(::core::mem::transmute(&element)).into() } unsafe extern "system" fn UnregisterAnchorCandidate(this: *mut ::core::ffi::c_void, element: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).UnregisterAnchorCandidate(&*(&element as *const ::Abi as *const ::DefaultType)).into() + (*this).UnregisterAnchorCandidate(::core::mem::transmute(&element)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -1028,7 +1028,7 @@ impl ISemanticZoomInformation_Vtbl { unsafe extern "system" fn SetSemanticZoomOwner(this: *mut ::core::ffi::c_void, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetSemanticZoomOwner(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetSemanticZoomOwner(::core::mem::transmute(&value)).into() } unsafe extern "system" fn IsActiveView(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -1077,27 +1077,27 @@ impl ISemanticZoomInformation_Vtbl { unsafe extern "system" fn MakeVisible(this: *mut ::core::ffi::c_void, item: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).MakeVisible(&*(&item as *const ::Abi as *const ::DefaultType)).into() + (*this).MakeVisible(::core::mem::transmute(&item)).into() } unsafe extern "system" fn StartViewChangeFrom(this: *mut ::core::ffi::c_void, source: ::windows::core::RawPtr, destination: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).StartViewChangeFrom(&*(&source as *const ::Abi as *const ::DefaultType), &*(&destination as *const ::Abi as *const ::DefaultType)).into() + (*this).StartViewChangeFrom(::core::mem::transmute(&source), ::core::mem::transmute(&destination)).into() } unsafe extern "system" fn StartViewChangeTo(this: *mut ::core::ffi::c_void, source: ::windows::core::RawPtr, destination: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).StartViewChangeTo(&*(&source as *const ::Abi as *const ::DefaultType), &*(&destination as *const ::Abi as *const ::DefaultType)).into() + (*this).StartViewChangeTo(::core::mem::transmute(&source), ::core::mem::transmute(&destination)).into() } unsafe extern "system" fn CompleteViewChangeFrom(this: *mut ::core::ffi::c_void, source: ::windows::core::RawPtr, destination: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).CompleteViewChangeFrom(&*(&source as *const ::Abi as *const ::DefaultType), &*(&destination as *const ::Abi as *const ::DefaultType)).into() + (*this).CompleteViewChangeFrom(::core::mem::transmute(&source), ::core::mem::transmute(&destination)).into() } unsafe extern "system" fn CompleteViewChangeTo(this: *mut ::core::ffi::c_void, source: ::windows::core::RawPtr, destination: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).CompleteViewChangeTo(&*(&source as *const ::Abi as *const ::DefaultType), &*(&destination as *const ::Abi as *const ::DefaultType)).into() + (*this).CompleteViewChangeTo(::core::mem::transmute(&source), ::core::mem::transmute(&destination)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -1131,7 +1131,7 @@ impl IStyleSelectorOverrides_Vtbl { unsafe extern "system" fn SelectStyleCore(this: *mut ::core::ffi::c_void, item: *mut ::core::ffi::c_void, container: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).SelectStyleCore(&*(&item as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&container as *const ::Abi as *const ::DefaultType)) { + match (*this).SelectStyleCore(::core::mem::transmute(&item), ::core::mem::transmute(&container)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -1176,17 +1176,17 @@ impl IToggleSwitchOverrides_Vtbl { unsafe extern "system" fn OnOnContentChanged(this: *mut ::core::ffi::c_void, oldcontent: *mut ::core::ffi::c_void, newcontent: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnOnContentChanged(&*(&oldcontent as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&newcontent as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)).into() + (*this).OnOnContentChanged(::core::mem::transmute(&oldcontent), ::core::mem::transmute(&newcontent)).into() } unsafe extern "system" fn OnOffContentChanged(this: *mut ::core::ffi::c_void, oldcontent: *mut ::core::ffi::c_void, newcontent: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnOffContentChanged(&*(&oldcontent as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&newcontent as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)).into() + (*this).OnOffContentChanged(::core::mem::transmute(&oldcontent), ::core::mem::transmute(&newcontent)).into() } unsafe extern "system" fn OnHeaderChanged(this: *mut ::core::ffi::c_void, oldcontent: *mut ::core::ffi::c_void, newcontent: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnHeaderChanged(&*(&oldcontent as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&newcontent as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)).into() + (*this).OnHeaderChanged(::core::mem::transmute(&oldcontent), ::core::mem::transmute(&newcontent)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -1222,7 +1222,7 @@ impl IVirtualizingPanelOverrides_Vtbl { unsafe extern "system" fn OnItemsChanged(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, args: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnItemsChanged(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&args as *const ::Abi as *const ::DefaultType)).into() + (*this).OnItemsChanged(::core::mem::transmute(&sender), ::core::mem::transmute(&args)).into() } unsafe extern "system" fn OnClearChildren(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -1258,7 +1258,7 @@ impl IVirtualizingStackPanelOverrides_Vtbl { unsafe extern "system" fn OnCleanUpVirtualizedItem(this: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnCleanUpVirtualizedItem(&*(&e as *const ::Abi as *const ::DefaultType)).into() + (*this).OnCleanUpVirtualizedItem(::core::mem::transmute(&e)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), diff --git a/crates/libs/windows/src/Windows/UI/Xaml/Controls/mod.rs b/crates/libs/windows/src/Windows/UI/Xaml/Controls/mod.rs index 39225df004..6c906ff5de 100644 --- a/crates/libs/windows/src/Windows/UI/Xaml/Controls/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Xaml/Controls/mod.rs @@ -3301,7 +3301,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for BackClickEventHandler { @@ -7558,7 +7558,7 @@ impl, &::core::option::Option ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const ::Abi as *const ::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for CalendarViewDayItemChangingEventHandler { @@ -9117,7 +9117,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for CleanUpVirtualizedItemEventHandler { @@ -10266,7 +10266,7 @@ impl ColumnDefinitionCollection { } #[doc = "*Required features: 'UI_Xaml_Controls', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -10275,7 +10275,7 @@ impl ColumnDefinitionCollection { } #[doc = "*Required features: 'UI_Xaml_Controls', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -15349,7 +15349,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for ContextMenuOpeningEventHandler { @@ -18666,7 +18666,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for DragItemsStartingEventHandler { @@ -25433,7 +25433,7 @@ impl HubSectionCollection { } #[doc = "*Required features: 'UI_Xaml_Controls', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -25442,7 +25442,7 @@ impl HubSectionCollection { } #[doc = "*Required features: 'UI_Xaml_Controls', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -25734,7 +25734,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for HubSectionHeaderClickEventHandler { @@ -51738,7 +51738,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for ItemClickEventHandler { @@ -51874,7 +51874,7 @@ impl ItemCollection { } #[doc = "*Required features: 'UI_Xaml_Controls', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [<::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option<::windows::core::IInspectable>]) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -51883,7 +51883,7 @@ impl ItemCollection { } #[doc = "*Required features: 'UI_Xaml_Controls', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[<::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option<::windows::core::IInspectable>]) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -57654,7 +57654,7 @@ impl) -> ::windo } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, item: *mut ::core::ffi::c_void, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - match ((*this).invoke)(&*(&item as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)) { + match ((*this).invoke)(::core::mem::transmute(&item)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -57747,7 +57747,7 @@ impl ::windows::core::Result, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - match ((*this).invoke)(&*(&key as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match ((*this).invoke)(::core::mem::transmute(&key)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -66690,7 +66690,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for NotifyEventHandler { @@ -77532,7 +77532,7 @@ impl RowDefinitionCollection { } #[doc = "*Required features: 'UI_Xaml_Controls', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -77541,7 +77541,7 @@ impl RowDefinitionCollection { } #[doc = "*Required features: 'UI_Xaml_Controls', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -80796,7 +80796,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for SectionsInViewChangedEventHandler { @@ -81007,7 +81007,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for SelectionChangedEventHandler { @@ -81698,7 +81698,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for SemanticZoomViewChangedEventHandler { @@ -85985,7 +85985,7 @@ impl SwipeItems { } #[doc = "*Required features: 'UI_Xaml_Controls', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -85994,7 +85994,7 @@ impl SwipeItems { } #[doc = "*Required features: 'UI_Xaml_Controls', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -89279,7 +89279,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for TextChangedEventHandler { @@ -90039,7 +90039,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for TextControlPasteEventHandler { @@ -96043,7 +96043,7 @@ impl UIElementCollection { } #[doc = "*Required features: 'UI_Xaml_Controls', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -96052,7 +96052,7 @@ impl UIElementCollection { } #[doc = "*Required features: 'UI_Xaml_Controls', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -97839,7 +97839,7 @@ impl WebView { } #[doc = "*Required features: 'UI_Xaml_Controls', 'deprecated'*"] #[cfg(feature = "deprecated")] - pub fn InvokeScript<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, scriptname: Param0, arguments: &[<::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result<::windows::core::HSTRING> { + pub fn InvokeScript<'a, Param0: ::windows::core::IntoParam<'a, ::windows::core::HSTRING>>(&self, scriptname: Param0, arguments: &[::windows::core::HSTRING]) -> ::windows::core::Result<::windows::core::HSTRING> { let this = self; unsafe { let mut result__: ::core::mem::ManuallyDrop<::windows::core::HSTRING> = ::core::mem::zeroed(); @@ -99496,7 +99496,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for WebViewNavigationFailedEventHandler { diff --git a/crates/libs/windows/src/Windows/UI/Xaml/Data/impl.rs b/crates/libs/windows/src/Windows/UI/Xaml/Data/impl.rs index a79369a14b..5faf33b63d 100644 --- a/crates/libs/windows/src/Windows/UI/Xaml/Data/impl.rs +++ b/crates/libs/windows/src/Windows/UI/Xaml/Data/impl.rs @@ -100,7 +100,7 @@ impl ICollectionView_Vtbl { unsafe extern "system" fn CurrentChanged(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CurrentChanged(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).CurrentChanged(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -112,12 +112,12 @@ impl ICollectionView_Vtbl { unsafe extern "system" fn RemoveCurrentChanged(this: *mut ::core::ffi::c_void, token: super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveCurrentChanged(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveCurrentChanged(::core::mem::transmute(&token)).into() } unsafe extern "system" fn CurrentChanging(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CurrentChanging(&*(&handler as *const ::Abi as *const ::DefaultType)) { + match (*this).CurrentChanging(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -129,12 +129,12 @@ impl ICollectionView_Vtbl { unsafe extern "system" fn RemoveCurrentChanging(this: *mut ::core::ffi::c_void, token: super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveCurrentChanging(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveCurrentChanging(::core::mem::transmute(&token)).into() } unsafe extern "system" fn MoveCurrentTo(this: *mut ::core::ffi::c_void, item: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).MoveCurrentTo(&*(&item as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)) { + match (*this).MoveCurrentTo(::core::mem::transmute(&item)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -357,7 +357,7 @@ impl ICustomProperty_Vtbl { unsafe extern "system" fn GetValue(this: *mut ::core::ffi::c_void, target: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetValue(&*(&target as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)) { + match (*this).GetValue(::core::mem::transmute(&target)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -369,12 +369,12 @@ impl ICustomProperty_Vtbl { unsafe extern "system" fn SetValue(this: *mut ::core::ffi::c_void, target: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetValue(&*(&target as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&value as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetValue(::core::mem::transmute(&target), ::core::mem::transmute(&value)).into() } unsafe extern "system" fn GetIndexedValue(this: *mut ::core::ffi::c_void, target: *mut ::core::ffi::c_void, index: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetIndexedValue(&*(&target as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&index as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)) { + match (*this).GetIndexedValue(::core::mem::transmute(&target), ::core::mem::transmute(&index)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -386,13 +386,7 @@ impl ICustomProperty_Vtbl { unsafe extern "system" fn SetIndexedValue(this: *mut ::core::ffi::c_void, target: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void, index: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this) - .SetIndexedValue( - &*(&target as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), - &*(&value as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), - &*(&index as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), - ) - .into() + (*this).SetIndexedValue(::core::mem::transmute(&target), ::core::mem::transmute(&value), ::core::mem::transmute(&index)).into() } unsafe extern "system" fn CanWrite(this: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -451,7 +445,7 @@ impl ICustomPropertyProvider_Vtbl { unsafe extern "system" fn GetCustomProperty(this: *mut ::core::ffi::c_void, name: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetCustomProperty(&*(&name as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).GetCustomProperty(::core::mem::transmute(&name)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -463,7 +457,7 @@ impl ICustomPropertyProvider_Vtbl { unsafe extern "system" fn GetIndexedProperty(this: *mut ::core::ffi::c_void, name: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, r#type: ::core::mem::ManuallyDrop, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetIndexedProperty(&*(&name as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), &*(&r#type as *const ::Abi as *const ::DefaultType)) { + match (*this).GetIndexedProperty(::core::mem::transmute(&name), ::core::mem::transmute(&r#type)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -522,7 +516,7 @@ impl IItemsRangeInfo_Vtbl { unsafe extern "system" fn RangesChanged(this: *mut ::core::ffi::c_void, visiblerange: ::windows::core::RawPtr, trackeditems: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RangesChanged(&*(&visiblerange as *const ::Abi as *const ::DefaultType), &*(&trackeditems as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)).into() + (*this).RangesChanged(::core::mem::transmute(&visiblerange), ::core::mem::transmute(&trackeditems)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), RangesChanged: RangesChanged:: } } @@ -545,7 +539,7 @@ impl INotifyPropertyChanged_Vtbl { unsafe extern "system" fn PropertyChanged(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).PropertyChanged(&*(&handler as *const ::Abi as *const ::DefaultType)) { + match (*this).PropertyChanged(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -557,7 +551,7 @@ impl INotifyPropertyChanged_Vtbl { unsafe extern "system" fn RemovePropertyChanged(this: *mut ::core::ffi::c_void, token: super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemovePropertyChanged(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemovePropertyChanged(::core::mem::transmute(&token)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -586,12 +580,12 @@ impl ISelectionInfo_Vtbl { unsafe extern "system" fn SelectRange(this: *mut ::core::ffi::c_void, itemindexrange: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SelectRange(&*(&itemindexrange as *const ::Abi as *const ::DefaultType)).into() + (*this).SelectRange(::core::mem::transmute(&itemindexrange)).into() } unsafe extern "system" fn DeselectRange(this: *mut ::core::ffi::c_void, itemindexrange: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).DeselectRange(&*(&itemindexrange as *const ::Abi as *const ::DefaultType)).into() + (*this).DeselectRange(::core::mem::transmute(&itemindexrange)).into() } unsafe extern "system" fn IsSelected(this: *mut ::core::ffi::c_void, index: i32, result__: *mut bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -690,12 +684,7 @@ impl IValueConverter_Vtbl { unsafe extern "system" fn Convert(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void, targettype: ::core::mem::ManuallyDrop, parameter: *mut ::core::ffi::c_void, language: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).Convert( - &*(&value as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), - &*(&targettype as *const ::Abi as *const ::DefaultType), - &*(¶meter as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), - &*(&language as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), - ) { + match (*this).Convert(::core::mem::transmute(&value), ::core::mem::transmute(&targettype), ::core::mem::transmute(¶meter), ::core::mem::transmute(&language)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -707,12 +696,7 @@ impl IValueConverter_Vtbl { unsafe extern "system" fn ConvertBack(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void, targettype: ::core::mem::ManuallyDrop, parameter: *mut ::core::ffi::c_void, language: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).ConvertBack( - &*(&value as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), - &*(&targettype as *const ::Abi as *const ::DefaultType), - &*(¶meter as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), - &*(&language as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), - ) { + match (*this).ConvertBack(::core::mem::transmute(&value), ::core::mem::transmute(&targettype), ::core::mem::transmute(¶meter), ::core::mem::transmute(&language)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/UI/Xaml/Data/mod.rs b/crates/libs/windows/src/Windows/UI/Xaml/Data/mod.rs index ea2749cd52..fa6c1d3c83 100644 --- a/crates/libs/windows/src/Windows/UI/Xaml/Data/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Xaml/Data/mod.rs @@ -1045,7 +1045,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for CurrentChangingEventHandler { @@ -1475,7 +1475,7 @@ impl ICollectionView { } #[doc = "*Required features: 'UI_Xaml_Data', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [<::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option<::windows::core::IInspectable>]) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -1484,7 +1484,7 @@ impl ICollectionView { } #[doc = "*Required features: 'UI_Xaml_Data', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[<::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option<::windows::core::IInspectable>]) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -3080,7 +3080,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for PropertyChangedEventHandler { diff --git a/crates/libs/windows/src/Windows/UI/Xaml/Documents/mod.rs b/crates/libs/windows/src/Windows/UI/Xaml/Documents/mod.rs index 8c3218d9b2..02b8034d14 100644 --- a/crates/libs/windows/src/Windows/UI/Xaml/Documents/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Xaml/Documents/mod.rs @@ -311,7 +311,7 @@ impl BlockCollection { } #[doc = "*Required features: 'UI_Xaml_Documents', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -320,7 +320,7 @@ impl BlockCollection { } #[doc = "*Required features: 'UI_Xaml_Documents', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -1539,7 +1539,7 @@ impl ContentLinkProviderCollection { } #[doc = "*Required features: 'UI_Xaml_Documents', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -1548,7 +1548,7 @@ impl ContentLinkProviderCollection { } #[doc = "*Required features: 'UI_Xaml_Documents', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -4224,7 +4224,7 @@ impl InlineCollection { } #[doc = "*Required features: 'UI_Xaml_Documents', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -4233,7 +4233,7 @@ impl InlineCollection { } #[doc = "*Required features: 'UI_Xaml_Documents', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } diff --git a/crates/libs/windows/src/Windows/UI/Xaml/Hosting/impl.rs b/crates/libs/windows/src/Windows/UI/Xaml/Hosting/impl.rs index 36aa098da8..5d6f1627f6 100644 --- a/crates/libs/windows/src/Windows/UI/Xaml/Hosting/impl.rs +++ b/crates/libs/windows/src/Windows/UI/Xaml/Hosting/impl.rs @@ -9,7 +9,7 @@ impl IXamlUIPresenterHost_Vtbl { unsafe extern "system" fn ResolveFileResource(this: *mut ::core::ffi::c_void, path: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).ResolveFileResource(&*(&path as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).ResolveFileResource(::core::mem::transmute(&path)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -67,11 +67,7 @@ impl IXamlUIPresenterHost3_Vtbl { unsafe extern "system" fn ResolveDictionaryResource(this: *mut ::core::ffi::c_void, dictionary: ::windows::core::RawPtr, dictionarykey: *mut ::core::ffi::c_void, suggestedvalue: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).ResolveDictionaryResource( - &*(&dictionary as *const ::Abi as *const ::DefaultType), - &*(&dictionarykey as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), - &*(&suggestedvalue as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), - ) { + match (*this).ResolveDictionaryResource(::core::mem::transmute(&dictionary), ::core::mem::transmute(&dictionarykey), ::core::mem::transmute(&suggestedvalue)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/UI/Xaml/Input/impl.rs b/crates/libs/windows/src/Windows/UI/Xaml/Input/impl.rs index 309102ad2f..e46dbba9d7 100644 --- a/crates/libs/windows/src/Windows/UI/Xaml/Input/impl.rs +++ b/crates/libs/windows/src/Windows/UI/Xaml/Input/impl.rs @@ -15,7 +15,7 @@ impl ICommand_Vtbl { unsafe extern "system" fn CanExecuteChanged(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CanExecuteChanged(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).CanExecuteChanged(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -27,12 +27,12 @@ impl ICommand_Vtbl { unsafe extern "system" fn RemoveCanExecuteChanged(this: *mut ::core::ffi::c_void, token: super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveCanExecuteChanged(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveCanExecuteChanged(::core::mem::transmute(&token)).into() } unsafe extern "system" fn CanExecute(this: *mut ::core::ffi::c_void, parameter: *mut ::core::ffi::c_void, result__: *mut bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CanExecute(&*(¶meter as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)) { + match (*this).CanExecute(::core::mem::transmute(¶meter)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -44,7 +44,7 @@ impl ICommand_Vtbl { unsafe extern "system" fn Execute(this: *mut ::core::ffi::c_void, parameter: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).Execute(&*(¶meter as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)).into() + (*this).Execute(::core::mem::transmute(¶meter)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), diff --git a/crates/libs/windows/src/Windows/UI/Xaml/Input/mod.rs b/crates/libs/windows/src/Windows/UI/Xaml/Input/mod.rs index 5e83fddb07..c10c3a10d5 100644 --- a/crates/libs/windows/src/Windows/UI/Xaml/Input/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Xaml/Input/mod.rs @@ -763,7 +763,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for DoubleTappedEventHandler { @@ -1966,7 +1966,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for HoldingEventHandler { @@ -4143,7 +4143,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for KeyEventHandler { @@ -4974,7 +4974,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for ManipulationCompletedEventHandler { @@ -5217,7 +5217,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for ManipulationDeltaEventHandler { @@ -5474,7 +5474,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for ManipulationInertiaStartingEventHandler { @@ -5940,7 +5940,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for ManipulationStartedEventHandler { @@ -6184,7 +6184,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for ManipulationStartingEventHandler { @@ -6642,7 +6642,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for PointerEventHandler { @@ -6973,7 +6973,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for RightTappedEventHandler { @@ -7425,7 +7425,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for TappedEventHandler { diff --git a/crates/libs/windows/src/Windows/UI/Xaml/Interop/impl.rs b/crates/libs/windows/src/Windows/UI/Xaml/Interop/impl.rs index ce919ef1d6..60e400e39c 100644 --- a/crates/libs/windows/src/Windows/UI/Xaml/Interop/impl.rs +++ b/crates/libs/windows/src/Windows/UI/Xaml/Interop/impl.rs @@ -96,7 +96,7 @@ impl IBindableObservableVector_Vtbl { unsafe extern "system" fn VectorChanged(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).VectorChanged(&*(&handler as *const ::Abi as *const ::DefaultType)) { + match (*this).VectorChanged(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -108,7 +108,7 @@ impl IBindableObservableVector_Vtbl { unsafe extern "system" fn RemoveVectorChanged(this: *mut ::core::ffi::c_void, token: super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveVectorChanged(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveVectorChanged(::core::mem::transmute(&token)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -176,7 +176,7 @@ impl IBindableVector_Vtbl { unsafe extern "system" fn IndexOf(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void, index: *mut u32, result__: *mut bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).IndexOf(&*(&value as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), ::core::mem::transmute_copy(&index)) { + match (*this).IndexOf(::core::mem::transmute(&value), ::core::mem::transmute_copy(&index)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -188,12 +188,12 @@ impl IBindableVector_Vtbl { unsafe extern "system" fn SetAt(this: *mut ::core::ffi::c_void, index: u32, value: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetAt(index, &*(&value as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetAt(index, ::core::mem::transmute(&value)).into() } unsafe extern "system" fn InsertAt(this: *mut ::core::ffi::c_void, index: u32, value: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).InsertAt(index, &*(&value as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)).into() + (*this).InsertAt(index, ::core::mem::transmute(&value)).into() } unsafe extern "system" fn RemoveAt(this: *mut ::core::ffi::c_void, index: u32) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -203,7 +203,7 @@ impl IBindableVector_Vtbl { unsafe extern "system" fn Append(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).Append(&*(&value as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)).into() + (*this).Append(::core::mem::transmute(&value)).into() } unsafe extern "system" fn RemoveAtEnd(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -270,7 +270,7 @@ impl IBindableVectorView_Vtbl { unsafe extern "system" fn IndexOf(this: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void, index: *mut u32, result__: *mut bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).IndexOf(&*(&value as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), ::core::mem::transmute_copy(&index)) { + match (*this).IndexOf(::core::mem::transmute(&value), ::core::mem::transmute_copy(&index)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -305,7 +305,7 @@ impl INotifyCollectionChanged_Vtbl { unsafe extern "system" fn CollectionChanged(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CollectionChanged(&*(&handler as *const ::Abi as *const ::DefaultType)) { + match (*this).CollectionChanged(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -317,7 +317,7 @@ impl INotifyCollectionChanged_Vtbl { unsafe extern "system" fn RemoveCollectionChanged(this: *mut ::core::ffi::c_void, token: super::super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveCollectionChanged(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveCollectionChanged(::core::mem::transmute(&token)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), diff --git a/crates/libs/windows/src/Windows/UI/Xaml/Interop/mod.rs b/crates/libs/windows/src/Windows/UI/Xaml/Interop/mod.rs index af41f083b2..0d25dfa004 100644 --- a/crates/libs/windows/src/Windows/UI/Xaml/Interop/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Xaml/Interop/mod.rs @@ -45,7 +45,7 @@ impl, &::core::optio } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, vector: ::windows::core::RawPtr, e: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&vector as *const ::Abi as *const ::DefaultType), &*(&e as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&vector), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for BindableVectorChangedEventHandler { @@ -1115,7 +1115,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for NotifyCollectionChangedEventHandler { diff --git a/crates/libs/windows/src/Windows/UI/Xaml/Markup/impl.rs b/crates/libs/windows/src/Windows/UI/Xaml/Markup/impl.rs index 82c0b23ac6..7f7a1978d1 100644 --- a/crates/libs/windows/src/Windows/UI/Xaml/Markup/impl.rs +++ b/crates/libs/windows/src/Windows/UI/Xaml/Markup/impl.rs @@ -9,7 +9,7 @@ impl IComponentConnector_Vtbl { unsafe extern "system" fn Connect(this: *mut ::core::ffi::c_void, connectionid: i32, target: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).Connect(connectionid, &*(&target as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)).into() + (*this).Connect(connectionid, ::core::mem::transmute(&target)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), Connect: Connect:: } } @@ -28,7 +28,7 @@ impl IComponentConnector2_Vtbl { unsafe extern "system" fn GetBindingConnector(this: *mut ::core::ffi::c_void, connectionid: i32, target: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetBindingConnector(connectionid, &*(&target as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)) { + match (*this).GetBindingConnector(connectionid, ::core::mem::transmute(&target)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -63,7 +63,7 @@ impl IDataTemplateComponent_Vtbl { unsafe extern "system" fn ProcessBindings(this: *mut ::core::ffi::c_void, item: *mut ::core::ffi::c_void, itemindex: i32, phase: i32, nextphase: *mut i32) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).ProcessBindings(&*(&item as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), itemindex, phase, ::core::mem::transmute_copy(&nextphase)).into() + (*this).ProcessBindings(::core::mem::transmute(&item), itemindex, phase, ::core::mem::transmute_copy(&nextphase)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -213,7 +213,7 @@ impl IXamlMember_Vtbl { unsafe extern "system" fn GetValue(this: *mut ::core::ffi::c_void, instance: *mut ::core::ffi::c_void, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetValue(&*(&instance as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)) { + match (*this).GetValue(::core::mem::transmute(&instance)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -225,7 +225,7 @@ impl IXamlMember_Vtbl { unsafe extern "system" fn SetValue(this: *mut ::core::ffi::c_void, instance: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetValue(&*(&instance as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&value as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetValue(::core::mem::transmute(&instance), ::core::mem::transmute(&value)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -259,7 +259,7 @@ impl IXamlMetadataProvider_Vtbl { unsafe extern "system" fn GetXamlType(this: *mut ::core::ffi::c_void, r#type: ::core::mem::ManuallyDrop, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetXamlType(&*(&r#type as *const ::Abi as *const ::DefaultType)) { + match (*this).GetXamlType(::core::mem::transmute(&r#type)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -271,7 +271,7 @@ impl IXamlMetadataProvider_Vtbl { unsafe extern "system" fn GetXamlTypeByFullName(this: *mut ::core::ffi::c_void, fullname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetXamlTypeByFullName(&*(&fullname as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).GetXamlTypeByFullName(::core::mem::transmute(&fullname)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -491,7 +491,7 @@ impl IXamlType_Vtbl { unsafe extern "system" fn CreateFromString(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CreateFromString(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).CreateFromString(::core::mem::transmute(&value)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -503,7 +503,7 @@ impl IXamlType_Vtbl { unsafe extern "system" fn GetMember(this: *mut ::core::ffi::c_void, name: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetMember(&*(&name as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).GetMember(::core::mem::transmute(&name)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -515,18 +515,12 @@ impl IXamlType_Vtbl { unsafe extern "system" fn AddToVector(this: *mut ::core::ffi::c_void, instance: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).AddToVector(&*(&instance as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&value as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType)).into() + (*this).AddToVector(::core::mem::transmute(&instance), ::core::mem::transmute(&value)).into() } unsafe extern "system" fn AddToMap(this: *mut ::core::ffi::c_void, instance: *mut ::core::ffi::c_void, key: *mut ::core::ffi::c_void, value: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this) - .AddToMap( - &*(&instance as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), - &*(&key as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), - &*(&value as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), - ) - .into() + (*this).AddToMap(::core::mem::transmute(&instance), ::core::mem::transmute(&key), ::core::mem::transmute(&value)).into() } unsafe extern "system" fn RunInitializer(this: *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; diff --git a/crates/libs/windows/src/Windows/UI/Xaml/Media/Animation/impl.rs b/crates/libs/windows/src/Windows/UI/Xaml/Media/Animation/impl.rs index 78bc90675c..f2b9c45842 100644 --- a/crates/libs/windows/src/Windows/UI/Xaml/Media/Animation/impl.rs +++ b/crates/libs/windows/src/Windows/UI/Xaml/Media/Animation/impl.rs @@ -24,7 +24,7 @@ impl INavigationTransitionInfoOverrides_Vtbl { unsafe extern "system" fn SetNavigationStateCore(this: *mut ::core::ffi::c_void, navigationstate: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetNavigationStateCore(&*(&navigationstate as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetNavigationStateCore(::core::mem::transmute(&navigationstate)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), diff --git a/crates/libs/windows/src/Windows/UI/Xaml/Media/Animation/mod.rs b/crates/libs/windows/src/Windows/UI/Xaml/Media/Animation/mod.rs index 9cd31f91b5..b6891fd01a 100644 --- a/crates/libs/windows/src/Windows/UI/Xaml/Media/Animation/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Xaml/Media/Animation/mod.rs @@ -1462,7 +1462,7 @@ impl ColorKeyFrameCollection { } #[doc = "*Required features: 'UI_Xaml_Media_Animation', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -1471,7 +1471,7 @@ impl ColorKeyFrameCollection { } #[doc = "*Required features: 'UI_Xaml_Media_Animation', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -3872,7 +3872,7 @@ impl DoubleKeyFrameCollection { } #[doc = "*Required features: 'UI_Xaml_Media_Animation', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -3881,7 +3881,7 @@ impl DoubleKeyFrameCollection { } #[doc = "*Required features: 'UI_Xaml_Media_Animation', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -10633,7 +10633,7 @@ impl ObjectKeyFrameCollection { } #[doc = "*Required features: 'UI_Xaml_Media_Animation', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -10642,7 +10642,7 @@ impl ObjectKeyFrameCollection { } #[doc = "*Required features: 'UI_Xaml_Media_Animation', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -11570,7 +11570,7 @@ impl PointKeyFrameCollection { } #[doc = "*Required features: 'UI_Xaml_Media_Animation', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -11579,7 +11579,7 @@ impl PointKeyFrameCollection { } #[doc = "*Required features: 'UI_Xaml_Media_Animation', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -16177,7 +16177,7 @@ impl TimelineCollection { } #[doc = "*Required features: 'UI_Xaml_Media_Animation', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -16186,7 +16186,7 @@ impl TimelineCollection { } #[doc = "*Required features: 'UI_Xaml_Media_Animation', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -16532,7 +16532,7 @@ impl TransitionCollection { } #[doc = "*Required features: 'UI_Xaml_Media_Animation', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -16541,7 +16541,7 @@ impl TransitionCollection { } #[doc = "*Required features: 'UI_Xaml_Media_Animation', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } diff --git a/crates/libs/windows/src/Windows/UI/Xaml/Media/Imaging/impl.rs b/crates/libs/windows/src/Windows/UI/Xaml/Media/Imaging/impl.rs index 8f4ed94aee..33b714158b 100644 --- a/crates/libs/windows/src/Windows/UI/Xaml/Media/Imaging/impl.rs +++ b/crates/libs/windows/src/Windows/UI/Xaml/Media/Imaging/impl.rs @@ -14,7 +14,7 @@ impl IXamlRenderingBackgroundTaskOverrides_Vtbl { unsafe extern "system" fn OnRun(this: *mut ::core::ffi::c_void, taskinstance: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnRun(&*(&taskinstance as *const ::Abi as *const ::DefaultType)).into() + (*this).OnRun(::core::mem::transmute(&taskinstance)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), diff --git a/crates/libs/windows/src/Windows/UI/Xaml/Media/Imaging/mod.rs b/crates/libs/windows/src/Windows/UI/Xaml/Media/Imaging/mod.rs index 58dd252a13..7881cd1bc9 100644 --- a/crates/libs/windows/src/Windows/UI/Xaml/Media/Imaging/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Xaml/Media/Imaging/mod.rs @@ -763,7 +763,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for DownloadProgressEventHandler { diff --git a/crates/libs/windows/src/Windows/UI/Xaml/Media/impl.rs b/crates/libs/windows/src/Windows/UI/Xaml/Media/impl.rs index 4f61968b15..4e3763688b 100644 --- a/crates/libs/windows/src/Windows/UI/Xaml/Media/impl.rs +++ b/crates/libs/windows/src/Windows/UI/Xaml/Media/impl.rs @@ -14,7 +14,7 @@ impl IBrushOverrides2_Vtbl { unsafe extern "system" fn PopulatePropertyInfoOverride(this: *mut ::core::ffi::c_void, propertyname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, animationpropertyinfo: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).PopulatePropertyInfoOverride(&*(&propertyname as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), &*(&animationpropertyinfo as *const ::Abi as *const ::DefaultType)).into() + (*this).PopulatePropertyInfoOverride(::core::mem::transmute(&propertyname), ::core::mem::transmute(&animationpropertyinfo)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -53,7 +53,7 @@ impl IGeneralTransformOverrides_Vtbl { unsafe extern "system" fn TryTransformCore(this: *mut ::core::ffi::c_void, inpoint: super::super::super::Foundation::Point, outpoint: *mut super::super::super::Foundation::Point, result__: *mut bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).TryTransformCore(&*(&inpoint as *const ::Abi as *const ::DefaultType), ::core::mem::transmute_copy(&outpoint)) { + match (*this).TryTransformCore(::core::mem::transmute(&inpoint), ::core::mem::transmute_copy(&outpoint)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -65,7 +65,7 @@ impl IGeneralTransformOverrides_Vtbl { unsafe extern "system" fn TransformBoundsCore(this: *mut ::core::ffi::c_void, rect: super::super::super::Foundation::Rect, result__: *mut super::super::super::Foundation::Rect) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).TransformBoundsCore(&*(&rect as *const ::Abi as *const ::DefaultType)) { + match (*this).TransformBoundsCore(::core::mem::transmute(&rect)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -147,12 +147,12 @@ impl IXamlLightOverrides_Vtbl { unsafe extern "system" fn OnConnected(this: *mut ::core::ffi::c_void, newelement: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnConnected(&*(&newelement as *const ::Abi as *const ::DefaultType)).into() + (*this).OnConnected(::core::mem::transmute(&newelement)).into() } unsafe extern "system" fn OnDisconnected(this: *mut ::core::ffi::c_void, oldelement: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnDisconnected(&*(&oldelement as *const ::Abi as *const ::DefaultType)).into() + (*this).OnDisconnected(::core::mem::transmute(&oldelement)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), diff --git a/crates/libs/windows/src/Windows/UI/Xaml/Media/mod.rs b/crates/libs/windows/src/Windows/UI/Xaml/Media/mod.rs index 6618a6ad05..7660195118 100644 --- a/crates/libs/windows/src/Windows/UI/Xaml/Media/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Xaml/Media/mod.rs @@ -1322,7 +1322,7 @@ impl BrushCollection { } #[doc = "*Required features: 'UI_Xaml_Media', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -1331,7 +1331,7 @@ impl BrushCollection { } #[doc = "*Required features: 'UI_Xaml_Media', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -2190,7 +2190,7 @@ impl DoubleCollection { } #[doc = "*Required features: 'UI_Xaml_Media', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [f64]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -2199,7 +2199,7 @@ impl DoubleCollection { } #[doc = "*Required features: 'UI_Xaml_Media', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[f64]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -3123,7 +3123,7 @@ impl GeometryCollection { } #[doc = "*Required features: 'UI_Xaml_Media', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -3132,7 +3132,7 @@ impl GeometryCollection { } #[doc = "*Required features: 'UI_Xaml_Media', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -3958,7 +3958,7 @@ impl GradientStopCollection { } #[doc = "*Required features: 'UI_Xaml_Media', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -3967,7 +3967,7 @@ impl GradientStopCollection { } #[doc = "*Required features: 'UI_Xaml_Media', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -8551,7 +8551,7 @@ impl PathFigureCollection { } #[doc = "*Required features: 'UI_Xaml_Media', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -8560,7 +8560,7 @@ impl PathFigureCollection { } #[doc = "*Required features: 'UI_Xaml_Media', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -9073,7 +9073,7 @@ impl PathSegmentCollection { } #[doc = "*Required features: 'UI_Xaml_Media', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -9082,7 +9082,7 @@ impl PathSegmentCollection { } #[doc = "*Required features: 'UI_Xaml_Media', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -9786,7 +9786,7 @@ impl PointCollection { } #[doc = "*Required features: 'UI_Xaml_Media', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [super::super::super::Foundation::Point]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -9795,7 +9795,7 @@ impl PointCollection { } #[doc = "*Required features: 'UI_Xaml_Media', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[super::super::super::Foundation::Point]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -10801,7 +10801,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for RateChangedRoutedEventHandler { @@ -13526,7 +13526,7 @@ impl TimelineMarkerCollection { } #[doc = "*Required features: 'UI_Xaml_Media', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -13535,7 +13535,7 @@ impl TimelineMarkerCollection { } #[doc = "*Required features: 'UI_Xaml_Media', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -13852,7 +13852,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for TimelineMarkerRoutedEventHandler { @@ -14092,7 +14092,7 @@ impl TransformCollection { } #[doc = "*Required features: 'UI_Xaml_Media', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -14101,7 +14101,7 @@ impl TransformCollection { } #[doc = "*Required features: 'UI_Xaml_Media', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } diff --git a/crates/libs/windows/src/Windows/UI/Xaml/Navigation/mod.rs b/crates/libs/windows/src/Windows/UI/Xaml/Navigation/mod.rs index 9539ebe953..5624dd51ef 100644 --- a/crates/libs/windows/src/Windows/UI/Xaml/Navigation/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Xaml/Navigation/mod.rs @@ -349,7 +349,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for LoadCompletedEventHandler { @@ -427,7 +427,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for NavigatedEventHandler { @@ -625,7 +625,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for NavigatingCancelEventHandler { @@ -970,7 +970,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for NavigationFailedEventHandler { @@ -1083,7 +1083,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for NavigationStoppedEventHandler { diff --git a/crates/libs/windows/src/Windows/UI/Xaml/Printing/mod.rs b/crates/libs/windows/src/Windows/UI/Xaml/Printing/mod.rs index 07a8c63bca..e20d05e003 100644 --- a/crates/libs/windows/src/Windows/UI/Xaml/Printing/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Xaml/Printing/mod.rs @@ -134,7 +134,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for AddPagesEventHandler { @@ -300,7 +300,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for GetPreviewPageEventHandler { @@ -592,7 +592,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for PaginateEventHandler { diff --git a/crates/libs/windows/src/Windows/UI/Xaml/Resources/impl.rs b/crates/libs/windows/src/Windows/UI/Xaml/Resources/impl.rs index bd4319f4ee..408183e4d8 100644 --- a/crates/libs/windows/src/Windows/UI/Xaml/Resources/impl.rs +++ b/crates/libs/windows/src/Windows/UI/Xaml/Resources/impl.rs @@ -9,12 +9,7 @@ impl ICustomXamlResourceLoaderOverrides_Vtbl { unsafe extern "system" fn GetResource(this: *mut ::core::ffi::c_void, resourceid: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, objecttype: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, propertyname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, propertytype: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut *mut ::core::ffi::c_void) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetResource( - &*(&resourceid as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), - &*(&objecttype as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), - &*(&propertyname as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), - &*(&propertytype as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), - ) { + match (*this).GetResource(::core::mem::transmute(&resourceid), ::core::mem::transmute(&objecttype), ::core::mem::transmute(&propertyname), ::core::mem::transmute(&propertytype)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/UI/Xaml/impl.rs b/crates/libs/windows/src/Windows/UI/Xaml/impl.rs index a1611a57bc..b124086c6e 100644 --- a/crates/libs/windows/src/Windows/UI/Xaml/impl.rs +++ b/crates/libs/windows/src/Windows/UI/Xaml/impl.rs @@ -38,47 +38,47 @@ impl IApplicationOverrides_Vtbl { unsafe extern "system" fn OnActivated(this: *mut ::core::ffi::c_void, args: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnActivated(&*(&args as *const ::Abi as *const ::DefaultType)).into() + (*this).OnActivated(::core::mem::transmute(&args)).into() } unsafe extern "system" fn OnLaunched(this: *mut ::core::ffi::c_void, args: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnLaunched(&*(&args as *const ::Abi as *const ::DefaultType)).into() + (*this).OnLaunched(::core::mem::transmute(&args)).into() } unsafe extern "system" fn OnFileActivated(this: *mut ::core::ffi::c_void, args: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnFileActivated(&*(&args as *const ::Abi as *const ::DefaultType)).into() + (*this).OnFileActivated(::core::mem::transmute(&args)).into() } unsafe extern "system" fn OnSearchActivated(this: *mut ::core::ffi::c_void, args: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnSearchActivated(&*(&args as *const ::Abi as *const ::DefaultType)).into() + (*this).OnSearchActivated(::core::mem::transmute(&args)).into() } unsafe extern "system" fn OnShareTargetActivated(this: *mut ::core::ffi::c_void, args: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnShareTargetActivated(&*(&args as *const ::Abi as *const ::DefaultType)).into() + (*this).OnShareTargetActivated(::core::mem::transmute(&args)).into() } unsafe extern "system" fn OnFileOpenPickerActivated(this: *mut ::core::ffi::c_void, args: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnFileOpenPickerActivated(&*(&args as *const ::Abi as *const ::DefaultType)).into() + (*this).OnFileOpenPickerActivated(::core::mem::transmute(&args)).into() } unsafe extern "system" fn OnFileSavePickerActivated(this: *mut ::core::ffi::c_void, args: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnFileSavePickerActivated(&*(&args as *const ::Abi as *const ::DefaultType)).into() + (*this).OnFileSavePickerActivated(::core::mem::transmute(&args)).into() } unsafe extern "system" fn OnCachedFileUpdaterActivated(this: *mut ::core::ffi::c_void, args: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnCachedFileUpdaterActivated(&*(&args as *const ::Abi as *const ::DefaultType)).into() + (*this).OnCachedFileUpdaterActivated(::core::mem::transmute(&args)).into() } unsafe extern "system" fn OnWindowCreated(this: *mut ::core::ffi::c_void, args: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnWindowCreated(&*(&args as *const ::Abi as *const ::DefaultType)).into() + (*this).OnWindowCreated(::core::mem::transmute(&args)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -113,7 +113,7 @@ impl IApplicationOverrides2_Vtbl { unsafe extern "system" fn OnBackgroundActivated(this: *mut ::core::ffi::c_void, args: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnBackgroundActivated(&*(&args as *const ::Abi as *const ::DefaultType)).into() + (*this).OnBackgroundActivated(::core::mem::transmute(&args)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -157,7 +157,7 @@ impl IDataTemplateExtension_Vtbl { unsafe extern "system" fn ProcessBindings(this: *mut ::core::ffi::c_void, arg: ::windows::core::RawPtr, result__: *mut i32) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).ProcessBindings(&*(&arg as *const ::Abi as *const ::DefaultType)) { + match (*this).ProcessBindings(::core::mem::transmute(&arg)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -189,7 +189,7 @@ impl IElementFactory_Vtbl { unsafe extern "system" fn GetElement(this: *mut ::core::ffi::c_void, args: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GetElement(&*(&args as *const ::Abi as *const ::DefaultType)) { + match (*this).GetElement(::core::mem::transmute(&args)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -201,7 +201,7 @@ impl IElementFactory_Vtbl { unsafe extern "system" fn RecycleElement(this: *mut ::core::ffi::c_void, args: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RecycleElement(&*(&args as *const ::Abi as *const ::DefaultType)).into() + (*this).RecycleElement(::core::mem::transmute(&args)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -231,7 +231,7 @@ impl IFrameworkElementOverrides_Vtbl { unsafe extern "system" fn MeasureOverride(this: *mut ::core::ffi::c_void, availablesize: super::super::Foundation::Size, result__: *mut super::super::Foundation::Size) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).MeasureOverride(&*(&availablesize as *const ::Abi as *const ::DefaultType)) { + match (*this).MeasureOverride(::core::mem::transmute(&availablesize)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -243,7 +243,7 @@ impl IFrameworkElementOverrides_Vtbl { unsafe extern "system" fn ArrangeOverride(this: *mut ::core::ffi::c_void, finalsize: super::super::Foundation::Size, result__: *mut super::super::Foundation::Size) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).ArrangeOverride(&*(&finalsize as *const ::Abi as *const ::DefaultType)) { + match (*this).ArrangeOverride(::core::mem::transmute(&finalsize)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -279,7 +279,7 @@ impl IFrameworkElementOverrides2_Vtbl { unsafe extern "system" fn GoToElementStateCore(this: *mut ::core::ffi::c_void, statename: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, usetransitions: bool, result__: *mut bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GoToElementStateCore(&*(&statename as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), usetransitions) { + match (*this).GoToElementStateCore(::core::mem::transmute(&statename), usetransitions) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -332,7 +332,7 @@ impl IUIElementOverrides_Vtbl { unsafe extern "system" fn FindSubElementsForTouchTargeting(this: *mut ::core::ffi::c_void, point: super::super::Foundation::Point, boundingrect: super::super::Foundation::Rect, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).FindSubElementsForTouchTargeting(&*(&point as *const ::Abi as *const ::DefaultType), &*(&boundingrect as *const ::Abi as *const ::DefaultType)) { + match (*this).FindSubElementsForTouchTargeting(::core::mem::transmute(&point), ::core::mem::transmute(&boundingrect)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -381,7 +381,7 @@ impl IUIElementOverrides7_Vtbl { unsafe extern "system" fn OnProcessKeyboardAccelerators(this: *mut ::core::ffi::c_void, args: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnProcessKeyboardAccelerators(&*(&args as *const ::Abi as *const ::DefaultType)).into() + (*this).OnProcessKeyboardAccelerators(::core::mem::transmute(&args)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -412,12 +412,12 @@ impl IUIElementOverrides8_Vtbl { unsafe extern "system" fn OnKeyboardAcceleratorInvoked(this: *mut ::core::ffi::c_void, args: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnKeyboardAcceleratorInvoked(&*(&args as *const ::Abi as *const ::DefaultType)).into() + (*this).OnKeyboardAcceleratorInvoked(::core::mem::transmute(&args)).into() } unsafe extern "system" fn OnBringIntoViewRequested(this: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).OnBringIntoViewRequested(&*(&e as *const ::Abi as *const ::DefaultType)).into() + (*this).OnBringIntoViewRequested(::core::mem::transmute(&e)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -445,7 +445,7 @@ impl IUIElementOverrides9_Vtbl { unsafe extern "system" fn PopulatePropertyInfoOverride(this: *mut ::core::ffi::c_void, propertyname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, animationpropertyinfo: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).PopulatePropertyInfoOverride(&*(&propertyname as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), &*(&animationpropertyinfo as *const ::Abi as *const ::DefaultType)).into() + (*this).PopulatePropertyInfoOverride(::core::mem::transmute(&propertyname), ::core::mem::transmute(&animationpropertyinfo)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -470,14 +470,7 @@ impl IVisualStateManagerOverrides_Vtbl { unsafe extern "system" fn GoToStateCore(this: *mut ::core::ffi::c_void, control: ::windows::core::RawPtr, templateroot: ::windows::core::RawPtr, statename: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, group: ::windows::core::RawPtr, state: ::windows::core::RawPtr, usetransitions: bool, result__: *mut bool) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).GoToStateCore( - &*(&control as *const ::Abi as *const ::DefaultType), - &*(&templateroot as *const ::Abi as *const ::DefaultType), - &*(&statename as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), - &*(&group as *const ::Abi as *const ::DefaultType), - &*(&state as *const ::Abi as *const ::DefaultType), - usetransitions, - ) { + match (*this).GoToStateCore(::core::mem::transmute(&control), ::core::mem::transmute(&templateroot), ::core::mem::transmute(&statename), ::core::mem::transmute(&group), ::core::mem::transmute(&state), usetransitions) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/UI/Xaml/mod.rs b/crates/libs/windows/src/Windows/UI/Xaml/mod.rs index c77c398e6e..9e9a65e8bb 100644 --- a/crates/libs/windows/src/Windows/UI/Xaml/mod.rs +++ b/crates/libs/windows/src/Windows/UI/Xaml/mod.rs @@ -584,7 +584,7 @@ impl) } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, p: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&p as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&p)).into() } } impl ::core::clone::Clone for ApplicationInitializationCallback { @@ -952,7 +952,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for BindingFailedEventHandler { @@ -3162,7 +3162,7 @@ impl DependencyObjectCollection { } #[doc = "*Required features: 'UI_Xaml', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -3171,7 +3171,7 @@ impl DependencyObjectCollection { } #[doc = "*Required features: 'UI_Xaml', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -3540,7 +3540,7 @@ impl, &::core::option::Option } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: ::windows::core::RawPtr, dp: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const ::Abi as *const ::DefaultType), &*(&dp as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&dp)).into() } } impl ::core::clone::Clone for DependencyPropertyChangedCallback { @@ -3715,7 +3715,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for DependencyPropertyChangedEventHandler { @@ -4122,7 +4122,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for DragEventHandler { @@ -5720,7 +5720,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } #[cfg(feature = "ApplicationModel")] @@ -6051,7 +6051,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for ExceptionRoutedEventHandler { @@ -12134,7 +12134,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } #[cfg(feature = "ApplicationModel")] @@ -12496,7 +12496,7 @@ impl, &::core::option::Option } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, d: ::windows::core::RawPtr, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&d as *const ::Abi as *const ::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&d), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for PropertyChangedCallback { @@ -13487,7 +13487,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for RoutedEventHandler { @@ -14001,7 +14001,7 @@ impl SetterBaseCollection { } #[doc = "*Required features: 'UI_Xaml', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -14010,7 +14010,7 @@ impl SetterBaseCollection { } #[doc = "*Required features: 'UI_Xaml', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -14308,7 +14308,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for SizeChangedEventHandler { @@ -14906,7 +14906,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } #[cfg(feature = "ApplicationModel")] @@ -15561,7 +15561,7 @@ impl TriggerActionCollection { } #[doc = "*Required features: 'UI_Xaml', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -15570,7 +15570,7 @@ impl TriggerActionCollection { } #[doc = "*Required features: 'UI_Xaml', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -15909,7 +15909,7 @@ impl TriggerCollection { } #[doc = "*Required features: 'UI_Xaml', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -15918,7 +15918,7 @@ impl TriggerCollection { } #[doc = "*Required features: 'UI_Xaml', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = self; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -18375,7 +18375,7 @@ impl UIElementWeakCollection { } #[doc = "*Required features: 'UI_Xaml', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -18384,7 +18384,7 @@ impl UIElementWeakCollection { } #[doc = "*Required features: 'UI_Xaml', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -18678,7 +18678,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for UnhandledExceptionEventHandler { @@ -19268,7 +19268,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } impl ::core::clone::Clone for VisualStateChangedEventHandler { @@ -20088,7 +20088,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } #[cfg(feature = "UI_Core")] @@ -20181,7 +20181,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } #[cfg(feature = "UI_Core")] @@ -20355,7 +20355,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } #[cfg(feature = "UI_Core")] @@ -20448,7 +20448,7 @@ impl, &::core::o } unsafe extern "system" fn Invoke(this: *mut ::core::ffi::c_void, sender: *mut ::core::ffi::c_void, e: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = this as *mut ::windows::core::RawPtr as *mut Self; - ((*this).invoke)(&*(&sender as *const <::windows::core::IInspectable as ::windows::core::Abi>::Abi as *const <::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType), &*(&e as *const ::Abi as *const ::DefaultType)).into() + ((*this).invoke)(::core::mem::transmute(&sender), ::core::mem::transmute(&e)).into() } } #[cfg(feature = "UI_Core")] diff --git a/crates/libs/windows/src/Windows/Web/Http/Filters/impl.rs b/crates/libs/windows/src/Windows/Web/Http/Filters/impl.rs index c500776f2a..19928c33f4 100644 --- a/crates/libs/windows/src/Windows/Web/Http/Filters/impl.rs +++ b/crates/libs/windows/src/Windows/Web/Http/Filters/impl.rs @@ -12,7 +12,7 @@ impl IHttpFilter_Vtbl { unsafe extern "system" fn SendRequestAsync(this: *mut ::core::ffi::c_void, request: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).SendRequestAsync(&*(&request as *const ::Abi as *const ::DefaultType)) { + match (*this).SendRequestAsync(::core::mem::transmute(&request)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); 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 7f25c35870..7f6a8c7a04 100644 --- a/crates/libs/windows/src/Windows/Web/Http/Headers/mod.rs +++ b/crates/libs/windows/src/Windows/Web/Http/Headers/mod.rs @@ -168,7 +168,7 @@ impl HttpCacheDirectiveHeaderValueCollection { } #[doc = "*Required features: 'Web_Http_Headers', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -177,7 +177,7 @@ impl HttpCacheDirectiveHeaderValueCollection { } #[doc = "*Required features: 'Web_Http_Headers', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -624,7 +624,7 @@ impl HttpChallengeHeaderValueCollection { } #[doc = "*Required features: 'Web_Http_Headers', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -633,7 +633,7 @@ impl HttpChallengeHeaderValueCollection { } #[doc = "*Required features: 'Web_Http_Headers', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -1056,7 +1056,7 @@ impl HttpConnectionOptionHeaderValueCollection { } #[doc = "*Required features: 'Web_Http_Headers', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -1065,7 +1065,7 @@ impl HttpConnectionOptionHeaderValueCollection { } #[doc = "*Required features: 'Web_Http_Headers', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -1488,7 +1488,7 @@ impl HttpContentCodingHeaderValueCollection { } #[doc = "*Required features: 'Web_Http_Headers', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -1497,7 +1497,7 @@ impl HttpContentCodingHeaderValueCollection { } #[doc = "*Required features: 'Web_Http_Headers', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -1936,7 +1936,7 @@ impl HttpContentCodingWithQualityHeaderValueCollection { } #[doc = "*Required features: 'Web_Http_Headers', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -1945,7 +1945,7 @@ impl HttpContentCodingWithQualityHeaderValueCollection { } #[doc = "*Required features: 'Web_Http_Headers', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -3188,7 +3188,7 @@ impl HttpCookiePairHeaderValueCollection { } #[doc = "*Required features: 'Web_Http_Headers', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -3197,7 +3197,7 @@ impl HttpCookiePairHeaderValueCollection { } #[doc = "*Required features: 'Web_Http_Headers', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -3965,7 +3965,7 @@ impl HttpExpectationHeaderValueCollection { } #[doc = "*Required features: 'Web_Http_Headers', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -3974,7 +3974,7 @@ impl HttpExpectationHeaderValueCollection { } #[doc = "*Required features: 'Web_Http_Headers', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -4250,7 +4250,7 @@ impl HttpLanguageHeaderValueCollection { } #[doc = "*Required features: 'Web_Http_Headers', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -4259,7 +4259,7 @@ impl HttpLanguageHeaderValueCollection { } #[doc = "*Required features: 'Web_Http_Headers', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -4698,7 +4698,7 @@ impl HttpLanguageRangeWithQualityHeaderValueCollection { } #[doc = "*Required features: 'Web_Http_Headers', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -4707,7 +4707,7 @@ impl HttpLanguageRangeWithQualityHeaderValueCollection { } #[doc = "*Required features: 'Web_Http_Headers', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -5353,7 +5353,7 @@ impl HttpMediaTypeWithQualityHeaderValueCollection { } #[doc = "*Required features: 'Web_Http_Headers', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -5362,7 +5362,7 @@ impl HttpMediaTypeWithQualityHeaderValueCollection { } #[doc = "*Required features: 'Web_Http_Headers', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -5638,7 +5638,7 @@ impl HttpMethodHeaderValueCollection { } #[doc = "*Required features: 'Web_Http_Headers', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -5647,7 +5647,7 @@ impl HttpMethodHeaderValueCollection { } #[doc = "*Required features: 'Web_Http_Headers', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -6414,7 +6414,7 @@ impl HttpProductInfoHeaderValueCollection { } #[doc = "*Required features: 'Web_Http_Headers', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -6423,7 +6423,7 @@ impl HttpProductInfoHeaderValueCollection { } #[doc = "*Required features: 'Web_Http_Headers', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } @@ -7672,7 +7672,7 @@ impl HttpTransferCodingHeaderValueCollection { } #[doc = "*Required features: 'Web_Http_Headers', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = &::windows::core::Interface::cast::>(self)?; unsafe { let mut result__: u32 = ::core::mem::zeroed(); @@ -7681,7 +7681,7 @@ impl HttpTransferCodingHeaderValueCollection { } #[doc = "*Required features: 'Web_Http_Headers', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn ReplaceAll(&self, items: &[::DefaultType]) -> ::windows::core::Result<()> { + pub fn ReplaceAll(&self, items: &[::core::option::Option]) -> ::windows::core::Result<()> { let this = &::windows::core::Interface::cast::>(self)?; unsafe { (::windows::core::Interface::vtable(this).ReplaceAll)(::core::mem::transmute_copy(this), items.len() as u32, ::core::mem::transmute(items.as_ptr())).ok() } } diff --git a/crates/libs/windows/src/Windows/Web/Http/impl.rs b/crates/libs/windows/src/Windows/Web/Http/impl.rs index 0fd142952b..f458a02d42 100644 --- a/crates/libs/windows/src/Windows/Web/Http/impl.rs +++ b/crates/libs/windows/src/Windows/Web/Http/impl.rs @@ -90,7 +90,7 @@ impl IHttpContent_Vtbl { unsafe extern "system" fn WriteToStreamAsync(this: *mut ::core::ffi::c_void, outputstream: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).WriteToStreamAsync(&*(&outputstream as *const ::Abi as *const ::DefaultType)) { + match (*this).WriteToStreamAsync(::core::mem::transmute(&outputstream)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); diff --git a/crates/libs/windows/src/Windows/Web/Http/mod.rs b/crates/libs/windows/src/Windows/Web/Http/mod.rs index f8c608ca93..facacf5417 100644 --- a/crates/libs/windows/src/Windows/Web/Http/mod.rs +++ b/crates/libs/windows/src/Windows/Web/Http/mod.rs @@ -874,7 +874,7 @@ impl HttpCookieCollection { } #[doc = "*Required features: 'Web_Http', 'Foundation_Collections'*"] #[cfg(feature = "Foundation_Collections")] - pub fn GetMany(&self, startindex: u32, items: &mut [::DefaultType]) -> ::windows::core::Result { + pub fn GetMany(&self, startindex: u32, items: &mut [::core::option::Option]) -> ::windows::core::Result { let this = self; unsafe { let mut result__: u32 = ::core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Web/Syndication/impl.rs b/crates/libs/windows/src/Windows/Web/Syndication/impl.rs index 55477784de..19fe1241ee 100644 --- a/crates/libs/windows/src/Windows/Web/Syndication/impl.rs +++ b/crates/libs/windows/src/Windows/Web/Syndication/impl.rs @@ -35,7 +35,7 @@ impl ISyndicationClient_Vtbl { unsafe extern "system" fn SetServerCredential(this: *mut ::core::ffi::c_void, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetServerCredential(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetServerCredential(::core::mem::transmute(&value)).into() } unsafe extern "system" fn ProxyCredential(this: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -52,7 +52,7 @@ impl ISyndicationClient_Vtbl { unsafe extern "system" fn SetProxyCredential(this: *mut ::core::ffi::c_void, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetProxyCredential(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetProxyCredential(::core::mem::transmute(&value)).into() } unsafe extern "system" fn MaxResponseBufferSize(this: *mut ::core::ffi::c_void, result__: *mut u32) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -108,12 +108,12 @@ impl ISyndicationClient_Vtbl { unsafe extern "system" fn SetRequestHeader(this: *mut ::core::ffi::c_void, name: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetRequestHeader(&*(&name as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), &*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetRequestHeader(::core::mem::transmute(&name), ::core::mem::transmute(&value)).into() } unsafe extern "system" fn RetrieveFeedAsync(this: *mut ::core::ffi::c_void, uri: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).RetrieveFeedAsync(&*(&uri as *const ::Abi as *const ::DefaultType)) { + match (*this).RetrieveFeedAsync(::core::mem::transmute(&uri)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -180,7 +180,7 @@ impl ISyndicationNode_Vtbl { unsafe extern "system" fn SetNodeName(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetNodeName(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetNodeName(::core::mem::transmute(&value)).into() } unsafe extern "system" fn NodeNamespace(this: *mut ::core::ffi::c_void, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -197,7 +197,7 @@ impl ISyndicationNode_Vtbl { unsafe extern "system" fn SetNodeNamespace(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetNodeNamespace(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetNodeNamespace(::core::mem::transmute(&value)).into() } unsafe extern "system" fn NodeValue(this: *mut ::core::ffi::c_void, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -214,7 +214,7 @@ impl ISyndicationNode_Vtbl { unsafe extern "system" fn SetNodeValue(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetNodeValue(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetNodeValue(::core::mem::transmute(&value)).into() } unsafe extern "system" fn Language(this: *mut ::core::ffi::c_void, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -231,7 +231,7 @@ impl ISyndicationNode_Vtbl { unsafe extern "system" fn SetLanguage(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetLanguage(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetLanguage(::core::mem::transmute(&value)).into() } unsafe extern "system" fn BaseUri(this: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -248,7 +248,7 @@ impl ISyndicationNode_Vtbl { unsafe extern "system" fn SetBaseUri(this: *mut ::core::ffi::c_void, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetBaseUri(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetBaseUri(::core::mem::transmute(&value)).into() } unsafe extern "system" fn AttributeExtensions(this: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -338,7 +338,7 @@ impl ISyndicationText_Vtbl { unsafe extern "system" fn SetText(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetText(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetText(::core::mem::transmute(&value)).into() } unsafe extern "system" fn Type(this: *mut ::core::ffi::c_void, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -355,7 +355,7 @@ impl ISyndicationText_Vtbl { unsafe extern "system" fn SetType(this: *mut ::core::ffi::c_void, value: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetType(&*(&value as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).SetType(::core::mem::transmute(&value)).into() } unsafe extern "system" fn Xml(this: *mut ::core::ffi::c_void, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -372,7 +372,7 @@ impl ISyndicationText_Vtbl { unsafe extern "system" fn SetXml(this: *mut ::core::ffi::c_void, value: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetXml(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetXml(::core::mem::transmute(&value)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Web/UI/impl.rs b/crates/libs/windows/src/Windows/Web/UI/impl.rs index 474dfce62d..c81ecba4b1 100644 --- a/crates/libs/windows/src/Windows/Web/UI/impl.rs +++ b/crates/libs/windows/src/Windows/Web/UI/impl.rs @@ -80,7 +80,7 @@ impl IWebViewControl_Vtbl { unsafe extern "system" fn SetSource(this: *mut ::core::ffi::c_void, source: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetSource(&*(&source as *const ::Abi as *const ::DefaultType)).into() + (*this).SetSource(::core::mem::transmute(&source)).into() } unsafe extern "system" fn DocumentTitle(this: *mut ::core::ffi::c_void, result__: *mut ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -121,7 +121,7 @@ impl IWebViewControl_Vtbl { unsafe extern "system" fn SetDefaultBackgroundColor(this: *mut ::core::ffi::c_void, value: super::super::UI::Color) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).SetDefaultBackgroundColor(&*(&value as *const ::Abi as *const ::DefaultType)).into() + (*this).SetDefaultBackgroundColor(::core::mem::transmute(&value)).into() } unsafe extern "system" fn DefaultBackgroundColor(this: *mut ::core::ffi::c_void, result__: *mut super::super::UI::Color) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; @@ -194,27 +194,27 @@ impl IWebViewControl_Vtbl { unsafe extern "system" fn Navigate(this: *mut ::core::ffi::c_void, source: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).Navigate(&*(&source as *const ::Abi as *const ::DefaultType)).into() + (*this).Navigate(::core::mem::transmute(&source)).into() } unsafe extern "system" fn NavigateToString(this: *mut ::core::ffi::c_void, text: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).NavigateToString(&*(&text as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).NavigateToString(::core::mem::transmute(&text)).into() } unsafe extern "system" fn NavigateToLocalStreamUri(this: *mut ::core::ffi::c_void, source: ::windows::core::RawPtr, streamresolver: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).NavigateToLocalStreamUri(&*(&source as *const ::Abi as *const ::DefaultType), &*(&streamresolver as *const ::Abi as *const ::DefaultType)).into() + (*this).NavigateToLocalStreamUri(::core::mem::transmute(&source), ::core::mem::transmute(&streamresolver)).into() } unsafe extern "system" fn NavigateWithHttpRequestMessage(this: *mut ::core::ffi::c_void, requestmessage: ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).NavigateWithHttpRequestMessage(&*(&requestmessage as *const ::Abi as *const ::DefaultType)).into() + (*this).NavigateWithHttpRequestMessage(::core::mem::transmute(&requestmessage)).into() } unsafe extern "system" fn InvokeScriptAsync(this: *mut ::core::ffi::c_void, scriptname: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, arguments: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).InvokeScriptAsync(&*(&scriptname as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), &*(&arguments as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).InvokeScriptAsync(::core::mem::transmute(&scriptname), ::core::mem::transmute(&arguments)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -226,7 +226,7 @@ impl IWebViewControl_Vtbl { unsafe extern "system" fn CapturePreviewToStreamAsync(this: *mut ::core::ffi::c_void, stream: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).CapturePreviewToStreamAsync(&*(&stream as *const ::Abi as *const ::DefaultType)) { + match (*this).CapturePreviewToStreamAsync(::core::mem::transmute(&stream)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -250,7 +250,7 @@ impl IWebViewControl_Vtbl { unsafe extern "system" fn BuildLocalStreamUri(this: *mut ::core::ffi::c_void, contentidentifier: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, relativepath: ::core::mem::ManuallyDrop<::windows::core::HSTRING>, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).BuildLocalStreamUri(&*(&contentidentifier as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType), &*(&relativepath as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)) { + match (*this).BuildLocalStreamUri(::core::mem::transmute(&contentidentifier), ::core::mem::transmute(&relativepath)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -267,7 +267,7 @@ impl IWebViewControl_Vtbl { unsafe extern "system" fn NavigationStarting(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).NavigationStarting(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).NavigationStarting(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -279,12 +279,12 @@ impl IWebViewControl_Vtbl { unsafe extern "system" fn RemoveNavigationStarting(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveNavigationStarting(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveNavigationStarting(::core::mem::transmute(&token)).into() } unsafe extern "system" fn ContentLoading(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).ContentLoading(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).ContentLoading(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -296,12 +296,12 @@ impl IWebViewControl_Vtbl { unsafe extern "system" fn RemoveContentLoading(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveContentLoading(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveContentLoading(::core::mem::transmute(&token)).into() } unsafe extern "system" fn DOMContentLoaded(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).DOMContentLoaded(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).DOMContentLoaded(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -313,12 +313,12 @@ impl IWebViewControl_Vtbl { unsafe extern "system" fn RemoveDOMContentLoaded(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveDOMContentLoaded(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveDOMContentLoaded(::core::mem::transmute(&token)).into() } unsafe extern "system" fn NavigationCompleted(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).NavigationCompleted(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).NavigationCompleted(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -330,12 +330,12 @@ impl IWebViewControl_Vtbl { unsafe extern "system" fn RemoveNavigationCompleted(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveNavigationCompleted(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveNavigationCompleted(::core::mem::transmute(&token)).into() } unsafe extern "system" fn FrameNavigationStarting(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).FrameNavigationStarting(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).FrameNavigationStarting(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -347,12 +347,12 @@ impl IWebViewControl_Vtbl { unsafe extern "system" fn RemoveFrameNavigationStarting(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveFrameNavigationStarting(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveFrameNavigationStarting(::core::mem::transmute(&token)).into() } unsafe extern "system" fn FrameContentLoading(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).FrameContentLoading(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).FrameContentLoading(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -364,12 +364,12 @@ impl IWebViewControl_Vtbl { unsafe extern "system" fn RemoveFrameContentLoading(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveFrameContentLoading(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveFrameContentLoading(::core::mem::transmute(&token)).into() } unsafe extern "system" fn FrameDOMContentLoaded(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).FrameDOMContentLoaded(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).FrameDOMContentLoaded(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -381,12 +381,12 @@ impl IWebViewControl_Vtbl { unsafe extern "system" fn RemoveFrameDOMContentLoaded(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveFrameDOMContentLoaded(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveFrameDOMContentLoaded(::core::mem::transmute(&token)).into() } unsafe extern "system" fn FrameNavigationCompleted(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).FrameNavigationCompleted(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).FrameNavigationCompleted(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -398,12 +398,12 @@ impl IWebViewControl_Vtbl { unsafe extern "system" fn RemoveFrameNavigationCompleted(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveFrameNavigationCompleted(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveFrameNavigationCompleted(::core::mem::transmute(&token)).into() } unsafe extern "system" fn ScriptNotify(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).ScriptNotify(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).ScriptNotify(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -415,12 +415,12 @@ impl IWebViewControl_Vtbl { unsafe extern "system" fn RemoveScriptNotify(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveScriptNotify(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveScriptNotify(::core::mem::transmute(&token)).into() } unsafe extern "system" fn LongRunningScriptDetected(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).LongRunningScriptDetected(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).LongRunningScriptDetected(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -432,12 +432,12 @@ impl IWebViewControl_Vtbl { unsafe extern "system" fn RemoveLongRunningScriptDetected(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveLongRunningScriptDetected(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveLongRunningScriptDetected(::core::mem::transmute(&token)).into() } unsafe extern "system" fn UnsafeContentWarningDisplaying(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).UnsafeContentWarningDisplaying(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).UnsafeContentWarningDisplaying(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -449,12 +449,12 @@ impl IWebViewControl_Vtbl { unsafe extern "system" fn RemoveUnsafeContentWarningDisplaying(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveUnsafeContentWarningDisplaying(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveUnsafeContentWarningDisplaying(::core::mem::transmute(&token)).into() } unsafe extern "system" fn UnviewableContentIdentified(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).UnviewableContentIdentified(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).UnviewableContentIdentified(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -466,12 +466,12 @@ impl IWebViewControl_Vtbl { unsafe extern "system" fn RemoveUnviewableContentIdentified(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveUnviewableContentIdentified(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveUnviewableContentIdentified(::core::mem::transmute(&token)).into() } unsafe extern "system" fn PermissionRequested(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).PermissionRequested(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).PermissionRequested(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -483,12 +483,12 @@ impl IWebViewControl_Vtbl { unsafe extern "system" fn RemovePermissionRequested(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemovePermissionRequested(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemovePermissionRequested(::core::mem::transmute(&token)).into() } unsafe extern "system" fn UnsupportedUriSchemeIdentified(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).UnsupportedUriSchemeIdentified(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).UnsupportedUriSchemeIdentified(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -500,12 +500,12 @@ impl IWebViewControl_Vtbl { unsafe extern "system" fn RemoveUnsupportedUriSchemeIdentified(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveUnsupportedUriSchemeIdentified(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveUnsupportedUriSchemeIdentified(::core::mem::transmute(&token)).into() } unsafe extern "system" fn NewWindowRequested(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).NewWindowRequested(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).NewWindowRequested(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -517,12 +517,12 @@ impl IWebViewControl_Vtbl { unsafe extern "system" fn RemoveNewWindowRequested(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveNewWindowRequested(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveNewWindowRequested(::core::mem::transmute(&token)).into() } unsafe extern "system" fn ContainsFullScreenElementChanged(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).ContainsFullScreenElementChanged(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).ContainsFullScreenElementChanged(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -534,12 +534,12 @@ impl IWebViewControl_Vtbl { unsafe extern "system" fn RemoveContainsFullScreenElementChanged(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveContainsFullScreenElementChanged(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveContainsFullScreenElementChanged(::core::mem::transmute(&token)).into() } unsafe extern "system" fn WebResourceRequested(this: *mut ::core::ffi::c_void, handler: ::windows::core::RawPtr, result__: *mut super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).WebResourceRequested(&*(&handler as *const as ::windows::core::Abi>::Abi as *const as ::windows::core::DefaultType>::DefaultType)) { + match (*this).WebResourceRequested(::core::mem::transmute(&handler)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); @@ -551,7 +551,7 @@ impl IWebViewControl_Vtbl { unsafe extern "system" fn RemoveWebResourceRequested(this: *mut ::core::ffi::c_void, token: super::super::Foundation::EventRegistrationToken) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).RemoveWebResourceRequested(&*(&token as *const ::Abi as *const ::DefaultType)).into() + (*this).RemoveWebResourceRequested(::core::mem::transmute(&token)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), @@ -629,7 +629,7 @@ impl IWebViewControl2_Vtbl { unsafe extern "system" fn AddInitializeScript(this: *mut ::core::ffi::c_void, script: ::core::mem::ManuallyDrop<::windows::core::HSTRING>) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - (*this).AddInitializeScript(&*(&script as *const <::windows::core::HSTRING as ::windows::core::Abi>::Abi as *const <::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType)).into() + (*this).AddInitializeScript(::core::mem::transmute(&script)).into() } Self { base: ::windows::core::IInspectableVtbl::new::(), diff --git a/crates/libs/windows/src/Windows/Web/impl.rs b/crates/libs/windows/src/Windows/Web/impl.rs index 8e3443c002..e8448202a1 100644 --- a/crates/libs/windows/src/Windows/Web/impl.rs +++ b/crates/libs/windows/src/Windows/Web/impl.rs @@ -12,7 +12,7 @@ impl IUriToStreamResolver_Vtbl { unsafe extern "system" fn UriToStreamAsync(this: *mut ::core::ffi::c_void, uri: ::windows::core::RawPtr, result__: *mut ::windows::core::RawPtr) -> ::windows::core::HRESULT { let this = (this as *mut ::windows::core::RawPtr).offset(OFFSET) as *mut Identity; let this = (*this).get_impl() as *mut Impl; - match (*this).UriToStreamAsync(&*(&uri as *const ::Abi as *const ::DefaultType)) { + match (*this).UriToStreamAsync(::core::mem::transmute(&uri)) { ::core::result::Result::Ok(ok__) => { *result__ = ::core::mem::transmute_copy(&ok__); ::core::mem::forget(ok__); diff --git a/crates/libs/windows/src/core/bindings.rs b/crates/libs/windows/src/core/bindings.rs index d206d01002..0055681208 100644 --- a/crates/libs/windows/src/core/bindings.rs +++ b/crates/libs/windows/src/core/bindings.rs @@ -829,115 +829,115 @@ impl PropertyValue { (::windows::core::Interface::vtable(this).CreateRect)(::core::mem::transmute_copy(this), value.into_param().abi(), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } - pub fn CreateUInt8Array(value: &[::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateUInt8Array(value: &[u8]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateUInt8Array)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } - pub fn CreateInt16Array(value: &[::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateInt16Array(value: &[i16]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateInt16Array)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } - pub fn CreateUInt16Array(value: &[::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateUInt16Array(value: &[u16]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateUInt16Array)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } - pub fn CreateInt32Array(value: &[::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateInt32Array(value: &[i32]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateInt32Array)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } - pub fn CreateUInt32Array(value: &[::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateUInt32Array(value: &[u32]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateUInt32Array)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } - pub fn CreateInt64Array(value: &[::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateInt64Array(value: &[i64]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateInt64Array)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } - pub fn CreateUInt64Array(value: &[::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateUInt64Array(value: &[u64]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateUInt64Array)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } - pub fn CreateSingleArray(value: &[::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateSingleArray(value: &[f32]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateSingleArray)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } - pub fn CreateDoubleArray(value: &[::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateDoubleArray(value: &[f64]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateDoubleArray)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } - pub fn CreateChar16Array(value: &[::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateChar16Array(value: &[u16]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateChar16Array)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } - pub fn CreateBooleanArray(value: &[::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateBooleanArray(value: &[bool]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateBooleanArray)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } - pub fn CreateStringArray(value: &[<::windows::core::HSTRING as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateStringArray(value: &[::windows::core::HSTRING]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateStringArray)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } - pub fn CreateInspectableArray(value: &[<::windows::core::IInspectable as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateInspectableArray(value: &[::core::option::Option<::windows::core::IInspectable>]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateInspectableArray)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } - pub fn CreateGuidArray(value: &[<::windows::core::GUID as ::windows::core::DefaultType>::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateGuidArray(value: &[::windows::core::GUID]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateGuidArray)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } - pub fn CreateDateTimeArray(value: &[::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateDateTimeArray(value: &[DateTime]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateDateTimeArray)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } - pub fn CreateTimeSpanArray(value: &[::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateTimeSpanArray(value: &[TimeSpan]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateTimeSpanArray)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } - pub fn CreatePointArray(value: &[::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreatePointArray(value: &[Point]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreatePointArray)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } - pub fn CreateSizeArray(value: &[::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateSizeArray(value: &[Size]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateSizeArray)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__) }) } - pub fn CreateRectArray(value: &[::DefaultType]) -> ::windows::core::Result<::windows::core::IInspectable> { + pub fn CreateRectArray(value: &[Rect]) -> ::windows::core::Result<::windows::core::IInspectable> { Self::IPropertyValueStatics(|this| unsafe { let mut result__: *mut ::core::ffi::c_void = ::core::mem::zeroed(); (::windows::core::Interface::vtable(this).CreateRectArray)(::core::mem::transmute_copy(this), value.len() as u32, ::core::mem::transmute(value.as_ptr()), &mut result__).from_abi::<::windows::core::IInspectable>(result__)